pixel-react 1.21.79 → 1.21.80

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/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 vm(){if(am)return im;am=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return im=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 a,o,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 a=Object(arguments[s]))t.call(a,c)&&(l[c]=a[c]);if(e){o=e(a);for(var d=0;d<o.length;d++)n.call(a,o[d])&&(l[o[d]]=a[o[d]])}}return l},im}function ym(){if(lm)return om;lm=1;return om="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function wm(){return cm?sm:(cm=1,sm=Function.call.bind(Object.prototype.hasOwnProperty))}function bm(){if(um)return dm;um=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ym(),n={},r=wm();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,a,o,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")+": "+o+" 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](a,c,l,o,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+o+" `"+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 "+o+" type: "+d.message+(null!=f?f:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},dm=i}function Em(){if(hm)return fm;hm=1;var e=gm(),t=vm(),n=ym(),r=wm(),i=bm(),a=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),fm=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:C(o),arrayOf:function(e){return C(function(t,r,i,a,o){if("function"!=typeof e)return new h("Property `"+o+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+a+" `"+o+"` of type `"+g(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,a,o+"["+s+"]",n);if(c instanceof Error)return c}return null})},element:C(function(e,t,n,r,i){var a=e[t];return l(a)?null:new h("Invalid "+r+" `"+i+"` of type `"+g(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:C(function(t,n,r,i,a){var o=t[n];return e.isValidElementType(o)?null:new h("Invalid "+i+" `"+a+"` of type `"+g(o)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return C(function(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||d;return new h("Invalid "+i+" `"+a+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+o+"`.")}var l;return null})},node:C(function(e,t,n,r,i){return A(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return C(function(t,i,a,o,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var s=t[i],c=g(s);if("object"!==c)return new h("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,a,o,l+"."+d,n);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(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."),o;return C(function(t,n,r,i,a){for(var o=t[n],l=0;l<e.length;l++)if(f(o,e[l]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new h("Invalid "+i+" `"+a+"` of value `"+String(o)+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),o}return C(function(t,i,a,o,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,a,o,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+o+" `"+l+"` supplied to `"+a+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return C(function(t,r,i,a,o){var l=t[r],s=g(l);if("object"!==s)return new h("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(i,a,o,c,v(d));var u=d(l,c,i,a,o+"."+c,n);if(u)return u}return null})},exact:function(e){return C(function(i,a,o,l,s){var c=i[a],d=g(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+o+"`, expected `object`.");var u=t({},i[a],e);for(var f in u){var C=e[f];if(r(e,f)&&"function"!=typeof C)return m(o,l,s,f,v(C));if(!C)return new h("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(i[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=C(c,f,o,l,s+"."+f,n);if(p)return p}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 C(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,o,l,c,u,f,C){if(c=c||d,f=f||l,C!==n){if(s){var p=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 p.name="Invariant Violation",p}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(a("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==o[l]?i?null===o[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(o,l,c,u,f)}var o=i.bind(null,!1);return o.isRequired=i.bind(null,!0),o}function p(e){return C(function(t,n,r,i,a,o){var l=t[n];return g(l)!==e?new h("Invalid "+i+" `"+a+"` of type `"+v(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 A(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(A);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(!A(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!A(i[1]))return!1}return!0;default:return!1}}function g(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 v(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=v(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},fm}function Mm(){if(pm)return Cm;pm=1;var e=ym();function t(){}function n(){}return n.resetWarningCache=t,Cm=function(){function r(t,n,r,i,a,o){if(o!==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 a={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 a.PropTypes=a,a}}function Lm(){if(mm)return $p.exports;if(mm=1,"production"!==process.env.NODE_ENV){var e=gm();$p.exports=Em()(e.isElement,true)}else $p.exports=Mm()();return $p.exports}var Hm=S(Lm()),xm=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Vm(){return Vm=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},Vm.apply(this,arguments)}function km(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sm(e,t){return Sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sm(e,t)}var Zm,Om,zm=function(e){var t,n;function i(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(km(t)),t.handleErrored=t.handleErrored.bind(km(t)),t.handleChange=t.handleChange.bind(km(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(km(t)),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Sm(t,n);var a=i.prototype;return a.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},a.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},a.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},a.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},a.executeAsync=function(){var e=this;return new Promise(function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()})},a.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},a.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},a.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},a.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},a.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},a.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())},a.componentDidMount=function(){this.explicitRender()},a.componentDidUpdate=function(){this.explicitRender()},a.handleRecaptchaRef=function(e){this.captcha=e},a.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xm);return r.createElement("div",Vm({},t,{ref:this.handleRecaptchaRef}))},i}(r.Component);zm.displayName="ReCAPTCHA",zm.propTypes={sitekey:Hm.string.isRequired,onChange:Hm.func,grecaptcha:Hm.object,theme:Hm.oneOf(["dark","light"]),type:Hm.oneOf(["image","audio"]),tabindex:Hm.number,onExpired:Hm.func,onErrored:Hm.func,size:Hm.oneOf(["compact","normal","invisible"]),stoken:Hm.string,hl:Hm.string,badge:Hm.oneOf(["bottomright","bottomleft","inline"]),isolated:Hm.bool},zm.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Nm=function(){if(Om)return Zm;Om=1;var e=gm(),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 a(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 o=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,u=Object.prototype;return Zm=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 C=a(t),p=a(r),m=0;m<h.length;++m){var A=h[m];if(!(n[A]||i&&i[A]||p&&p[A]||C&&C[A])){var g=c(r,A);try{o(t,A,g)}catch(e){}}}}return t},Zm}(),Im=S(Nm);function Tm(){return Tm=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},Tm.apply(this,arguments)}var Dm={},Fm=0;var Rm="onloadcallback";function Pm(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}var Bm=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",i=function(r){var i,a;function o(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}a=r,(i=o).prototype=Object.create(a.prototype),i.prototype.constructor=i,i.__proto__=a;var l=o.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Fm++),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=Dm[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,a=i.globalName,o=i.callbackName,l=i.scriptId;if(a&&void 0!==window[a]&&(Dm[n]={loaded:!0,observers:{}}),Dm[n]){var s=Dm[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)},Dm[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(Dm[n]){var t=Dm[n].observers;for(var r in t)e(t[r])&&delete t[r]}};o&&"undefined"!=typeof window&&(window[o]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=Dm[n];e&&(e.loaded=!0,f(function(t){return!o&&(t(e),!0)}))},d.onerror=function(){var e=Dm[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=Dm[e];i&&(delete i.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete Dm[e])},l.render=function(){var e=t.globalName,r=this.props;r.asyncScriptOnLoad;var i=r.forwardedRef,a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(a[e]=void 0!==window[e]?window[e]:void 0),a.ref=i,m(n,a)},o}(E),o=a(function(e,t){return m(i,Tm({},e,{forwardedRef:t}))});return o.displayName="AsyncScriptLoader("+r+")",o.propTypes={asyncScriptOnLoad:Hm.func},Im(o,n)}}(function(){var e=Pm(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Rm+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Rm+"&render=explicit"},{callbackName:Rm,globalName:"grecaptcha",attributes:Pm().nonce?{nonce:Pm().nonce}:{}})(zm);const jm=Bm,_m=a(({onVerify:t,className:r="",error:i,sitekey:a,...o},l)=>{const[s,d]=c(null),u=i||s;return n("div",{className:I("ff-recaptcha-wrapper",r),role:"group","aria-label":"Captcha verification",children:[e(jm,{ref:l,sitekey:a,onChange:e=>{e?(d(null),t(e)):d("Please complete the CAPTCHA")},...o}),u&&e("div",{className:"ff-recaptcha-error",role:"alert","aria-live":"assertive",children:e(U,{fontSize:12,children:u})})]})}),qm={margin:6,optionHeight:32,selectInputHeight:38,dropDownWrapperPadding:0},Um=({onSelectBlur:r,onSelectOptionSelector:i,dropdownPosition:a,options:s=[],optionZIndex:u=100,inputRef:f,webServiceClick:h=()=>{},accessibilityClick:C=()=>{},containerWidth:p,loadMoreOptions:m,chipRef:A,isWebservice:g=!0,isAccessibility:v=!1,dropDownMessage:y=""})=>{const[w,b]=c(null),[E,M]=c(""),L=d(Q),H=L?.currentTheme,x=o(null),[V,k]=c(-1);J(x,r,[f,A]);const{positionX:S,positionY:Z,width:O,fromBottom:z}=a,{margin:N,optionHeight:T,selectInputHeight:D,dropDownWrapperPadding:F}=qm,R=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}},P=({platform:n,nlpType:r})=>"NLP"===r?e(q,"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}:"Desktop"===n?{name:"local",height:10,width:10}:{name:"common_nlp",height:10,width:10}):"WORKBENCH_REQUEST"===r&&"Webservice"===n?e(q,{name:"web_service_icon",height:8,width:8}):e(t,{});Sn(["ff-nlp-dropdown-pagination"],{root:document.getElementById("ff-nlp-dropdown-options-wrapper"),rootMargin:"0px",threshold:.1,onIntersect:(e,t)=>{e.isIntersecting&&m&&m()}}),l(()=>{if(V>=0&&V<s.length){const e=s[V];b(e),M("show")}else V>=s.length&&(b(null),M(""),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":V>=0&&s[V]&&i(s[V])}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,V]),l(()=>{if(V<0)return;const e=document.getElementById(`ff-nlp-option-${V}`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})},[V]),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 B=e=>e?.searchName||e?.displayName||e?.desc||e?.name||e?.nlpName||"---";return e("section",{className:"ff-nlp-dropdown-wrapper","aria-label":"NLP dropdown",children:n("div",{ref:x,style:{...(()=>{let e;return e=K(s)||s.length>0?5*T+2*F:s.length*T+2*F,z>e+N+80?{left:S,top:Z,width:O,zIndex:u}:{zIndex:u,left:S,width:O,top:Z-D-92-e-N}})(),width:p},className:I("ff-nlp-options-wrapper",H),onMouseLeave:()=>M("hide"),"aria-label":"NLP options panel",children:[n("div",{className:"ff-nlp-options-wrapper-main",children:[e("div",{className:"ff-nlp-options-primary-wrapper",id:"ff-nlp-dropdown-options-wrapper","aria-label":"NLP options list",children:K(s)?e(U,{textAlign:"center",lineHeight:"32px",as:"p",color:"var(--ff-nlp-text-color)",className:"ff-nlp-no-option",children:K(y)?"No Results Found":y}):n(t,{children:[s.map((t,r)=>e("div",{onMouseEnter:()=>{b(t),M("show")},id:`ff-nlp-option-${r}`,"aria-selected":V===r,"aria-label":String(B(t)),children:e("div",{onMouseEnter:()=>k(r),onClick:()=>i(t),onKeyDown:e=>{"Enter"===e.key&&i(t)},children:n(U,{as:"div",lineHeight:"30px",fontSize:12,className:I("ff-nlp-option",H,{"ff-nlp-option--selected":V===r}),children:[e(Y,{title:t.platform,children:e("span",{children:e(U,{className:`nlp-categories ${R(t.nlpType).className}`,fontWeight:"regular",fontSize:8,lineHeight:"32px",children:R(t.nlpType).label})})}),e("span",{children:P(t)}),B(t)]})})},`ff-nlp-option-${r}`)),e("div",{id:"ff-nlp-dropdown-pagination"})]})}),n("div",{className:I("show"===E?"ff-nlp-web-service-div":"ff-nlp-primary-web-service-div",{"ff-nlp-web-service-div--gap":v}),"aria-label":"NLP quick actions",children:[g&&e(Zp,{iconName:"plus_user_icon",label:"Web Service",onClick:()=>{r(),h()}}),v&&e(Zp,{iconName:"plus_user_icon",label:"Accessibility",onClick:()=>{r(),C()}})]})]}),e("div",{className:"show"===E?"ff-nlp-data-show":"ff-nlp-data-hide","aria-label":"NLP details panel",children:n("div",{className:"ff-nlp-data-side-menu","aria-label":"NLP selected option details",children:[w?.videoSrc&&n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:10,children:["Video",e("div",{className:"nlp-details ",children:e("video",{src:w.videoSrc,controls:!0,className:"nlp-video-player",width:"100%","aria-label":"NLP preview video",children:"Your browser does not support the video tag."})})]}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["STEP_GROUP"===w?.nlpType?"Step Group Details":"NLP Details",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:B(w)})]}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Description",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:w?.description||"--"})]}),"STEP_GROUP"===w?.nlpType&&e(t,{children:n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Path",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:w?.path?w?.path:"---"})]})}),e(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:"Inputs"}),w?.stepInputs?.length?w.stepInputs.map((t,r)=>{const i=t.type?t?.type?.split(".")?.pop():"--";return e("div",{children:n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Input",r+1,n(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["type: ",i]}),n(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["name: ",t.name||"--"]})]})},r)}):e("div",{className:"nlp-details",children:"--"}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Output",e(U,{className:"nlp-details ",fontWeight:"regular",fontSize:12,children:w?.returnType||"--"})]})]})})]})})},Wm=a(({chipOptionList:t,selectedChips:r,optionZIndex:i=0,inputRef:a,ChipsAccordionWidth:s},d)=>{const[f,h]=c([]),[C,p]=c(!1),[m,A]=c({left:0,top:0}),[g,v]=c("down"),y=o(null);b(d,()=>y.current);const w=Sa(y,C);l(()=>{K(t)||h(t)},[t]);const E=o(null),M=()=>{E.current};l(()=>{M()},[f]),u(()=>{const e=()=>{if(!a?.current)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=w(a);v(r<160?"up":"down"),A({left:e+n,top:t})};e();const t=new ResizeObserver(()=>e());return a?.current&&t.observe(a.current),window.addEventListener("scroll",e,!0),()=>{a?.current&&t.unobserve(a.current),t.disconnect(),window.removeEventListener("scroll",e,!0)}},[w,a]);return l(()=>{const e=()=>{M()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),L(n("section",{className:"ff-chips-accordion",style:{left:m.left,top:m.top,zIndex:i+100,transform:"up"===g?"translateY(calc(-100% + 33px))":"none",width:s,position:"absolute"},ref:y,"aria-label":"Selected chips accordion",children:[e("div",{ref:E,className:"ff-chips-row "+(C?"expanded":""),style:{maxHeight:C?"280px":"20px"},"aria-label":"Chips list",children:e("div",{className:"chips-container "+(C?"chips-container-scroll":""),role:"list","aria-label":"Selectable chips",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),"aria-label":t,"aria-pressed":n,children:e(U,{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 "+(C?"expanded":""),role:"button","aria-expanded":C,"aria-label":C?"Collapse chips list":"Expand chips list",children:e(q,{name:"down"===g?"arrows_down_icon":"arrows_top_icon",height:8,width:8,onClick:()=>{p(e=>!e),C&&document.querySelector(".ff-chips-row")?.scrollTo({top:0})},"aria-label":C?"Collapse chips list":"Expand chips list"})})})]}),document.body)}),Xm=(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:a}=t.payload||{};return{...e,dropdownPosition:{positionX:n,positionY:r,width:i,fromBottom:a}};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}},Qm=({label:t="",leftIcon:r,rightIcon:i,rightIconColor:a,showLabel:s=!0,onHelpIconClick:d=()=>{},aiIconClick:f=()=>{},webServiceClick:h=()=>{},accessibilityClick:C=()=>{},containerWidth:p="",optionsList:m=[],selectedOption:A={displayName:"",projectId:"",nlpType:"",platform:""},onChange:g=()=>{},errorMsg:y="",className:w="",optionZIndex:b=100,disabled:E=!1,borderRadius:M=!0,showBorder:H=!0,required:x=!1,value:V="",onSelect:k=()=>{},chipOptionList:S,selectedChips:Z,loadMoreOptions:O=()=>{},isWebservice:z=!0,isAccessibility:N=!1,closeInputOnOutsideClick:T=()=>{},tooltipText:D="Help",ChipsAccordionWidth:F="27.8%",dropDownMessage:R=""})=>{const P={isInputFocused:!1,isIconClick:!1,showOptions:!1,option:K(A)&&"string"==typeof A?.displayName?A.displayName:"",dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}},[B,j]=v(Xm,P),[_,W]=c(A),[X,Q]=c({}),G=o(!1);l(()=>{const e="string"==typeof A.displayName?A.displayName:String(A.displayName??"");e!==_.displayName&&W({...A,displayName:e})},[A]),l(()=>{V&&oe("FOCUS_INPUT")},[V]);const Y=o(null),J=o(null),$=o(null),{isInputFocused:ee,isIconClick:te,showOptions:ne,dropdownPosition:re,option:ie}=B,ae=Sa(Y,ne),oe=e=>{E||j("SHOW_ERROR"===e||"BLUR_INPUT"===e?{type:e,payload:{option:"string"==typeof A.displayName?A.displayName:String(A.displayName??"")}}:{type:e})},le=()=>{if(!ne||!Y?.current||E)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=ae(Y);j({type:"UPDATE_DROPDOWN_POSITION",payload:{positionX:e,positionY:t,width:n,fromBottom:r}})},se=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;ne&&se(!ne),le();const e=()=>le();return window.addEventListener("resize",e),window.addEventListener("scroll",e),()=>{se(!0),window.removeEventListener("resize",e),window.removeEventListener("scroll",e)}},[ne]),l(()=>{y&&oe("SHOW_ERROR")},[]),l(()=>{oe("FOCUS_INPUT")},[]);const ce=!ee&&Boolean(ie);return l(()=>{const e=J.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=ne||S;return t.style.overflow=r?"hidden":n||"auto",()=>{t.style.overflow=n||"auto"}},[ne,S]),n("section",{className:"main-section","aria-label":"NLP input section",children:[n("div",{className:I(`ff-nlp-input-wrapper ${w}`),"aria-label":"NLP input wrapper",children:[n("div",{className:"ff-nlp-input","aria-label":"NLP input field",children:[e("input",{type:"text",className:I("ff-nlp-input-container",{"ff-nlp-input-container--default":!ee,"ff-nlp-input-container--active":ce,"ff-nlp-input-container--no-label":!s,"ff-nlp-input-container--error":y&&!ee&&!Boolean(ie),"ff-nlp-input-container--border-radius":!M,"ff-nlp-input-container--disable":E,"ff-nlp-input-container--no-border":!H}),style:{zIndex:b,paddingLeft:"32px"},onFocus:()=>oe("FOCUS_INPUT"),onChange:e=>{E||g(e)},value:V,disabled:E,autoComplete:"off",spellCheck:"false",ref:J,autoFocus:!0,"aria-label":t||"NLP input"}),n("div",{className:"ff-nlp-icon-container","aria-label":"AI search action",children:[e(q,{name:r||"ai_search",className:"ff-nlp-help_icon",width:16,height:16,onClick:f,"aria-label":"Search with AI"}),e(U,{className:"icon-label",fontSize:10,children:"Search With Ai"})]}),s&&n("div",{className:I("ff-nlp-input-label","ff-nlp-input-label--default",{"ff-nlp-input-label--active":V||Boolean(ie),"ff-nlp-input-label--error":y}),children:[x&&e(U,{color:"var(--$error-light)",className:"ff-nlp-input-label--required",children:"*"}),t]}),n("div",{className:"help-icon-container",onMouseDown:()=>G.current=!0,style:{zIndex:b},"aria-label":"Help action",children:[e("span",{className:I("ff-nlp-input-arrow",{"ff-nlp-input-arrow--down":!te,"ff-nlp-input-arrow--no-label":!s}),"aria-label":"Help tooltip trigger",onMouseEnter:e=>{const t=e.target.getBoundingClientRect();Q({top:t.top+window.scrollY-20+"px",left:`${t.left+window.scrollX+.5*t.width}px`,visibility:"visible",opacity:1,transitionDelay:"0s"})},onMouseLeave:()=>Q(e=>({...e,visibility:"hidden",opacity:0})),children:e(q,{name:i||"",height:16,width:16,onClick:d,color:a,"aria-label":"Help"})}),L(e(U,{className:"help-icon-label",fontSize:10,style:X,children:D}),document.body)]}),e("fieldset",{className:I("ff-nlp-input-fieldset",{"ff-nlp-input-fieldset--no-label":!s,"ff-nlp-input-fieldset--default":!ee,"ff-nlp-input-fieldset--active":ee,"ff-nlp-input-fieldset--option":ce,"ff-nlp-input-fieldset--error":y,"ff-nlp-input-fieldset--border-radius":!M,"ff-nlp-input-fieldset--no-border":!H}),"aria-label":t||"NLP input boundary"})]}),y&&e(U,{className:"ff-nlp-input-wrapper-error-text",fontSize:8,color:"var(--error-light)","aria-label":y,children:y}),e("div",{ref:Y,"aria-label":"NLP dropdown container",children:ne&&L(e(Um,{onSelectBlur:()=>{E||(G.current?G.current=!1:y?oe("SHOW_ERROR"):(oe("BLUR_INPUT"),T()))},onSelectOptionSelector:e=>{k(e)},dropdownPosition:re,options:m,optionZIndex:b,inputRef:J,webServiceClick:h,accessibilityClick:C,containerWidth:p,loadMoreOptions:O,chipRef:$,isWebservice:z,isAccessibility:N,dropDownMessage:R}),document.body)})]}),e("div",{className:"chips-accordion-content","aria-label":"Selected chips",children:S&&S.length>0&&e(Wm,{chipOptionList:S,selectedChips:Z,optionZIndex:b,ref:$,inputRef:J,ChipsAccordionWidth:F})})]})},Gm=({items:t,onButtonClick:r,selectedValue:i=null,onChange:a,className:o=""})=>{const[s,d]=c(i);l(()=>{i!==s&&d(i)},[i,s]);return n("div",{className:I("ff-icon-radio-group",o),role:"radiogroup","aria-label":"Icon selection group",children:[t?.map(t=>e("div",{className:I("ff-icon-radio-button",{selected:s===t.iconName,disabled:t.disabled}),onClick:()=>(e=>{if(e.disabled)return;const t=e.iconName;d(t),a&&a(t),r(e)})(t),role:"radio","aria-checked":s===t.iconName,"aria-label":t.iconLabel,"aria-disabled":t.disabled||void 0,children:e(Y,{title:t.iconLabel,children:e("div",{className:I("icon-container",{selected:s===t.iconName}),children:e(q,{name:t.iconName,hoverEffect:!1,color:s===t.iconName?"var(--drawer-footer-bg)":"var(--brand-color)"})})})},t.iconName)),e("div",{className:"line-connector"})]})},Km=({width:t="100%",options:r=[],runCount:i=0,className:a="",contentReverse:o=!1,onClick:l=()=>{},modalId:s="",scriptType:c="",readOnly:d=!1,isMissing:u=!1})=>{const f={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",microsoftedge:"edge",firefox:"fire_fox",chrome:"chrome_icon",explorer:"internet_explorer",ios:"mac_icon",comet:"comet_icon"},h="manual"===c.toLowerCase();return console.warn("Options list",r),n("section",{id:s,style:{width:t},className:I("ff-machine-input-field-wrapper",a,{"cursor-event-none":1!==i&&"Automation"==c}),role:"region","aria-label":"Machine input field",onClick:()=>{d||l()},children:[!h&&n(U,{as:"span",color:"var(--ff-machine-input-field-text-color)",fontSize:8,textAlign:"center",className:"ff-machine-input-label","aria-label":`Run ${i}`,children:["Run ",i]}),e("div",{className:I("ff-machine-input-field",{"ff-machine-input-field-reverse":o,"ff-machine-input-field-missing":u}),role:"list","aria-label":"Available machine options",children:r.map(({label:t,type:r,version:i,available:a})=>n("div",{className:I("ff-machine-icon-text-wrapper",{"ff-machine-icon-text-wrapper-reverse":o,show_border:!1===a}),role:"listitem","aria-label":t,children:[e(q,{name:f[r?.toLowerCase()]||"",className:"ff-machine-icon","aria-label":t}),e(Y,{title:t,children:e(U,{className:I("ff-machine-text",{"ff-machine-text-reverse":o}),color:"var(--ff-machine-input-field-text-color)","aria-label":t,children:xn(t,10)?Hn(t,10):t})}),h&&!K(i)&&e(Y,{title:i,children:n(U,{className:I("ff-machine-text",{"ff-machine-text-reverse":o}),color:"var(--ff-machine-input-field-text-color)","aria-label":i,children:[" -"," ",xn(i??"",10)?Hn(i??"",10):i]})})]},r))})]})};Km.displayName="MachineInputField";const Ym=({datSetToolTip:{globalVariableSetName:r="",peVariableSetName:i="",testDataSetName:a=""}})=>{const o={"Project Environment Set":i,"Global Variable Set":r,"Test Data Set":a};return e(t,{children:Object.entries(o).map(([t,r],i)=>e("div",{className:"ff-dataSetList-container",children:n("div",{children:[e(U,{as:"div",fontSize:10,lineHeight:"15px",color:"var(--details-page-value-color)",className:"ff-dataSetList-items",children:t}),e(U,{as:"div",lineHeight:"18px",color:"var(--base-bg-color)",children:r})]})},i))})},Jm=e=>"object"==typeof e&&0===Object.keys(e).length,$m=s(null),eA=({machineInstances:r,rowIndex:i,machineColumnCount:a,nextRowMachineInstance:o,previousRowMachineInstance:l,onAddBrowser:s,onDeleteBrowser:c,onAddRunBrowser:u,onUpdateDataSetList:f,onUpdateAddBrowserInstance:h,addInstanceLabel:C="",scriptType:p="",projectType:m="",readOnly:A,maxRunCount:g})=>{const v=i%2==0,y=K(r[a-1]),w=d($m),{testDataSetMap:b={},globalVariableMap:E={},projectVariableMap:M={}}=w||{},L=(e,t)=>e&&t&&"machineInstanceId"in e&&"machineInstanceId"in t&&e.machineInstanceId===t.machineInstanceId?"dashed":"solid",H=e=>r?.length-1!==e&&a>1,x=(e="",t)=>{const{executionEnv:n,browserName:r,browserVersion:i,machineInfo:{osVersion:a,iconName:o,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"===p?.toLowerCase()&&u.push({label:s||"",type:"local"===n?.toLowerCase()?"local":""});const f=[{label:a||"",type:o||l},{label:i,type:r}],h=c?.reduce((e,t)=>(t&&e?.push({label:t?.name,type:"manual"===p?.toLowerCase()?"android":t?.platform,version:"manual"===p?.toLowerCase()?t?.version:"",available:"boolean"==typeof t?.available?t?.available:""}),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[]}},V="manual"!==p?.toLowerCase(),k=e=>!K(e)||(Jm(e)||void 0!==o);return n("div",{className:I({"ff-connecting-branch-grid":v,"ff-connecting-branch-grid-reverse":!v}),style:{gridTemplateColumns:1===a?"24px minmax(min-content, auto) 24px":`24px minmax(min-content, auto) repeat(${a-1}, 40px minmax(min-content, auto)) 24px`},children:[n("div",{className:"ff-connecting-branch-start-wrapper",children:[e("div",{className:I({"ff-connecting-branch-arrow":v,"ff-connecting-branch-arrow-reverse":!v})}),e("div",{className:I({"ff-connecting-branch-container":v,"ff-connecting-branch-container-reverse":!v}),style:{border:`1px ${L(r[0],l)} var(--ff-connecting-branch-color)`,borderTop:"none",borderLeft:`${!v&&"none"}`,borderRight:`${v&&"none"}`}})]}),r?.map((i,a)=>{const{runCount:o=("runCount"in i?i.runCount:0),numberOfRuns:l=0,machineInstanceId:d="",peVariableSetId:y="",globalVariableSetId:w="",testDataSetId:S="",testDataSetName:Z="",peVariableSetName:O="",globalVariableSetName:z=""}=i;return n(t,{children:[K(i)?!A&&e("div",{className:"ff-connecting-branch-browser-button",children:e(W,{id:`ff-sequential-branch-add-${d}`,variant:"tertiary",label:C,iconName:"plus_icon",iconPosition:v?"left":"right",onClick:()=>{A||s(`ff-sequential-branch-add-${d}`)}})}):n("div",{children:[n("div",{className:"ff-connecting-branch-input-point-wrapper",children:[k(r[a+1])&&e("div",{className:I({"ff-connecting-branch-point":v,"ff-connecting-branch-point-reverse":!v})}),e(Km,{runCount:o,options:x(m,i),contentReverse:!v,modalId:`${d}-runCount-${o-1}`,onClick:()=>1==o||"Automation"!==p?h(`${d}-runCount-0`,i):null,scriptType:p,readOnly:A},Ai())]}),n("div",{className:I({"ff-connecting-branch-datalist":v,"ff-connecting-branch-datalist-reverse":!v}),children:[V&&n(t,{children:[e("div",{id:`ff-sequential-branch-dataset-${d}-${o}`,className:"ff-dataset-list-branch",onClick:()=>{A||f(`ff-sequential-branch-dataset-${d}-${o}`,{peVariableSetId:y,globalVariableSetId:w,testDataSetId:S,testDataSetName:Z,globalVariableSetName:z,peVariableSetName:O},!0,l,d)},children:n(Y,{placement:"bottom",title:e(t,{children:e(Ym,{datSetToolTip:{peVariableSetName:M[y]||"",globalVariableSetName:E[w]||"",testDataSetName:b[S]||""}})}),style:{display:"flex",alignItems:"center"},children:[e(q,{name:"datalist_icon",className:"ff-connecting-icon",hoverEffect:!0}),e(U,{className:"ff-connecting-text",color:"var(--ff-connecting-branch-color)",children:"Data Set List"})]})}),!A&&e(t,{children:e(Y,{placement:"bottom",title:l>=g?`Maximum ${g} runs are allowed.`:"",children:n("div",{className:"ff-environment-run-container",onClick:l>=g?void 0:()=>u(d),children:[e(q,{name:"plus_icon",className:"ff-connecting-run-icon",color:"var(--ff-connecting-branch-color)",hoverEffect:!0,disabled:l>=g}),e(U,{className:"ff-connecting-run-text",color:"var(--ff-connecting-branch-color)",style:{opacity:l>=g?.5:1},children:"Run"})]})})})]}),!A&&e(Y,{title:"Delete",children:e(q,{name:"delete",className:"ff-connecting-delete-icon",onClick:()=>c(d,o),color:"var(--ff-connecting-branch-delete-color)",hoverEffect:!0})})]})]}),H(a)&&e("div",{className:"ff-connecting-branch-middle-arrow",style:{borderTop:`1px ${L(i,r[a+1])} var(--ff-connecting-branch-color)`},children:e("div",{className:I({"ff-connecting-branch-arrow":v,"ff-connecting-branch-arrow-reverse":!v})})})]},Ai())}),(A?!y&&!K(o):!y)&&e("div",{className:I({"ff-connecting-branch-end-arrow":v,"ff-connecting-branch-end-arrow-reverse":!v}),style:{border:`1px ${L(r[a-1],o)} var(--ff-connecting-branch-color)`,borderBottom:"none",borderLeft:`${v&&"none"}`,borderRight:`${!v&&"none"}`}})]})},tA=({machineBranchInstances:n,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:a,onDeleteBrowser:o,onAddRunBrowser:s,onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f="",scriptType:h="",projectType:C="Web",readOnly:p=!1,maxRunCount:m})=>{const[A,g]=c(n);l(()=>{g(n)},[n]);const v=((e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(A,r);return e("div",{className:"ff-connecting-branch-grid-wrapper",children:v.map((n,l)=>e(t,{children:e(eA,{machineInstances:n,rowIndex:l,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:a,onDeleteBrowser:o,onAddRunBrowser:s,nextRowMachineInstance:v[l+1]?.[0],previousRowMachineInstance:v[l-1]?.[r-1],onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f,scriptType:h,projectType:C,readOnly:p,maxRunCount:m})},Ai()))})},nA=({machineInstances:r=[],machineColumnWidth:i=180,machineColumnCount:a=1,selectedMachine:s={},machineOptionsList:d=[],onHandleSelect:u=()=>{},onAddBrowserInstance:f=()=>{},onAddRunBrowserInstance:h=()=>{},onDeleteBrowserInstance:C=()=>{},onUpdateDataSetList:p=()=>{},onDeleteMachineInstance:m=()=>{},dataSetValues:A={testDataSetId:"",globalVariableSetId:"",peVariableSetId:"",globalVariableSetName:"",peVariableSetName:"",testDataSetName:""},onUpdateAddBrowserInstance:g=()=>{},addInstanceLabel:v="Environment",placeholder:y="Choose Machine",scriptType:w="Automation",projectType:b="Web",readOnly:E=!1,zIndex:M=99999,maxRunCount:L=35,environmentVariableMaps:H,isRequired:x=!1,showIcon:V=!1})=>{const[k,S]=c({}),Z=o(null),O=Math.max(a,1),z=Math.max(i,180),[N,T]=c([]),D=K(r);let F=K(s.value?.clientId);"Manual"===w&&(F=K(s.value));l(()=>{S(s)},[s]),l(()=>{T(E?r:[...r,{}])},[r]);const R="manual"!==w.toLowerCase(),P=(B=A,j="Id",Object.fromEntries(Object.entries(B).filter(([e])=>!e.includes(j))));var B,j;const _=E&&!D||!E&&D||!E&&!D;return e($m.Provider,{value:H,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(Za,{onChange:u,optionsList:d,label:y,required:x,showLabel:!0,className:"ff-sequential-select-branch",width:"240px",selectedOption:k,valueAccessor:"name",optionsRequired:!E,disableInput:E,optionZIndex:M,showIcon:V}),!F&&n("div",{className:I({"ff-select-branch-arrow":D,"ff-select-branch-arrow-down":!D}),children:[_&&e("div",{className:"ff-select-branch-point"}),n("div",{className:"ff-select-branch-arrow",children:[!E&&e("div",{className:"ff-branch-arrow-wrapper",children:D&&e("div",{className:"ff-branch-arrow"})}),D&&!E&&e(t,{children:e(W,{variant:"tertiary",label:"Manual"===w?"Machine":"Environment",iconName:"plus_icon",iconPosition:"left",size:"small",className:"branch-button",ref:Z,onClick:()=>f("ff-sequential-branch-button"),id:"ff-sequential-branch-button"})})]})]})]}),!F&&n("div",{className:"ff-select-scope-datalist",children:[e("div",{className:"ff-scope-wrapper",children:e(U,{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:[R&&e("div",{id:"ff-sequential-machine-datalist",onClick:()=>{E||p("ff-sequential-machine-datalist",A)},children:n(Y,{placement:"bottom",title:e("div",{children:e(Ym,{datSetToolTip:P})}),style:{display:"flex",alignItems:"center"},children:[e(q,{name:"datalist_icon",className:"ff-dataset-icon",hoverEffect:!0}),e(U,{as:"span",color:"var(--ff-connecting-branch-color)",className:"ff-datalist-text",children:"Data Set List"})]})}),!E&&e(Y,{title:"Delete",placement:"bottom",children:e(q,{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:!D&&e(tA,{machineBranchInstances:N,machineColumnCount:O,machineColumnWidth:z,onAddBrowser:f,onDeleteBrowser:C,onAddRunBrowser:h,onUpdateDataSetList:p,onUpdateAddBrowserInstance:g,addInstanceLabel:v,scriptType:w,projectType:b,readOnly:E,maxRunCount:L})})]})})},rA=({label:t,selectedFiles:r,onFilesChange:i,disabled:a=!1,buttonDisplayType:l="attachment",iconName:s="plus_icon",maxFileSizeMB:d,maxFiles:u,buttonLabel:f="Select Files",showSelectedFiles:h=!0,buttonVariant:C="primary",deleteButton:p=!0,multiple:m=!0,addAttachmentButton:A=!0,isInfoIconRequired:g=!0,onFileListClick:v,types:y=[],attachmentInfoTooltip:w="",selectedFileMessage:b="This file is already selected",required:E=!1,errorMessage:M,truncateMaxLimit:L=1/0,onClickAttachmentButton:H=()=>{}})=>{const x=o(null),[V,k]=c(""),S={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"],dat:[".dat","application/octet-stream"],trg:[".trg","application/octet-stream"]},Z=y.flatMap(e=>S[e]||[]).join(","),O=()=>{H(),k(""),x.current?.click()};return n("section",{"aria-label":t?`${t} attachment uploader`:"Attachment uploader",children:[g&&n("div",{className:"ff-label-icon",children:[e(U,{fontWeight:"semi-bold",lineHeight:"18px",as:"span",required:E,children:t}),e(Y,{title:w||(()=>{if(0===y.length)return"Any files are allowed.";const t=y.flatMap(e=>S[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(q,{name:"info",hoverEffect:!0,"aria-label":"Attachment information"})})]}),(!h||0===r.length)&&("attachment"===l?e(W,{variant:C,label:f,size:"medium",onClick:O,disabled:a}):"icon"===l?e(Zp,{label:f,iconName:s,onClick:O,isDisable:a}):null),e("input",{type:"file",ref:x,className:"ff-input-field",onChange:()=>{if(k(""),x.current?.files){const e=Array.from(x.current.files);if(e.length>5)return k("Maximum file(s) can be uploaded: 5"),void(x.current.value="");const t=e.filter(e=>!r.some(t=>t.name===e.name));if(0===t.length)return k(b),void(x.current.value="");if("number"==typeof u&&r.length+t.length>u)return k(`You can only select up to ${u} files.`),void(x.current.value="");if("number"==typeof d){const e=1024*d*1024;if(t.filter(t=>t.size>e).length>0)return k(`Maximum file(s) size allowed: ${d} MB.`),void(x.current.value="")}i([...r,...t],t,"ADD"),x.current.value=""}},multiple:m,accept:Z,required:E,"aria-label":f}),V&&e(bi,{isOpen:!!V,variant:"info",toastTitle:"Info",toastMessage:V,zIndex:1e7}),h&&r.map((t,a)=>n("div",{className:"ff-attachment-files",onClick:v,role:"listitem","aria-label":`Selected file ${t.name}`,children:[e(U,{color:"var(--brand-color)",children:e(zi,{title:t.name,width:L})}),p&&e(Y,{title:"Delete",children:e(q,{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")})(a)})}),a===r.length-1&&A&&e(Y,{title:""+("number"==typeof u&&r.length>=u?`Maximum files can be uploaded: ${u}`:"Add File"),children:e(q,{name:"add_file",hoverEffect:!0,onClick:O,disabled:"number"==typeof u&&!(r.length<u)})})]},t.name)),E&&e(U,{children:M,fontSize:10,className:"error-text"})]})},iA=({selected:t="text",firstButton:r="File",secondButton:i="File",handleClick:a})=>n("div",{className:"toggle-container",children:[e("button",{className:"toggle-button "+(t===r?"active":""),onClick:()=>a(r),children:r}),e("button",{className:"toggle-button "+(t===i?"active":""),onClick:()=>a(i),children:i})]}),aA=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:i,customIconSize:a,backgroundColor:o,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:o},role:"img","aria-label":l?`Avatar for ${l}`:`Avatar icon ${n||"default"}`,children:l?e("span",{className:"ff-avatar-label",style:{fontSize:s||"14px",color:r},children:c}):e(q,{name:n,height:a,width:a,color:r})})},oA=({logo:t,overlay:r=!1})=>e("section",{className:`overlay-loader ${r&&"overlay"}`,role:"status","aria-live":"polite","aria-label":"Loading content",children:n("div",{className:"loader-container ","aria-label":"Loading indicator",children:[t&&e(t,{}),e("div",{className:"line_loader","aria-hidden":"true"})]})}),lA=({contentHeader:t,data:r,maxHeight:i=""})=>{const a=`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("section",{className:"ff-content-card-container","aria-label":"Content card","aria-labelledby":"content-card-header",children:[e("header",{className:"ff-content-card-nav",children:e(U,{as:"div",id:"content-card-header",fontWeight:"semi-bold",lineHeight:"35px",children:t})}),e("div",{className:`ff-content-card-body scrollable ${a}`,role:"region","aria-label":"Content card details",children:Object.entries(r).map(([t,r],i)=>n("div",{className:"ff-content-card-row",role:"listitem","aria-label":`${t}: ${r}`,children:[n(U,{fontWeight:"semi-bold",children:[t,":"]}),e(U,{className:"ff-content-card-value",children:r})]},i+t))})]})},sA="Principle",cA="Guidelines",dA="Weightage in %",uA=e=>null==e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(uA).filter(Boolean).join(" "):i.isValidElement(e)?uA(e.props.children):"",fA=({title:t="Success Criteria Weightage",totalWeightage:r,maxWeightage:i=100,principleColumnLabel:a=sA,guidelinesColumnLabel:o=cA,weightageColumnLabel:l=dA,columnLabels:s,groups:d=[],onWeightageChange:u=()=>{},renderWeightageCell:f,weightageInputWidth:C="12%",onReset:p=()=>{},showResetIcon:m=!0,isResetEnabled:A=!0,resetEnabledTooltip:g="Reset to default value",resetDisabledTooltip:v="No changes to reset",onMaxWeightageReached:y,disabled:w=!1,minValue:b=0,maxValue:E=100,disableUpwardIncreaseOnMax:M=!0,isAccordion:L=!0,defaultExpanded:H=!1,className:x="",style:V})=>{const k=h().replace(/:/g,""),[S,Z]=c(H),O=`${k}-weightage-title`,z=`${k}-weightage-content`,N=d.reduce((e,t)=>e+t.guidelines.length,0);let T=2;const D=d.map(e=>{const t=T;return T+=e.guidelines.length,t}),F={principle:s?.principle??a,guidelines:s?.guidelines??o,weightage:s?.weightage??l},R=uA(F.weightage)||dA,P=i??E,B=r??d.reduce((e,t)=>e+t.guidelines.reduce((e,t)=>e+(t.value||0),0),0),j=Math.max(0,P-B),_=e=>{if(""===e||"-"===e)return 0;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0},W=(e,t,n)=>{u(e,t,n)},X=!L||S,Q=({groupIndex:t,rowIndex:n,row:r,minValue:i,maxValue:a,disabled:o,inputWidth:l,inputProps:s})=>e("div",{className:"ff-weightage-input",style:{width:l},children:e(Vi,{type:"number",noBorder:!0,value:r.value,minValue:i,maxValue:a,disabled:o,error:r.error,helperText:r.helperText,placeholder:"",variant:"primary",isLabelRequired:!1,disableAfterMaxValueReached:!0,size:"small",className:"ff-weightage-input-field",onChange:e=>((e,t,n,r,i,a)=>{const o=a.target.value;if(o.includes(".")||o.includes(","))return;const l=_(o);let s=!1,c="";(l<r||l>i)&&(s=!0,c=`Value must be between ${r} and ${i}`),W(e,t,{...n,value:l,error:s,helperText:c})})(t,n,r,i,a,e),setUpdatedNumberValue:e=>{if("string"==typeof e&&(e.includes(".")||e.includes(",")))return;const o=_(e);if(((e,t,n)=>{const r=e.value||0;return!!(j<=0&&B>=P&&Number.isFinite(n)&&n>=r&&r>=t)&&(y?.(),!0)})(r,a,o))return;const l=o<i||o>a;W(t,n,{...r,value:o,error:l,helperText:l?`Value must be between ${i} and ${a}`:""})},...s,onKeyDown:e=>{[".",",","e","E","+","-"].includes(e.key)?e.preventDefault():"ArrowUp"===e.key&&j<=0&&B>=P&&(r.value||0)>=a&&y?.()}})}),G=(t,n,r)=>e("div",{className:t,role:"columnheader","aria-colindex":r,children:e(U,{fontWeight:"semi-bold",children:e(Qs,{children:n})})}),K=(t,r,i)=>{const a=t.key??t.principle;return e("div",{className:"ff-weightage-group",role:"rowgroup","aria-label":t.principle,children:t.guidelines.map((o,l)=>((t,r,i,a,o,l)=>{const s=a.key??`${i}-${a.label}`,c=a.maxValue??P,d=Math.min(c,100),u=M?Math.min(d,(a.value||0)+j):d,h=Math.min(a.minValue??b,u),p=w||!!a.disabled||!X,m=`${k}-weightage-row-${r}-${o}`,A=a.error&&a.helperText?`${m}-error`:void 0,g={group:t,row:a,groupIndex:r,rowIndex:o,rowKey:s,minValue:h,maxValue:u,disabled:p,inputWidth:C,inputProps:{id:`${m}-input`,name:s,"aria-label":`${R} for ${a.label} in ${t.principle}`,"aria-describedby":A,"aria-errormessage":A,"aria-invalid":a.error||void 0,onWheel:e=>{e.currentTarget.blur()}},onChange:e=>W(r,o,e)};return n("div",{className:"ff-weightage-row",role:"row","aria-rowindex":l,children:[0===o&&e("div",{className:"ff-weightage-principle",role:"rowheader","aria-colindex":1,"aria-rowspan":t.guidelines.length,style:{gridRow:`span ${t.guidelines.length}`},children:e(U,{fontWeight:"medium",children:e(Qs,{children:t.principle})})}),e("div",{className:"ff-weightage-guideline",role:"cell","aria-colindex":2,children:e(U,{children:e(Qs,{className:"auto-truncate",children:a.label})})}),e("div",{className:"ff-weightage-value",role:"cell","aria-colindex":3,children:(v=g,f?f(v):Q(v))})]},s);var v})(t,r,a,o,l,i+l))},a)};return n("div",{className:I("ff-weightage-table",x),style:V,children:[n("div",{className:"ff-weightage-head",children:[e("div",{className:"ff-weightage-title",id:O,children:e(U,{fontWeight:"semi-bold",children:e(Qs,{children:t})})}),n("span",{className:"ff-weightage-total",children:[e("span",{className:"ff-weightage-total-value","aria-live":"polite","aria-label":`Total weightage ${B}`,children:e(U,{fontWeight:"semi-bold",children:n(Qs,{children:["Total Weightage : ",B]})})}),m&&e("span",{className:"ff-weightage-reset-wrap","data-tooltip":A?g:v,children:e("button",{type:"button",className:"ff-weightage-icon-button",onClick:p,disabled:!A||w,"aria-label":A?g:v,children:e(q,{name:"reset_default_value",withPadding:!1,disabled:!A||w})})}),L&&e("button",{type:"button",className:"ff-weightage-icon-button",onClick:()=>{Z(e=>!e)},"aria-label":S?"Collapse weightage table":"Expand weightage table","aria-expanded":X,"aria-controls":z,"data-tooltip":S?"Collapse":"Expand",children:e(q,{name:S?"arrow_up":"arrow_down",withPadding:!1})})]})]}),e("div",{className:I("ff-weightage-content",{"ff-weightage-content--expanded":X}),id:z,"aria-hidden":!X,...X?{}:{inert:""},children:e("div",{className:"ff-weightage-content-inner",children:n("div",{className:"ff-weightage-grid",role:"table","aria-labelledby":O,"aria-colcount":3,"aria-rowcount":N+1,children:[n("div",{className:"ff-weightage-row ff-weightage-row-head",role:"row","aria-rowindex":1,children:[G("ff-weightage-principle",F.principle,1),G("ff-weightage-guideline",F.guidelines,2),G("ff-weightage-value",F.weightage,3)]}),d.map((e,t)=>K(e,t,D[t]??2))]})})})]})},hA=({type:t="file",onChange:r,selectedFile:i,selectedJiraInstance:a,selectedJiraTickets:o,selectedFigmaInstance:l,selectedFigmaPages:s,processedFiles:d=[],jiraInstances:u=[],jiraTickets:f=[],figmaInstances:h=[],ticketLimit:C=3,tooltip:p,dropdownPlacement:m,onSearch:A=()=>{},loadMoreOptions:g=()=>{}})=>{const[v,y]=c(""),[w,b]=c(""),[E,M]=c(null),[L,H]=c(null),[x,V]=c([]),[k,S]=c(null),[Z,O]=c([]),z=void 0!==i?i:E,N=void 0!==a?a:L,I=void 0!==o?o:x,T=void 0!==l?l:k,D=void 0!==s?s:Z,F=(e,n,i,a=null,o=[])=>{r({sourceType:t,selectedFile:e,selectedJiraInstance:n,selectedJiraTickets:i,selectedFigmaInstance:a,selectedFigmaPages:o})},R=d.map(e=>({label:e.name,value:e.id})),P=u.map(e=>({label:e.instanceName,value:e._id})),B=I.length>=C,j=f.filter(e=>e.toLowerCase().includes(v.toLowerCase())).map((t,n)=>{const r=I.some(e=>e.value===t),i=`${n+1}. ${t}`;return{label:B&&!r?e(Y,{title:p??`Only ${C} tickets can be selected`,children:e("span",{className:"disabled-ticket-label",children:i})}):i,value:t,isDisabled:B&&!r}}),_=h.map(e=>({label:e.name||e.instanceName||e._id,value:e._id})),q=h.find(e=>e._id===T?._id)||T,U=q?.pageData||[],W=D.length>=C,X=U.filter(e=>("string"==typeof e?e:e?.name||"").toLowerCase().includes(w.toLowerCase())).map((t,n)=>{const r="string"==typeof t?t:t?.name||"",i="string"==typeof t?t:t?._id||t?.name||"",a=D.some(e=>e.value===i||e.value===r),o=`${n+1}. ${r}`;return{label:W&&!a?e(Y,{title:p??`Only ${C} page can be selected`,children:e("span",{className:"disabled-ticket-label",children:o})}):o,value:i,isDisabled:W&&!a}});return n("section",{className:"processed-source-selector","aria-label":"Processed source selector",children:["file"===t&&e("section",{className:"selector-row","aria-label":"Processed file selector",children:e("div",{className:"dropdown-container file-dropdown","aria-label":"Processed file dropdown",children:e(Za,{optionsList:R,selectedOption:z?{label:z.name,value:z.id}:{label:"",value:""},onChange:e=>{const t=d.find(t=>t.id===e.value)||null;M(t),F(t,null,[])},placeHolder:"Select Processed File",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"processed-source-file-select",dropdownClassName:"processed-source-select-dropdown",variant:"ai"})})}),"jira"===t&&e("section",{className:"selector-row-wrapper","aria-label":"Processed Jira selectors",children:n("div",{className:"selector-row","aria-label":"Jira selector row",children:[e("div",{className:"dropdown-container instance-dropdown","aria-label":"Jira instance dropdown",children:e(Za,{optionsList:P,selectedOption:N?{label:N.instanceName,value:N._id}:{label:"",value:""},onChange:e=>{const t=u.find(t=>t._id===e.value)||null;H(t),V([]),F(null,t,[])},placeHolder:"Processed Jira Instances",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"processed-source-instance-select",dropdownClassName:"processed-source-select-dropdown",variant:"ai"})}),N&&e("div",{className:"dropdown-container ticket-dropdown","aria-label":"Jira ticket multi select",children:e(wi,{label:"Select Jira Ticket",options:j,selectedOptions:I,onChange:e=>{e.length<=C&&(V(e),F(null,N,e))},placeholderForSearching:"Search Jira Ticket",displayCount:!0,noResultsMessage:"No tickets available",dropdownPlacement:m,className:"processed-source-tickets-select",dropdownClassName:"processed-source-multiselect-dropdown",variant:"ai",onSearch:e=>{y(e),A(e)},loadMoreOptions:g})})]})}),"figma"===t&&e("section",{className:"selector-row-wrapper","aria-label":"Figma selectors",children:n("div",{className:"selector-row","aria-label":"Figma selector row",children:[e("div",{className:"dropdown-container instance-dropdown","aria-label":"Figma instance dropdown",children:e(Za,{optionsList:_,selectedOption:T?{label:T.name||T.instanceName||T._id,value:T._id}:{label:"",value:""},onChange:e=>{const t=h.find(t=>t._id===e.value)||null;S(t),O([]),F(null,null,[],t,[])},placeHolder:"Figma Instances",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"source-instance-select",dropdownClassName:"source-select-dropdown",variant:"ai"})}),T&&e("div",{className:"dropdown-container ticket-dropdown","aria-label":"Figma page multi select",children:e(wi,{label:"Select Figma Page",options:X,selectedOptions:D,onChange:e=>{e.length<=C&&(O(e),F(null,null,[],T,e))},placeholderForSearching:"Search Figma Page",displayCount:!0,noResultsMessage:"No pages available",dropdownPlacement:m,className:"processed-source-tickets-select",dropdownClassName:"processed-source-multiselect-dropdown",variant:"ai",onSearch:e=>{b(e),A(e)},loadMoreOptions:g})})]})})]})},CA=({label:t,placeholder:r,text:i,showText:a=!0,highlightText:s,customError:d,confirmIcon:u,customErrorCondition:f,cancelIcon:h,variant:C="textField",onInputChange:p,dropdownData:m=[],className:A,height:g,isOpen:v=!1,confirmAction:y,onClick:w,tooltip:b,onDoubleClick:E,disableEditing:M=!1})=>{const[L,H]=c(v??!1),[x,V]=c(i??""),[k,S]=c(m[0]?.value??""),[Z,O]=c(""),[z,N]=c(!0),[I,T]=c(!1),D=!(!Z||!L),F=o(null),R=o(null),[P,B]=c(null),j=X("Escape");l(()=>()=>{P&&clearTimeout(P)},[P]);const _=()=>{let e="";0===x.length||0===x.trim().length?e="Please type any text.":x.length<3?e="Please enter at least 3 characters.":f&&(e=d??"Invalid input."),e?O(e):(H(!1),O(""),y&&y(x,k)),u?.onClick?.()},W=()=>{V(i??""),S(m[0]?.value??""),H(!1),O(""),T(!1),h?.onClick?.()},Q=e=>{const t=e.target.value;V(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"):$n.test(t)?O("Space is not allowed at starting and at the end"):O(f?d??"Invalid input.":""),T(t!==i),p&&p(t)},G=e=>{if(F.current&&!F.current.contains(e.target)&&R.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")(x,i??"");e&&L?O(e):(H(!1),O(""))}};return l(()=>(document.addEventListener("click",G),()=>{document.removeEventListener("click",G)}),[x]),j(W),Zn([{key:"Enter",action:()=>{_()}}],F),n("section",{className:"ff-label-edit-text-field",ref:F,"aria-label":t||"Editable label text field",children:[L?n("div",{className:"ff-label-text-field","aria-label":"Editing controls",children:["textFieldWithDropdown"===C?n("div",{className:"ff-label-text-field-with-dropdown "+(L?"open":""),style:{height:g},"aria-label":"Editable text field with dropdown",children:[e(Vi,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:x,onChange:Q,className:`${A} \n \n ${I?"modified":""}`,"aria-label":t||"Editable text input"}),e(Za,{label:"",optionsList:m,selectedOption:{value:k,label:k},onChange:e=>S(e.value),"aria-label":"Dropdown selector"})]}):e("div",{className:"ff-label-text-field-without-dropdown","aria-label":"Editable text field",children:e(Vi,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:x,onChange:Q,className:`${A} \n \n ${I?"modified":""}`,"aria-label":t||"Editable text input"})}),n("div",{className:"ff-icon-container","aria-label":"Edit actions",children:[u&&e(Y,{title:"Confirm",placement:"bottom",children:e(q,{color:"var(--label-edit-confirm-icon)",height:20,width:20,name:u.name,disabled:z,className:""+(z?"disabled-confirm-icon":"confirm-icon"),onClick:_,"aria-label":"Confirm changes"})}),h&&e(Y,{title:"Cancel",placement:"bottom",children:e(q,{color:"var(--label-edit-cancel-icon)",height:12,width:20,name:h.name,className:"cancel-icon",onClick:W,ref:R,"aria-label":"Cancel changes"})})]})]}):e(Y,{title:b?.tooltipTitle?b?.tooltipTitle:"",placement:"bottom",children:a&&e("span",{className:"display-text",onDoubleClick:()=>{M||(P&&(clearTimeout(P),B(null)),E&&E(),H(!0),O(""))},role:"button","aria-label":b?.tooltipTitle||t||"Editable text",onClick:()=>{if(M)return;P&&(clearTimeout(P),B(null));const e=window.setTimeout(()=>{w&&w(),B(null)},1e3);B(e)},children:e(yn,{text:x,highlight:s})})}),Z&&L&&e(U,{as:"p",fontSize:8,className:"error-text",children:Z})]})},pA=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",mA=({label:t,text:r,highlightText:i,customError:a,customErrorCondition:l=!1,confirmIcon:s,cancelIcon:d,editIcon:u,dropdownData:f=[],isOpen:h=!1,confirmAction:C,onClick:p,nameTooltipTitle:m})=>{const[A,g]=c(h??!1),[v,y]=c(r),[w,b]=c(!0),[E,M]=c(f[0]?.value??""),[L,H]=c(""),[x,V]=c(!1),k=!(!L||!A),S=o(null),Z=o(null),O=()=>{g(!0),H("")},z=()=>{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")(v,r,a,l);e&&A?H(e):(g(!1),H(""),C&&C(v,E))},N=()=>{y(r),M(f[0]?.value??""),g(!1),H(""),V(!1)};function I(e){"Enter"===e&&z(),"Escape"===e&&N()}return Zn([{key:"Enter",action:()=>I("Enter")},{key:"Escape",action:()=>I("Escape")}],S),n("div",{className:"ff-label-edit-text-field",ref:S,role:"group","aria-label":"Editable text field",children:[n("div",A?{className:"ff-label-text-field",role:"group","aria-label":"Edit text field",children:[e("div",{className:"ff-label-text-field-without-dropdown",children:e(Vi,{name:"input","aria-label":t||"Edit text",label:t||"",disabled:!1,error:k,placeholder:"Enter your name",value:v,onChange:e=>{y(e.target.value),V(!0),H(""),b(!1)},className:"\n \n "+(x?"modified":""),type:"text"})}),n("div",{className:"ff-icon-container",role:"group","aria-label":"Edit actions",children:[s&&e(Y,{title:"confirm",placement:"bottom",children:e(q,{color:s?.color??"var(--default-confirm-icon-color)",height:s?.height??20,disabled:w,width:s?.width??20,name:s?.name??"default-confirm-icon",className:`${s?.className??"default-confirm-class"} ${w?"disabled-confirm-icon":"confirm-icon"}`,onClick:z,"aria-label":"Confirm edit"})}),d&&e(Y,{title:"cancel",placement:"bottom",children:e(q,{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:N,ref:Z,"aria-label":"Cancel edit"})})]})]}:{className:"display-text-container",role:"group","aria-label":"Display text",children:[m?e(Y,{title:m,children:e("span",{className:"display-text",onClick:p,role:"button",tabIndex:0,"aria-label":"Edit text",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),O())},children:e(yn,{text:v,highlight:i})})}):e("span",{className:"display-text",onClick:p,role:"button","aria-label":"Edit text",children:e(yn,{text:v,highlight:i})}),e(Y,{title:pA(u?.name??"Edit"),children:e(q,{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:O,"aria-label":"Edit text"})})]}),L&&A&&e(U,{as:"p",fontSize:8,className:"error-text",children:L})]})},AA="SET_DATA",gA="SET_CREATE_FORMULA_PARSER",vA="SELECT_ENTIRE_ROW",yA="SELECT_ENTIRE_COLUMN",wA="SELECT_ENTIRE_WORKSHEET",bA="SET_SELECTION",EA="SELECT",MA="ACTIVATE",LA="SET_CELL_DATA",HA="SET_CELL_DIMENSIONS",xA="COPY",VA="CUT",kA="PASTE",SA="EDIT",ZA="VIEW",OA="BLUR",zA="KEY_PRESS",NA="KEY_DOWN",IA="DRAG_START",TA="DRAG_END",DA="COMMIT",FA="BOLD",RA="ITALIC",PA="UNDERLINE_TYPE",BA="FONT_FAMILY",jA="FONT_SIZE",_A="TEXT_ALIGN",qA="BORDER_TYPE",UA="COLOR",WA="BACKGROUND_COLOR",XA="FORMATE_PAINTER",QA="ADD_ROW_TOP",GA="ADD_ROW_BOTTOM",KA="ADD_COLUMN_LEFT",YA="ADD_COLUMN_RIGHT",JA="DELETE_ROW",$A="DELETE_COLUMN",eg="SET_ROW_HEIGHT",tg="SET_COLUMN_WIDTH",ng="SET_COLUMN_POSITION",rg="SET_AUTO_FILL",ig="UPDATE_COLUMN_DIMENSIONS",ag="SET_EDITABLE",og="ON_MOUSE_UP";function lg(e){return{type:og,payload:{point:e}}}function sg(e){return{type:ag,payload:{editable:e}}}function cg(e,t){return{type:eg,payload:{row:e,height:t}}}function dg(e,t){return{type:ng,payload:{column:e,width:t}}}function ug(e){return{type:FA,payload:{data:e}}}function fg(e){return{type:RA,payload:{data:e}}}function hg(e,t,n){return{type:qA,payload:{data:e,value:t,color:n}}}function Cg(e){return{type:PA,payload:{data:e}}}function pg(e,t){return{type:jA,payload:{data:e,value:t}}}function mg(e,t){return{type:BA,payload:{data:e,value:t}}}function Ag(e,t){return{type:_A,payload:{data:e,value:t}}}function gg(e,t){return{type:UA,payload:{data:e,value:t}}}function vg(e,t){return{type:WA,payload:{data:e,value:t}}}function yg(e){return{type:XA,payload:{data:e}}}function wg(e){return{type:QA,row:e}}function bg(e){return{type:GA,row:e}}function Eg(e,t){return{type:KA,columnWidth:e,column:t}}function Mg(e,t){return{type:YA,columnWidth:e,column:t}}function Lg(e){return{type:JA,row:e}}function Hg(e){return{type:$A,column:e}}function xg(e){return{type:zA,payload:{event:e}}}function Vg(e){return{type:AA,payload:{data:e}}}function kg(e){return{type:gA,payload:{createFormulaParser:e}}}function Sg(e){return{type:bA,payload:{selection:e}}}function Zg(e){return{type:MA,payload:{point:e}}}function Og(e,t){return{type:LA,payload:{active:e,data:t}}}function zg(e,t){return{type:HA,payload:{point:e,dimensions:t}}}function Ng(e){return{type:kA,payload:{data:e}}}function Ig(e){return{type:NA,payload:{event:e}}}function Tg(){return{type:IA}}function Dg(){return{type:TA}}function Fg(){return{type:xA}}function Rg(){return{type:VA}}function Pg(){return{type:SA}}function Bg(){return{type:OA}}function jg(e,t){const n=t[e.row];if(void 0!==n)return n[e.column]}function _g(e,t,n){const r=[...n],i=[...n[0]??[]];i.length<=e.column&&(i.length=e.column+1),r[0]=i;const a=[...n[e.row]??[]];return a[e.column]=t,r[e.row]=a,r}function qg(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 Ug={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:""+(Wg=9,1.33*Wg+"px"),fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}};var Wg;function Xg(e,t){if(!Gg(e,t))return t;const n=[...t],r=t[e.row];if(r){const t=[...r];t[e.column]=Ug,n[e.row]=t}return n}function*Qg(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 Gg(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 Kg(e){return{columns:Jg(e),rows:Yg(e)}}function Yg(e){return e.length}function Jg(e){const t=e[0];return t?t.length:0}function $g(e){const t=Kg(e);return{row:t.rows-1,column:t.columns-1}}class ev{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 ev({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 tv={row:0,column:0};class nv{}class rv extends nv{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 rv}}class iv extends nv{range;constructor(e){super(),this.range=e}toRange(e){return this.range}normalizeTo(e){const t=dv(e);return new iv(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 iv&&this.range.equals(e.range)}}class av extends nv{}class ov extends av{toRange(e){return dv(e)}normalizeTo(){return this}hasEntireColumn(){return!0}hasEntireRow(){return!0}size(e){return Jg(e)*Yg(e)}has(){return!0}equals(e){return e instanceof ov}}class lv extends av{start;end;constructor(e,t){if(!uv(e))throw new fv("start");if(!uv(t))throw new fv("end");super(),this.start=Math.min(e,t),this.end=Math.max(e,t)}equals(e){return e instanceof lv&&this.constructor===e.constructor&&this.start===e.start&&this.end===e.end}}class sv extends lv{toRange(e){const t=$g(e);return new ev({row:this.start,column:0},{row:this.end,column:t.column})}normalizeTo(e){const t=Yg(e);return new sv(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)*Jg(e)}has(e,t){return t.row>=this.start&&t.row<=this.end}}class cv extends lv{toRange(e){const t=$g(e);return new ev({row:0,column:this.start},{row:t.row,column:this.end})}normalizeTo(e){const t=Jg(e);return new cv(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)*Yg(e)}has(e,t){return t.column>=this.start&&t.column<=this.end}}function dv(e){const t=$g(e);return new ev(tv,t)}function uv(e){return Number.isInteger(e)&&e>=0}class fv extends Error{constructor(e){super(`${e} is not a valid index. It must be 0 or a positive integer`)}}const hv="text/plain";function Cv(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 pv(e,t){return Boolean(e&&(r=e,(n=t).column===r.column&&n.row===r.row));var n,r}function mv(e){return{width:e.offsetWidth,height:e.offsetHeight,left:e.offsetLeft,top:e.offsetTop}}function Av(e){return Object.keys(e).map(e=>Number(e)).sort((e,t)=>e-t)}function gv(e,t,n){const r={},i=Av(e);let a=0,o=!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},a=n,o=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=o?l+1:l,u=o?c.left+a:c.left;r[d]={...c,left:u}}if(!o){const e=i.length>0?i[i.length-1]:void 0,a=void 0!==e?r[e]:void 0,o=a?a.left+a.width:0;r[t]={left:o,width:n}}return r}function vv(e,t,n){const r={},i=Av(e);let a=0,o=!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},a=n,o=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=o?l+1:l,u=o?c.top+a:c.top;r[d]={...c,top:u}}if(!o){const e=i.length>0?i[i.length-1]:void 0,a=void 0!==e?r[e]:void 0,o=a?a.top+a.height:0;r[t]={top:o,height:n}}return r}function yv(e,t){const n={},r=Av(e);let i=0;for(let a=0,o=0;a<r.length;a++){if(r[a]===t)continue;const l=r[a];if(void 0===l)continue;const s=e[l];s&&(n[o]={top:0===i?s.top:i,height:s.height},"number"==typeof n[o]?.top&&(i=(n[o]?.top??0)+s.height),o++)}return n}function wv(e,t){const n={},r=Av(e);let i=0;for(let a=0,o=0;a<r.length;a++){if(r[a]===t)continue;const l=r[a];if(void 0===l)continue;const s=e[l];s&&(n[o]={left:0===i?s.left:i,width:s.width},"number"==typeof n[o]?.left&&(i=(n[o]?.left??0)+s.width),o++)}return n}function bv(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 a=(t?.[e.row]?t?.[e.row]?.height:32)||32;let o=60;for(let t=0;t<e.column;t++)o+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:a,left:o,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}function Ev(e,t,n){const r=bv(n.start,e,t);let i=bv(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 a=(t?.[e.row]?t?.[e.row]?.height:32)||32;let o=60;for(let t=0;t<e.column;t++)o+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:a,left:o,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 Mv(e,t,n,r){const i=r.toRange(n);return i?Ev(e,t,i):void 0}function Lv(e){return function(e,t){const n=[];for(const[r,i]of Qg(t))qg(r,e(i,r),n);return n}(e=>e?.value||"",e).map(e=>e.map(e=>{const t=String(e).replace(/"/g,'""');return si.test(t)?`"${t}"`:t}).join("\t")).join("\n")}function Hv(e,t){return null!==e&&"view"===t&&xv(e)}function xv(e){return e.matches(":focus-within")}function Vv(e){return"string"==typeof e&&e.includes("\n")}const kv=e=>`${1.33*e}px`,Sv=e=>parseFloat(e.replace("px",""))/1.33,Zv={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:`${kv(9)}`,fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}},Ov=[{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"}],zv=[5,6,8,9,10,12,14,16,18,20,22,24,26,28,32,36,40,48,56,72],Nv=e=>["dropDown","text"].includes(e?.inputType?.type??"text")&&!e?.readOnly;function Iv(e){return{rowCount:e?.length??0,columnCount:e?.[0]?.length??0}}function Tv(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function Dv(e){return e}function Fv(e){return`${e.row},${e.column}`}function Rv(e){const[t,n]=e.split(",");return{row:Number(t),column:Number(n)}}class Pv{set;constructor(e){this.set=e}static from(e){const t=new Set;for(const n of e)t.add(Fv(n));return new Pv(t)}has(e){return this.set.has(Fv(e))}get size(){return this.set.size}add(e){const t=new Set(this.set);return t.add(Fv(e)),new Pv(t)}delete(e){const t=new Set(this.set);return t.delete(Fv(e))?new Pv(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 Rv(e)}}class Bv{forwards;constructor(e=new Map){this.forwards=e}static from(e){const t=new Map;for(const[n,r]of e)t.set(Fv(n),r);return new Bv(t)}set(e,t){const n=new Bv(new Map(this.forwards));return 0===t.size?(n.forwards.delete(Fv(e)),n):(n.forwards.set(Fv(e),t),n)}get(e){return this.forwards.get(Fv(e))||Pv.from([])}getBackwards(e){let t=Pv.from([]);for(const[n,r]of this.forwards)r.has(e)&&(t=t.add(Rv(n)));return t}getBackwardsRecursive(e,t=Pv.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=Pv.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=Rv(t);e.add(t),yield[r,n];for(const t of n){const n=Fv(t);e.has(n)||this.forwards.has(n)||(e.add(n),yield[t,Pv.from([])])}}}*traverseBFSBackwards(){let e=Pv.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 jv{data;evaluatedData;referenceGraph;createFormulaParser;constructor(e,t,n,r){this.createFormulaParser=e,this.data=t,this.referenceGraph=n||function(){const e=[];return Bv.from(e)}(),this.evaluatedData=r||function(e,t){let n=e;for(const r of t.traverseBFSBackwards()){const t=jg(r,e);if(t&&Tv(t.value)){const e=qv();n=_g(r,{...t,value:e},n)}}return n}(t,this.referenceGraph)}}function _v(e,t,n){const r=_g(t,n,e.data),i=(Tv(n.value),e.referenceGraph),a=function(e,t,n,r,i){if(n.hasCircularDependency(r)){let a=Pv.from([r]),o=_g(r,{...i,value:"TODO"},e);for(const e of n.getBackwardsRecursive(r)){if(a.has(e))break;a=a.add(e);const n=jg(e,t);n&&(o=_g(e,{...n,value:"TODO"},o))}return o}let a=e;const o=Tv(i.value)?"TODO":i.value,l={...i,value:o};a=_g(r,l,a);for(const e of n.getBackwardsRecursive(r)){const n=jg(e,t);if(!n)continue;const r=Tv(n.value)?qv():n.value;a=_g(e,{...n,value:r},a)}return a}(e.evaluatedData,r,i,t,n);return new jv(e.createFormulaParser,r,i,a)}function qv(){return"TODO"}function Uv(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 Wv(e){return cy(e)||!e.editable?e:{...e,mode:"edit"}}const Xv=e=>(e=>e&&!e.readOnly)(e)&&"file"!==e?.inputType?.type?{...e,value:"",style:e?.style}:e,Qv=e=>{if(e)return{...e,value:(e.value||"")+"\n",style:e.style}};function Gv(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=jg(i,e.model.data),a=Xv(t);n.push({prevCell:t||null,nextCell:a||null}),r=_g(i,a,r)}return{...e,model:new jv(Dv,r),...$v(n)}}function Kv(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=jg(i,e.model.data),a=Qv(t);n.push({prevCell:t||null,nextCell:a||null}),r=_g(i,a,r)}return{...e,mode:"edit",model:new jv(Dv,r),...$v(n)}}function Yv(e){return{...e,active:null,copied:null,formattedStyle:{open:!1,style:void 0},selected:new rv}}function Jv(e){return{...e,mode:"view"}}function $v(e){return{lastCommit:e}}const ey=(e,t)=>n=>{if(!n.active)return;const r=Kg(n.model.data),i=n.active.column+t>=r.columns,a={row:n.active.row+e+(i?1:0),column:(n.active.column+t)%r.columns};return Gg(a,n.model.data)?{...n,active:a,selected:new iv(new ev(a,a)),mode:"view"}:{...n,mode:"view"}},ty={ArrowUp:ey(-1,0),ArrowDown:ey(1,0),ArrowLeft:ey(0,-1),ArrowRight:ey(0,1),Tab:ey(0,1),Enter:Wv,Backspace:function(e){if(!e.active)return e;if("view"===e.mode){return Gv(e)}{const t=[];let n=e.model.data;const r=jg(e.active,e.model.data),i=Xv(r);return t.push({prevCell:r||null,nextCell:i||null}),n=_g(e.active,i,n),{...e,mode:"edit",model:new jv(Dv,n),...$v(t)}}},Delete:Gv,Escape:Yv},ny={Escape:Jv,Tab:ty.Tab,Enter:ty.ArrowDown,Delete:Gv},ry={Tab:ey(0,-1)};var iy;!function(e){e.Left="Left",e.Right="Right",e.Top="Top",e.Bottom="Bottom"}(iy||(iy={}));const ay={ArrowUp:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Top)}),ArrowDown:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Bottom)}),ArrowLeft:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Left)}),ArrowRight:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Right)}),Tab:ey(0,-1)},oy={},ly={};function sy(e,t){const{key:n}=t;let r;if("edit"===e.mode)if(t.shiftKey&&"Enter"===n)r=ty;else{if(t.altKey&&"Enter"===n)return Kv;r=t.shiftKey?ry:ny}else r=t.shiftKey&&t.metaKey?oy:t.shiftKey?ay:t.metaKey?ly:ty;return r[n]}function cy(e){const t=function(e){const t=e.active&&jg(e.active,e.model.data);return t||null}(e);return Boolean(t?.readOnly)}function dy(e,t,n,r){if(!t)return e;if(e instanceof iv){const i=function(e,t,n,r){const i=r===iy.Left||r===iy.Right?"column":"row",a=r===iy.Left||r===iy.Top?"start":"end",o="start"===a?-1:1,l=e.range.has({...t,[i]:t[i]+-1*o}),s=l?"start"===a?"end":"start":a,c=new ev(e.range.start,e.range.end);c[s][i]+=o;const d=new iv(c).normalizeTo(n);return d}(e,t,n,r);return i}return e instanceof cv?function(e,t,n,r){if(r===iy.Top||r===iy.Bottom)return e;const i=r===iy.Left?-1:1,a=r===iy.Left?"start":"end",o="start"===a?"end":"start",l={...e};(r===iy.Left?e.end>t.row:e.start<t.row)?l[o]=e[o]+i:l[a]=e[a]+i;return new cv(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e instanceof sv?function(e,t,n,r){if(r===iy.Left||r===iy.Right)return e;const i=r===iy.Top?-1:1,a=r===iy.Top?"start":"end",o="start"===a?"end":"start",l={...e};(r===iy.Top?e.end>t.row:e.start<t.row)?l[o]=e[o]+i:l[a]=e[a]+i;return new sv(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e}const uy=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:a,columnDimensions:o}=e,{column:l,columnWidth:s=100}=t,c=l??i;if(K(c))return e;const d="LEFT"===n?c:c+1,u=a.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 jv(a.createFormulaParser,u),h=r??0;return{...e,model:f,selectedRow:h,selectedColumn:d,active:{row:h,column:d},selected:new cv(d,d),columnDimensions:gv(o,d,s)}},fy=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:a,rowDimensions:o}=e,{row:l}=t,s=l??r;if(K(s))return e;const c="TOP"===n?s:s+1,d=[...a.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(Zv))(a.data[s]||[],d[0]?.length);d.splice(c,0,u??[]);const f=new jv(a.createFormulaParser,d),h=i??0;return{...e,model:f,selectedRow:c,selectedColumn:h,active:{row:c,column:h},selected:new sv(c,c),rowDimensions:vv(o,c,32)}},hy={active:null,mode:"view",rowDimensions:{},columnDimensions:{},lastChanged:null,hasPasted:!1,cut:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},dragging:!1,model:new jv(Dv,[]),selected:new rv,copied:null,lastCommit:null,selectedColumn:null,selectedRow:null,formattedStyle:{open:!1,style:void 0},editable:!1,ctrl:!0};function Cy(e,t){switch(t.type){case ig:{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 ag:{const{editable:n}=t.payload;return{...e,editable:n}}case rg:{const{autofill:n}=t.payload,r=e.active;let i=Zv;return r&&(i=jg({row:r.row,column:r.column},e.model.data)||i),{...e,autoFill:{open:n,cellValue:i}}}case QA:return fy(e,t,"TOP");case GA:return fy(e,t,"BOTTOM");case KA:return uy(e,t,"LEFT");case YA:return uy(e,t,"RIGHT");case JA:{let{selectedRow:n,selectedColumn:r,model:i,rowDimensions:a,copied:o}=e;const{row:l}=t;if(K(n))return e;const s=l??n;let c=[...i.data];c.splice(s,1);const d=new jv(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,C=c.length>0?new sv(u,u):new rv;let p=o;return o&&o.start.row<=s&&o.end.row>=s&&(p=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:C,active:h,copied:p,rowDimensions:yv(a,s)}}case $A:{const{selectedRow:n,selectedColumn:r,model:i,columnDimensions:a,copied:o}=e,{column:l}=t;if(K(l??r))return e;const s=l??r,c=i.data.map(e=>e.filter((e,t)=>t!==s)),d=new jv(i.createFormulaParser,c),u=null!==n?n:0,f=s>0?s-1:0,h=c.length>0?{row:u,column:f}:null,C=c.length>0?new cv(f,f):new rv;let p=o;return o&&o.start.column<=s&&o.end.column>=s&&(p=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:C,active:h,copied:p,columnDimensions:wv(a,s)}}case FA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"bold"===r.style?.fontWeight){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,fontWeight:o?"normal":"bold"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case RA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"italic"===r.style?.fontStyle){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,fontStyle:o?"normal":"italic"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case qA:{const{value:n,color:r}=t.payload,i=e.selected.toRange(e.model.data),a=function(e,t,n,r,i){if(!t)return e;let a=e;const{start:o,end:l}=t,s=(e,t)=>jg({row:e,column:t},a),c=(e,t,n)=>{a=_g({row:e,column:t},n,a)};for(let e=o.row;e<=l.row;e++)for(let t=o.column;t<=l.column;t++){const a=s(e,t);if(!a||!i||a.readOnly)continue;const o={...a,style:{...a.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}`,C="1px solid var(--excel-header-border)",p=e=>{switch(e){case"borderTop":l&&l.style?.borderBottom===h?o.style.borderTop="none":o.style.borderTop=h;break;case"borderBottom":d&&d.style?.borderTop===h?o.style.borderBottom="none":o.style.borderBottom=h;break;case"borderLeft":u&&u.style?.borderRight===h?o.style.borderLeft="none":o.style.borderLeft=h;break;case"borderRight":f&&f.style?.borderLeft===h?o.style.borderRight="none":o.style.borderRight=h}};switch(n){case"border-all-sides":p("borderTop"),p("borderBottom"),p("borderLeft"),p("borderRight");break;case"border-none":if(o.style={...o.style,borderRight:C,borderLeft:C,borderTop:C,borderBottom:C},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":p("borderRight");break;case"border-left":p("borderLeft");break;case"border-top":p("borderTop");break;case"border-bottom":p("borderBottom")}c(e,t,o)}return a}(e.model.data,i,n,r,e.editable);return{...e,model:new jv(e.model.createFormulaParser,a)}}case PA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"underline"===r.style?.textDecoration){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,textDecoration:o?"none":"underline"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case jA:{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 a=kv(i),{start:o,end:l}=t;let s=e;for(let e=o.row;e<=l.row;e++)for(let t=o.column;t<=l.column;t++){const n=jg({row:e,column:t},s);n&&r&&(n.readOnly||(s=_g({row:e,column:t},{...n,style:{...n.style,fontSize:a}},s)))}return s}(e.model.data,r,n,e.editable),a=new jv(e.model.createFormulaParser,i);let o={...e.rowDimensions};if(e.active&&"edit"!==e.mode){const t=e.active.row,n=i[t];if(n){let e=32;n.forEach(t=>{if(!t)return;const n=t.style?.fontSize?parseInt(t.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*n,18),i=(["file","dropDown"].includes(t?.inputType?.type??"")?0:String(t.value).split(" ").length)+(String(t.value).split("\n").length-1);e=Math.max(e,r*i)}),o[t]={...o[t]||{top:0,height:32},height:e}}}else if(r)for(let e=r.start.row;e<=r.end.row;e++){const t=i[e];if(!t)continue;let n=32;t.forEach(e=>{if(!e)return;const t=e.style?.fontSize?parseInt(e.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*t,18),i=(["file","dropDown"].includes(e?.inputType?.type??"")?0:String(e.value).split(" ").length)+(String(e.value).split("\n").length-1);n=Math.max(n,r*i)}),o[e]={...o[e]||{top:0,height:32},height:n}}return{...e,model:a,rowDimensions:o}}case BA:{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:a}=t;let o=e;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const i=jg({row:e,column:t},o);i&&r&&(i.readOnly||(o=_g({row:e,column:t},{...i,style:{...i.style,fontFamily:n}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case _A:{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:a}=t;let o=e;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const i=jg({row:e,column:t},o);i&&r&&(i.readOnly||(o=_g({row:e,column:t},{...i,style:{...i.style,textAlign:n}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case UA:{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:a}=t;let o=e;const l=Uv(n)?`#${n}`:n;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const n=jg({row:e,column:t},o);n&&r&&(n.readOnly||(o=_g({row:e,column:t},{...n,style:{...n.style,color:l}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case WA:{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:a}=t;let o=e;const l=Uv(n)?`#${n}`:n;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const n=jg({row:e,column:t},o);n&&r&&(n.readOnly||(o=_g({row:e,column:t},{...n,style:{...n.style,backgroundColor:l}},o)))}return o}return e}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case XA:{if(!e.editable)return e;const t=function(e,t){if(!t)return;const{row:n,column:r}=t,i=jg({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 rv,active:e.copied?.start||null,copied:null,formattedStyle:{open:!1,style:void 0}}:{...e,selected:new rv,active:null,copied:n,formattedStyle:{open:!0,style:t}}}case AA:{const{data:n}=t.payload,r=e.active&&Gg(e.active,n)?e.active:null,i=e.selected.normalizeTo(n);return{...e,model:new jv(e.model.createFormulaParser,n),active:r,selected:i}}case gA:{const{createFormulaParser:n}=t.payload;return{...e,model:new jv(n,e.model.data)}}case vA:{const{row:n,extend:r}=t.payload,{active:i}=e,a=new sv(r&&i?i.row:n,n),o=r&&i?i:{...tv,row:n};return{...e,selected:a,active:o,mode:"view",selectedColumn:null,selectedRow:n}}case yA:{const{column:n,extend:r}=t.payload,{active:i}=e,a=new cv(r&&i?i.column:n,n),o=r&&i?i:{...tv,column:n};return{...e,selected:a,active:o,mode:"view",selectedColumn:n,selectedRow:null}}case wA:return{...e,selected:new ov,active:tv,mode:"view"};case bA:{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 EA:{const{point:n}=t.payload;return e.active&&!pv(e.active,n)?{...e,selected:new iv(new ev(n,e.active)),mode:"view"}:e}case MA:{const{point:n}=t.payload;return{...e,selected:new iv(new ev(n,n)),active:n,mode:pv(e.active,n)&&e.editable?"edit":"view"}}case LA:{const{active:n,data:r}=t.payload;return cy(e)||!e.editable?e:{...e,model:_v(e.model,n,r),lastChanged:n}}case HA:{const{point:n,dimensions:r}=t.payload,i=e.rowDimensions[n.row],a=e.columnDimensions[n.column];return i&&a&&i.top===r.top&&i.height===r.height&&a.left===r.left&&a.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 xA:case VA:{const n=e.selected.toRange(e.model.data);return{...e,copied:n,cut:t.type===VA,hasPasted:!1}}case kA:{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})),a=Kg(i),o=e.selected.toRange(e.model.data);let l=null;e.cut&&e.copied&&(l=new ev(r,{row:r.row+a.rows-1,column:r.column+a.columns-1}));const s=e=>!!l&&(e.row>=l.start.row&&e.row<=l.end.row&&e.column>=l.start.column&&e.column<=l.end.column);if(o&&1===a.rows&&1===a.columns){const t=jg({row:0,column:0},i);let n=e.model.data;if(e.cut&&e.copied)for(const t of e.copied)s(t)||(n=Xg(t,n));const r=[];for(const i of o||[]){const a=jg(i,e.model.data)||null,o={...a,value:t?.value};r.push({prevCell:a||Zv,nextCell:Zv}),Nv(a)&&(n=_g(i,o,n))}return{...e,model:new jv(Dv,n),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:r}}const c={rows:r.row+a.rows,columns:r.column+a.columns},d=function(e,t){const{rows:n,columns:r}=Kg(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 a=[...e];if(i.columns>r){const e=i.columns-r;a=a.map(t=>[...t,...Array(e).fill(Ug)])}if(i.rows>n){const e=i.rows-n,t=Array(i.columns).fill(Ug);a=[...a,...Array(e).fill(t)]}return a}(e.model.data,c);let u={data:d,commit:[]};for(const[t,n]of Qg(i)){let i=u.commit||[];const a={row:t.row+r.row,column:t.column+r.column};let o=u.data;if(e.cut&&e.copied){const r={row:t.row+e.copied.start.row,column:t.column+e.copied.start.column};s(r)||(o=Xg(r,u.data)),i=[...i,{prevCell:n||null,nextCell:null}]}Gg(a,d)||(u={data:o,commit:i});const l=jg(a,o)||null;i=[...i,{prevCell:l,nextCell:n||null}],Nv(l)&&(u.data=_g(a,{...l,value:n?.value??""},o),u.commit=i)}return{...e,model:new jv(Dv,u.data),selected:new iv(new ev(r,{row:r.row+a.rows-1,column:r.column+a.columns-1})),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:u.commit}}case SA:return Wv(e);case ZA:return Jv(e);case"CLEAR":return Gv(e);case OA:return Yv(e);case zA:{const{event:n}=t.payload;if(cy(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()?Wv(Gv(e)):Wv(e)}return e}case NA:{const{event:n}=t.payload;if(n.ctrlKey)return{...e,ctrl:!e.ctrl};if(cy(e)||n.metaKey||!e.editable)return e;const r=sy(e,n);return r?{...e,...r(e,n)}:e}case eg:{const{row:n,height:r}=t.payload,i=e.rowDimensions[n]||{top:0};let a=e.model.data;if(a[n]){const e=a?.[n]?.length;for(let t=0;t<e;t++){const e={row:n,column:t},i=jg(e,a)||Zv;a=_g(e,{...i,style:{...i.style,height:r}},a)}}const o=new jv(e.model.createFormulaParser,a);return{...e,rowDimensions:{...e.rowDimensions,[n]:{top:i.top,height:r}},model:o}}case tg:{const{column:n,width:r}=t.payload,i=e.columnDimensions[n]||{left:0};if(!e.model.data)return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}}};let a=e.model.data??[];for(let e=0;e<a.length;e++)if(a[e]&&a?.[e]?.length>n){const t={row:e,column:n},i=jg(t,a)??Zv;a=_g(t,{...i,style:{...i.style??{},width:r}},a)}const o=new jv(e.model.createFormulaParser,a);return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}},model:o}}case ng:{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 IA:return{...e,dragging:!0};case og:{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=jg(n,r);i&&!i.readOnly&&(r=_g(n,{...i,style:t.style},r));return r}(e.model.data,e.formattedStyle,e.active)),{...e,copied:null,model:new jv(e.model.createFormulaParser,r),formattedStyle:{open:!1,style:void 0},active:n}}case TA:{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 a=e;for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:n.style},a)))}return a}(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:a,end:o}=t,l=a.row-o.row,s=a.column-o.column;let c={row:0,column:0},d={row:0,column:0};Math.abs(l)>Math.abs(s)?(c={row:Math.min(a.row,o.row),column:r?.column??a.column},d={row:Math.max(a.row,o.row),column:r?.column??a.column}):(c={row:r?.row??a.row,column:Math.min(a.column,o.column)},d={row:r?.row??a.row,column:Math.max(a.column,o.column)});let u=e;const f=String(n.value??""),h=[...f.matchAll(/(-?\d+)/g)],C=["dropDown"].includes(n?.inputType?.type||"");for(let e=c.row;e<=d.row;e++)for(let t=c.column;t<=d.column;t++){const a=jg({row:e,column:t},u);if(!a||a.readOnly)continue;const o=["file","dropDown"].includes(a?.inputType?.type||""),d=["file"].includes(a?.inputType?.type||"");if(!C&&o)continue;if(C&&d)continue;let p=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;p=p.replace(/(-?\d+)/g,()=>{const e=h[i++];return e?(parseInt(e?.[1]??"",10)+n).toString():""})}u=_g({row:e,column:t},{...a,style:n.style,value:p,inputType:n.inputType},u)}return u}(e.model.data,t,e.autoFill.cellValue,n,e.ctrl);let{start:i,end:a}=t;const o=i.row-a.row,l=i.column-a.column;let s={row:0,column:0},c={row:0,column:0};return Math.abs(o)>Math.abs(l)?(s={row:Math.min(i.row,a.row),column:n?.column??0},c={row:Math.max(i.row,a.row),column:n?.column??0}):(s={row:n?.row??0,column:Math.min(i.column,a.column)},c={row:n?.row??0,column:Math.max(i.column,a.column)}),{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new jv(e.model.createFormulaParser,r),selected:new iv(new ev(s,c))}}return{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new jv(e.model.createFormulaParser,r)}}case DA:{const{changes:n}=t.payload;return{...e,...$v(n)}}default:throw new Error("Unknown action")}}var py,my={exports:{}},Ay={};var gy,vy,yy={};
19
+ */function vm(){if(am)return im;am=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return im=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 a,o,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 a=Object(arguments[s]))t.call(a,c)&&(l[c]=a[c]);if(e){o=e(a);for(var d=0;d<o.length;d++)n.call(a,o[d])&&(l[o[d]]=a[o[d]])}}return l},im}function ym(){if(lm)return om;lm=1;return om="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function wm(){return cm?sm:(cm=1,sm=Function.call.bind(Object.prototype.hasOwnProperty))}function bm(){if(um)return dm;um=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ym(),n={},r=wm();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,a,o,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")+": "+o+" 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](a,c,l,o,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+o+" `"+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 "+o+" type: "+d.message+(null!=f?f:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},dm=i}function Em(){if(hm)return fm;hm=1;var e=gm(),t=vm(),n=ym(),r=wm(),i=bm(),a=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),fm=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:C(o),arrayOf:function(e){return C(function(t,r,i,a,o){if("function"!=typeof e)return new h("Property `"+o+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+a+" `"+o+"` of type `"+g(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,a,o+"["+s+"]",n);if(c instanceof Error)return c}return null})},element:C(function(e,t,n,r,i){var a=e[t];return l(a)?null:new h("Invalid "+r+" `"+i+"` of type `"+g(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:C(function(t,n,r,i,a){var o=t[n];return e.isValidElementType(o)?null:new h("Invalid "+i+" `"+a+"` of type `"+g(o)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return C(function(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||d;return new h("Invalid "+i+" `"+a+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+o+"`.")}var l;return null})},node:C(function(e,t,n,r,i){return A(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return C(function(t,i,a,o,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var s=t[i],c=g(s);if("object"!==c)return new h("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,a,o,l+"."+d,n);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(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."),o;return C(function(t,n,r,i,a){for(var o=t[n],l=0;l<e.length;l++)if(f(o,e[l]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new h("Invalid "+i+" `"+a+"` of value `"+String(o)+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),o}return C(function(t,i,a,o,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,a,o,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+o+" `"+l+"` supplied to `"+a+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return C(function(t,r,i,a,o){var l=t[r],s=g(l);if("object"!==s)return new h("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(i,a,o,c,v(d));var u=d(l,c,i,a,o+"."+c,n);if(u)return u}return null})},exact:function(e){return C(function(i,a,o,l,s){var c=i[a],d=g(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+o+"`, expected `object`.");var u=t({},i[a],e);for(var f in u){var C=e[f];if(r(e,f)&&"function"!=typeof C)return m(o,l,s,f,v(C));if(!C)return new h("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(i[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=C(c,f,o,l,s+"."+f,n);if(p)return p}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 C(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,o,l,c,u,f,C){if(c=c||d,f=f||l,C!==n){if(s){var p=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 p.name="Invariant Violation",p}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(a("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==o[l]?i?null===o[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(o,l,c,u,f)}var o=i.bind(null,!1);return o.isRequired=i.bind(null,!0),o}function p(e){return C(function(t,n,r,i,a,o){var l=t[n];return g(l)!==e?new h("Invalid "+i+" `"+a+"` of type `"+v(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 A(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(A);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(!A(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!A(i[1]))return!1}return!0;default:return!1}}function g(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 v(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=v(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},fm}function Mm(){if(pm)return Cm;pm=1;var e=ym();function t(){}function n(){}return n.resetWarningCache=t,Cm=function(){function r(t,n,r,i,a,o){if(o!==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 a={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 a.PropTypes=a,a}}function Lm(){if(mm)return $p.exports;if(mm=1,"production"!==process.env.NODE_ENV){var e=gm();$p.exports=Em()(e.isElement,true)}else $p.exports=Mm()();return $p.exports}var Hm=S(Lm()),xm=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Vm(){return Vm=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},Vm.apply(this,arguments)}function km(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sm(e,t){return Sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sm(e,t)}var Zm,Om,zm=function(e){var t,n;function i(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(km(t)),t.handleErrored=t.handleErrored.bind(km(t)),t.handleChange=t.handleChange.bind(km(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(km(t)),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Sm(t,n);var a=i.prototype;return a.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},a.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},a.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},a.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},a.executeAsync=function(){var e=this;return new Promise(function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()})},a.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},a.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},a.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},a.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},a.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},a.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())},a.componentDidMount=function(){this.explicitRender()},a.componentDidUpdate=function(){this.explicitRender()},a.handleRecaptchaRef=function(e){this.captcha=e},a.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xm);return r.createElement("div",Vm({},t,{ref:this.handleRecaptchaRef}))},i}(r.Component);zm.displayName="ReCAPTCHA",zm.propTypes={sitekey:Hm.string.isRequired,onChange:Hm.func,grecaptcha:Hm.object,theme:Hm.oneOf(["dark","light"]),type:Hm.oneOf(["image","audio"]),tabindex:Hm.number,onExpired:Hm.func,onErrored:Hm.func,size:Hm.oneOf(["compact","normal","invisible"]),stoken:Hm.string,hl:Hm.string,badge:Hm.oneOf(["bottomright","bottomleft","inline"]),isolated:Hm.bool},zm.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Nm=function(){if(Om)return Zm;Om=1;var e=gm(),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 a(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 o=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,u=Object.prototype;return Zm=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 C=a(t),p=a(r),m=0;m<h.length;++m){var A=h[m];if(!(n[A]||i&&i[A]||p&&p[A]||C&&C[A])){var g=c(r,A);try{o(t,A,g)}catch(e){}}}}return t},Zm}(),Im=S(Nm);function Tm(){return Tm=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},Tm.apply(this,arguments)}var Dm={},Fm=0;var Rm="onloadcallback";function Pm(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}var Bm=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",i=function(r){var i,a;function o(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}a=r,(i=o).prototype=Object.create(a.prototype),i.prototype.constructor=i,i.__proto__=a;var l=o.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Fm++),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=Dm[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,a=i.globalName,o=i.callbackName,l=i.scriptId;if(a&&void 0!==window[a]&&(Dm[n]={loaded:!0,observers:{}}),Dm[n]){var s=Dm[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)},Dm[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(Dm[n]){var t=Dm[n].observers;for(var r in t)e(t[r])&&delete t[r]}};o&&"undefined"!=typeof window&&(window[o]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=Dm[n];e&&(e.loaded=!0,f(function(t){return!o&&(t(e),!0)}))},d.onerror=function(){var e=Dm[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=Dm[e];i&&(delete i.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete Dm[e])},l.render=function(){var e=t.globalName,r=this.props;r.asyncScriptOnLoad;var i=r.forwardedRef,a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(a[e]=void 0!==window[e]?window[e]:void 0),a.ref=i,m(n,a)},o}(E),o=a(function(e,t){return m(i,Tm({},e,{forwardedRef:t}))});return o.displayName="AsyncScriptLoader("+r+")",o.propTypes={asyncScriptOnLoad:Hm.func},Im(o,n)}}(function(){var e=Pm(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Rm+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Rm+"&render=explicit"},{callbackName:Rm,globalName:"grecaptcha",attributes:Pm().nonce?{nonce:Pm().nonce}:{}})(zm);const jm=Bm,_m=a(({onVerify:t,className:r="",error:i,sitekey:a,...o},l)=>{const[s,d]=c(null),u=i||s;return n("div",{className:I("ff-recaptcha-wrapper",r),role:"group","aria-label":"Captcha verification",children:[e(jm,{ref:l,sitekey:a,onChange:e=>{e?(d(null),t(e)):d("Please complete the CAPTCHA")},...o}),u&&e("div",{className:"ff-recaptcha-error",role:"alert","aria-live":"assertive",children:e(U,{fontSize:12,children:u})})]})}),qm={margin:6,optionHeight:32,selectInputHeight:38,dropDownWrapperPadding:0},Um=({onSelectBlur:r,onSelectOptionSelector:i,dropdownPosition:a,options:s=[],optionZIndex:u=100,inputRef:f,webServiceClick:h=()=>{},accessibilityClick:C=()=>{},containerWidth:p,loadMoreOptions:m,chipRef:A,isWebservice:g=!0,isAccessibility:v=!1,dropDownMessage:y=""})=>{const[w,b]=c(null),[E,M]=c(""),L=d(Q),H=L?.currentTheme,x=o(null),[V,k]=c(-1);J(x,r,[f,A]);const{positionX:S,positionY:Z,width:O,fromBottom:z}=a,{margin:N,optionHeight:T,selectInputHeight:D,dropDownWrapperPadding:F}=qm,R=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}},P=({platform:n,nlpType:r})=>"NLP"===r?e(q,"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}:"Desktop"===n?{name:"local",height:10,width:10}:{name:"common_nlp",height:10,width:10}):"WORKBENCH_REQUEST"===r&&"Webservice"===n?e(q,{name:"web_service_icon",height:8,width:8}):e(t,{});Sn(["ff-nlp-dropdown-pagination"],{root:document.getElementById("ff-nlp-dropdown-options-wrapper"),rootMargin:"0px",threshold:.1,onIntersect:(e,t)=>{e.isIntersecting&&m&&m()}}),l(()=>{if(V>=0&&V<s.length){const e=s[V];b(e),M("show")}else V>=s.length&&(b(null),M(""),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":V>=0&&s[V]&&i(s[V])}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,V]),l(()=>{if(V<0)return;const e=document.getElementById(`ff-nlp-option-${V}`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})},[V]),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 B=e=>e?.searchName||e?.displayName||e?.desc||e?.name||e?.nlpName||"---";return e("section",{className:"ff-nlp-dropdown-wrapper","aria-label":"NLP dropdown",children:n("div",{ref:x,style:{...(()=>{let e;return e=K(s)||s.length>0?5*T+2*F:s.length*T+2*F,z>e+N+80?{left:S,top:Z,width:O,zIndex:u}:{zIndex:u,left:S,width:O,top:Z-D-92-e-N}})(),width:p},className:I("ff-nlp-options-wrapper",H),onMouseLeave:()=>M("hide"),"aria-label":"NLP options panel",children:[n("div",{className:"ff-nlp-options-wrapper-main",children:[e("div",{className:"ff-nlp-options-primary-wrapper",id:"ff-nlp-dropdown-options-wrapper","aria-label":"NLP options list",children:K(s)?e(U,{textAlign:"center",lineHeight:"32px",as:"p",color:"var(--ff-nlp-text-color)",className:"ff-nlp-no-option",children:K(y)?"No Results Found":y}):n(t,{children:[s.map((t,r)=>e("div",{onMouseEnter:()=>{b(t),M("show")},id:`ff-nlp-option-${r}`,"aria-selected":V===r,"aria-label":String(B(t)),children:e("div",{onMouseEnter:()=>k(r),onClick:()=>i(t),onKeyDown:e=>{"Enter"===e.key&&i(t)},children:n(U,{as:"div",lineHeight:"30px",fontSize:12,className:I("ff-nlp-option",H,{"ff-nlp-option--selected":V===r}),children:[e(Y,{title:t.platform,children:e("span",{children:e(U,{className:`nlp-categories ${R(t.nlpType).className}`,fontWeight:"regular",fontSize:8,lineHeight:"32px",children:R(t.nlpType).label})})}),e("span",{children:P(t)}),B(t)]})})},`ff-nlp-option-${r}`)),e("div",{id:"ff-nlp-dropdown-pagination"})]})}),n("div",{className:I("show"===E?"ff-nlp-web-service-div":"ff-nlp-primary-web-service-div",{"ff-nlp-web-service-div--gap":v}),"aria-label":"NLP quick actions",children:[g&&e(Zp,{iconName:"plus_user_icon",label:"Web Service",onClick:()=>{r(),h()}}),v&&e(Zp,{iconName:"plus_user_icon",label:"Accessibility",onClick:()=>{r(),C()}})]})]}),e("div",{className:"show"===E?"ff-nlp-data-show":"ff-nlp-data-hide","aria-label":"NLP details panel",children:n("div",{className:"ff-nlp-data-side-menu","aria-label":"NLP selected option details",children:[w?.videoSrc&&n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:10,children:["Video",e("div",{className:"nlp-details ",children:e("video",{src:w.videoSrc,controls:!0,className:"nlp-video-player",width:"100%","aria-label":"NLP preview video",children:"Your browser does not support the video tag."})})]}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["STEP_GROUP"===w?.nlpType?"Step Group Details":"NLP Details",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:B(w)})]}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Description",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:w?.description||"--"})]}),"STEP_GROUP"===w?.nlpType&&e(t,{children:n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Path",e(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:w?.path?w?.path:"---"})]})}),e(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:"Inputs"}),w?.stepInputs?.length?w.stepInputs.map((t,r)=>{const i=t.type?t?.type?.split(".")?.pop():"--";return e("div",{children:n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Input",r+1,n(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["type: ",i]}),n(U,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["name: ",t.name||"--"]})]})},r)}):e("div",{className:"nlp-details",children:"--"}),n(U,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Output",e(U,{className:"nlp-details ",fontWeight:"regular",fontSize:12,children:w?.returnType||"--"})]})]})})]})})},Wm=a(({chipOptionList:t,selectedChips:r,optionZIndex:i=0,inputRef:a,ChipsAccordionWidth:s},d)=>{const[f,h]=c([]),[C,p]=c(!1),[m,A]=c({left:0,top:0}),[g,v]=c("down"),y=o(null);b(d,()=>y.current);const w=Sa(y,C);l(()=>{K(t)||h(t)},[t]);const E=o(null),M=()=>{E.current};l(()=>{M()},[f]),u(()=>{const e=()=>{if(!a?.current)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=w(a);v(r<160?"up":"down"),A({left:e+n,top:t})};e();const t=new ResizeObserver(()=>e());return a?.current&&t.observe(a.current),window.addEventListener("scroll",e,!0),()=>{a?.current&&t.unobserve(a.current),t.disconnect(),window.removeEventListener("scroll",e,!0)}},[w,a]);return l(()=>{const e=()=>{M()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),L(n("section",{className:"ff-chips-accordion",style:{left:m.left,top:m.top,zIndex:i+100,transform:"up"===g?"translateY(calc(-100% + 33px))":"none",width:s,position:"absolute"},ref:y,"aria-label":"Selected chips accordion",children:[e("div",{ref:E,className:"ff-chips-row "+(C?"expanded":""),style:{maxHeight:C?"280px":"20px"},"aria-label":"Chips list",children:e("div",{className:"chips-container "+(C?"chips-container-scroll":""),role:"list","aria-label":"Selectable chips",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),"aria-label":t,"aria-pressed":n,children:e(U,{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 "+(C?"expanded":""),role:"button","aria-expanded":C,"aria-label":C?"Collapse chips list":"Expand chips list",children:e(q,{name:"down"===g?"arrows_down_icon":"arrows_top_icon",height:8,width:8,onClick:()=>{p(e=>!e),C&&document.querySelector(".ff-chips-row")?.scrollTo({top:0})},"aria-label":C?"Collapse chips list":"Expand chips list"})})})]}),document.body)}),Xm=(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:a}=t.payload||{};return{...e,dropdownPosition:{positionX:n,positionY:r,width:i,fromBottom:a}};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}},Qm=({label:t="",leftIcon:r,rightIcon:i,rightIconColor:a,showLabel:s=!0,onHelpIconClick:d=()=>{},aiIconClick:f=()=>{},webServiceClick:h=()=>{},accessibilityClick:C=()=>{},containerWidth:p="",optionsList:m=[],selectedOption:A={displayName:"",projectId:"",nlpType:"",platform:""},onChange:g=()=>{},errorMsg:y="",className:w="",optionZIndex:b=100,disabled:E=!1,borderRadius:M=!0,showBorder:H=!0,required:x=!1,value:V="",onSelect:k=()=>{},chipOptionList:S,selectedChips:Z,loadMoreOptions:O=()=>{},isWebservice:z=!0,isAccessibility:N=!1,closeInputOnOutsideClick:T=()=>{},tooltipText:D="Help",ChipsAccordionWidth:F="27.8%",dropDownMessage:R=""})=>{const P={isInputFocused:!1,isIconClick:!1,showOptions:!1,option:K(A)&&"string"==typeof A?.displayName?A.displayName:"",dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}},[B,j]=v(Xm,P),[_,W]=c(A),[X,Q]=c({}),G=o(!1);l(()=>{const e="string"==typeof A.displayName?A.displayName:String(A.displayName??"");e!==_.displayName&&W({...A,displayName:e})},[A]),l(()=>{V&&oe("FOCUS_INPUT")},[V]);const Y=o(null),J=o(null),$=o(null),{isInputFocused:ee,isIconClick:te,showOptions:ne,dropdownPosition:re,option:ie}=B,ae=Sa(Y,ne),oe=e=>{E||j("SHOW_ERROR"===e||"BLUR_INPUT"===e?{type:e,payload:{option:"string"==typeof A.displayName?A.displayName:String(A.displayName??"")}}:{type:e})},le=()=>{if(!ne||!Y?.current||E)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=ae(Y);j({type:"UPDATE_DROPDOWN_POSITION",payload:{positionX:e,positionY:t,width:n,fromBottom:r}})},se=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;ne&&se(!ne),le();const e=()=>le();return window.addEventListener("resize",e),window.addEventListener("scroll",e),()=>{se(!0),window.removeEventListener("resize",e),window.removeEventListener("scroll",e)}},[ne]),l(()=>{y&&oe("SHOW_ERROR")},[]),l(()=>{oe("FOCUS_INPUT")},[]);const ce=!ee&&Boolean(ie);return l(()=>{const e=J.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=ne||S;return t.style.overflow=r?"hidden":n||"auto",()=>{t.style.overflow=n||"auto"}},[ne,S]),n("section",{className:"main-section","aria-label":"NLP input section",children:[n("div",{className:I(`ff-nlp-input-wrapper ${w}`),"aria-label":"NLP input wrapper",children:[n("div",{className:"ff-nlp-input","aria-label":"NLP input field",children:[e("input",{type:"text",className:I("ff-nlp-input-container",{"ff-nlp-input-container--default":!ee,"ff-nlp-input-container--active":ce,"ff-nlp-input-container--no-label":!s,"ff-nlp-input-container--error":y&&!ee&&!Boolean(ie),"ff-nlp-input-container--border-radius":!M,"ff-nlp-input-container--disable":E,"ff-nlp-input-container--no-border":!H}),style:{zIndex:b,paddingLeft:"32px"},onFocus:()=>oe("FOCUS_INPUT"),onChange:e=>{E||g(e)},value:V,disabled:E,autoComplete:"off",spellCheck:"false",ref:J,autoFocus:!0,"aria-label":t||"NLP input"}),n("div",{className:"ff-nlp-icon-container","aria-label":"AI search action",children:[e(q,{name:r||"ai_search",className:"ff-nlp-help_icon",width:16,height:16,onClick:f,"aria-label":"Search with AI"}),e(U,{className:"icon-label",fontSize:10,children:"Search With Ai"})]}),s&&n("div",{className:I("ff-nlp-input-label","ff-nlp-input-label--default",{"ff-nlp-input-label--active":V||Boolean(ie),"ff-nlp-input-label--error":y}),children:[x&&e(U,{color:"var(--$error-light)",className:"ff-nlp-input-label--required",children:"*"}),t]}),n("div",{className:"help-icon-container",onMouseDown:()=>G.current=!0,style:{zIndex:b},"aria-label":"Help action",children:[e("span",{className:I("ff-nlp-input-arrow",{"ff-nlp-input-arrow--down":!te,"ff-nlp-input-arrow--no-label":!s}),"aria-label":"Help tooltip trigger",onMouseEnter:e=>{const t=e.target.getBoundingClientRect();Q({top:t.top+window.scrollY-20+"px",left:`${t.left+window.scrollX+.5*t.width}px`,visibility:"visible",opacity:1,transitionDelay:"0s"})},onMouseLeave:()=>Q(e=>({...e,visibility:"hidden",opacity:0})),children:e(q,{name:i||"",height:16,width:16,onClick:d,color:a,"aria-label":"Help"})}),L(e(U,{className:"help-icon-label",fontSize:10,style:X,children:D}),document.body)]}),e("fieldset",{className:I("ff-nlp-input-fieldset",{"ff-nlp-input-fieldset--no-label":!s,"ff-nlp-input-fieldset--default":!ee,"ff-nlp-input-fieldset--active":ee,"ff-nlp-input-fieldset--option":ce,"ff-nlp-input-fieldset--error":y,"ff-nlp-input-fieldset--border-radius":!M,"ff-nlp-input-fieldset--no-border":!H}),"aria-label":t||"NLP input boundary"})]}),y&&e(U,{className:"ff-nlp-input-wrapper-error-text",fontSize:8,color:"var(--error-light)","aria-label":y,children:y}),e("div",{ref:Y,"aria-label":"NLP dropdown container",children:ne&&L(e(Um,{onSelectBlur:()=>{E||(G.current?G.current=!1:y?oe("SHOW_ERROR"):(oe("BLUR_INPUT"),T()))},onSelectOptionSelector:e=>{k(e)},dropdownPosition:re,options:m,optionZIndex:b,inputRef:J,webServiceClick:h,accessibilityClick:C,containerWidth:p,loadMoreOptions:O,chipRef:$,isWebservice:z,isAccessibility:N,dropDownMessage:R}),document.body)})]}),e("div",{className:"chips-accordion-content","aria-label":"Selected chips",children:S&&S.length>0&&e(Wm,{chipOptionList:S,selectedChips:Z,optionZIndex:b,ref:$,inputRef:J,ChipsAccordionWidth:F})})]})},Gm=({items:t,onButtonClick:r,selectedValue:i=null,onChange:a,className:o=""})=>{const[s,d]=c(i);l(()=>{i!==s&&d(i)},[i,s]);return n("div",{className:I("ff-icon-radio-group",o),role:"radiogroup","aria-label":"Icon selection group",children:[t?.map(t=>e("div",{className:I("ff-icon-radio-button",{selected:s===t.iconName,disabled:t.disabled}),onClick:()=>(e=>{if(e.disabled)return;const t=e.iconName;d(t),a&&a(t),r(e)})(t),role:"radio","aria-checked":s===t.iconName,"aria-label":t.iconLabel,"aria-disabled":t.disabled||void 0,children:e(Y,{title:t.iconLabel,children:e("div",{className:I("icon-container",{selected:s===t.iconName}),children:e(q,{name:t.iconName,hoverEffect:!1,color:s===t.iconName?"var(--drawer-footer-bg)":"var(--brand-color)"})})})},t.iconName)),e("div",{className:"line-connector"})]})},Km=({width:t="100%",options:r=[],runCount:i=0,className:a="",contentReverse:o=!1,onClick:l=()=>{},modalId:s="",scriptType:c="",readOnly:d=!1,isMissing:u=!1})=>{const f={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",microsoftedge:"edge",firefox:"fire_fox",chrome:"chrome_icon",explorer:"internet_explorer",ios:"mac_icon",comet:"comet_icon"},h="manual"===c.toLowerCase();return console.warn("Options list",r),n("section",{id:s,style:{width:t},className:I("ff-machine-input-field-wrapper",a,{"cursor-event-none":1!==i&&"Automation"==c}),role:"region","aria-label":"Machine input field",onClick:()=>{d||l()},children:[!h&&n(U,{as:"span",color:"var(--ff-machine-input-field-text-color)",fontSize:8,textAlign:"center",className:"ff-machine-input-label","aria-label":`Run ${i}`,children:["Run ",i]}),e("div",{className:I("ff-machine-input-field",{"ff-machine-input-field-reverse":o,"ff-machine-input-field-missing":u}),role:"list","aria-label":"Available machine options",children:r.map(({label:t,type:r,version:i,available:a})=>n("div",{className:I("ff-machine-icon-text-wrapper",{"ff-machine-icon-text-wrapper-reverse":o,show_border:!1===a}),role:"listitem","aria-label":t,children:[e(q,{name:f[r?.toLowerCase()]||"",className:"ff-machine-icon","aria-label":t}),e(Y,{title:t,children:e(U,{className:I("ff-machine-text",{"ff-machine-text-reverse":o}),color:"var(--ff-machine-input-field-text-color)","aria-label":t,children:xn(t,10)?Hn(t,10):t})}),h&&!K(i)&&e(Y,{title:i,children:n(U,{className:I("ff-machine-text",{"ff-machine-text-reverse":o}),color:"var(--ff-machine-input-field-text-color)","aria-label":i,children:[" -"," ",xn(i??"",10)?Hn(i??"",10):i]})})]},r))})]})};Km.displayName="MachineInputField";const Ym=({datSetToolTip:{globalVariableSetName:r="",peVariableSetName:i="",testDataSetName:a=""}})=>{const o={"Project Environment Set":i,"Global Variable Set":r,"Test Data Set":a};return e(t,{children:Object.entries(o).map(([t,r],i)=>e("div",{className:"ff-dataSetList-container",children:n("div",{children:[e(U,{as:"div",fontSize:10,lineHeight:"15px",color:"var(--details-page-value-color)",className:"ff-dataSetList-items",children:t}),e(U,{as:"div",lineHeight:"18px",color:"var(--base-bg-color)",children:r})]})},i))})},Jm=e=>"object"==typeof e&&0===Object.keys(e).length,$m=s(null),eA=({machineInstances:r,rowIndex:i,machineColumnCount:a,nextRowMachineInstance:o,previousRowMachineInstance:l,onAddBrowser:s,onDeleteBrowser:c,onAddRunBrowser:u,onUpdateDataSetList:f,onUpdateAddBrowserInstance:h,addInstanceLabel:C="",scriptType:p="",projectType:m="",readOnly:A,maxRunCount:g})=>{const v=i%2==0,y=K(r[a-1]),w=d($m),{testDataSetMap:b={},globalVariableMap:E={},projectVariableMap:M={}}=w||{},L=(e,t)=>e&&t&&"machineInstanceId"in e&&"machineInstanceId"in t&&e.machineInstanceId===t.machineInstanceId?"dashed":"solid",H=e=>r?.length-1!==e&&a>1,x=(e="",t)=>{const{executionEnv:n,browserName:r,browserVersion:i,machineInfo:{osVersion:a,iconName:o,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"===p?.toLowerCase()&&u.push({label:s||"",type:"local"===n?.toLowerCase()?"local":""});const f=[{label:a||"",type:o||l},{label:i,type:r}],h=c?.reduce((e,t)=>(t&&e?.push({label:t?.name,type:"manual"===p?.toLowerCase()?"android":t?.platform,version:"manual"===p?.toLowerCase()?t?.version:"",available:"boolean"==typeof t?.available?t?.available:""}),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[]}},V="manual"!==p?.toLowerCase(),k=e=>!K(e)||(Jm(e)||void 0!==o);return n("div",{className:I({"ff-connecting-branch-grid":v,"ff-connecting-branch-grid-reverse":!v}),style:{gridTemplateColumns:1===a?"24px minmax(min-content, auto) 24px":`24px minmax(min-content, auto) repeat(${a-1}, 40px minmax(min-content, auto)) 24px`},children:[n("div",{className:"ff-connecting-branch-start-wrapper",children:[e("div",{className:I({"ff-connecting-branch-arrow":v,"ff-connecting-branch-arrow-reverse":!v})}),e("div",{className:I({"ff-connecting-branch-container":v,"ff-connecting-branch-container-reverse":!v}),style:{border:`1px ${L(r[0],l)} var(--ff-connecting-branch-color)`,borderTop:"none",borderLeft:`${!v&&"none"}`,borderRight:`${v&&"none"}`}})]}),r?.map((i,a)=>{const{runCount:o=("runCount"in i?i.runCount:0),numberOfRuns:l=0,machineInstanceId:d="",peVariableSetId:y="",globalVariableSetId:w="",testDataSetId:S="",testDataSetName:Z="",peVariableSetName:O="",globalVariableSetName:z=""}=i;return n(t,{children:[K(i)?!A&&e("div",{className:"ff-connecting-branch-browser-button",children:e(W,{id:`ff-sequential-branch-add-${d}`,variant:"tertiary",label:C,iconName:"plus_icon",iconPosition:v?"left":"right",onClick:()=>{A||s(`ff-sequential-branch-add-${d}`)}})}):n("div",{children:[n("div",{className:"ff-connecting-branch-input-point-wrapper",children:[k(r[a+1])&&e("div",{className:I({"ff-connecting-branch-point":v,"ff-connecting-branch-point-reverse":!v})}),e(Km,{runCount:o,options:x(m,i),contentReverse:!v,modalId:`${d}-runCount-${o-1}`,onClick:()=>1==o||"Automation"!==p?h(`${d}-runCount-0`,i):null,scriptType:p,readOnly:A},Ai())]}),n("div",{className:I({"ff-connecting-branch-datalist":v,"ff-connecting-branch-datalist-reverse":!v}),children:[V&&n(t,{children:[e("div",{id:`ff-sequential-branch-dataset-${d}-${o}`,className:"ff-dataset-list-branch",onClick:()=>{A||f(`ff-sequential-branch-dataset-${d}-${o}`,{peVariableSetId:y,globalVariableSetId:w,testDataSetId:S,testDataSetName:Z,globalVariableSetName:z,peVariableSetName:O},!0,l,d)},children:n(Y,{placement:"bottom",title:e(t,{children:e(Ym,{datSetToolTip:{peVariableSetName:M[y]||"",globalVariableSetName:E[w]||"",testDataSetName:b[S]||""}})}),style:{display:"flex",alignItems:"center"},children:[e(q,{name:"datalist_icon",className:"ff-connecting-icon",hoverEffect:!0}),e(U,{className:"ff-connecting-text",color:"var(--ff-connecting-branch-color)",children:"Data Set List"})]})}),!A&&e(t,{children:e(Y,{placement:"bottom",title:l>=g?`Maximum ${g} runs are allowed.`:"",children:n("div",{className:"ff-environment-run-container",onClick:l>=g?void 0:()=>u(d),children:[e(q,{name:"plus_icon",className:"ff-connecting-run-icon",color:"var(--ff-connecting-branch-color)",hoverEffect:!0,disabled:l>=g}),e(U,{className:"ff-connecting-run-text",color:"var(--ff-connecting-branch-color)",style:{opacity:l>=g?.5:1},children:"Run"})]})})})]}),!A&&e(Y,{title:"Delete",children:e(q,{name:"delete",className:"ff-connecting-delete-icon",onClick:()=>c(d,o),color:"var(--ff-connecting-branch-delete-color)",hoverEffect:!0})})]})]}),H(a)&&e("div",{className:"ff-connecting-branch-middle-arrow",style:{borderTop:`1px ${L(i,r[a+1])} var(--ff-connecting-branch-color)`},children:e("div",{className:I({"ff-connecting-branch-arrow":v,"ff-connecting-branch-arrow-reverse":!v})})})]},Ai())}),(A?!y&&!K(o):!y)&&e("div",{className:I({"ff-connecting-branch-end-arrow":v,"ff-connecting-branch-end-arrow-reverse":!v}),style:{border:`1px ${L(r[a-1],o)} var(--ff-connecting-branch-color)`,borderBottom:"none",borderLeft:`${v&&"none"}`,borderRight:`${!v&&"none"}`}})]})},tA=({machineBranchInstances:n,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:a,onDeleteBrowser:o,onAddRunBrowser:s,onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f="",scriptType:h="",projectType:C="Web",readOnly:p=!1,maxRunCount:m})=>{const[A,g]=c(n);l(()=>{g(n)},[n]);const v=((e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(A,r);return e("div",{className:"ff-connecting-branch-grid-wrapper",children:v.map((n,l)=>e(t,{children:e(eA,{machineInstances:n,rowIndex:l,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:a,onDeleteBrowser:o,onAddRunBrowser:s,nextRowMachineInstance:v[l+1]?.[0],previousRowMachineInstance:v[l-1]?.[r-1],onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f,scriptType:h,projectType:C,readOnly:p,maxRunCount:m})},Ai()))})},nA=({machineInstances:r=[],machineColumnWidth:i=180,machineColumnCount:a=1,selectedMachine:s={},machineOptionsList:d=[],onHandleSelect:u=()=>{},onAddBrowserInstance:f=()=>{},onAddRunBrowserInstance:h=()=>{},onDeleteBrowserInstance:C=()=>{},onUpdateDataSetList:p=()=>{},onDeleteMachineInstance:m=()=>{},dataSetValues:A={testDataSetId:"",globalVariableSetId:"",peVariableSetId:"",globalVariableSetName:"",peVariableSetName:"",testDataSetName:""},onUpdateAddBrowserInstance:g=()=>{},addInstanceLabel:v="Environment",placeholder:y="Choose Machine",scriptType:w="Automation",projectType:b="Web",readOnly:E=!1,zIndex:M=99999,maxRunCount:L=35,environmentVariableMaps:H,isRequired:x=!1,showIcon:V=!1})=>{const[k,S]=c({}),Z=o(null),O=Math.max(a,1),z=Math.max(i,180),[N,T]=c([]),D=K(r);let F=K(s.value?.clientId);"Manual"===w&&(F=K(s.value));l(()=>{S(s)},[s]),l(()=>{T(E?r:[...r,{}])},[r]);const R="manual"!==w.toLowerCase(),P=(B=A,j="Id",Object.fromEntries(Object.entries(B).filter(([e])=>!e.includes(j))));var B,j;const _=E&&!D||!E&&D||!E&&!D;return e($m.Provider,{value:H,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(Za,{onChange:u,optionsList:d,label:y,required:x,showLabel:!0,className:"ff-sequential-select-branch",width:"240px",selectedOption:k,valueAccessor:"name",optionsRequired:!E,disableInput:E,optionZIndex:M,showIcon:V}),!F&&n("div",{className:I({"ff-select-branch-arrow":D,"ff-select-branch-arrow-down":!D}),children:[_&&e("div",{className:"ff-select-branch-point"}),n("div",{className:"ff-select-branch-arrow",children:[!E&&e("div",{className:"ff-branch-arrow-wrapper",children:D&&e("div",{className:"ff-branch-arrow"})}),D&&!E&&e(t,{children:e(W,{variant:"tertiary",label:"Manual"===w?"Machine":"Environment",iconName:"plus_icon",iconPosition:"left",size:"small",className:"branch-button",ref:Z,onClick:()=>f("ff-sequential-branch-button"),id:"ff-sequential-branch-button"})})]})]})]}),!F&&n("div",{className:"ff-select-scope-datalist",children:[e("div",{className:"ff-scope-wrapper",children:e(U,{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:[R&&e("div",{id:"ff-sequential-machine-datalist",onClick:()=>{E||p("ff-sequential-machine-datalist",A)},children:n(Y,{placement:"bottom",title:e("div",{children:e(Ym,{datSetToolTip:P})}),style:{display:"flex",alignItems:"center"},children:[e(q,{name:"datalist_icon",className:"ff-dataset-icon",hoverEffect:!0}),e(U,{as:"span",color:"var(--ff-connecting-branch-color)",className:"ff-datalist-text",children:"Data Set List"})]})}),!E&&e(Y,{title:"Delete",placement:"bottom",children:e(q,{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:!D&&e(tA,{machineBranchInstances:N,machineColumnCount:O,machineColumnWidth:z,onAddBrowser:f,onDeleteBrowser:C,onAddRunBrowser:h,onUpdateDataSetList:p,onUpdateAddBrowserInstance:g,addInstanceLabel:v,scriptType:w,projectType:b,readOnly:E,maxRunCount:L})})]})})},rA=({label:t,selectedFiles:r,onFilesChange:i,disabled:a=!1,buttonDisplayType:l="attachment",iconName:s="plus_icon",maxFileSizeMB:d,maxFiles:u,buttonLabel:f="Select Files",showSelectedFiles:h=!0,buttonVariant:C="primary",deleteButton:p=!0,multiple:m=!0,addAttachmentButton:A=!0,isInfoIconRequired:g=!0,onFileListClick:v,types:y=[],attachmentInfoTooltip:w="",selectedFileMessage:b="This file is already selected",required:E=!1,errorMessage:M,truncateMaxLimit:L=1/0,onClickAttachmentButton:H=()=>{}})=>{const x=o(null),[V,k]=c(""),S={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"],dat:[".dat","application/octet-stream"],trg:[".trg","application/octet-stream"]},Z=y.flatMap(e=>S[e]||[]).join(","),O=()=>{H(),k(""),x.current?.click()};return n("section",{"aria-label":t?`${t} attachment uploader`:"Attachment uploader",children:[g&&n("div",{className:"ff-label-icon",children:[e(U,{fontWeight:"semi-bold",lineHeight:"18px",as:"span",required:E,children:t}),e(Y,{title:w||(()=>{if(0===y.length)return"Any files are allowed.";const t=y.flatMap(e=>S[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(q,{name:"info",hoverEffect:!0,"aria-label":"Attachment information"})})]}),(!h||0===r.length)&&("attachment"===l?e(W,{variant:C,label:f,size:"medium",onClick:O,disabled:a}):"icon"===l?e(Zp,{label:f,iconName:s,onClick:O,isDisable:a}):null),e("input",{type:"file",ref:x,className:"ff-input-field",onChange:()=>{if(k(""),x.current?.files){const e=Array.from(x.current.files);if(e.length>5)return k("Maximum file(s) can be uploaded: 5"),void(x.current.value="");const t=e.filter(e=>!r.some(t=>t.name===e.name));if(0===t.length)return k(b),void(x.current.value="");if("number"==typeof u&&r.length+t.length>u)return k(`You can only select up to ${u} files.`),void(x.current.value="");if("number"==typeof d){const e=1024*d*1024;if(t.filter(t=>t.size>e).length>0)return k(`Maximum file(s) size allowed: ${d} MB.`),void(x.current.value="")}i([...r,...t],t,"ADD"),x.current.value=""}},multiple:m,accept:Z,required:E,"aria-label":f}),V&&e(bi,{isOpen:!!V,variant:"info",toastTitle:"Info",toastMessage:V,zIndex:1e7}),h&&r.map((t,a)=>n("div",{className:"ff-attachment-files",onClick:v,role:"listitem","aria-label":`Selected file ${t.name}`,children:[e(U,{color:"var(--brand-color)",children:e(zi,{title:t.name,width:L})}),p&&e(Y,{title:"Delete",children:e(q,{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")})(a)})}),a===r.length-1&&A&&e(Y,{title:""+("number"==typeof u&&r.length>=u?`Maximum files can be uploaded: ${u}`:"Add File"),children:e(q,{name:"add_file",hoverEffect:!0,onClick:O,disabled:"number"==typeof u&&!(r.length<u)})})]},t.name)),E&&e(U,{children:M,fontSize:10,className:"error-text"})]})},iA=({selected:t="text",firstButton:r="File",secondButton:i="File",handleClick:a})=>n("div",{className:"toggle-container",children:[e("button",{className:"toggle-button "+(t===r?"active":""),onClick:()=>a(r),children:r}),e("button",{className:"toggle-button "+(t===i?"active":""),onClick:()=>a(i),children:i})]}),aA=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:i,customIconSize:a,backgroundColor:o,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:o},role:"img","aria-label":l?`Avatar for ${l}`:`Avatar icon ${n||"default"}`,children:l?e("span",{className:"ff-avatar-label",style:{fontSize:s||"14px",color:r},children:c}):e(q,{name:n,height:a,width:a,color:r})})},oA=({logo:t,overlay:r=!1})=>e("section",{className:`overlay-loader ${r&&"overlay"}`,role:"status","aria-live":"polite","aria-label":"Loading content",children:n("div",{className:"loader-container ","aria-label":"Loading indicator",children:[t&&e(t,{}),e("div",{className:"line_loader","aria-hidden":"true"})]})}),lA=({contentHeader:t,data:r,maxHeight:i=""})=>{const a=`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("section",{className:"ff-content-card-container","aria-label":"Content card","aria-labelledby":"content-card-header",children:[e("header",{className:"ff-content-card-nav",children:e(U,{as:"div",id:"content-card-header",fontWeight:"semi-bold",lineHeight:"35px",children:t})}),e("div",{className:`ff-content-card-body scrollable ${a}`,role:"region","aria-label":"Content card details",children:Object.entries(r).map(([t,r],i)=>n("div",{className:"ff-content-card-row",role:"listitem","aria-label":`${t}: ${r}`,children:[n(U,{fontWeight:"semi-bold",children:[t,":"]}),e(U,{className:"ff-content-card-value",children:r})]},i+t))})]})},sA="Principle",cA="Guidelines",dA="Weightage in %",uA=e=>null==e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(uA).filter(Boolean).join(" "):i.isValidElement(e)?uA(e.props.children):"",fA=({title:t="Success Criteria Weightage",totalWeightage:r,maxWeightage:i=100,principleColumnLabel:a=sA,guidelinesColumnLabel:o=cA,weightageColumnLabel:l=dA,columnLabels:s,groups:d=[],onWeightageChange:u=()=>{},renderWeightageCell:f,weightageInputWidth:C="12%",onReset:p=()=>{},showResetIcon:m=!0,isResetEnabled:A=!0,resetEnabledTooltip:g="Reset to default value",resetDisabledTooltip:v="No changes to reset",onMaxWeightageReached:y,disabled:w=!1,minValue:b=0,maxValue:E=100,disableUpwardIncreaseOnMax:M=!0,isAccordion:L=!0,defaultExpanded:H=!1,className:x="",style:V})=>{const k=h().replace(/:/g,""),[S,Z]=c(H),O=`${k}-weightage-title`,z=`${k}-weightage-content`,N=d.reduce((e,t)=>e+t.guidelines.length,0);let T=2;const D=d.map(e=>{const t=T;return T+=e.guidelines.length,t}),F={principle:s?.principle??a,guidelines:s?.guidelines??o,weightage:s?.weightage??l},R=uA(F.weightage)||dA,P=i??E,B=r??d.reduce((e,t)=>e+t.guidelines.reduce((e,t)=>e+(t.value||0),0),0),j=Math.max(0,P-B),_=e=>{if(""===e||"-"===e)return 0;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0},W=(e,t,n)=>{u(e,t,n)},X=!L||S,Q=({groupIndex:t,rowIndex:n,row:r,minValue:i,maxValue:a,disabled:o,inputWidth:l,inputProps:s})=>e("div",{className:"ff-weightage-input",style:{width:l},children:e(Vi,{type:"number",noBorder:!0,value:r.value,minValue:i,maxValue:a,disabled:o,error:r.error,helperText:r.helperText,placeholder:"",variant:"primary",isLabelRequired:!1,disableAfterMaxValueReached:!0,size:"small",className:"ff-weightage-input-field",onChange:e=>((e,t,n,r,i,a)=>{const o=a.target.value;if(o.includes(".")||o.includes(","))return;const l=_(o);let s=!1,c="";(l<r||l>i)&&(s=!0,c=`Value must be between ${r} and ${i}`),W(e,t,{...n,value:l,error:s,helperText:c})})(t,n,r,i,a,e),setUpdatedNumberValue:e=>{if("string"==typeof e&&(e.includes(".")||e.includes(",")))return;const o=_(e);if(((e,t,n)=>{const r=e.value||0;return!!(j<=0&&B>=P&&Number.isFinite(n)&&n>=r&&r>=t)&&(y?.(),!0)})(r,a,o))return;const l=o<i||o>a;W(t,n,{...r,value:o,error:l,helperText:l?`Value must be between ${i} and ${a}`:""})},...s,onKeyDown:e=>{[".",",","e","E","+","-"].includes(e.key)?e.preventDefault():"ArrowUp"===e.key&&j<=0&&B>=P&&(r.value||0)>=a&&y?.()}})}),G=(t,n,r)=>e("div",{className:t,role:"columnheader","aria-colindex":r,children:e(U,{fontWeight:"semi-bold",children:e(Qs,{children:n})})}),K=(t,r,i)=>{const a=t.key??t.principle;return e("div",{className:"ff-weightage-group",role:"rowgroup","aria-label":t.principle,children:t.guidelines.map((o,l)=>((t,r,i,a,o,l)=>{const s=a.key??`${i}-${a.label}`,c=a.maxValue??P,d=Math.min(c,100),u=M?Math.min(d,(a.value||0)+j):d,h=Math.min(a.minValue??b,u),p=w||!!a.disabled||!X,m=`${k}-weightage-row-${r}-${o}`,A=a.error&&a.helperText?`${m}-error`:void 0,g={group:t,row:a,groupIndex:r,rowIndex:o,rowKey:s,minValue:h,maxValue:u,disabled:p,inputWidth:C,inputProps:{id:`${m}-input`,name:s,"aria-label":`${R} for ${a.label} in ${t.principle}`,"aria-describedby":A,"aria-errormessage":A,"aria-invalid":a.error||void 0,onWheel:e=>{e.currentTarget.blur()}},onChange:e=>W(r,o,e)};return n("div",{className:"ff-weightage-row",role:"row","aria-rowindex":l,children:[0===o&&e("div",{className:"ff-weightage-principle",role:"rowheader","aria-colindex":1,"aria-rowspan":t.guidelines.length,style:{gridRow:`span ${t.guidelines.length}`},children:e(U,{fontWeight:"medium",children:e(Qs,{children:t.principle})})}),e("div",{className:"ff-weightage-guideline",role:"cell","aria-colindex":2,children:e(U,{children:e(Qs,{className:"auto-truncate",children:a.label})})}),e("div",{className:"ff-weightage-value",role:"cell","aria-colindex":3,children:(v=g,f?f(v):Q(v))})]},s);var v})(t,r,a,o,l,i+l))},a)};return n("div",{className:I("ff-weightage-table",x),style:V,children:[n("div",{className:"ff-weightage-head",children:[e("div",{className:"ff-weightage-title",id:O,children:e(U,{fontWeight:"semi-bold",children:e(Qs,{children:t})})}),n("span",{className:"ff-weightage-total",children:[e("span",{className:"ff-weightage-total-value","aria-live":"polite","aria-label":`Total weightage ${B}`,children:e(U,{fontWeight:"semi-bold",children:n(Qs,{children:["Total Weightage : ",B]})})}),m&&e("span",{className:"ff-weightage-reset-wrap","data-tooltip":A?g:v,children:e("button",{type:"button",className:"ff-weightage-icon-button",onClick:p,disabled:!A||w,"aria-label":A?g:v,children:e(q,{name:"reset_default_value",withPadding:!1,disabled:!A||w})})}),L&&e("button",{type:"button",className:"ff-weightage-icon-button",onClick:()=>{Z(e=>!e)},"aria-label":S?"Collapse weightage table":"Expand weightage table","aria-expanded":X,"aria-controls":z,"data-tooltip":S?"Collapse":"Expand",children:e(q,{name:S?"arrow_up":"arrow_down",withPadding:!1})})]})]}),e("div",{className:I("ff-weightage-content",{"ff-weightage-content--expanded":X}),id:z,"aria-hidden":!X,...X?{}:{inert:""},children:e("div",{className:"ff-weightage-content-inner",children:n("div",{className:"ff-weightage-grid",role:"table","aria-labelledby":O,"aria-colcount":3,"aria-rowcount":N+1,children:[n("div",{className:"ff-weightage-row ff-weightage-row-head",role:"row","aria-rowindex":1,children:[G("ff-weightage-principle",F.principle,1),G("ff-weightage-guideline",F.guidelines,2),G("ff-weightage-value",F.weightage,3)]}),d.map((e,t)=>K(e,t,D[t]??2))]})})})]})},hA=({type:t="file",onChange:r,selectedFile:i,selectedJiraInstance:a,selectedJiraTickets:o,selectedFigmaInstance:l,selectedFigmaPages:s,processedFiles:d=[],jiraInstances:u=[],jiraTickets:f=[],figmaInstances:h=[],ticketLimit:C=3,tooltip:p,dropdownPlacement:m,onSearch:A=()=>{},loadMoreOptions:g=()=>{}})=>{const[v,y]=c(""),[w,b]=c(""),[E,M]=c(null),[L,H]=c(null),[x,V]=c([]),[k,S]=c(null),[Z,O]=c([]),z=void 0!==i?i:E,N=void 0!==a?a:L,I=void 0!==o?o:x,T=void 0!==l?l:k,D=void 0!==s?s:Z,F=(e,n,i,a=null,o=[])=>{r({sourceType:t,selectedFile:e,selectedJiraInstance:n,selectedJiraTickets:i,selectedFigmaInstance:a,selectedFigmaPages:o})},R=d.map(e=>({label:e.name,value:e.id})),P=u.map(e=>({label:e.instanceName,value:e._id})),B=I.length>=C,j=f.filter(e=>e.toLowerCase().includes(v.toLowerCase())).map((t,n)=>{const r=I.some(e=>e.value===t),i=`${n+1}. ${t}`;return{label:B&&!r?e(Y,{title:p??`Only ${C} tickets can be selected`,children:e("span",{className:"disabled-ticket-label",children:i})}):i,value:t,isDisabled:B&&!r}}),_=h.map(e=>({label:e.name||e.instanceName||e._id,value:e._id})),q=h.find(e=>e._id===T?._id)||T,U=q?.pageData||[],W=D.length>=C,X=U?.filter(e=>{const t="string"==typeof e?e:e?.name||"";return t?.toLowerCase()?.includes(w?.toLowerCase())})?.map((t,n)=>{const r="string"==typeof t?t:t?.name||"",i="string"==typeof t?t:t?._id||t?.name||"",a=D.some(e=>e.value===i||e.value===r),o=`${n+1}. ${r}`;return{label:W&&!a?e(Y,{title:p??`Only ${C} page can be selected`,children:e("span",{className:"disabled-ticket-label",children:o})}):o,value:i,isDisabled:W&&!a}});return n("section",{className:"processed-source-selector","aria-label":"Processed source selector",children:["file"===t&&e("section",{className:"selector-row","aria-label":"Processed file selector",children:e("div",{className:"dropdown-container file-dropdown","aria-label":"Processed file dropdown",children:e(Za,{optionsList:R,selectedOption:z?{label:z.name,value:z.id}:{label:"",value:""},onChange:e=>{const t=d.find(t=>t.id===e.value)||null;M(t),F(t,null,[])},placeHolder:"Select Processed File",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"processed-source-file-select",dropdownClassName:"processed-source-select-dropdown",variant:"ai"})})}),"jira"===t&&e("section",{className:"selector-row-wrapper","aria-label":"Processed Jira selectors",children:n("div",{className:"selector-row","aria-label":"Jira selector row",children:[e("div",{className:"dropdown-container instance-dropdown","aria-label":"Jira instance dropdown",children:e(Za,{optionsList:P,selectedOption:N?{label:N.instanceName,value:N._id}:{label:"",value:""},onChange:e=>{const t=u.find(t=>t._id===e.value)||null;H(t),V([]),F(null,t,[])},placeHolder:"Processed Jira Instances",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"processed-source-instance-select",dropdownClassName:"processed-source-select-dropdown",variant:"ai"})}),N&&e("div",{className:"dropdown-container ticket-dropdown","aria-label":"Jira ticket multi select",children:e(wi,{label:"Select Jira Ticket",options:j,selectedOptions:I,onChange:e=>{e.length<=C&&(V(e),F(null,N,e))},placeholderForSearching:"Search Jira Ticket",displayCount:!0,noResultsMessage:"No tickets available",dropdownPlacement:m,className:"processed-source-tickets-select",dropdownClassName:"processed-source-multiselect-dropdown",variant:"ai",onSearch:e=>{y(e),A(e)},loadMoreOptions:g})})]})}),"figma"===t&&e("section",{className:"selector-row-wrapper","aria-label":"Figma selectors",children:n("div",{className:"selector-row","aria-label":"Figma selector row",children:[e("div",{className:"dropdown-container instance-dropdown","aria-label":"Figma instance dropdown",children:e(Za,{optionsList:_,selectedOption:T?{label:T.name||T.instanceName||T._id,value:T._id}:{label:"",value:""},onChange:e=>{const t=h.find(t=>t._id===e.value)||null;S(t),O([]),F(null,null,[],t,[])},placeHolder:"Figma Instances",showLabel:!1,showToolTip:!0,dropdownPlacement:m,className:"source-instance-select",dropdownClassName:"source-select-dropdown",variant:"ai"})}),T&&e("div",{className:"dropdown-container ticket-dropdown","aria-label":"Figma page multi select",children:e(wi,{label:"Select Figma Page",options:X,selectedOptions:D,onChange:e=>{e.length<=C&&(O(e),F(null,null,[],T,e))},placeholderForSearching:"Search Figma Page",displayCount:!0,noResultsMessage:"No pages available",dropdownPlacement:m,className:"processed-source-tickets-select",dropdownClassName:"processed-source-multiselect-dropdown",variant:"ai",onSearch:e=>{b(e),A(e)},loadMoreOptions:g})})]})})]})},CA=({label:t,placeholder:r,text:i,showText:a=!0,highlightText:s,customError:d,confirmIcon:u,customErrorCondition:f,cancelIcon:h,variant:C="textField",onInputChange:p,dropdownData:m=[],className:A,height:g,isOpen:v=!1,confirmAction:y,onClick:w,tooltip:b,onDoubleClick:E,disableEditing:M=!1})=>{const[L,H]=c(v??!1),[x,V]=c(i??""),[k,S]=c(m[0]?.value??""),[Z,O]=c(""),[z,N]=c(!0),[I,T]=c(!1),D=!(!Z||!L),F=o(null),R=o(null),[P,B]=c(null),j=X("Escape");l(()=>()=>{P&&clearTimeout(P)},[P]);const _=()=>{let e="";0===x.length||0===x.trim().length?e="Please type any text.":x.length<3?e="Please enter at least 3 characters.":f&&(e=d??"Invalid input."),e?O(e):(H(!1),O(""),y&&y(x,k)),u?.onClick?.()},W=()=>{V(i??""),S(m[0]?.value??""),H(!1),O(""),T(!1),h?.onClick?.()},Q=e=>{const t=e.target.value;V(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"):$n.test(t)?O("Space is not allowed at starting and at the end"):O(f?d??"Invalid input.":""),T(t!==i),p&&p(t)},G=e=>{if(F.current&&!F.current.contains(e.target)&&R.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")(x,i??"");e&&L?O(e):(H(!1),O(""))}};return l(()=>(document.addEventListener("click",G),()=>{document.removeEventListener("click",G)}),[x]),j(W),Zn([{key:"Enter",action:()=>{_()}}],F),n("section",{className:"ff-label-edit-text-field",ref:F,"aria-label":t||"Editable label text field",children:[L?n("div",{className:"ff-label-text-field","aria-label":"Editing controls",children:["textFieldWithDropdown"===C?n("div",{className:"ff-label-text-field-with-dropdown "+(L?"open":""),style:{height:g},"aria-label":"Editable text field with dropdown",children:[e(Vi,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:x,onChange:Q,className:`${A} \n \n ${I?"modified":""}`,"aria-label":t||"Editable text input"}),e(Za,{label:"",optionsList:m,selectedOption:{value:k,label:k},onChange:e=>S(e.value),"aria-label":"Dropdown selector"})]}):e("div",{className:"ff-label-text-field-without-dropdown","aria-label":"Editable text field",children:e(Vi,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:x,onChange:Q,className:`${A} \n \n ${I?"modified":""}`,"aria-label":t||"Editable text input"})}),n("div",{className:"ff-icon-container","aria-label":"Edit actions",children:[u&&e(Y,{title:"Confirm",placement:"bottom",children:e(q,{color:"var(--label-edit-confirm-icon)",height:20,width:20,name:u.name,disabled:z,className:""+(z?"disabled-confirm-icon":"confirm-icon"),onClick:_,"aria-label":"Confirm changes"})}),h&&e(Y,{title:"Cancel",placement:"bottom",children:e(q,{color:"var(--label-edit-cancel-icon)",height:12,width:20,name:h.name,className:"cancel-icon",onClick:W,ref:R,"aria-label":"Cancel changes"})})]})]}):e(Y,{title:b?.tooltipTitle?b?.tooltipTitle:"",placement:"bottom",children:a&&e("span",{className:"display-text",onDoubleClick:()=>{M||(P&&(clearTimeout(P),B(null)),E&&E(),H(!0),O(""))},role:"button","aria-label":b?.tooltipTitle||t||"Editable text",onClick:()=>{if(M)return;P&&(clearTimeout(P),B(null));const e=window.setTimeout(()=>{w&&w(),B(null)},1e3);B(e)},children:e(yn,{text:x,highlight:s})})}),Z&&L&&e(U,{as:"p",fontSize:8,className:"error-text",children:Z})]})},pA=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",mA=({label:t,text:r,highlightText:i,customError:a,customErrorCondition:l=!1,confirmIcon:s,cancelIcon:d,editIcon:u,dropdownData:f=[],isOpen:h=!1,confirmAction:C,onClick:p,nameTooltipTitle:m})=>{const[A,g]=c(h??!1),[v,y]=c(r),[w,b]=c(!0),[E,M]=c(f[0]?.value??""),[L,H]=c(""),[x,V]=c(!1),k=!(!L||!A),S=o(null),Z=o(null),O=()=>{g(!0),H("")},z=()=>{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")(v,r,a,l);e&&A?H(e):(g(!1),H(""),C&&C(v,E))},N=()=>{y(r),M(f[0]?.value??""),g(!1),H(""),V(!1)};function I(e){"Enter"===e&&z(),"Escape"===e&&N()}return Zn([{key:"Enter",action:()=>I("Enter")},{key:"Escape",action:()=>I("Escape")}],S),n("div",{className:"ff-label-edit-text-field",ref:S,role:"group","aria-label":"Editable text field",children:[n("div",A?{className:"ff-label-text-field",role:"group","aria-label":"Edit text field",children:[e("div",{className:"ff-label-text-field-without-dropdown",children:e(Vi,{name:"input","aria-label":t||"Edit text",label:t||"",disabled:!1,error:k,placeholder:"Enter your name",value:v,onChange:e=>{y(e.target.value),V(!0),H(""),b(!1)},className:"\n \n "+(x?"modified":""),type:"text"})}),n("div",{className:"ff-icon-container",role:"group","aria-label":"Edit actions",children:[s&&e(Y,{title:"confirm",placement:"bottom",children:e(q,{color:s?.color??"var(--default-confirm-icon-color)",height:s?.height??20,disabled:w,width:s?.width??20,name:s?.name??"default-confirm-icon",className:`${s?.className??"default-confirm-class"} ${w?"disabled-confirm-icon":"confirm-icon"}`,onClick:z,"aria-label":"Confirm edit"})}),d&&e(Y,{title:"cancel",placement:"bottom",children:e(q,{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:N,ref:Z,"aria-label":"Cancel edit"})})]})]}:{className:"display-text-container",role:"group","aria-label":"Display text",children:[m?e(Y,{title:m,children:e("span",{className:"display-text",onClick:p,role:"button",tabIndex:0,"aria-label":"Edit text",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),O())},children:e(yn,{text:v,highlight:i})})}):e("span",{className:"display-text",onClick:p,role:"button","aria-label":"Edit text",children:e(yn,{text:v,highlight:i})}),e(Y,{title:pA(u?.name??"Edit"),children:e(q,{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:O,"aria-label":"Edit text"})})]}),L&&A&&e(U,{as:"p",fontSize:8,className:"error-text",children:L})]})},AA="SET_DATA",gA="SET_CREATE_FORMULA_PARSER",vA="SELECT_ENTIRE_ROW",yA="SELECT_ENTIRE_COLUMN",wA="SELECT_ENTIRE_WORKSHEET",bA="SET_SELECTION",EA="SELECT",MA="ACTIVATE",LA="SET_CELL_DATA",HA="SET_CELL_DIMENSIONS",xA="COPY",VA="CUT",kA="PASTE",SA="EDIT",ZA="VIEW",OA="BLUR",zA="KEY_PRESS",NA="KEY_DOWN",IA="DRAG_START",TA="DRAG_END",DA="COMMIT",FA="BOLD",RA="ITALIC",PA="UNDERLINE_TYPE",BA="FONT_FAMILY",jA="FONT_SIZE",_A="TEXT_ALIGN",qA="BORDER_TYPE",UA="COLOR",WA="BACKGROUND_COLOR",XA="FORMATE_PAINTER",QA="ADD_ROW_TOP",GA="ADD_ROW_BOTTOM",KA="ADD_COLUMN_LEFT",YA="ADD_COLUMN_RIGHT",JA="DELETE_ROW",$A="DELETE_COLUMN",eg="SET_ROW_HEIGHT",tg="SET_COLUMN_WIDTH",ng="SET_COLUMN_POSITION",rg="SET_AUTO_FILL",ig="UPDATE_COLUMN_DIMENSIONS",ag="SET_EDITABLE",og="ON_MOUSE_UP";function lg(e){return{type:og,payload:{point:e}}}function sg(e){return{type:ag,payload:{editable:e}}}function cg(e,t){return{type:eg,payload:{row:e,height:t}}}function dg(e,t){return{type:ng,payload:{column:e,width:t}}}function ug(e){return{type:FA,payload:{data:e}}}function fg(e){return{type:RA,payload:{data:e}}}function hg(e,t,n){return{type:qA,payload:{data:e,value:t,color:n}}}function Cg(e){return{type:PA,payload:{data:e}}}function pg(e,t){return{type:jA,payload:{data:e,value:t}}}function mg(e,t){return{type:BA,payload:{data:e,value:t}}}function Ag(e,t){return{type:_A,payload:{data:e,value:t}}}function gg(e,t){return{type:UA,payload:{data:e,value:t}}}function vg(e,t){return{type:WA,payload:{data:e,value:t}}}function yg(e){return{type:XA,payload:{data:e}}}function wg(e){return{type:QA,row:e}}function bg(e){return{type:GA,row:e}}function Eg(e,t){return{type:KA,columnWidth:e,column:t}}function Mg(e,t){return{type:YA,columnWidth:e,column:t}}function Lg(e){return{type:JA,row:e}}function Hg(e){return{type:$A,column:e}}function xg(e){return{type:zA,payload:{event:e}}}function Vg(e){return{type:AA,payload:{data:e}}}function kg(e){return{type:gA,payload:{createFormulaParser:e}}}function Sg(e){return{type:bA,payload:{selection:e}}}function Zg(e){return{type:MA,payload:{point:e}}}function Og(e,t){return{type:LA,payload:{active:e,data:t}}}function zg(e,t){return{type:HA,payload:{point:e,dimensions:t}}}function Ng(e){return{type:kA,payload:{data:e}}}function Ig(e){return{type:NA,payload:{event:e}}}function Tg(){return{type:IA}}function Dg(){return{type:TA}}function Fg(){return{type:xA}}function Rg(){return{type:VA}}function Pg(){return{type:SA}}function Bg(){return{type:OA}}function jg(e,t){const n=t[e.row];if(void 0!==n)return n[e.column]}function _g(e,t,n){const r=[...n],i=[...n[0]??[]];i.length<=e.column&&(i.length=e.column+1),r[0]=i;const a=[...n[e.row]??[]];return a[e.column]=t,r[e.row]=a,r}function qg(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 Ug={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:""+(Wg=9,1.33*Wg+"px"),fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}};var Wg;function Xg(e,t){if(!Gg(e,t))return t;const n=[...t],r=t[e.row];if(r){const t=[...r];t[e.column]=Ug,n[e.row]=t}return n}function*Qg(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 Gg(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 Kg(e){return{columns:Jg(e),rows:Yg(e)}}function Yg(e){return e.length}function Jg(e){const t=e[0];return t?t.length:0}function $g(e){const t=Kg(e);return{row:t.rows-1,column:t.columns-1}}class ev{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 ev({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 tv={row:0,column:0};class nv{}class rv extends nv{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 rv}}class iv extends nv{range;constructor(e){super(),this.range=e}toRange(e){return this.range}normalizeTo(e){const t=dv(e);return new iv(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 iv&&this.range.equals(e.range)}}class av extends nv{}class ov extends av{toRange(e){return dv(e)}normalizeTo(){return this}hasEntireColumn(){return!0}hasEntireRow(){return!0}size(e){return Jg(e)*Yg(e)}has(){return!0}equals(e){return e instanceof ov}}class lv extends av{start;end;constructor(e,t){if(!uv(e))throw new fv("start");if(!uv(t))throw new fv("end");super(),this.start=Math.min(e,t),this.end=Math.max(e,t)}equals(e){return e instanceof lv&&this.constructor===e.constructor&&this.start===e.start&&this.end===e.end}}class sv extends lv{toRange(e){const t=$g(e);return new ev({row:this.start,column:0},{row:this.end,column:t.column})}normalizeTo(e){const t=Yg(e);return new sv(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)*Jg(e)}has(e,t){return t.row>=this.start&&t.row<=this.end}}class cv extends lv{toRange(e){const t=$g(e);return new ev({row:0,column:this.start},{row:t.row,column:this.end})}normalizeTo(e){const t=Jg(e);return new cv(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)*Yg(e)}has(e,t){return t.column>=this.start&&t.column<=this.end}}function dv(e){const t=$g(e);return new ev(tv,t)}function uv(e){return Number.isInteger(e)&&e>=0}class fv extends Error{constructor(e){super(`${e} is not a valid index. It must be 0 or a positive integer`)}}const hv="text/plain";function Cv(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 pv(e,t){return Boolean(e&&(r=e,(n=t).column===r.column&&n.row===r.row));var n,r}function mv(e){return{width:e.offsetWidth,height:e.offsetHeight,left:e.offsetLeft,top:e.offsetTop}}function Av(e){return Object.keys(e).map(e=>Number(e)).sort((e,t)=>e-t)}function gv(e,t,n){const r={},i=Av(e);let a=0,o=!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},a=n,o=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=o?l+1:l,u=o?c.left+a:c.left;r[d]={...c,left:u}}if(!o){const e=i.length>0?i[i.length-1]:void 0,a=void 0!==e?r[e]:void 0,o=a?a.left+a.width:0;r[t]={left:o,width:n}}return r}function vv(e,t,n){const r={},i=Av(e);let a=0,o=!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},a=n,o=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=o?l+1:l,u=o?c.top+a:c.top;r[d]={...c,top:u}}if(!o){const e=i.length>0?i[i.length-1]:void 0,a=void 0!==e?r[e]:void 0,o=a?a.top+a.height:0;r[t]={top:o,height:n}}return r}function yv(e,t){const n={},r=Av(e);let i=0;for(let a=0,o=0;a<r.length;a++){if(r[a]===t)continue;const l=r[a];if(void 0===l)continue;const s=e[l];s&&(n[o]={top:0===i?s.top:i,height:s.height},"number"==typeof n[o]?.top&&(i=(n[o]?.top??0)+s.height),o++)}return n}function wv(e,t){const n={},r=Av(e);let i=0;for(let a=0,o=0;a<r.length;a++){if(r[a]===t)continue;const l=r[a];if(void 0===l)continue;const s=e[l];s&&(n[o]={left:0===i?s.left:i,width:s.width},"number"==typeof n[o]?.left&&(i=(n[o]?.left??0)+s.width),o++)}return n}function bv(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 a=(t?.[e.row]?t?.[e.row]?.height:32)||32;let o=60;for(let t=0;t<e.column;t++)o+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:a,left:o,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}function Ev(e,t,n){const r=bv(n.start,e,t);let i=bv(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 a=(t?.[e.row]?t?.[e.row]?.height:32)||32;let o=60;for(let t=0;t<e.column;t++)o+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:a,left:o,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 Mv(e,t,n,r){const i=r.toRange(n);return i?Ev(e,t,i):void 0}function Lv(e){return function(e,t){const n=[];for(const[r,i]of Qg(t))qg(r,e(i,r),n);return n}(e=>e?.value||"",e).map(e=>e.map(e=>{const t=String(e).replace(/"/g,'""');return si.test(t)?`"${t}"`:t}).join("\t")).join("\n")}function Hv(e,t){return null!==e&&"view"===t&&xv(e)}function xv(e){return e.matches(":focus-within")}function Vv(e){return"string"==typeof e&&e.includes("\n")}const kv=e=>`${1.33*e}px`,Sv=e=>parseFloat(e.replace("px",""))/1.33,Zv={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:`${kv(9)}`,fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}},Ov=[{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"}],zv=[5,6,8,9,10,12,14,16,18,20,22,24,26,28,32,36,40,48,56,72],Nv=e=>["dropDown","text"].includes(e?.inputType?.type??"text")&&!e?.readOnly;function Iv(e){return{rowCount:e?.length??0,columnCount:e?.[0]?.length??0}}function Tv(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function Dv(e){return e}function Fv(e){return`${e.row},${e.column}`}function Rv(e){const[t,n]=e.split(",");return{row:Number(t),column:Number(n)}}class Pv{set;constructor(e){this.set=e}static from(e){const t=new Set;for(const n of e)t.add(Fv(n));return new Pv(t)}has(e){return this.set.has(Fv(e))}get size(){return this.set.size}add(e){const t=new Set(this.set);return t.add(Fv(e)),new Pv(t)}delete(e){const t=new Set(this.set);return t.delete(Fv(e))?new Pv(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 Rv(e)}}class Bv{forwards;constructor(e=new Map){this.forwards=e}static from(e){const t=new Map;for(const[n,r]of e)t.set(Fv(n),r);return new Bv(t)}set(e,t){const n=new Bv(new Map(this.forwards));return 0===t.size?(n.forwards.delete(Fv(e)),n):(n.forwards.set(Fv(e),t),n)}get(e){return this.forwards.get(Fv(e))||Pv.from([])}getBackwards(e){let t=Pv.from([]);for(const[n,r]of this.forwards)r.has(e)&&(t=t.add(Rv(n)));return t}getBackwardsRecursive(e,t=Pv.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=Pv.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=Rv(t);e.add(t),yield[r,n];for(const t of n){const n=Fv(t);e.has(n)||this.forwards.has(n)||(e.add(n),yield[t,Pv.from([])])}}}*traverseBFSBackwards(){let e=Pv.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 jv{data;evaluatedData;referenceGraph;createFormulaParser;constructor(e,t,n,r){this.createFormulaParser=e,this.data=t,this.referenceGraph=n||function(){const e=[];return Bv.from(e)}(),this.evaluatedData=r||function(e,t){let n=e;for(const r of t.traverseBFSBackwards()){const t=jg(r,e);if(t&&Tv(t.value)){const e=qv();n=_g(r,{...t,value:e},n)}}return n}(t,this.referenceGraph)}}function _v(e,t,n){const r=_g(t,n,e.data),i=(Tv(n.value),e.referenceGraph),a=function(e,t,n,r,i){if(n.hasCircularDependency(r)){let a=Pv.from([r]),o=_g(r,{...i,value:"TODO"},e);for(const e of n.getBackwardsRecursive(r)){if(a.has(e))break;a=a.add(e);const n=jg(e,t);n&&(o=_g(e,{...n,value:"TODO"},o))}return o}let a=e;const o=Tv(i.value)?"TODO":i.value,l={...i,value:o};a=_g(r,l,a);for(const e of n.getBackwardsRecursive(r)){const n=jg(e,t);if(!n)continue;const r=Tv(n.value)?qv():n.value;a=_g(e,{...n,value:r},a)}return a}(e.evaluatedData,r,i,t,n);return new jv(e.createFormulaParser,r,i,a)}function qv(){return"TODO"}function Uv(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 Wv(e){return cy(e)||!e.editable?e:{...e,mode:"edit"}}const Xv=e=>(e=>e&&!e.readOnly)(e)&&"file"!==e?.inputType?.type?{...e,value:"",style:e?.style}:e,Qv=e=>{if(e)return{...e,value:(e.value||"")+"\n",style:e.style}};function Gv(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=jg(i,e.model.data),a=Xv(t);n.push({prevCell:t||null,nextCell:a||null}),r=_g(i,a,r)}return{...e,model:new jv(Dv,r),...$v(n)}}function Kv(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=jg(i,e.model.data),a=Qv(t);n.push({prevCell:t||null,nextCell:a||null}),r=_g(i,a,r)}return{...e,mode:"edit",model:new jv(Dv,r),...$v(n)}}function Yv(e){return{...e,active:null,copied:null,formattedStyle:{open:!1,style:void 0},selected:new rv}}function Jv(e){return{...e,mode:"view"}}function $v(e){return{lastCommit:e}}const ey=(e,t)=>n=>{if(!n.active)return;const r=Kg(n.model.data),i=n.active.column+t>=r.columns,a={row:n.active.row+e+(i?1:0),column:(n.active.column+t)%r.columns};return Gg(a,n.model.data)?{...n,active:a,selected:new iv(new ev(a,a)),mode:"view"}:{...n,mode:"view"}},ty={ArrowUp:ey(-1,0),ArrowDown:ey(1,0),ArrowLeft:ey(0,-1),ArrowRight:ey(0,1),Tab:ey(0,1),Enter:Wv,Backspace:function(e){if(!e.active)return e;if("view"===e.mode){return Gv(e)}{const t=[];let n=e.model.data;const r=jg(e.active,e.model.data),i=Xv(r);return t.push({prevCell:r||null,nextCell:i||null}),n=_g(e.active,i,n),{...e,mode:"edit",model:new jv(Dv,n),...$v(t)}}},Delete:Gv,Escape:Yv},ny={Escape:Jv,Tab:ty.Tab,Enter:ty.ArrowDown,Delete:Gv},ry={Tab:ey(0,-1)};var iy;!function(e){e.Left="Left",e.Right="Right",e.Top="Top",e.Bottom="Bottom"}(iy||(iy={}));const ay={ArrowUp:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Top)}),ArrowDown:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Bottom)}),ArrowLeft:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Left)}),ArrowRight:e=>({...e,selected:dy(e.selected,e.active,e.model.data,iy.Right)}),Tab:ey(0,-1)},oy={},ly={};function sy(e,t){const{key:n}=t;let r;if("edit"===e.mode)if(t.shiftKey&&"Enter"===n)r=ty;else{if(t.altKey&&"Enter"===n)return Kv;r=t.shiftKey?ry:ny}else r=t.shiftKey&&t.metaKey?oy:t.shiftKey?ay:t.metaKey?ly:ty;return r[n]}function cy(e){const t=function(e){const t=e.active&&jg(e.active,e.model.data);return t||null}(e);return Boolean(t?.readOnly)}function dy(e,t,n,r){if(!t)return e;if(e instanceof iv){const i=function(e,t,n,r){const i=r===iy.Left||r===iy.Right?"column":"row",a=r===iy.Left||r===iy.Top?"start":"end",o="start"===a?-1:1,l=e.range.has({...t,[i]:t[i]+-1*o}),s=l?"start"===a?"end":"start":a,c=new ev(e.range.start,e.range.end);c[s][i]+=o;const d=new iv(c).normalizeTo(n);return d}(e,t,n,r);return i}return e instanceof cv?function(e,t,n,r){if(r===iy.Top||r===iy.Bottom)return e;const i=r===iy.Left?-1:1,a=r===iy.Left?"start":"end",o="start"===a?"end":"start",l={...e};(r===iy.Left?e.end>t.row:e.start<t.row)?l[o]=e[o]+i:l[a]=e[a]+i;return new cv(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e instanceof sv?function(e,t,n,r){if(r===iy.Left||r===iy.Right)return e;const i=r===iy.Top?-1:1,a=r===iy.Top?"start":"end",o="start"===a?"end":"start",l={...e};(r===iy.Top?e.end>t.row:e.start<t.row)?l[o]=e[o]+i:l[a]=e[a]+i;return new sv(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e}const uy=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:a,columnDimensions:o}=e,{column:l,columnWidth:s=100}=t,c=l??i;if(K(c))return e;const d="LEFT"===n?c:c+1,u=a.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 jv(a.createFormulaParser,u),h=r??0;return{...e,model:f,selectedRow:h,selectedColumn:d,active:{row:h,column:d},selected:new cv(d,d),columnDimensions:gv(o,d,s)}},fy=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:a,rowDimensions:o}=e,{row:l}=t,s=l??r;if(K(s))return e;const c="TOP"===n?s:s+1,d=[...a.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(Zv))(a.data[s]||[],d[0]?.length);d.splice(c,0,u??[]);const f=new jv(a.createFormulaParser,d),h=i??0;return{...e,model:f,selectedRow:c,selectedColumn:h,active:{row:c,column:h},selected:new sv(c,c),rowDimensions:vv(o,c,32)}},hy={active:null,mode:"view",rowDimensions:{},columnDimensions:{},lastChanged:null,hasPasted:!1,cut:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},dragging:!1,model:new jv(Dv,[]),selected:new rv,copied:null,lastCommit:null,selectedColumn:null,selectedRow:null,formattedStyle:{open:!1,style:void 0},editable:!1,ctrl:!0};function Cy(e,t){switch(t.type){case ig:{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 ag:{const{editable:n}=t.payload;return{...e,editable:n}}case rg:{const{autofill:n}=t.payload,r=e.active;let i=Zv;return r&&(i=jg({row:r.row,column:r.column},e.model.data)||i),{...e,autoFill:{open:n,cellValue:i}}}case QA:return fy(e,t,"TOP");case GA:return fy(e,t,"BOTTOM");case KA:return uy(e,t,"LEFT");case YA:return uy(e,t,"RIGHT");case JA:{let{selectedRow:n,selectedColumn:r,model:i,rowDimensions:a,copied:o}=e;const{row:l}=t;if(K(n))return e;const s=l??n;let c=[...i.data];c.splice(s,1);const d=new jv(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,C=c.length>0?new sv(u,u):new rv;let p=o;return o&&o.start.row<=s&&o.end.row>=s&&(p=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:C,active:h,copied:p,rowDimensions:yv(a,s)}}case $A:{const{selectedRow:n,selectedColumn:r,model:i,columnDimensions:a,copied:o}=e,{column:l}=t;if(K(l??r))return e;const s=l??r,c=i.data.map(e=>e.filter((e,t)=>t!==s)),d=new jv(i.createFormulaParser,c),u=null!==n?n:0,f=s>0?s-1:0,h=c.length>0?{row:u,column:f}:null,C=c.length>0?new cv(f,f):new rv;let p=o;return o&&o.start.column<=s&&o.end.column>=s&&(p=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:C,active:h,copied:p,columnDimensions:wv(a,s)}}case FA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"bold"===r.style?.fontWeight){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,fontWeight:o?"normal":"bold"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case RA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"italic"===r.style?.fontStyle){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,fontStyle:o?"normal":"italic"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case qA:{const{value:n,color:r}=t.payload,i=e.selected.toRange(e.model.data),a=function(e,t,n,r,i){if(!t)return e;let a=e;const{start:o,end:l}=t,s=(e,t)=>jg({row:e,column:t},a),c=(e,t,n)=>{a=_g({row:e,column:t},n,a)};for(let e=o.row;e<=l.row;e++)for(let t=o.column;t<=l.column;t++){const a=s(e,t);if(!a||!i||a.readOnly)continue;const o={...a,style:{...a.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}`,C="1px solid var(--excel-header-border)",p=e=>{switch(e){case"borderTop":l&&l.style?.borderBottom===h?o.style.borderTop="none":o.style.borderTop=h;break;case"borderBottom":d&&d.style?.borderTop===h?o.style.borderBottom="none":o.style.borderBottom=h;break;case"borderLeft":u&&u.style?.borderRight===h?o.style.borderLeft="none":o.style.borderLeft=h;break;case"borderRight":f&&f.style?.borderLeft===h?o.style.borderRight="none":o.style.borderRight=h}};switch(n){case"border-all-sides":p("borderTop"),p("borderBottom"),p("borderLeft"),p("borderRight");break;case"border-none":if(o.style={...o.style,borderRight:C,borderLeft:C,borderTop:C,borderBottom:C},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":p("borderRight");break;case"border-left":p("borderLeft");break;case"border-top":p("borderTop");break;case"border-bottom":p("borderBottom")}c(e,t,o)}return a}(e.model.data,i,n,r,e.editable);return{...e,model:new jv(e.model.createFormulaParser,a)}}case PA:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let a=e,o=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);if(r&&n&&!r.readOnly&&"underline"===r.style?.textDecoration){o=!0;break}}if(o)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&n&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:{...r.style,textDecoration:o?"none":"underline"}},a)))}return a}(e.model.data,t,e.editable);return{...e,model:new jv(e.model.createFormulaParser,n)}}case jA:{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 a=kv(i),{start:o,end:l}=t;let s=e;for(let e=o.row;e<=l.row;e++)for(let t=o.column;t<=l.column;t++){const n=jg({row:e,column:t},s);n&&r&&(n.readOnly||(s=_g({row:e,column:t},{...n,style:{...n.style,fontSize:a}},s)))}return s}(e.model.data,r,n,e.editable),a=new jv(e.model.createFormulaParser,i);let o={...e.rowDimensions};if(e.active&&"edit"!==e.mode){const t=e.active.row,n=i[t];if(n){let e=32;n.forEach(t=>{if(!t)return;const n=t.style?.fontSize?parseInt(t.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*n,18),i=(["file","dropDown"].includes(t?.inputType?.type??"")?0:String(t.value).split(" ").length)+(String(t.value).split("\n").length-1);e=Math.max(e,r*i)}),o[t]={...o[t]||{top:0,height:32},height:e}}}else if(r)for(let e=r.start.row;e<=r.end.row;e++){const t=i[e];if(!t)continue;let n=32;t.forEach(e=>{if(!e)return;const t=e.style?.fontSize?parseInt(e.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*t,18),i=(["file","dropDown"].includes(e?.inputType?.type??"")?0:String(e.value).split(" ").length)+(String(e.value).split("\n").length-1);n=Math.max(n,r*i)}),o[e]={...o[e]||{top:0,height:32},height:n}}return{...e,model:a,rowDimensions:o}}case BA:{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:a}=t;let o=e;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const i=jg({row:e,column:t},o);i&&r&&(i.readOnly||(o=_g({row:e,column:t},{...i,style:{...i.style,fontFamily:n}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case _A:{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:a}=t;let o=e;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const i=jg({row:e,column:t},o);i&&r&&(i.readOnly||(o=_g({row:e,column:t},{...i,style:{...i.style,textAlign:n}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case UA:{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:a}=t;let o=e;const l=Uv(n)?`#${n}`:n;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const n=jg({row:e,column:t},o);n&&r&&(n.readOnly||(o=_g({row:e,column:t},{...n,style:{...n.style,color:l}},o)))}return o}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case WA:{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:a}=t;let o=e;const l=Uv(n)?`#${n}`:n;for(let e=i.row;e<=a.row;e++)for(let t=i.column;t<=a.column;t++){const n=jg({row:e,column:t},o);n&&r&&(n.readOnly||(o=_g({row:e,column:t},{...n,style:{...n.style,backgroundColor:l}},o)))}return o}return e}(e.model.data,r,n,e.editable);return{...e,model:new jv(e.model.createFormulaParser,i)}}case XA:{if(!e.editable)return e;const t=function(e,t){if(!t)return;const{row:n,column:r}=t,i=jg({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 rv,active:e.copied?.start||null,copied:null,formattedStyle:{open:!1,style:void 0}}:{...e,selected:new rv,active:null,copied:n,formattedStyle:{open:!0,style:t}}}case AA:{const{data:n}=t.payload,r=e.active&&Gg(e.active,n)?e.active:null,i=e.selected.normalizeTo(n);return{...e,model:new jv(e.model.createFormulaParser,n),active:r,selected:i}}case gA:{const{createFormulaParser:n}=t.payload;return{...e,model:new jv(n,e.model.data)}}case vA:{const{row:n,extend:r}=t.payload,{active:i}=e,a=new sv(r&&i?i.row:n,n),o=r&&i?i:{...tv,row:n};return{...e,selected:a,active:o,mode:"view",selectedColumn:null,selectedRow:n}}case yA:{const{column:n,extend:r}=t.payload,{active:i}=e,a=new cv(r&&i?i.column:n,n),o=r&&i?i:{...tv,column:n};return{...e,selected:a,active:o,mode:"view",selectedColumn:n,selectedRow:null}}case wA:return{...e,selected:new ov,active:tv,mode:"view"};case bA:{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 EA:{const{point:n}=t.payload;return e.active&&!pv(e.active,n)?{...e,selected:new iv(new ev(n,e.active)),mode:"view"}:e}case MA:{const{point:n}=t.payload;return{...e,selected:new iv(new ev(n,n)),active:n,mode:pv(e.active,n)&&e.editable?"edit":"view"}}case LA:{const{active:n,data:r}=t.payload;return cy(e)||!e.editable?e:{...e,model:_v(e.model,n,r),lastChanged:n}}case HA:{const{point:n,dimensions:r}=t.payload,i=e.rowDimensions[n.row],a=e.columnDimensions[n.column];return i&&a&&i.top===r.top&&i.height===r.height&&a.left===r.left&&a.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 xA:case VA:{const n=e.selected.toRange(e.model.data);return{...e,copied:n,cut:t.type===VA,hasPasted:!1}}case kA:{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})),a=Kg(i),o=e.selected.toRange(e.model.data);let l=null;e.cut&&e.copied&&(l=new ev(r,{row:r.row+a.rows-1,column:r.column+a.columns-1}));const s=e=>!!l&&(e.row>=l.start.row&&e.row<=l.end.row&&e.column>=l.start.column&&e.column<=l.end.column);if(o&&1===a.rows&&1===a.columns){const t=jg({row:0,column:0},i);let n=e.model.data;if(e.cut&&e.copied)for(const t of e.copied)s(t)||(n=Xg(t,n));const r=[];for(const i of o||[]){const a=jg(i,e.model.data)||null,o={...a,value:t?.value};r.push({prevCell:a||Zv,nextCell:Zv}),Nv(a)&&(n=_g(i,o,n))}return{...e,model:new jv(Dv,n),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:r}}const c={rows:r.row+a.rows,columns:r.column+a.columns},d=function(e,t){const{rows:n,columns:r}=Kg(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 a=[...e];if(i.columns>r){const e=i.columns-r;a=a.map(t=>[...t,...Array(e).fill(Ug)])}if(i.rows>n){const e=i.rows-n,t=Array(i.columns).fill(Ug);a=[...a,...Array(e).fill(t)]}return a}(e.model.data,c);let u={data:d,commit:[]};for(const[t,n]of Qg(i)){let i=u.commit||[];const a={row:t.row+r.row,column:t.column+r.column};let o=u.data;if(e.cut&&e.copied){const r={row:t.row+e.copied.start.row,column:t.column+e.copied.start.column};s(r)||(o=Xg(r,u.data)),i=[...i,{prevCell:n||null,nextCell:null}]}Gg(a,d)||(u={data:o,commit:i});const l=jg(a,o)||null;i=[...i,{prevCell:l,nextCell:n||null}],Nv(l)&&(u.data=_g(a,{...l,value:n?.value??""},o),u.commit=i)}return{...e,model:new jv(Dv,u.data),selected:new iv(new ev(r,{row:r.row+a.rows-1,column:r.column+a.columns-1})),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:u.commit}}case SA:return Wv(e);case ZA:return Jv(e);case"CLEAR":return Gv(e);case OA:return Yv(e);case zA:{const{event:n}=t.payload;if(cy(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()?Wv(Gv(e)):Wv(e)}return e}case NA:{const{event:n}=t.payload;if(n.ctrlKey)return{...e,ctrl:!e.ctrl};if(cy(e)||n.metaKey||!e.editable)return e;const r=sy(e,n);return r?{...e,...r(e,n)}:e}case eg:{const{row:n,height:r}=t.payload,i=e.rowDimensions[n]||{top:0};let a=e.model.data;if(a[n]){const e=a?.[n]?.length;for(let t=0;t<e;t++){const e={row:n,column:t},i=jg(e,a)||Zv;a=_g(e,{...i,style:{...i.style,height:r}},a)}}const o=new jv(e.model.createFormulaParser,a);return{...e,rowDimensions:{...e.rowDimensions,[n]:{top:i.top,height:r}},model:o}}case tg:{const{column:n,width:r}=t.payload,i=e.columnDimensions[n]||{left:0};if(!e.model.data)return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}}};let a=e.model.data??[];for(let e=0;e<a.length;e++)if(a[e]&&a?.[e]?.length>n){const t={row:e,column:n},i=jg(t,a)??Zv;a=_g(t,{...i,style:{...i.style??{},width:r}},a)}const o=new jv(e.model.createFormulaParser,a);return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}},model:o}}case ng:{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 IA:return{...e,dragging:!0};case og:{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=jg(n,r);i&&!i.readOnly&&(r=_g(n,{...i,style:t.style},r));return r}(e.model.data,e.formattedStyle,e.active)),{...e,copied:null,model:new jv(e.model.createFormulaParser,r),formattedStyle:{open:!1,style:void 0},active:n}}case TA:{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 a=e;for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=jg({row:e,column:t},a);r&&(r.readOnly||(a=_g({row:e,column:t},{...r,style:n.style},a)))}return a}(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:a,end:o}=t,l=a.row-o.row,s=a.column-o.column;let c={row:0,column:0},d={row:0,column:0};Math.abs(l)>Math.abs(s)?(c={row:Math.min(a.row,o.row),column:r?.column??a.column},d={row:Math.max(a.row,o.row),column:r?.column??a.column}):(c={row:r?.row??a.row,column:Math.min(a.column,o.column)},d={row:r?.row??a.row,column:Math.max(a.column,o.column)});let u=e;const f=String(n.value??""),h=[...f.matchAll(/(-?\d+)/g)],C=["dropDown"].includes(n?.inputType?.type||"");for(let e=c.row;e<=d.row;e++)for(let t=c.column;t<=d.column;t++){const a=jg({row:e,column:t},u);if(!a||a.readOnly)continue;const o=["file","dropDown"].includes(a?.inputType?.type||""),d=["file"].includes(a?.inputType?.type||"");if(!C&&o)continue;if(C&&d)continue;let p=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;p=p.replace(/(-?\d+)/g,()=>{const e=h[i++];return e?(parseInt(e?.[1]??"",10)+n).toString():""})}u=_g({row:e,column:t},{...a,style:n.style,value:p,inputType:n.inputType},u)}return u}(e.model.data,t,e.autoFill.cellValue,n,e.ctrl);let{start:i,end:a}=t;const o=i.row-a.row,l=i.column-a.column;let s={row:0,column:0},c={row:0,column:0};return Math.abs(o)>Math.abs(l)?(s={row:Math.min(i.row,a.row),column:n?.column??0},c={row:Math.max(i.row,a.row),column:n?.column??0}):(s={row:n?.row??0,column:Math.min(i.column,a.column)},c={row:n?.row??0,column:Math.max(i.column,a.column)}),{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new jv(e.model.createFormulaParser,r),selected:new iv(new ev(s,c))}}return{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new jv(e.model.createFormulaParser,r)}}case DA:{const{changes:n}=t.payload;return{...e,...$v(n)}}default:throw new Error("Unknown action")}}var py,my={exports:{}},Ay={};var gy,vy,yy={};
20
20
  /**
21
21
  * @license React
22
22
  * scheduler.development.js
@@ -25,7 +25,7 @@ object-assign
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */function wy(){return gy||(gy=1,e=yy,"production"!==process.env.NODE_ENV&&function(){function t(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var a=r-1>>>1,o=e[a];if(!(i(o,t)>0))return;e[a]=t,e[r]=o,r=a}}(e,t,n)}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,a=e.length,o=a>>>1;r<o;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(i(s,t)<0)c<a&&i(d,s)<0?(e[r]=d,e[c]=t,r=c):(e[r]=s,e[l]=t,r=l);else{if(!(c<a&&i(d,t)<0))return;e[r]=d,e[c]=t,r=c}}}(e,n,0)),t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error),"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,C=!1,p=!1,m="function"==typeof setTimeout?setTimeout:null,A="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function v(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))return;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function y(e){if(p=!1,v(e),!C)if(null!==n(s))C=!0,O(w);else{var t=n(c);null!==t&&z(y,t.startTime-e)}}function w(t,i){C=!1,p&&(p=!1,N()),h=!0;var a=f;try{return function(t,i){var a=i;for(v(a),u=n(s);null!==u&&(!(u.expirationTime>a)||t&&!x());){var o=u.callback;if("function"==typeof o){u.callback=null,f=u.priorityLevel;var l=o(u.expirationTime<=a);a=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),v(a)}else r(s);u=n(s)}if(null!==u)return!0;var d=n(c);return null!==d&&z(y,d.startTime-a),!1}(t,i)}finally{u=null,f=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b=!1,E=null,M=-1,L=5,H=-1;function x(){return!(e.unstable_now()-H<L)}var V,k=function(){if(null!==E){var t=e.unstable_now();H=t;var n=!0;try{n=E(!0,t)}finally{n?V():(b=!1,E=null)}}else b=!1};if("function"==typeof g)V=function(){g(k)};else if("undefined"!=typeof MessageChannel){var S=new MessageChannel,Z=S.port2;S.port1.onmessage=k,V=function(){Z.postMessage(null)}}else V=function(){m(k,0)};function O(e){E=e,b||(b=!0,V())}function z(t,n){M=m(function(){t(e.unstable_now())},n)}function N(){A(M),M=-1}var I=function(){};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){C||h||(C=!0,O(w))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){var t;switch(f){case 1:case 2:case 3:t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=I,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o,l,u=e.unstable_now();if("object"==typeof a&&null!==a){var f=a.delay;o="number"==typeof f&&f>0?u+f:u}else o=u;switch(r){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}var m=o+l,A={id:d++,callback:i,priorityLevel:r,startTime:o,expirationTime:m,sortIndex:-1};return o>u?(A.sortIndex=o,t(c,A),null===n(s)&&A===n(c)&&(p?N():p=!0,z(y,o-u))):(A.sortIndex=m,t(s,A),C||h||(C=!0,O(w))),A},e.unstable_shouldYield=x,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yy;var e}var by=(vy||(vy=1,"production"===process.env.NODE_ENV?my.exports=(py||(py=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,o=a>>>1;r<o;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(0>i(s,n))c<a&&0>i(d,s)?(e[r]=d,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<a&&0>i(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,C=!1,p=!1,m="function"==typeof setTimeout?setTimeout:null,A="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function v(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function y(e){if(p=!1,v(e),!C)if(null!==n(s))C=!0,O(w);else{var t=n(c);null!==t&&z(y,t.startTime-e)}}function w(t,i){C=!1,p&&(p=!1,A(L),L=-1),h=!0;var a=f;try{for(v(i),u=n(s);null!==u&&(!(u.expirationTime>i)||t&&!V());){var o=u.callback;if("function"==typeof o){u.callback=null,f=u.priorityLevel;var l=o(u.expirationTime<=i);i=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),v(i)}else r(s);u=n(s)}if(null!==u)var d=!0;else{var m=n(c);null!==m&&z(y,m.startTime-i),d=!1}return d}finally{u=null,f=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b,E=!1,M=null,L=-1,H=5,x=-1;function V(){return!(e.unstable_now()-x<H)}function k(){if(null!==M){var t=e.unstable_now();x=t;var n=!0;try{n=M(!0,t)}finally{n?b():(E=!1,M=null)}}else E=!1}if("function"==typeof g)b=function(){g(k)};else if("undefined"!=typeof MessageChannel){var S=new MessageChannel,Z=S.port2;S.port1.onmessage=k,b=function(){Z.postMessage(null)}}else b=function(){m(k,0)};function O(e){M=e,E||(E=!0,b())}function z(t,n){L=m(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){C||h||(C=!0,O(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:d++,callback:i,priorityLevel:r,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>o?(r.sortIndex=a,t(c,r),null===n(s)&&r===n(c)&&(p?(A(L),L=-1):p=!0,z(y,a-o))):(r.sortIndex=l,t(s,r),C||h||(C=!0,O(w))),r},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Ay)),Ay):my.exports=wy()),my.exports);const Ey=Symbol(),My=Symbol(),Ly="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,Hy=by.unstable_runWithPriority?e=>{try{by.unstable_runWithPriority(by.unstable_NormalPriority,e)}catch(t){if("Not implemented."!==t.message)throw t;e()}}:e=>e();function xy(e,t){const n=d(e)[Ey];if("object"==typeof process&&"production"!==process.env.NODE_ENV&&!n)throw new Error("useContextSelector requires special context");const{v:{current:r},n:{current:i},l:a}=n,o=t(r),[l,s]=v((e,n)=>{if(!n)return[r,o];if("p"in n)throw n.p;if(n.n===i)return Object.is(e[1],o)?e:[r,o];try{if("v"in n){if(Object.is(e[0],n.v))return e;const r=t(n.v);return Object.is(e[1],r)?e:[n.v,r]}}catch(e){}return[...e]},[r,o]);return Object.is(l[1],o)||s(),Ly(()=>(a.add(s),()=>{a.delete(s)}),[a]),l[1]}const Vy=function(e){const t=s({[Ey]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[My]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=o(e),i=o(0),[a,l]=c(null);a&&(a(e),l(null));const s=o();if(!s.current){const e=new Set,t=(t,n)=>{i.current+=1;const r={n:i.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{l(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()};s.current={[Ey]:{v:r,n:i,l:e,u:t}}}return Ly(()=>{r.current=e,i.current+=1,Hy(()=>{s.current[Ey].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),m(n,{value:s.current},t)}),delete t.Consumer,t}([hy,()=>{}]),ky=({children:t,useTableRef:n,totalWidth:r})=>{const i=o(null);return l(()=>{n&&i.current&&n(i)},[n]),e("table",{className:"ff-spreadsheet-table",ref:i,style:{minWidth:`${60+r}px`,tableLayout:"fixed"},children:t})},Sy=t=>e("tr",{...t}),Zy=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function Oy(){return xy(Vy,([,e])=>e)}function zy(e){return xy(Vy,([t])=>e(t))}const Ny=({selected:t,onSelect:n})=>{const i=r.useCallback(()=>{n()},[n]);return e("th",{className:"ff-spreadsheet-corner-header",onClick:i,tabIndex:0,children:e("div",{className:I("corner-header",{"ff-spreadsheet-header--selected":t}),children:e(q,{variant:t?"dark":"light",color:t?"var(--hover-color)":"var(--text-color)",name:"excel_corner_menu"})})})},Iy=t=>function(n){const i=Oy(),a=r.useCallback(()=>i({type:wA}),[i]),o=zy(e=>e.selected instanceof ov);return e(t,{...n,selected:o,onSelect:a})},Ty=t=>function(n){const i=Oy(),a=r.useCallback((e,t)=>i(function(e,t){return{type:yA,payload:{column:e,extend:t}}}(e,t)),[i]),o=zy(e=>e.selected.hasEntireColumn(n.column)),l=zy(e=>e.selectedColumn??void 0),s=zy(e=>e.active?jg(e.active,e.model.data):void 0);return e(t,{...n,cell:s,selected:o,selectedColumn:l,onSelect:a,scrollToColumn:n.scrollToColumn})},Dy=Ty(({column:t,label:i,selected:a,onSelect:o,setContextMenu:l,deleteColumn:s,addColumnLeft:c,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:h,minimumColumnWidth:p,maxColLimit:m,disableDeleteOption:A,contextMenu:g,onAddColumn:v,onDeleteColumn:y,setVisibleRange:w,scrollToColumn:b})=>{const E=Oy(),M=zy(e=>e.model.data),L=zy(e=>e.columnDimensions[t]?.width??p),H=zy(e=>e.model.data),{columnCount:x}=Iv(H),V=e=>{w(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return h&&b(h),n})},k=C(()=>[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{V("increment"),c(p),v?.(h??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:x>=m},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{V("increment"),d(p),v?.(h??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:x>=m},...A?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{V("decrement"),s(),y?.(h??t)},disableTooltip:"",visible:f?.contextDisable?.["Delete Column"]??!1,disable:!1}]],[h,t,M]),S=r.useCallback((e,n)=>{const r=n?t-1:t,i=Math.max(r,0);o(i,e.shiftKey);const a=e.clientX,l=Number(L),s=e=>{const t=e.clientX-a,n=Math.max(p,l+t);E(function(e,t){return{type:tg,payload:{column:e,width:t}}}(i,n))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),E(Dg())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),E(Tg())},[t,L]),Z=r.useCallback(e=>E(Zg(e)),[E]),O=r.useCallback(e=>{o(t,e.shiftKey)},[o,t]),z=r.useCallback(e=>{e.preventDefault(),o(t,e.shiftKey),l({open:u,contextType:"column",options:k})},[t,h,u,k]);return r.useEffect(()=>{void 0!==h&&"column"===g?.contextType&&l(e=>({open:e.open,contextType:"column",options:k}))},[t,h,u,k,"column"===g?.contextType]),n("th",{className:I("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":a}),style:{width:`${L}px`,minWidth:"100px"},onClick:O,onContextMenu:z,tabIndex:0,children:[e(U,{fontWeight:"medium",children:i??Fy(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>S(e,!1),onDoubleClick:()=>E(dg(t,L)),onClick:()=>Z({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>S(e,!0),onDoubleClick:()=>E(dg(t,L)),onClick:()=>Z({row:-1,column:t})})]},t)});function Fy(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const Ry=({row:t,label:i,selected:a,onSelect:o,setContextMenu:l,addRowTop:s,addRowBottom:c,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:C,disableDeleteOption:p,contextMenu:m,setVisibleRange:A,scrollToRow:g})=>{const v=Oy(),y=zy(e=>e.rowDimensions[t]?.height||32),w=zy(e=>e.model.data),{rowCount:b}=Iv(w),E=e=>{A(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return f&&g(f),n})},M=r.useMemo(()=>[{label:"Add Row Top",value:"Add Row Top",iconName:"plus_icon",action:()=>{E("increment"),s()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Top"]??!1,disable:b>=C},{label:"Add Row Bottom",value:"Add Row Bottom",iconName:"plus_icon",action:()=>{E("increment"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:b>=C},...p?[]:[{label:"Delete Row",value:"Delete Row",iconName:"delete",action:()=>{E("decrement"),d()},disableTooltip:"",visible:h?.contextDisable?.["Delete Row"]??!1,disable:!1}]],[f,t]),L=r.useCallback((e,n)=>{const r=n?t:t-1,i=Math.max(r,0);o(i,e.shiftKey);const a=e.clientY,l=y,s=e=>{const t=e.clientY-a,n=Math.max(32,l+t);v(cg(i,n))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),v(Dg())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c)},[y,t]),H=r.useCallback(e=>v(Zg(e)),[v]),x=r.useCallback(e=>{o(t,e.shiftKey)},[t]),V=r.useCallback(e=>{e.preventDefault(),o(t,e.shiftKey),l({open:u,contextType:"row",options:M})},[t,u,M,f]);return r.useEffect(()=>{void 0!==f&&"row"===m?.contextType&&l(e=>({open:e.open,contextType:"row",options:M}))},[t,u,M,f,"row"===m?.contextType]),n("th",{className:I("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":a}),style:{height:`${y}px`,minHeight:"32px"},onClick:x,onContextMenu:V,tabIndex:0,children:[e(U,{fontWeight:"medium",children:void 0!==i?i:t+1}),e("div",{className:"drag-row-selector drag-row-down",onMouseDown:e=>L(e,!0),onDoubleClick:()=>v(cg(t,y)),onClick:()=>H({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>L(e,!1),onDoubleClick:()=>v(cg(t,y)),onClick:()=>H({row:t,column:-1})})]})},Py=t=>function(n){const i=Oy(),a=zy(e=>e.selected.hasEntireRow(n.row)),o=zy(e=>e.active?jg(e.active,e.model.data):void 0),l=zy(e=>e.selectedRow??void 0),s=r.useCallback((e,t)=>i(function(e,t){return{type:vA,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:a,cell:o,selectedRow:l,onSelect:s,scrollToRow:n.scrollToRow})},By=r.memo(({row:t,column:n,DataViewer:i,active:a,dragging:o,mode:l,data:s,evaluatedData:c,select:d,activate:u,edit:f,editable:h,setCellDimensions:C,setCellData:p})=>{const m=r.useRef(null),A=r.useMemo(()=>({row:t,column:n}),[t,n]),g=r.useCallback(e=>{e.preventDefault(),window.getSelection()?.removeAllRanges(),"view"===l&&(C(A,mv(e.currentTarget)),e.shiftKey?d(A):(u(A),"dropDown"===s?.inputType?.type&&h&&!s?.readOnly&&f()))},[l,C,A,d,u,f,h,s]),v=r.useCallback(e=>{o&&(C(A,mv(e.currentTarget)),d(A))},[C,d,o,A]);return r.useEffect(()=>{const e=m.current;if(!e)return;const t=()=>{o||C(A,mv(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[C,A,o]),s&&s.DataViewer&&(i=s.DataViewer),e("td",{ref:m,style:{...s?.style,..."dropDown"===s?.inputType?.type&&{fontSize:"12px"},textDecoration:"underline"===s?.style?.textDecoration?s?.style?.textDecoration:"none"},className:I("ff-spreadsheet-cell",s?.className,{"ff-spreadsheet-active-cell":a||o}),onMouseEnter:v,onMouseDown:g,tabIndex:0,children:e(i,{row:t,column:n,cell:s,active:a,evaluatedCell:c,setCellData:p,inputValue:()=>null})})}),jy=t=>function(n){const{row:i,column:a}=n,o=Oy(),l=r.useMemo(()=>({row:i,column:a}),[i,a]),s=r.useCallback(e=>o(Og(l,e)),[o,l]),c=r.useCallback(e=>o(function(e){return{type:EA,payload:{point:e}}}(e)),[o]),d=r.useCallback(e=>o(Zg(e)),[o]),u=r.useCallback(()=>o(Pg()),[o]),f=r.useCallback((e,t)=>o(zg(e,t)),[o]),h=zy(e=>pv(e.active,l)),C=zy(e=>h?e.mode:"view"),p=zy(e=>e.editable),m=zy(e=>jg(l,e.model.data)),A=zy(e=>jg(l,e.model.evaluatedData)),g=zy(e=>e.dragging),v=zy(e=>e.copied?.has(l)||!1);return e(t,{...n,active:h,copied:v,dragging:g,mode:C,evaluatedData:A,data:m,select:c,activate:d,edit:u,editable:p,setCellDimensions:f,setCellData:s})},_y=({cell:r,evaluatedCell:i,active:a})=>{const o=function(e,t){const n=t?.value??e?.value;if(n&&"object"==typeof n)return n.toString();return n}(r,i);return e("span","boolean"==typeof o?{className:"ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean",children:qy(o)}:{className:I("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":Vv(o)}),children:a||"dropDown"!==r?.inputType?.type?a||"file"!==r?.inputType?.type?!a&&o:e(t,{children:K(r?.value)?n("div",{className:"ff-spreadsheet-data-viewer--without-fileType",children:[e(q,{name:"attachment_icon"})," Attachment"]}):(n=>{if(K(n))return e(t,{});return JSON.parse(n).map(t=>e("div",{className:"ff-spreadsheet-data-viewer--fileType",children:e(zi,{width:r?.style?.width??100,title:t?.name?.split("*")?.[0]??""})},t.name))})(o)}):n("div",{className:"ff-spreadsheet-data-viewer--dropdownType",children:[o,e(q,{name:"arrow_down",height:8,className:"dropdownType-icon"})]})})};function qy(e){return e?"TRUE":"FALSE"}const Uy=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:a={}},s)=>{const c=o(null);i.useImperativeHandle(s,()=>c.current),l(()=>{if(c.current&&document.activeElement!==c.current){const e=String(t)?.endsWith("\n")?`${t}\n`:t;e!==c.current.innerText&&(c.current.innerText=e)}},[t]);return e("div",{style:a,children:e("div",{ref:c,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),void document.execCommand("insertLineBreak");c.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:()=>{if(c.current){let e=c.current.innerText;e.endsWith("\n")&&(e=e.slice(0,-1)),n?.(e)}},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)},spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{outline:"none",transition:"border 0.2s",whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"inherit",fontSize:"inherit",lineHeight:"normal",minHeight:"24px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),Wy=({onChange:t,cell:n})=>{const i=r.useRef(null),a=r.useCallback(e=>{const{contextDisable:r,...i}=n;t({...i,value:e,inputType:i.inputType??{type:"text"}})},[t,n]);r.useEffect(()=>{i.current&&function(e){if(e)if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.selectionStart=e.selectionEnd=e.value.length;else if(e.isContentEditable){const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)}}(i.current)},[]);return e("div",{className:"ff-spreadsheet-data-editor",children:e(Uy,{ref:i,initialValue:n?.value??"",onChange:a,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,width:"100%",height:"100%",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},Xy=t=>{const i=r.useRef(null),a=r.useRef(null),o=Oy(),l=r.useCallback((e,t)=>o(Og(e,t)),[o]),s=r.useCallback(e=>o(Zg(e)),[o]),c=r.useCallback(()=>o(Pg()),[o]),d=r.useCallback(e=>o({type:rg,payload:{autofill:e}}),[o]),u=r.useCallback(e=>o(function(e){return{type:DA,payload:{changes:e}}}(e)),[o]),f=r.useCallback(()=>{o({type:ZA})},[o]),h=zy(e=>e.rowDimensions),C=zy(e=>e.active),p=zy(e=>e.mode),m=zy(e=>e.active?jg(e.active,e.model.data):void 0),A=zy(e=>e.selected),g=zy(e=>A&&Mv(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),v=zy(e=>{let t=C?bv(C,e.rowDimensions,e.columnDimensions):void 0;return t={top:t?.top?t?.top:0,height:t?.height?t?.height:0,left:t?.left?t?.left:0,width:t?.width?t?.width:0},t}),y=r.useMemo(()=>!C||!v||C.row<t.visibleRowRange.start||C.row>=t.visibleRowRange.end||C.column<t.visibleColRange.start||C.column>=t.visibleColRange.end,[C,v,t.visibleRowRange,t.visibleColRange]),w=r.useRef(void 0),b=r.useRef(null),E=r.useRef(void 0),M=r.useCallback(e=>{C&&l(C,e)},[l,C]),[L,H]=r.useState({value:"",name:""}),[x,V]=r.useState(!1),[k,S]=r.useState(),[Z,O]=r.useState([]),[z,N]=r.useState("var(--ff-select-text-color)");r.useEffect(()=>{m&&C&&t.getActiveCell({value:m.value,active:C});const n=i.current;if(!y&&n&&(n.focus({preventScroll:!0}),"dropDown"===m?.inputType?.type)){H({value:m?.value,name:m?.value}),N(m?.style?.color),V(e=>!e);const t=m?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value,color:t.color}));S(t)}},[i,y,C?.row,C?.column]),r.useEffect(()=>{if("file"===m?.inputType?.type&&m?.value)try{const e=JSON.parse(m.value).map(e=>new File([new Blob],e.name.split("*")[0]??"default"));O(e)}catch(e){console.error("Error parsing cell value for files:",e),O([])}else O([])},[m?.inputType?.type,m?.value]),r.useEffect(()=>{"dropDown"===m?.inputType?.type&&m?.value!==L.value&&H({value:m?.value,name:m?.value})},[m?.value,m?.inputType?.type,L.value]),r.useEffect(()=>{const e=b.current,t=E.current;if(b.current=C,E.current=m,!e||!t)return;const n=C?.row!==e.row||C?.column!==e.column;if(n||"edit"!==p){const e=w.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||m===t||u([{prevCell:t,nextCell:m||null}]),w.current=m}});const T=m&&m.DataEditor||t.DataEditor,D=m&&m.readOnly,F=r.useCallback(e=>{if(!C)return;const t=e.currentTarget.closest(".ff-excel-spreadsheet");if(!t)return void e.preventDefault();e.stopPropagation();const n=document.body.style.userSelect,r=document.body.style.overflow;document.body.style.userSelect="none",document.body.style.overflow="hidden";let i=null;const a=()=>{i&&(cancelAnimationFrame(i),i=null)},o=e=>{const n=t.getBoundingClientRect();let r=0,o=0;e.clientY<n.top+50?o=-12:e.clientY>n.bottom-50&&(o=12),e.clientX<n.left+50?r=-12:e.clientX>n.right-50&&(r=12),0!==r||0!==o?(e=>{a();const n=()=>{const{x:r,y:a}=e;0!==r&&(t.scrollLeft+=r),0!==a&&(t.scrollTop+=a),i=requestAnimationFrame(n)};i=requestAnimationFrame(n)})({x:r,y:o}):a()},l=()=>{a(),document.body.style.userSelect=n,document.body.style.overflow=r,document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l),d(!0)},[s,d,C]),R=r.useCallback(e=>{e.preventDefault(),t.setContextMenu({open:t.contextOption?.open??!1,contextType:t.contextOption?.contextType??null,options:t.contextOption?.options||[]})},[t]),P=g?.height!==v?.height||g?.width!==v?.width,B=r.useCallback(e=>{C&&P&&(zg(C,mv(e.currentTarget)),s(C))},[C,P]),j=t.isAtRight?t.maxWidth-(v?.left-t.scrollPos.left)+100:t.maxWidth,_=t.isAtBottom?t.maxHeight-(v?.top-t.scrollPos.top)+64:t.maxHeight,q=["file","dropDown"].includes(m?.inputType?.type||""),U="dropDown"===m?.inputType?.type;return n("div",{ref:i,className:I("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${p}`,{"ff-spreadsheet-active-cell--hidden":y,"ff-spreadsheet-active-cell--dragging":P&&"text"!==m?.inputType?.type}),onMouseDown:B,style:{...v,backgroundColor:m?.style?.backgroundColor,...q?{display:"flex",alignItems:U?"center":m?.style?.alignContent,justifyContent:U?"flex-start":m?.style?.textAlign}:{},..."edit"===p&&C?{minWidth:Math.min(v?.width,t.maxWidth),minHeight:Math.min(v?.height,t.maxHeight),height:"auto",maxWidth:`${j}px`,maxHeight:`${_}px`,overflow:"auto",..."dropDown"===m?.inputType?.type?{}:{padding:"2px 4px 0px 4px",width:"max-content"}}:{}},onContextMenu:R,onClick:"view"!==p||D?void 0:c,tabIndex:0,children:[e("div",{className:q?"":"active-cell-main",style:U?{width:"100%"}:void 0,children:"dropDown"===m?.inputType?.type?e(Za,{...m?.inputType?.inputProps,dropDownRef:a,showOptions:{open:!("edit"!==p||!C),toggle:x},selectedOption:L,optionsList:k||[],height:26,showLabel:!1,disabled:!t.editable,showBorder:!1,selectedOptionColor:z,optionZIndex:5e3,onChange:e=>{const t=K(e.color)?m?.style:{...m?.style,color:e.color};H({value:e.value,name:e.label}),N(e.color||"var(--ff-select-text-color)"),M({...m,value:e.value,style:t,inputType:m?.inputType})}}):"file"===m?.inputType?.type?e(rA,{...m?.inputType?.inputProps,label:"",onFileListClick:e=>{const n=e.target.closest(".ff-attachment-files"),r=e.target.closest(".ff-icon-container, .ff-icon-click, .ff-icon-danger");if(n&&!r&&m?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(m.value),r=n.parentElement?.querySelectorAll(".ff-attachment-files")||[],i=Array.from(r).indexOf(n);if(-1===i||!e[i])return void console.error("File index not found or invalid");const a=e[i];t.attachmentAction.viewAttachment(a.id,a.name?.split("*")[0]??"default")}catch(e){console.error("Error parsing cell value:",e)}else console.warn("Missing file element, icon click, cell value, or viewAttachment action")},selectedFiles:Z,onFilesChange:async(e,n,r)=>{try{if("ADD"===r&&"file"===m?.inputType?.type){let n=[];try{m?.value&&(n=JSON.parse(m.value))}catch(e){console.error("Error parsing cell.value:",e)}let r=0;const i=e.filter((e,t,i)=>{const a=e.name.split("*")[0],o=i.findIndex(e=>e.name.split("*")[0]===a)!==t,l=n.some(e=>e.name.split("*")[0]===a);return!o&&!l||(r++,!1)});if(n.length+i.length>5)return void dc.info("Cannot upload more than 5 files.");if(t.attachmentAction?.addAttachment&&i.length>0)try{let e=0,r=0,a=0;const l=Z?.length+i?.length,s=l>0?25*l:1,c=[...n],d=i?.map(async e=>{try{if(e.name.includes("*"))return{file:e,status:"existing",data:{name:e.name}};const n=await(t?.attachmentAction?.addAttachment(e));if(!n||"string"==typeof n&&0===n.trim().length)return{file:e,status:"failed",reason:"no response"};if("string"==typeof n)try{const t=JSON.parse(n);return 507===t.responseCode?{file:e,status:"memory_full",reason:"no memory"}:400===t.responseCode?{file:e,status:"failed",reason:"invalid file"}:t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,t),{file:e,status:"failed",reason:"invalid response"})}catch(t){return console.error(`Parse error for ${e.name}:`,t),{file:e,status:"failed",reason:"parse error"}}if("object"==typeof n&&null!==n){const t=n;return t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,n),{file:e,status:"failed",reason:"invalid response"})}return console.error(`Unknown response for ${e.name}:`,n),{file:e,status:"failed",reason:"unknown"}}catch(t){return console.error(`Upload failed for ${e.name}:`,t),{file:e,status:"failed",reason:"upload error"}}});if((await Promise.allSettled(d)).forEach(t=>{if("fulfilled"===t.status&&t.value){const{status:n,data:i}=t.value;"success"===n&&i?.id&&i?.name?(c.push(i),e++):"existing"===n&&i?.name?c.push(i):"memory_full"===n?a++:r++}else r++}),e>0||c.length>n.length){const e=c.length>0?JSON.stringify(c):"";M({...m,value:e,style:m?.style,inputType:m?.inputType}),o(cg(C?.row||0,Math.max(s,h?.[C.row]?.height||s))),O(c.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}a>0&&dc.info("No memory available to add the file"),e>0&&dc.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&dc.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),dc.error("Operation failed")}}else if("DELETE"===r&&"file"===m?.inputType?.type)try{let e=[...m&&JSON.parse(m.value)],r=0;for(const i of n||[]){const n=e.findIndex(e=>e.name.split("*")[0]===i.name.split("*")[0]),a=e[n]?.id;if(-1!==n&&a&&t.attachmentAction?.deleteAttachment)try{const o=await t.attachmentAction.deleteAttachment(a);"SUCCESS"===o||"object"==typeof o&&null!==o&&("status"in o&&"SUCCESS"===o.status||"responseCode"in o&&200===o.responseCode)?(e.splice(n,1),r++):console.error(`Delete failed for ${i.name}: Invalid response`,o)}catch(e){console.error(`Delete error for ${i.name}:`,e),dc.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:a,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),dc.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";M({...m,value:t,style:m?.style,inputType:m?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),dc.success(`${r} file${r>1?"s":""} deleted successfully`)}else if(n?.length){const t=e?.filter(e=>e.id&&e.name);if(t.length<e.length){const e=t.length>0?JSON.stringify(t):"";M({...m,value:e,style:m?.style,inputType:m?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),dc.error("Failed to delete file(s). Invalid file data detected.")}else dc.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),dc.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),dc.error("Operation failed")}},disabled:!t.editable,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:t.editable,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:t.editable,isInfoIconRequired:!1,truncateMaxLimit:(v?.width??0)-60}):"edit"===p&&C&&t.editable?e(T,{row:C.row,column:C.column,cell:m,onChange:M,exitEditMode:f}):e(Uy,{initialValue:m?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...m?.style,height:"100%",width:"100%",textDecoration:"underline"===m?.style?.textDecoration?"underline":"none",backgroundColor:P?"#1e161f00":m?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(m?.inputType?.type??"")&&("edit"===p||C&&e("div",{onMouseDown:F,className:"select_dot"}))]},`${C?.row}-${C?.column}`)},Qy=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const a=zy(e=>e.active),o=zy(e=>e.autoFill),l=zy(e=>a?bv(a,e.rowDimensions,e.columnDimensions):void 0),{width:s,height:c,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,C=s,p=c;return o.open&&s&&c&&l&&(s-h>c-f?(C=s,p=l.height):(p=c,C=l.width)),e("div",{className:I("ff-spreadsheet-floating-rect",{[`ff-spreadsheet-floating-rect--${i}`]:i,"ff-spreadsheet-floating-rect--dragging":n,"ff-spreadsheet-floating-rect--hidden":r}),style:{width:(C??0)+1,height:(p??0)+1,top:d,left:u}})},Gy=({scrollPos:t={top:0,left:0}})=>{const n=zy(e=>e.selected),i=zy(e=>e.dragging),a=zy(e=>e.selected.size(e.model.data)<2),o=zy(e=>n&&Mv(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(o)return{...o,top:o.top-1,left:o.left-1,height:o.height-1,width:o.width-1}},[o,t]);return e(Qy,{variant:"selected",dimensions:l,dragging:i,hidden:a||!o})},Ky=({scrollPos:t={top:0,left:0}})=>{const n=zy(e=>e.copied),i=null===n,a=zy(e=>n&&Ev(e.rowDimensions,e.columnDimensions,n)),o=r.useMemo(()=>{if(a)return{...a,top:a.top-1,left:a.left-1,height:a.height-1,width:a.width-1}},[a,t]);return e(Qy,{variant:"copied",dimensions:o,hidden:i||!a,dragging:!1})},Yy=i.forwardRef(({getColorValue:t,disabled:n,initialColor:r},a)=>{const l=o(null);i.useImperativeHandle(a,()=>l.current);const[s,d]=c(r);return e("div",{className:I("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:s},onClick:()=>{l.current&&!n&&l.current.click()},"aria-label":"Select color"+(n?"":`, current color ${s}`),"aria-disabled":n,children:e("input",{type:"color",disabled:n,className:I("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:l,"aria-label":"Color picker",onChange:e=>{d(e.target.value),t(e.target.value.replace("#",""))}})})});Yy.displayName="ColorBarSelector";const Jy=e=>{switch(e.toUpperCase()){case"LEFT":default:return"left";case"RIGHT":return"right";case"CENTER":return"center";case"JUSTIFY":return"justify";case"BOTTOM":return"end";case"TOP":return"start"}},$y=e=>{switch(e){case"left":return"LEFT";case"right":return"RIGHT";case"center":return"CENTER";case"justify":return"JUSTIFY";case"end":default:return"BOTTOM";case"start":return"TOP"}},ew=e=>zv.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function tw(e,t=100){const{border:n}=e;let r="",i="",a="",o="";return"THIN"!==n.top&&(r="MEDIUM"===n.top?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.right&&(i="MEDIUM"===n.right?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.bottom&&(a="MEDIUM"===n.bottom?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.left&&(o="MEDIUM"===n.left?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),{fontSize:kv(ew(String(e.size))),fontFamily:(l=e.name,Ov.some(e=>e.label===l)?l:"Poppins"),color:`#${e.color}`,backgroundColor:`#${e.backgroundColor}`,fontWeight:e.bold?"bold":"normal",fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":"normal",borderTop:r,borderRight:i,borderBottom:a,borderLeft:o,textAlign:Jy(e.alignment.horizontal),alignContent:Jy(e.alignment.vertical),height:e.height??32,width:e.width??t};var l}const nw=e=>{if(!e||"none"===e)return"THIN";if(e.includes("solid")||e.includes("dashed")||e.includes("dotted")){if(e.includes("2px")||e.includes("medium"))return"MEDIUM";if(e.includes("3px")||e.includes("medium"))return"THICK"}return"THIN"},rw=(e,t=100)=>({name:e.fontFamily||"Arial",size:Sv(e.fontSize?.toString()||"12"),bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,underline:"underline"===e.textDecoration,color:e.color?.replace("#","")||"000000",backgroundColor:e.backgroundColor?.replace("#","")||"FFFFFF",borderColor:"F2F2F2",border:{top:nw(e.borderTop?e.borderTop.toString():void 0),right:nw(e.borderRight?e.borderRight.toString():void 0),bottom:nw(e.borderBottom?e.borderBottom.toString():void 0),left:nw(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:$y(e.textAlign),vertical:$y(e.alignContent),wrapText:!1},width:e.width||t,height:e.height||32}),iw=({toolbar:t="show",editable:r,onBold:i,onItalic:a,setUnderlineType:s,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:C,setBorderType:p,setFormatePainter:m})=>{const A=zy(e=>e.selected instanceof ov),[g,v]=c("disable"===t||!r),y=zy(e=>e.active?jg(e.active,e.model.data):null),w=zy(e=>e.model.data),b=zy(e=>e.formattedStyle.open),E={...Zv.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[M,L]=c(y?.style||E),H=o(null);l(()=>{y?.style&&JSON.stringify(y.style)!==JSON.stringify(M)&&L(y?.style||E),A?v(!r):y&&"boolean"==typeof y.readOnly&&v(y.readOnly||"disable"===t||!r||"dropDown"===y?.inputType?.type)},[y,r]);const x=rw(M),[V,k]=c("border-none"),[S,Z]=c({label:"",value:""}),[O,z]=c({label:"",value:""}),[N,I]=c({color:E.color,backgroundColor:E.backgroundColor,borderColor:E.borderColor}),T=[{value:"border-all-sides",label:"All Border",icon:"all_borders"},{value:"border-bottom",label:"Border Bottom",icon:"border_bottom"},{value:"border-left",label:"Border Left",icon:"border_left"},{value:"border-right",label:"Border Right",icon:"border_right"},{value:"border-top",label:"Border Top",icon:"border_top"},{value:"border-none",label:"No Border",icon:"no_border"}],D=zv.map(e=>({label:e,value:e})),F=o(null),R=o(null);l(()=>{let e=setTimeout(()=>{d(w,N.color)},0);return()=>{clearTimeout(e)}},[N.color]),l(()=>{let e=setTimeout(()=>{C(w,N.backgroundColor)},0);return()=>{clearTimeout(e)}},[N.backgroundColor]);return l(()=>{const e=M.fontFamily,t=`${Sv(M.fontSize)}`;Z({label:e??"Times New Roman",value:e??"Times New Roman"}),z({label:t??"11",value:t??"11"})},[M]),n("div",{className:"ff-excel-toolbar",role:"toolbar","aria-label":"Excel formatting toolbar",children:[n("div",{className:"ff-excel-toolbar-font ","aria-label":"Font controls",children:[e("div",{className:"ff-excel-toolbar-font-family","aria-label":"Font family selector",children:e(Za,{disabled:g,height:24,tooltip:!0,showToolTip:!0,showLabel:!1,optionZIndex:2e3,onChange:e=>{Z({label:e.label,value:e.label}),f(w,e.value)},required:!1,optionsList:Ov,selectedOption:S})}),e("div",{className:"ff-excel-toolbar-font-size","aria-label":"Font size selector",children:e(Za,{disabled:g,height:24,showLabel:!1,optionZIndex:2e3,required:!1,onChange:e=>{z({label:e.label,value:e.value}),u(w,e.value)},optionsList:D,selectedOption:O})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon","aria-label":"Text alignment controls",children:[e(Y,{placement:"top",title:"Text Left",children:e(q,{disabled:g,variant:"left"===M.textAlign?"dark":"light",hoverEffect:"left"!==M.textAlign,onClick:()=>h(w,"left"),name:"text_align_left"})}),e(Y,{placement:"top",title:"Text Center",children:e(q,{disabled:g,variant:"center"===M.textAlign?"dark":"light",hoverEffect:"center"!==M.textAlign,onClick:()=>h(w,"center"),name:"text_align_center"})}),e(Y,{placement:"top",title:"Text Right",children:e(q,{disabled:g,variant:"right"===M.textAlign?"dark":"light",hoverEffect:"right"!==M.textAlign,onClick:()=>h(w,"right"),name:"text_align_right"})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-text","aria-label":"Text styling controls",children:[e(Y,{placement:"top",title:"Bold",children:e(q,{disabled:g,variant:x.bold?"dark":"light",hoverEffect:!x.bold,onClick:()=>i(w),name:"bold"})}),e(Y,{placement:"top",title:"Italic",children:e(q,{disabled:g,variant:x.italic?"dark":"light",hoverEffect:!x.italic,onClick:()=>a(w),name:"italic"})}),e(Y,{placement:"top",title:"Underline",children:e("div",{className:"ff-excel-toolbar-icon-underline",children:e(q,{disabled:g,variant:"underline"===M.textDecoration?"dark":"light",hoverEffect:"underline"!==M.textDecoration,onClick:()=>s(w),name:"underline"})})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon","aria-label":"Formatting tools",children:[e(Y,{placement:"top",title:"Format Painter",children:e(q,{disabled:g,variant:b?"dark":"light",hoverEffect:!b,onClick:()=>{m(w)},name:"formate_painter"})}),e(Y,{placement:"top",title:"Text Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(q,{disabled:g,hoverEffect:!0,width:12,height:10,onClick:()=>{d(w,N.color),F.current?.click()},name:"text_color"}),e(Yy,{ref:F,disabled:g,getColorValue:e=>{I(t=>({...t,color:e}))},initialColor:N.color})]})}),e(Y,{placement:"top",title:"Background Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(q,{disabled:g,hoverEffect:!0,width:12,height:10,onClick:()=>{C(w,N.backgroundColor),R.current?.click()},name:"fill_color"}),e(Yy,{ref:R,disabled:g,getColorValue:e=>{I(t=>({...t,backgroundColor:e}))},initialColor:N.backgroundColor})]})})]}),e("div",{className:"ff-excel-toolbar-divider"}),e("div",{className:"ff-excel-toolbar-menu","aria-label":"Border controls",children:n("div",{className:"ff-excel-toolbar-menu-option",children:[e(Y,{placement:"top",title:"Border Type",children:e(q,{hoverEffect:!0,disabled:g,onClick:()=>p(w,V,"var(--input-hover-border-color)"),name:(()=>{const e=T.find(e=>e.value===V);return e?e.icon:""})()})}),e("span",{ref:H,children:e(Da,{disabled:g,iconName:"arrow_down",targetRef:H,iconSize:12,zIndex:2e3,options:T,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;p(w,t,"var(--input-hover-border-color)"),k(t)}})})]})})]})},aw=(e,t)=>{let n,r=null;const i=function(...i){const a=this;null===r||Date.now()-r>=t?(e.apply(a,i),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(a,i),r=Date.now()},t-(Date.now()-r)))};return i.cancel=()=>{n&&clearTimeout(n),n=null,r=null},i},ow=r.forwardRef(function(t,i){const{className:a,columnLabels:o=[],rowLabels:l=[],toolbar:s,editable:c,onKeyDown:d,Table:u=ky,Row:f=Sy,sheetHeight:h,HeaderRow:C=Zy,DataEditor:p=Wy,DataViewer:m=_y,onSelect:A=()=>{},onActivate:g=()=>{},onEvaluatedDataChange:v=()=>{},contextOption:y,attachmentAction:w,workRef:b,minimumColumnWidth:E,setContextMenu:M,maxRowLimit:L,maxColLimit:H,disableDeleteOption:x,contextMenu:V,getActiveCell:k,onAddColumn:S,onDeleteColumn:Z}=t,O=32,z=E||100,N=r.useRef(!1),T=zy(e=>e.model.data),[D,F]=r.useState(!1),[R,P]=r.useState(0),[B,j]=r.useState(0),[_,q]=r.useState({top:0,left:0}),[U,W]=r.useState(!1),[X,Q]=r.useState(!1),G=r.useMemo(()=>{const e=t.createFormulaParser||Dv,n=new jv(e,t.data);let r={},i={};t.data.forEach((e,t)=>{let n=O;e.forEach(e=>{if(e){const t=parseFloat(String(e.style?.height).replace("px",""))||O;n=Math.max(n,t)}}),r[t]={top:0,height:n}});const a=t.data[0]?t.data[0].length:0;for(let e=0;e<a;e++){let n=z;t.data.forEach(t=>{const r=t[e];if(r){const e=parseFloat(String(r.style?.width).replace("px",""))||z;n=Math.max(n,e)}}),i[e]={left:0,width:n}}return F(e=>!e),{...hy,model:n,selected:t.selected||hy.selected,rowDimensions:r,columnDimensions:i}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(Cy,G),[Y,J]=K,$=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=Kg(e);return{rows:t?Math.max(i,t.length):i,columns:n?Math.max(r,n.length):r}}(Y.model.data,l,o),[Y.model.data,l,o]),[ee,te]=r.useState({start:0,end:Math.min(20,$.rows)}),[ne,re]=r.useState({start:0,end:Math.min(15,$.columns)}),ie=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.rowDimensions[n]?.height||O;return t},[Y.rowDimensions,O]),ae=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.columnDimensions[n]?.width||z;return t},[Y.columnDimensions,z]),oe=r.useRef(!0);r.useEffect(()=>{oe.current?oe.current=!1:J(function(e){return{type:ig,payload:{minimumColumnWidth:e}}}(E))},[E]);const le=ie($.rows),se=ae($.columns),ce=ie(ee.start),de=le-ie(ee.end),ue=ae(ne.start),fe=se-ae(ne.end),he=Y.mode,Ce=r.useRef(null),pe=e=>r.useCallback((...t)=>J(e(...t)),[e]),me=pe(sg),Ae=pe(Rg),ge=pe(Fg),ve=pe(Bg),ye=pe(Ng),we=pe(Ig),be=pe(xg),Ee=pe(Tg),Me=pe(Dg),Le=pe(Vg),He=pe(kg),xe=pe(Sg),Ve=pe(ug),ke=pe(fg),Se=pe(Cg),Ze=pe(Ag),Oe=pe(pg),ze=pe(mg),Ne=pe(hg),Ie=pe(gg),Te=pe(vg),De=pe(yg),Fe=pe(lg),Re=pe(wg),Pe=pe(bg),Be=pe(Eg),je=pe(Mg),_e=pe(Lg),qe=pe(Hg);r.useImperativeHandle(i,()=>({removeSelect:ve}));const Ue=r.useRef(Y.active);r.useEffect(()=>{if(Y.active!==Ue.current)if(Y.active)g(Y.active);else{const e=b.current;e&&xv(e)&&document.activeElement&&document.activeElement.blur()}Ue.current=Y.active},[g,Y.active]);const We=r.useRef(Y.model.evaluatedData);r.useEffect(()=>{Y?.model?.evaluatedData!==We?.current&&v(Y?.model?.evaluatedData),We.current=Y.model.evaluatedData},[Y?.model?.evaluatedData,v]);const Xe=r.useRef(Y.selected);r.useEffect(()=>{Y.selected.equals(Xe.current)||t.selected&&Y.selected.equals(t.selected)||A(Y.selected),Xe.current=Y.selected},[Y.selected,A,t.selected]);const Qe=r.useRef(t.selected);r.useEffect(()=>{t.selected&&Qe.current&&!t.selected.equals(Qe.current)&&xe(t.selected),Qe.current=t.selected},[t.selected,xe]);let Ge=r.useRef();r.useEffect(()=>{me(c),void 0!==Ge.current&&t.data!==Ge.current&&Le(t.data),Ge.current=t.data},[t.data,Le,c]);const Ke=r.useRef(t.createFormulaParser);r.useEffect(()=>{t.createFormulaParser!==Ke.current&&t.createFormulaParser&&He(t.createFormulaParser),Ke.current=t.createFormulaParser},[t.createFormulaParser,He]);const Ye=r.useCallback(e=>{const{model:t,selected:n}=Y,{data:r}=t,i=n.toRange(r);if(i){!function(e,t){e.clipboardData?.setData(hv,t)}(e,Lv(function(e,t,n){const r=[],i=t.column-e.column;for(let a=e.row;a<=t.row;a++){const o=a-e.row;r[o]=r[o]||Array(i);for(let i=e.column;i<=t.column;i++)r[o][i-e.column]=jg({row:a,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Je=r.useCallback(e=>{Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),Ye(e),Ae())},[he,Ye,Ae]),$e=r.useCallback(e=>{Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),Ye(e),ge())},[he,Ye,ge]),et=r.useCallback(e=>{if(Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),e.clipboardData)){const t=function(e){return window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?e.clipboardData.getData(hv):""}(e);ye(t)}},[he,ye]),tt=r.useCallback(e=>{e.persist();const t=e.ctrlKey||e.metaKey,n=e.key.toLowerCase();t&&"b"===n?(e.preventDefault(),Ve(T)):t&&"i"===n?(e.preventDefault(),ke(T)):t&&"u"===n&&(e.preventDefault(),Se(T)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==sy(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),we(e))},[Y,d,we]),nt=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Fe(Y.active)},[Y]),rt=r.useCallback(()=>{Me(),document.removeEventListener("mouseup",rt)},[Me]),it=r.useCallback(e=>{Y.dragging||1!==e.buttons||"view"!==he||(Ee(),document.addEventListener("mouseup",rt))},[Y,Ee,rt,he]),at=r.useMemo(()=>jy(t.Cell||By),[t.Cell,D,c]),ot=r.useMemo(()=>Iy(t.CornerIndicator||Ny),[t.CornerIndicator,D]),lt=r.useMemo(()=>Py(t.RowIndicator||Ry),[t.RowIndicator,D]),st=r.useMemo(()=>Ty(t.ColumnIndicator||Dy),[t.ColumnIndicator,D]);r.useEffect(()=>(document.addEventListener("cut",Je),document.addEventListener("copy",$e),document.addEventListener("paste",et),()=>{document.removeEventListener("cut",Je),document.removeEventListener("copy",$e),document.removeEventListener("paste",et)}),[Je,$e,et]);const ct=e=>{const t=new ResizeObserver(e=>{const t=e[0];if(t&&Ce.current){const e=t.target;if(e){const{clientWidth:t,clientHeight:n}=e;j(Math.min(Ce.current.clientHeight,n)),P(Math.min(Ce.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},dt=r.useCallback(e=>{const t=e.target,{scrollTop:n,clientHeight:r,scrollLeft:i,clientWidth:a}=t;q({top:n,left:i});let o=0;for(;o<$.rows&&ie(o)<n;)o++;let l=o;for(;l<$.rows&&ie(l)<n+r;)l++;o=Math.max(0,o-10),l=Math.min($.rows,l+10),te({start:o,end:l});const s=l===$.rows;W(s);let c=0;for(;c<$.columns&&ae(c)<i;)c++;let d=c;for(;d<$.columns&&ae(d)<i+a;)d++;c=Math.max(0,c-10),d=Math.min($.columns,d+10),re({start:c,end:d});const u=d===$.columns;Q(u),V.open&&M({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},[$.rows,$.columns,ie,ae]),ut=r.useMemo(()=>aw(dt,16),[dt]),ft=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.rowDimensions?.[n]?.height||O;requestAnimationFrame(()=>{Ce.current&&e>=$.rows-1&&Ce?.current?.scrollTo({top:t+O,behavior:"smooth"})})})},ht=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.columnDimensions?.[n]?.width||z;requestAnimationFrame(()=>{Ce.current&&e>=$.columns-1&&Ce.current.scrollTo({left:t+60,behavior:"smooth"})})})};r.useEffect(()=>{N.current||(te({start:0,end:Math.min(20,$.rows)}),re({start:0,end:Math.min(15,$.columns)}))},[$.rows,$.columns,N.current]);const Ct=Cv(ee.end,ee.start),pt=Cv(ne.end,ne.start),mt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${ue}px`}},"left-spacer")," ",pt.map(t=>e("col",{style:{width:`${Y.columnDimensions[t]?.width||z}px`}},t)),e("col",{style:{width:`${fe}px`}},"right-spacer")," "]}),At=r.useMemo(()=>n(u,{useTableRef:ct,totalWidth:se,children:[mt,n("tbody",{children:[n(C,{children:[e(ot,{}),e("div",{className:"spacer left"}),pt.map(n=>e(st,{column:n,minimumColumnWidth:E,setContextMenu:t.setContextMenu,label:n in o?o[n]:void 0,deleteColumn:qe,addColumnLeft:Be,addColumnRight:je,columnContextEnable:t.columnContextEnable,maxColLimit:H,disableDeleteOption:x,contextMenu:V,onAddColumn:S,onDeleteColumn:Z,setVisibleRange:re,scrollToColumn:ht},n)),e("div",{className:"spacer right"})]}),e("tr",{style:{height:`${ce}px`}}),Ct.map(r=>n(f,{row:r,children:[e(lt,{label:r in l?l?.[r]:void 0,row:r,addRowTop:Re,addRowBottom:Pe,deleteRow:_e,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:L,disableDeleteOption:x,contextMenu:V,setVisibleRange:te,scrollToRow:ft},r),e("div",{className:"spacer left"}),pt.map(t=>e(at,{row:r,column:t,DataViewer:m},`${r}-${t}`)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${de}px`}})]})]}),[u,$.rows,$.columns,f,C,ot,o,st,l,lt,at,m,ee,ne,ce,de,ue,fe,Y.rowDimensions,Y.columnDimensions]),gt=r.useMemo(()=>e(Xy,{attachmentAction:w,contextOption:y,getActiveCell:k,setContextMenu:t.setContextMenu,DataEditor:p,visibleRowRange:ee,visibleColRange:ne,maxHeight:B-64,maxWidth:R-E,totalHeight:le,totalWidth:se,isAtBottom:U,isAtRight:X,scrollPos:_,editable:c},Y.active?`${Y.active.row}-${Y.active.column}`:"no-active"),[p,ee,ne,Y.active,B,R,le,se,U,X,c]),vt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${R}px`},className:I("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),e("div",{style:{height:`${B}px`},className:I("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),"hide"!==s&&e("div",{className:"ff-excel-toolbar-container",children:e(iw,{editable:c,toolbar:s,onBold:Ve,onItalic:ke,setUnderlineType:Se,setColor:Ie,setBorderType:Ne,setFontSize:Oe,setFontFamily:ze,setTextAlign:Ze,setBackgroundColor:Te,setFormatePainter:De})}),n("div",{ref:Ce,style:{height:h},className:I("ff-excel-spreadsheet",a),onKeyPress:be,onKeyDown:tt,onClick:nt,onMouseMove:it,onScroll:e=>ut(e),children:[At,gt,e(Gy,{scrollPos:_}),e(Ky,{scrollPos:_})]})]}),[a,be,tt,it,At,gt,R]);return e(Vy.Provider,{value:K,children:vt})}),lw=({contextMenu:t,position:r,editable:i})=>{if(!t.open)return null;return i&&e("div",{onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},className:"ff-excel-menu",role:"menu","aria-label":"Excel context menu",style:{left:r.x,top:r.y,position:"absolute",zIndex:9999999999},children:t.options.map(t=>{if(!t.visible){const i=t.disable;return e(Y,{title:i?t.disableTooltip:"",children:n("div",{className:"ff-excel-menu-options "+(i?"disabled":""),role:"menuitem","aria-label":t.label,"aria-disabled":i,onClick:()=>{i||t.action()},children:[t.iconName&&e(q,{name:t.iconName,height:16,width:16,color:(r=t.label,r.includes("Delete")?"var(--label-edit-error-text)":"var(--brand-color)"),disabled:i}),e(U,{as:"label",children:t.label})]})},t.label)}var r;return null})})},sw=({excelData:r,contextOption:a,toolbar:s="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:C=!0,contextHeightPositioning:p=0,contextWidthPositioning:m=0,onSave:A=()=>Promise.resolve(),onSaveInfoChange:g,attachmentAction:v={addAttachment:()=>Promise.resolve(""),deleteAttachment:()=>Promise.resolve(""),viewAttachment:()=>Promise.resolve()},onSaveDelay:y=3e3,scroller:w=!1,columnContextEnable:b=!0,rowContextEnable:E=!0,sheetBarContextEnable:M=!0,minimumColumnWidth:L=100,disableDeleteOption:H=!1,maxRowLimit:x=1/0,maxColLimit:V=1/0,maxSheetLimit:k=1/0,getActiveCell:S=()=>{}})=>{const Z=o(null),[O,z]=c([]),[N,T]=c(""),[D,F]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[R,P]=c({name:"defaultSheet",index:0}),[B,j]=c({defaultSheet:[[Zv]]}),[_,W]=c([[Zv]]),[X,Q]=c((A.length,{})),[G,J]=c({x:0,y:0}),$=o(""),ee=o(null),te=o(null),ne=o(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);z(t),K(t.length)||($.current=t[0]||"",P({name:t[0]||"",index:0}));const n={},r={};e.forEach(e=>{const t=e.sheetName,i=e.data,a=Math.max(u,i.length),o=Math.max(f,Math.max(...i.map(e=>e.length)));let l=Array.from({length:a},()=>Array(o).fill({value:"",style:Zv.style,readOnly:!1,inputType:void 0}));i.forEach((e,t)=>{e.forEach((e,n)=>{var r;t<a&&n<o&&(l[t]||(l[t]=[]),l[t][n]={value:(r=e.value,null==r?null:r),style:K(e?.style)?Zv.style:tw(e?.style,L),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const s=new Set([...e?.rows?.readOnly?e.rows.readOnly.map(e=>`r${e}`):[],...e?.columns?.readOnly?e.columns.readOnly.map(e=>`c${e}`):[],...e?.cells?.readOnly?e.cells.readOnly.map(([e,t])=>`${e},${t}`):[]]);if(l.forEach((t,n)=>{t.forEach((t,r)=>{l[n]||(l[n]=[]);const i=s.has(`r${n+1}`)||s.has(`c${r+1}`)||s.has(`${n+1},${r+1}`),a=((t,n,r)=>r?.inputType?r.inputType:e?.rows?.inputType?.[t+1]||e?.columns?.inputType?.[n+1]||e?.cells?.inputType?.[`${t+1},${n+1}`]||{type:"text"})(n,r,t||Zv);l[n][r]={...t,value:t?.value??"",readOnly:t?.readOnly?t.readOnly:i,inputType:a,contextDisable:t?.contextDisable}})}),n[t]=l,A.length>1){const e=i[0]||[];r[t]=Array.from({length:o},(t,n)=>({newData:"",oldData:e[n]?.value||""}))}}),j(n),A.length>1&&Q(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&W(n[i])}},[r]),l(()=>{g&&g(N),"File saved"===N&&setTimeout(()=>{T("")},2e3)},[N]),l(()=>{T("Saving..."),re(ae())},[B,$.current]);const re=i.useCallback(Js(e=>{if(A.length>1){const t={...X};O.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Q(t);const n=O.map(e=>({sheetName:e,headers:t[e]||[]}));A(e,n)}else A(e);T("File saved")},y),[A,X,O]),ie=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),re(ae()))},[A]);i.useEffect(()=>(document.addEventListener("keydown",ie),()=>{document.removeEventListener("keydown",ie)}),[ie]);const ae=()=>O.map(e=>{const t=B[e]?.map(e=>{const t=e.reduce((e,t,n)=>{const r=""!==String(t?.value??"").trim(),i=t?.style?.width,a=t?.style?.height;return r||(void 0!==i&&i!==L||void 0!==a&&32!==a)?n:e},-1),n=e.map((e,n)=>e&&e.style&&n<=t?{value:e.value,style:rw(e.style,L),readOnly:e.readOnly,inputType:e.inputType,contextDisable:e.contextDisable}:null).filter(e=>null!==e);return n.length>0?n:[]})||[],n=t.filter((e,n)=>{const r=t.slice(n+1).some(e=>e.length>0);return e.length>0||r});return{sheetName:e,data:K(n.length)?[[]]:n}}),[oe,le]=c(null),se=()=>O.length>=k,ce=()=>{if(se())return;const e=((e,t)=>{const n=t.map(e=>e.toLowerCase());let r=`${e}1`,i=2;for(;n.includes(r.toLowerCase());)r=`${e}${i}`,i++;return r})("Sheet",O),t=Array.from({length:u},()=>Array.from({length:f},()=>Zv));z(t=>[...t,e]),P({index:O?.length,name:e}),j({...B,[e]:t}),W(t),A.length>1&&Q(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),$.current=e},de=(e=[[Zv]])=>{W(e)},ue=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void le(null);const i=(r.textContent||"").trim();if(!i)return dc.warning("Sheet name cannot be empty."),r.textContent=R.name,void le(null);if(i.length>50)return dc.warning("The sheet name cannot be greater than 50 characters"),r.textContent=R.name,void le(null);if(O.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return dc.warning("Sheet name already exists"),r.textContent=R.name,void le(null);let a=O;de(B?.[n]),a.splice(t,1,i);const o=function(e,t,n){if(!(t in e))throw new Error(`Key "${t}" not found in object`);const{[t]:r,...i}=e;return{...i,[n]:r??[]}}(B,n,i);$.current=i,P(e=>({...e,name:i})),j(o),A.length>1&&Q(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),le(null)};const fe=(e,t)=>{e!==R.name&&t!==R.index&&(P({index:t,name:e}),z(n=>{const r=[...n];return r[t]=e,r}),de(B[e]),$.current=e)},he=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&D.open&&(F({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[D.open]);i.useEffect(()=>(document.addEventListener("contextmenu",he),document.addEventListener("click",e=>he(e,!0)),()=>{document.removeEventListener("contextmenu",he),document.removeEventListener("click",e=>he(e,!0))}),[he]);const Ce=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ce(),disableTooltip:"Sheet limit reached",visible:!1,disable:se()},...H?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(O.length>1){let n=O.slice();n.splice(t,1);const r={...B};delete r[e];const i=Math.min(t,n.length-1);z(n),j(r),A.length>1&&Q(t=>{const n={...t};return delete n[e],n});const a=n[i]?n[i]:"";P({index:i,name:a}),de(r?.[a]),$.current=a}else dc.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];F(e=>({...e,open:!0,contextType:"sheet",options:r}))};l(()=>{ne.current?.removeSelect()},[R.name]);return e(t,{children:O.length>0&&n("section",{ref:ee,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=te.current?.parentElement?.getBoundingClientRect(),n=window.scrollX,r=window.scrollY;let i=e.clientX-(t?.left||0)+n,a=e.clientY-(t?.top||0)+r;const o=300,l=window.innerWidth,s=window.innerHeight,c=l-e.clientX,d=e.clientX,u=s-e.clientY,f=e.clientY;c<o&&d>=o?i=e.clientX-(t?.left||0)+n-150:i+=2,u<200&&f>=200?a=e.clientY-(t?.top||0)+r-20:a+=2,e.target.classList.contains("ff-excel-tab-list")?J({x:i,y:a-(H?32:65)}):(i+o>l&&(i=l-o-2),i<0&&(i=2),J({x:i+m,y:a+p}))},onClick:e=>{e.stopPropagation(),D.open&&F({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},"aria-label":"Excel spreadsheet workspace",role:"region",children:[e("div",{ref:te,className:"ff-excel-sheet","aria-label":"Spreadsheet content",children:e(ow,{ref:ne,editable:C,attachmentAction:v,toolbar:s,sheetHeight:h,setContextMenu:F,contextOption:a,data:_,columnContextEnable:b,rowContextEnable:E,minimumColumnWidth:L,onEvaluatedDataChange:e=>{j(t=>({...t,[$.current]:e}))},workRef:ee,scroller:w,maxRowLimit:x,maxColLimit:V,disableDeleteOption:H,contextMenu:D,getActiveCell:S,onAddColumn:(e,t)=>{A.length>1&&Q(n=>{const r=R.name,i=[...n[r]||[]],a=t?e:e+1;return i.splice(a,0,{newData:"",oldData:""}),{...n,[r]:i}})},onDeleteColumn:e=>{A.length>1&&Q(t=>{const n=R.name,r=[...t[n]||[]];return r.splice(e,1),{...t,[n]:r}})}},R.name)}),"hide"!==d&&n("nav",{className:"ff-excel-sheet-bar","aria-label":"Sheet navigation",children:["show"===d&&n("div",{className:"ff-excel-add-sheet-set","aria-label":"Sheet actions",children:[e(Y,{title:se()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(q,{disabled:!C||se(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ce,name:"plus_icon",height:20,width:20})}),e(Da,{options:(t=>t.map((t,r)=>({label:n("div",{style:{display:"flex",gap:"8px"},children:[R?.name===t?e(q,{height:16,width:16,name:"tick"}):e("div",{style:{height:"16px",width:"24px"}}),e(Y,{title:xn(t,20,"count")?t:"",children:e(U,{children:Hn(t,20,"count")})})]}),name:r,value:t})))(O),targetRef:Z,onOptionClick:e=>{const{value:t,name:n=""}=e;fe(t,parseInt(n))},dropdownPlacement:"top",iconName:"show_script",tooltipTitle:"All Sheets",tooltipPlacement:"top",dropdownHeight:215,selectedValue:R.name})]}),e("div",{className:"ff-excel-tab-container",role:"tablist","aria-label":"Worksheet tabs",children:O.map((t,n)=>e(U,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{fe(t,n),M&&Ce(e,t,n)},className:I("ff-excel-tab-list",{active:t===R.name}),role:"tab","aria-selected":t===R.name,"aria-label":`Sheet ${t}`,onClick:()=>{fe(t,n)},suppressContentEditableWarning:oe===n,onDoubleClick:e=>{"show"===d&&(le(n),null===oe&&setTimeout(()=>(e=>{const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)})(e.target),0))},contentEditable:C&&oe===n,onBlur:e=>{ue(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),ue(e,n,t))},children:t})},t))})]}),D.open&&e(lw,{contextMenu:D,position:G,editable:C}),e(cc,{})]})})},cw=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:i=!1})=>{const a=i?"filter":"module";return e("div",{className:I("ff-module-chip",{"ff-filter-chip":i,[`ff-${a}-chip--active`]:n,[`ff-${a}-chip--hover`]:!n}),onClick:r,"aria-label":t||`${a} chip`,children:e(U,{lineHeight:"18px",className:"module-typography",children:t})})},dw=({x:e,y:t,radius:n,startAngle:r,endAngle:i})=>{const a=e+n*Math.cos(r),o=t+n*Math.sin(r),l=e+n*Math.cos(i),s=t+n*Math.sin(i),c=i-r>Math.PI?1:0;return i-r>=2*Math.PI?`\n M ${e+n} ${t}\n A ${n} ${n} 0 1 1 ${e-n} ${t} \n A ${n} ${n} 0 1 1 ${e+n} ${t}\n `:`M ${a} ${o} A ${n} ${n} 0 ${c} 1 ${l} ${s}`},uw=({radius:t=15,lineWidth:r=5,label:i,percentageValue:a,icon:l,fontSize:s=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:C})=>{const[p,m]=c({x:0,y:0}),[A,g]=c(!1),v=o(null);let y=-Math.PI/2;const w=2*(t+r),{backgroundArcPath:b,foregroundArcPath:E}=((e,t,n)=>{const r=t,i=r+Math.max(0,Math.min(e,100))/100*2*Math.PI;return{backgroundArcPath:dw({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:dw({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(a,y,t),M=()=>{g(!0)},L=()=>{m({x:0,y:0}),g(!1)},H=e=>{if(v.current){const t=v.current.getBoundingClientRect();m({x:e.clientX-t.left,y:e.clientY-t.top})}},x=i?`${i} radial chart at ${a}%`:`Radial chart at ${a}%`;return n("section",{ref:v,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${s}px`},onClick:C,"aria-label":x,children:[e("svg",{width:w,height:w,viewBox:`0 0 ${w} ${w}`,role:"img","aria-label":x,children:n("g",{transform:`translate(${t+r}, ${t+r})`,children:[e("path",{d:b,fill:"none",stroke:f,strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),e("path",{d:E,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),h&&e("path",{d:E,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),l?e("foreignObject",{x:"-10",y:"-10",width:"20",height:"20",children:e(q,{className:"ff-radial-chart-icon-padding",name:l,height:20,width:20,withPadding:!1})}):e("text",{x:"0",y:"0",fill:d||u,textAnchor:"middle",dominantBaseline:"central",children:`${Math.round(a)}%`})]})}),A&&n("div",{className:"ff-icon-radial-chart-tooltip",style:{position:"absolute",left:`${p.x+15}px`,top:p.y-5+"px"},children:[e(U,{children:`${i} : `}),n(U,{children:[a,"%"]})]})]})},fw=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:a,onDownloadClick:o,height:l="75px",width:s="79px",fileName:c,thumbnailMediaSrc:d,isDelete:u})=>e("figure",{className:"ff-attach-media-container",style:{height:l,width:s},"aria-label":c?`Attached media ${c}`:"Attached media",children:n("div",{className:"ff-media-wrapper",style:{height:l,width:s},children:[e("img",{src:d||t,alt:c?`Preview of ${c}`:"Attached media preview"}),n("div",{className:"ff-hover-icons","aria-label":"Media actions",children:[n("div",{className:"ff-top-icons",children:[e("div",{className:"ff-icon-container",children:e(Y,{title:"Download File",placement:"bottom",children:e(q,{name:"download_file_icon",height:10,width:10,onClick:o,color:"var(--icons-default-color)","aria-label":"Download file"})})}),u&&e("div",{className:"ff-icon-container",children:e(Y,{title:"Delete",placement:"bottom",children:e(q,{name:"delete",height:10,width:10,color:"var(--ff-delete-button-attachment)",onClick:()=>{a&&a(r)},"aria-label":"Delete file"})})})]}),e("div",{className:"ff-expand-icon-container",children:e(Y,{title:"Maximize",placement:"bottom",children:e(q,{name:"expand_icon",height:16,width:16,onClick:i,"aria-label":"Expand media"})})})]}),e(U,{color:"var(--text-area-default-color)",fontWeight:"medium",className:"ff-media-text",children:c})]})}),hw=({icon:r,status:i,count:a,text:o,style:s={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=c(!1),C=["total defects","defect density","open defects","closed defects","quality score"],p=C.includes(i.toLowerCase()),m=C.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:s,onClick:()=>(e=>{C.includes(e.toLowerCase())||(h(!0),u(e))})(i),children:[n("div",{className:"ff-status-bar",children:[e("div",{children:e(q,{name:r,height:20,width:20,hoverEffect:!1})}),!C.includes(i.toLowerCase())&&e(U,{fontWeight:"semi-bold",fontSize:"10px",textAlign:"center",lineHeight:"15px",className:"ff-status-text",as:"div",children:i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()})]}),e("div",{className:"ff-content "+(m?"red-background":""),children:n(t,p?{children:[e(U,{fontWeight:"semi-bold",fontSize:"10px",className:"ff-text",lineHeight:"15px",color:"var(--ff-chip-text-color)",children:o}),e(U,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"36px",children:"defect density"===i.toLowerCase()?n(t,{children:[a.toString().padStart(2,"0"),e(U,{fontSize:"15px",fontWeight:"semi-bold",children:"/ Modules"})]}):"quality score"===i.toLowerCase()?`${parseFloat(a.toString()).toFixed(2)}%`:a.toString().padStart(2,"0")})]}:{children:[e(U,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"24px",color:f?"var(--base-bg-color)":"",children:a.toString().padStart(2,"0")}),e(U,{className:"ff-text",lineHeight:"18px",color:f?"var(--base-bg-color)":"var(--ff-chip-text-color)",children:o})]})})]})},Cw=({option:t})=>{const r=o(null),[i,a]=c(!1);l(()=>{const e=r.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth)},n=requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",t)}},[t]);const s={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},d=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;return n("div",{style:{width:"-webkit-fill-available"},className:"ff-variable-option ff-variable-data",role:"option","aria-label":d(t),children:[e(Y,{title:i?d(t):"",style:{width:"calc(100% - 32px)"},children:e("span",{ref:r,className:"ff-truncated_text","aria-label":d(t),children:d(t)})}),e(q,{name:(e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"LOCAL"===e.type&&"STEPGROUP"===e?.parentVariableType?"step_group_variable":"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":s[e.type||""]||""})(t),height:24,width:24})]})};function pw(e){return()=>e}function mw(e){e()}function Aw(e,t){return n=>e(t(n))}function gw(e,t){return()=>e(t)}function vw(e){return void 0!==e}function yw(){}function ww(e,t){return t(e),e}function bw(e,t){return t(e)}function Ew(...e){return e}function Mw(e,t){return e(1,t)}function Lw(e,t){e(0,t)}function Hw(e){e(2)}function xw(e){return e(4)}function Vw(e,t){return Mw(e,function(e,t){return n=>e(t,n)}(t,0))}function kw(e,t){const n=e(1,e=>{n(),t(e)});return n}function Sw(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Zw(e,t){return e===t}function Ow(e=Zw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function zw(e){return t=>n=>{e(n)&&t(n)}}function Nw(e){return t=>Aw(t,e)}function Iw(e){return t=>()=>{t(e)}}function Tw(e,...t){const n=function(...e){return t=>e.reduceRight(bw,t)}(...t);return(t,r)=>{switch(t){case 2:return void Hw(e);case 1:return Mw(e,n(r))}}}function Dw(e,t){return n=>r=>{n(t=e(t,r))}}function Fw(e){return t=>n=>{e>0?e--:t(n)}}function Rw(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function Pw(...e){const t=Array.from({length:e.length});let n=0,r=null;const i=2**e.length-1;return e.forEach((e,a)=>{const o=2**a;Mw(e,e=>{const l=n;n|=o,t[a]=e,l!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{const o=()=>{e([a].concat(t))};n===i?o():r=o}}function Bw(e){let t=e;const n=_w();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function jw(e,t){return ww(Bw(t),t=>Vw(e,t))}function _w(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach(e=>{e(n)});case 2:return void e.splice(0);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function qw(e){return ww(_w(),t=>Vw(e,t))}const Uw={singleton:!0};function Ww(e,t=[],n=Uw){const{singleton:r}=n;return{constructor:e,dependencies:t,id:Xw(),singleton:r}}const Xw=()=>Symbol("id");function Qw(...e){const t=_w(),n=Array.from({length:e.length});let r=0;const i=2**e.length-1;return e.forEach((e,a)=>{const o=2**a;Mw(e,e=>{n[a]=e,r|=o,r===i&&Lw(t,n)})}),function(e,a){switch(e){case 2:return void Hw(t);case 1:return r===i&&a(n),Mw(t,a)}}}function Gw(e,t=Zw){return Tw(e,Ow(t))}function Kw(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(mw)}}(...e.map(e=>Mw(e,n)))}}}const Yw=0,Jw=1,$w=2,eb=3,tb={[Yw]:"debug",[eb]:"error",[Jw]:"log",[$w]:"warn"},nb=Ww(()=>{const e=Bw(eb);return{log:Bw((t,n,r=Jw)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??xw(e))&&console[tb[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function rb(e){const t=function(e){return"self"in e?e.document.documentElement:e}(e);return"rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction}function ib(e,t){return rb(e)?-t:t}function ab(e,t){return rb(e)?-t:t}function ob(e,t,n){return lb(e,t,n).callbackRef}function lb(e,t,n){const r=i.useRef(null);let a=e=>{};const o=i.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return a=e=>{e&&t?(o?.observe(e),r.current=e):(r.current&&o?.unobserve(r.current),r.current=null)},{callbackRef:a,ref:r}}function sb(e,t,n,r,a,o,l,s,c){const d=i.useCallback(n=>{const i=function(e,t,n,r){const i=e.length;if(0===i)return null;const a=[];for(let o=0;o<i;o++){const i=e.item(o);if(void 0===i.dataset.index)continue;const l=parseInt(i.dataset.index,10),s=parseFloat(i.dataset.knownSize),c=t(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},eb),c===s)continue;const d=a[a.length-1];0===a.length||d.size!==c||d.endIndex!==l-1?a.push({endIndex:l,size:c,startIndex:l}):a[a.length-1].endIndex++}return a}(n.children,t,s?"offsetWidth":"offsetHeight",a);let c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;const d="window"===c.lastElementChild?.dataset.viewportType;let u;d&&(u=c.ownerDocument.defaultView);const f=l?s?l.scrollWidth:l.scrollHeight:d?s?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,h=l?s?l.offsetWidth:l.offsetHeight:d?s?u.innerWidth:u.innerHeight:s?c.offsetWidth:c.offsetHeight,C=l?s?ib(l,l.scrollLeft):l.scrollTop:d?s?ib(u,u.scrollX||u.document.documentElement.scrollLeft):u.scrollY||u.document.documentElement.scrollTop:s?ib(c,c.scrollLeft):c.scrollTop;r({scrollHeight:f,scrollTop:Math.max(C,0),viewportHeight:h}),o?.(s?cb("column-gap",getComputedStyle(n).columnGap,a):cb("row-gap",getComputedStyle(n).rowGap,a)),null!==i&&e(i)},[e,t,a,o,l,r,s]);return lb(d,n,c)}function cb(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,$w),"normal"===t?0:parseInt(t??"0",10)}function db(e,t,n){const r=i.useRef(null),a=i.useCallback(n=>{if(!n?.offsetParent)return;const i=n.getBoundingClientRect(),a=i.width;let o,s;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;s=e.height-Math.max(0,n),o=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;s=e.innerHeight-Math.max(0,i.top),o=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:o,visibleHeight:s,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:o,ref:l}=lb(a,!0,n),s=i.useCallback(()=>{a(l.current)},[a,l]);return i.useEffect(()=>{if(t){t.addEventListener("scroll",s);const e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}const e=l.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,l]),o}const ub=Ww(()=>{const e=_w(),t=_w(),n=Bw(0),r=_w(),i=Bw(0),a=_w(),o=_w(),l=Bw(0),s=Bw(0),c=Bw(0),d=Bw(0),u=_w(),f=_w(),h=Bw(!1),C=Bw(!1),p=Bw(!1);return Vw(Tw(e,Nw(({scrollTop:e})=>e)),t),Vw(Tw(e,Nw(({scrollHeight:e})=>e)),o),Vw(t,i),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:s,footerHeight:d,headerHeight:l,horizontalDirection:C,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:p,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),fb={lvl:0};function hb(e,t){const n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]);const a=[];for(let o=1;o<n;o++){const{index:n,value:l}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=l}return a.push({end:1/0,start:r,value:i}),a}function Cb(e){return e===fb}function pb(e,t){if(!Cb(e))return t===e.k?e.v:t<e.k?pb(e.l,t):pb(e.r,t)}function mb(e,t,n="k"){if(Cb(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=mb(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return mb(e.l,t,n)}function Ab(e,t,n){return Cb(e)?Vb(t,n,1):t===e.k?Mb(e,{k:t,v:n}):t<e.k?kb(Mb(e,{l:Ab(e.l,t,n)})):kb(Mb(e,{r:Ab(e.r,t,n)}))}function gb(){return fb}function vb(e,t,n){if(Cb(e))return[];return function(e){return hb(e,({k:e,v:t})=>({index:e,value:t}))}(bb(e,mb(e,t)[0],n))}function yb(e,t){if(Cb(e))return fb;const{k:n,l:r,r:i}=e;if(t===n){if(Cb(r))return i;if(Cb(i))return r;const[t,n]=xb(r);return Eb(Mb(e,{k:t,l:Lb(r),v:n}))}return Eb(Mb(e,t<n?{l:yb(r,t)}:{r:yb(i,t)}))}function wb(e){return Cb(e)?[]:[...wb(e.l),{k:e.k,v:e.v},...wb(e.r)]}function bb(e,t,n){if(Cb(e))return[];const{k:r,l:i,r:a,v:o}=e;let l=[];return r>t&&(l=l.concat(bb(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:o}),r<=n&&(l=l.concat(bb(a,t,n))),l}function Eb(e){const{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Hb(t))return Sb(Mb(e,{lvl:n-1}));if(!Cb(t)&&!Cb(t.r))return Mb(t.r,{l:Mb(t,{r:t.r.l}),lvl:n,r:Mb(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(Hb(e))return Zb(Mb(e,{lvl:n-1}));if(!Cb(r)&&!Cb(r.l)){const t=r.l,i=Hb(t)?r.lvl-1:r.lvl;return Mb(t,{l:Mb(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Zb(Mb(r,{l:t.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function Mb(e,t){return Vb(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function Lb(e){return Cb(e.r)?e.l:Eb(Mb(e,{r:Lb(e.r)}))}function Hb(e){return Cb(e)||e.lvl>e.r.lvl}function xb(e){return Cb(e.r)?[e.k,e.v]:xb(e.r)}function Vb(e,t,n,r=fb,i=fb){return{k:e,l:r,lvl:n,r:i,v:t}}function kb(e){return Zb(Sb(e))}function Sb(e){const{l:t}=e;return Cb(t)||t.lvl!==e.lvl?e:Mb(t,{r:Mb(e,{l:t.r})})}function Zb(e){const{lvl:t,r:n}=e;return Cb(n)||Cb(n.r)||n.lvl!==t||n.r.lvl!==t?e:Mb(n,{l:Mb(e,{r:n.l}),lvl:t+1})}function Ob(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function zb(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const Nb=Ww(()=>({recalcInProgress:Bw(!1)}),[],{singleton:!0});function Ib(e,t,n){return e[Tb(e,t,n)]}function Tb(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=n(e[a],t);if(0===o)return a;if(-1===o){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Db(e,t){return Math.round(e.getBoundingClientRect()[t])}function Fb(e){return!Cb(e.groupOffsetTree)}function Rb({index:e},t){return t===e?0:t<e?-1:1}function Pb({offset:e},t){return t===e?0:t<e?-1:1}function Bb(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:a}=Ib(t,e,Rb),o=e-r,l=a*o+(o-1)*n+i;return l>0?l+n:l}function jb(e,t){if(!Fb(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _b(e,t,n){if(function(e){return void 0!==e.groupIndex}(e))return t.groupIndices[e.groupIndex]+1;let r=jb("LAST"===e.index?n:e.index,t);return r=Math.max(0,Math.min(n,r)),r}function qb(e,t,n,r=0){return r>0&&(t=Math.max(t,Ib(e,r,Rb).offset)),hb(function(e,t,n,r){const i=Tb(e,t,r),a=Tb(e,n,r,i);return e.slice(i,a+1)}(e,t,n,Pb),Qb)}function Ub(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Yw);const a=e.sizeTree;let o=a,l=0;if(n.length>0&&Cb(a)&&2===t.length){const e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Ab(Ab(t,n,e),n+1,r),o)}else[o,l]=function(e,t){let n=Cb(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),Cb(e)){e=Ab(e,0,i);continue}const o=vb(e,a-1,t+1);if(o.some(Gb(r)))continue;let l=!1,s=!1;for(const{end:n,start:r,value:a}of o)l?(t>=r||i===a)&&(e=yb(e,r)):(s=a!==i,l=!0),n>t&&t>=r&&a!==i&&(e=Ab(e,t+1,a));s&&(e=Ab(e,a,i))}return[e,n]}(o,t);if(o===a)return e;const{lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u}=Xb(e.offsetTree,l,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Ab(e,t,Bb(t,u,i)),gb()),lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u,sizeTree:o}}function Wb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Xb(e,t,n,r){let i=e,a=0,o=0,l=0,s=0;if(0===t)i=[];else{s=Tb(i,t-1,Rb),l=i[s].offset;const e=mb(n,t-1);a=e[0],o=e[1],i.length&&i[s].size===mb(n,t)[1]&&(s-=1),i=i.slice(0,s+1)}for(const{start:e,value:s}of vb(n,t,1/0)){const t=e-a,n=t*o+l+t*r;i.push({index:e,offset:n,size:s}),a=e,l=n,o=s}return{lastIndex:a,lastOffset:l,lastSize:o,offsetTree:i}}function Qb(e){return{index:e.index,value:e}}function Gb(e){const{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Kb={offsetHeight:"height",offsetWidth:"width"},Yb=Ww(([{log:e},{recalcInProgress:t}])=>{const n=_w(),r=_w(),i=jw(r,0),a=_w(),o=_w(),l=Bw(0),s=Bw([]),c=Bw(void 0),d=Bw(void 0),u=Bw(void 0),f=Bw(void 0),h=Bw((e,t)=>Db(e,Kb[t])),C=Bw(void 0),p=Bw(0),m={groupIndices:[],groupOffsetTree:gb(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:gb()},A=jw(Tw(n,Pw(s,e,p),Dw(Ub,m),Ow()),m),g=jw(Tw(s,Ow(),Dw((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Nw(({prev:e})=>e)),[]);Vw(Tw(s,zw(e=>e.length>0),Pw(A,p),Nw(([e,t,n])=>{const r=e.reduce((e,r,i)=>Ab(e,r,Bb(r,t.offsetTree,n)||i),gb());return{...t,groupIndices:e,groupOffsetTree:r}})),A),Vw(Tw(r,Pw(A),zw(([e,{lastIndex:t}])=>e<t),Nw(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Vw(c,d);const v=jw(Tw(c,Nw(e=>void 0===e)),!0);Vw(Tw(d,zw(e=>void 0!==e&&Cb(xw(A).sizeTree)),Nw(e=>{const t=xw(u),n=xw(s).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Vw(Tw(f,zw(e=>void 0!==e&&e.length>0&&Cb(xw(A).sizeTree)),Nw(e=>{const t=[];let n=e[0],r=0;for(let i=1;i<e.length;i++){const a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Vw(Tw(s,Pw(u,d),zw(([,e,t])=>void 0!==e&&void 0!==t),Nw(([e,t,n])=>{const r=[];for(let i=0;i<e.length;i++){const a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),void 0!==o&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);const y=qw(Tw(n,Pw(A),Dw(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),Nw(e=>e.changed)));Mw(Tw(l,Dw((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Nw(e=>e.diff)),e=>{const{groupIndices:n}=xw(A);if(e>0)Lw(t,!0),Lw(a,e+Wb(e,n));else if(e<0){const t=xw(g);t.length>0&&(e-=Wb(-e,t)),Lw(o,e)}}),Mw(Tw(l,Pw(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},eb)});const w=qw(a);Vw(Tw(a,Pw(A),Nw(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=pb(t.sizeTree,0);let a=0,o=0;for(;a<e;){const e=t.groupIndices[o],l=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+l-1,size:i,startIndex:e+1}),o++,a+=l+1}const l=wb(t.sizeTree);return a!==e&&l.shift(),l.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return wb(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);const b=qw(Tw(o,Pw(A,p),Nw(([e,{offsetTree:t},n])=>Bb(-e,t,n))));return Vw(Tw(o,Pw(A,p),Nw(([e,t,n])=>{if(t.groupIndices.length>0){if(Cb(t.sizeTree))return t;let r=gb();const i=xw(g);let a=0,o=0,l=0;for(;a<-e;){l=i[o];const e=i[o+1]-l-1;o++,a+=e+1}if(r=wb(t.sizeTree).reduce((t,{k:n,v:r})=>Ab(t,Math.max(0,n+e),r),r),a!==-e){r=Ab(r,0,pb(t.sizeTree,l));r=Ab(r,1,mb(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...Xb(t.offsetTree,0,r,n)}}const r=wb(t.sizeTree).reduce((t,{k:n,v:r})=>Ab(t,Math.max(0,n+e),r),gb());return{...t,sizeTree:r,...Xb(t.offsetTree,0,r,n)}})),A),{beforeUnshiftWith:w,data:C,defaultItemSize:d,firstItemIndex:l,fixedItemSize:c,fixedGroupSize:u,gap:p,groupIndices:s,heightEstimates:f,itemSize:h,listRefresh:y,shiftWith:o,shiftWithOffset:b,sizeRanges:n,sizes:A,statefulTotalCount:i,totalCount:r,trackItemSizes:v,unshiftWith:a}},Ew(nb,Nb),{singleton:!0});function Jb(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const $b=Ww(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const a=_w(),o=_w(),l=qw(Tw(a,Nw(Jb)));return Vw(Tw(l,Nw(e=>e.totalCount)),n),Vw(Tw(l,Nw(e=>e.groupIndices)),e),Vw(Tw(Qw(i,t,r),zw(([e,t])=>Fb(t)),Nw(([e,t,n])=>mb(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),Ow(),Nw(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},Ew(Yb,ub)),eE=Ww(([{log:e}])=>{const t=Bw(!1),n=qw(Tw(t,zw(e=>e),Ow()));return Mw(t,t=>{t&&xw(e)("props updated",{},Yw)}),{didMount:n,propsReady:t}},Ew(nb),{singleton:!0}),tE=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function nE(e){const t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),(!t.behavior||!tE)&&(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}const rE=Ww(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:l,scrollingInProgress:s,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=_w(),C=_w(),p=Bw(0);let m=null,A=null,g=null;function v(){null!==m&&(m(),m=null),null!==g&&(g(),g=null),A&&(clearTimeout(A),A=null),Lw(s,!1)}return Vw(Tw(h,Pw(n,u,r,p,l,o,f),Pw(e,a,i),Nw(([[e,n,r,i,a,o,l,c],u,f,p])=>{const y=nE(e),{align:w,behavior:b,offset:E}=y,M=i-1,L=_b(y,n,M);let H=Bb(L,n.offsetTree,u)+o;"end"===w?(H+=f+mb(n.sizeTree,L)[1]-r+p,L===M&&(H+=l)):"center"===w?H+=(f+mb(n.sizeTree,L)[1]-r+p)/2:H-=a,void 0!==E&&0!==E&&(H+=E);const x=t=>{v(),t?(c("retrying to scroll to",{location:e},Yw),Lw(h,e)):(Lw(C,!0),c("list did not change, scroll successful",{},Yw))};if(v(),"smooth"===b){let e=!1;g=Mw(t,t=>{e=e||t}),m=kw(d,()=>{x(e)})}else m=kw(Tw(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),x);return A=setTimeout(()=>{v()},1200),Lw(s,!0),c("scrolling from index to",{behavior:b,index:L,top:H},Yw),{behavior:b,top:H}})),c),{scrollTargetReached:C,scrollToIndex:h,topListHeight:p}},Ew(Yb,ub,nb),{singleton:!0});function iE(e,t){0===e?t():requestAnimationFrame(()=>{iE(e-1,t)})}function aE(e,t){if(void 0===e)return 0;const n=t-1,r="number"==typeof e?e:"LAST"===e.index?n:e.index;return Math.max(0,Math.min(r,n))}function oE(e){return void 0===e||("number"==typeof e?0===e:!(0!==e.index||void 0!==e.align&&"start"!==e.align||void 0!==e.offset&&0!==e.offset))}const lE=Ww(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{const l=Bw(!0),s=Bw(0),c=Bw(!0);return Vw(Tw(o,Pw(s),zw(([e,t])=>!oE(t)),Iw(!1)),l),Vw(Tw(o,Pw(s),zw(([e,t])=>!oE(t)),Iw(!1)),c),Mw(Tw(Qw(t,o),Pw(l,n,e,c),zw(([[,e],t,{sizeTree:n},r,i])=>e&&(!Cb(n)||vw(r))&&!t&&!i),Pw(s)),([,e])=>{if(void 0===e)return Lw(l,!0),void Lw(c,!0);kw(i,()=>{Lw(c,!0)}),iE(4,()=>{kw(r,()=>{Lw(l,!0)}),Lw(a,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:s,scrolledToInitialItem:l}},Ew(Yb,ub,rE,eE),{singleton:!0});function sE(e,t){return Math.abs(e-t)<1.01}const cE="up",dE="down",uE={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},fE=Ww(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{const o=Bw(!1),l=Bw(!0),s=_w(),c=_w(),d=Bw(4),u=Bw(0),f=jw(Tw(Kw(Tw(Gw(i),Fw(1),Iw(!0)),Tw(Gw(i),Fw(1),Iw(!1),Sw(100))),Ow()),!1),h=jw(Tw(Kw(Tw(n,Iw(!0)),Tw(n,Iw(!1),Sw(200))),Ow()),!1);Vw(Tw(Qw(Gw(i),Gw(u)),Nw(([e,t])=>e<=t),Ow()),l),Vw(Tw(l,Rw(50)),c);const C=qw(Tw(Qw(r,Gw(a),Gw(t),Gw(e),Gw(d)),Dw((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{const l={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-o){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:l}}let s;return s=l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:s,state:l}},uE),Ow((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),p=jw(Tw(r,Dw((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!sE(e.scrollHeight,t)){const i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),zw(e=>e.changed),Nw(e=>e.jump)),0);Vw(Tw(C,Nw(e=>e.atBottom)),o),Vw(Tw(o,Rw(50)),s);const m=Bw(dE);Vw(Tw(r,Nw(({scrollTop:e})=>e),Ow(),Dw((e,t)=>xw(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?cE:dE,prevScrollTop:t},{direction:dE,prevScrollTop:0}),Nw(e=>e.direction)),m),Vw(Tw(r,Rw(50),Iw("none")),m);const A=Bw(0);return Vw(Tw(f,zw(e=>!e),Iw(0)),A),Vw(Tw(i,Rw(100),Pw(f),zw(([e,t])=>t),Dw(([e,t],[n])=>[t,n],[0,0]),Nw(([e,t])=>t-e)),A),{atBottomState:C,atBottomStateChange:s,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:u,isAtBottom:o,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:p,scrollDirection:m,scrollVelocity:A}},Ew(ub)),hE="top",CE="bottom",pE="none";function mE(e,t,n){return"number"==typeof e?n===cE&&t===hE||n===dE&&t===CE?e:0:n===cE?t===hE?e.main:e.reverse:t===CE?e.main:e.reverse}function AE(e,t){return"number"==typeof e?e:e[t]??0}const gE=Ww(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const a=_w(),o=Bw(0),l=Bw(0),s=Bw(0);return{increaseViewportBy:l,listBoundary:a,overscan:s,topListHeight:o,visibleRange:jw(Tw(Qw(Gw(r),Gw(i),Gw(n),Gw(a,zb),Gw(s),Gw(o),Gw(t),Gw(e),Gw(l)),Nw(([e,t,n,[r,i],a,o,l,s,c])=>{const d=e-s,u=o+l,f=Math.max(n-d,0);let h=pE;const C=AE(c,hE),p=AE(c,CE);return r-=s,i+=n+l,(r+=n+l)>e+u-C&&(h=cE),(i-=s)<e-f+t+p&&(h=dE),h!==pE?[Math.max(d-n-mE(a,hE,h)-C,0),d-f-l+t+mE(a,CE,h)+p]:null}),zw(e=>null!==e),Ow(zb)),[0,0])}},Ew(ub),{singleton:!0});const vE={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function yE(e,t,n,r,i,a){const{lastIndex:o,lastOffset:l,lastSize:s}=i;let c=0,d=0;if(e.length>0){c=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-o,f=c,h=l+u*s+(u-1)*r-d;return{bottom:d,firstItemIndex:a,items:bE(e,i,a),offsetBottom:h,offsetTop:c,top:f,topItems:bE(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function wE(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-o>=e)break;o++}const l=e+o,s=aE(t,l);return yE(Array.from({length:l}).map((e,t)=>({data:a[t+s],index:t+s,offset:0,size:0})),[],l,i,n,r)}function bE(e,t,n){if(0===e.length)return[];if(!Fb(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));const r=e[0].index,i=e[e.length-1].index,a=[],o=vb(t.groupOffsetTree,r,i);let l,s=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=o.shift(),s=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:s,type:"group"}:{groupIndex:s,index:r.index-(s+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function EE(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}const ME=Ww(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:l,visibleRange:s},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:C}])=>{const p=Bw([]),m=Bw(0),A=_w(),g=Bw(0);Vw(a.topItemsIndexes,p);const v=jw(Tw(Qw(h,C,Gw(s,zb),Gw(i),Gw(r),Gw(c),d,Gw(p),Gw(t),Gw(n),Gw(g),e),zw(([e,t,,n,,,,,,,,r])=>{const i=void 0!==r&&r.length!==n;return e&&!t&&!i}),Nw(([,,[e,t],n,r,i,a,o,l,s,c,d])=>{const u=r,{offsetTree:f,sizeTree:h}=u,C=xw(m);if(0===n)return{...vE,totalCount:n};if(0===e&&0===t)return 0===C?{...vE,totalCount:n}:wE(C,i,r,l,s,d||[]);if(Cb(h))return C>0?null:yE(function(e,t,n){if(Fb(t)){const r=jb(e,t);return[{index:mb(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(aE(i,n),u,d),[],n,s,u,l);const p=[];if(o.length>0){const e=o[0],t=o[o.length-1];let n=0;for(const r of vb(h,e,t)){const i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)p.push({data:d?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return yE([],p,n,s,u,l);const A=o.length>0?o[o.length-1]+1:0,g=qb(f,e,t,A);if(0===g.length)return null;const v=n-1,y=ww([],n=>{for(const r of g){const i=r.value;let a=i.offset,o=r.start;const l=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+s)/(l+s));const t=o-r.start;a+=t*l+t*s}o<A&&(a+=(A-o)*l,o=A);const c=Math.min(r.end,v);for(let e=o;e<=c&&!(a>=t);e++)n.push({data:d?.[e],index:e,offset:a,size:l}),a+=l+s}}),w=EE(c,hE),b=EE(c,CE);if(y.length>0&&(w>0||b>0)){const e=y[0],t=y[y.length-1];if(w>0&&e.index>A){const t=Math.min(w,e.index-A),n=[];let r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){const t=vb(h,i,i)[0]?.value??e.size;r-=t+s,n.unshift({data:d?.[i],index:i,offset:r,size:t})}y.unshift(...n)}if(b>0&&t.index<v){const e=Math.min(b,v-t.index);let n=t.offset+t.size+s;for(let r=t.index+1;r<=t.index+e;r++){const e=vb(h,r,r)[0]?.value??t.size;y.push({data:d?.[r],index:r,offset:n,size:e}),n+=e+s}}}return yE(y,p,n,s,u,l)}),zw(e=>null!==e),Ow()),vE);Vw(Tw(e,zw(vw),Nw(e=>e?.length)),i),Vw(Tw(v,Nw(e=>e.topListHeight)),u),Vw(u,l),Vw(Tw(v,Nw(e=>[e.top,e.bottom])),o),Vw(Tw(v,Nw(e=>e.items)),A);const y=qw(Tw(v,zw(({items:e})=>e.length>0),Pw(i,e),zw(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Nw(([,e,t])=>[e-1,t]),Ow(zb),Nw(([e])=>e))),w=qw(Tw(v,Rw(200),zw(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Nw(({items:e})=>e[0].index),Ow())),b=qw(Tw(v,zw(({items:e})=>e.length>0),Nw(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),Ow(Ob)));return{endReached:y,initialItemCount:m,itemsRendered:A,listState:v,minOverscanItemCount:g,rangeChanged:b,startReached:w,topItemsIndexes:p,...f}},Ew(Yb,$b,gE,lE,rE,fE,eE,Nb),{singleton:!0}),LE=Ww(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const a=_w(),o=jw(Tw(Qw(n,e,r,t,i),Nw(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Vw(Gw(o),a),{totalListHeight:o,totalListHeightChanged:a}},Ew(ub,ME),{singleton:!0}),HE=Ww(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Bw(!1);return{alignToBottom:n,paddingTopAddition:jw(Tw(Qw(n,e,t),zw(([e])=>e),Nw(([,e,t])=>Math.max(0,e-t)),Rw(0),Ow()),0)}},Ew(ub,LE),{singleton:!0}),xE=Ww(()=>({context:Bw(null)})),VE=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>a?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,kE=Ww(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:l,viewportHeight:s},{scrollToIndex:c}])=>{const d=_w();return Vw(Tw(d,Pw(t,s,n,a,i,r,l),Pw(e),Nw(([[e,t,n,r,i,a,l,s],c])=>{const{calculateViewLocation:d=VE,done:u,...f}=e,h=_b(e,t,r-1),C=Bb(h,t.offsetTree,c)+i+a,p=d({itemBottom:C+mb(t.sizeTree,h)[1],itemTop:C,locationParams:f,viewportBottom:s+n-l,viewportTop:s+a});return null===p?u?.():u&&kw(Tw(o,zw(e=>!e),Fw(xw(o)?1:2)),u),p}),zw(e=>null!==e)),c),{scrollIntoView:d}},Ew(Yb,ub,rE,ME,nb),{singleton:!0});function SE(e){return!1!==e&&("smooth"===e?"smooth":"auto")}const ZE=Ww(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:l},{didMount:s,propsReady:c},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const C=Bw(!1),p=_w();let m=null;function A(e){Lw(o,{align:"end",behavior:e,index:"LAST"})}function g(e){const t=kw(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(xw(d)("scrolling to bottom due to increased size",{},Yw),A("auto"))});setTimeout(t,100)}Mw(Tw(Qw(Tw(Gw(t),Fw(1)),s),Pw(Gw(C),a,l,u),Nw(([[e,t],n,r,i,a])=>{let o=t&&i,l="auto";return o&&(l=((e,t)=>"function"==typeof e?SE(e(t)):t&&SE(e))(n,r||a),o=o&&!1!==l),{followOutputBehavior:l,shouldFollow:o,totalCount:e}}),zw(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0===xw(n)?m=kw(e,()=>{xw(d)("following output to ",{totalCount:r},Yw),A(t),m=null}):requestAnimationFrame(()=>{xw(d)("following output to ",{totalCount:r},Yw),A(t)})}),Mw(Tw(Qw(Gw(C),t,c),zw(([e,,t])=>!1!==e&&t),Dw(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),zw(({refreshed:e})=>e),Pw(C,t)),([,e])=>{xw(l)&&g(!1!==e)}),Mw(p,()=>{g(!1!==xw(C))}),Mw(Qw(Gw(C),i),([e,t])=>{!1!==e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&A("auto")});const v=Bw(null),y=_w();return Vw(Kw(Tw(Gw(r),Nw(e=>e?.length??0)),Tw(Gw(t))),y),Mw(Tw(Qw(Tw(y,Fw(1)),s),Pw(Gw(v),l,u,f),Nw(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),zw(e=>!!e),Rw(0)),t=>{null!==m&&(m(),m=null),void 0===xw(n)?m=kw(e,()=>{xw(d)("scrolling into view",{}),Lw(h,t),m=null}):requestAnimationFrame(()=>{xw(d)("scrolling into view",{}),Lw(h,t)})}),{autoscrollToBottom:p,followOutput:C,scrollIntoViewOnChange:v}},Ew(Yb,fE,rE,lE,eE,nb,ub,xE,kE)),OE=Ww(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:l}])=>(Vw(Tw(l,Pw(a),zw(([,e])=>0!==e),Pw(i,r,t,n,e),Nw(([[,e],t,n,r,i,a=[]])=>wE(e,t,n,r,i,a))),o),{}),Ew(Yb,lE,ME,eE),{singleton:!0}),zE=Ww(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Bw(0);return Mw(Tw(e,Pw(r),zw(([,e])=>0!==e),Nw(([,e])=>({top:e}))),e=>{kw(Tw(n,Fw(1),zw(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Lw(t,e)})})}),{initialScrollTop:r}},Ew(eE,ub,ME),{singleton:!0}),NE=Ww(([{scrollVelocity:e}])=>{const t=Bw(!1),n=_w(),r=Bw(!1);return Vw(Tw(e,Pw(r,t,n),zw(([e,t])=>!1!==t&&void 0!==t),Nw(([e,t,n,r])=>{const{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),Ow()),t),Mw(Tw(Qw(t,e,n),Pw(r)),([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Ew(fE),{singleton:!0}),IE=Ww(([{scrollContainerState:e,scrollTo:t}])=>{const n=_w(),r=_w(),i=_w(),a=Bw(!1),o=Bw(void 0);return Vw(Tw(Qw(n,r),Nw(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),Vw(Tw(t,Pw(r),Nw(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Ew(ub)),TE=Ww(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:l,windowViewportRect:s}])=>{const c=_w(),d=Bw(void 0),u=Bw(null),f=Bw(null);return Vw(l,u),Vw(s,f),Mw(Tw(c,Pw(t,r,o,u,f,n)),([e,t,n,r,i,a,o])=>{const l=function(e){return wb(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}})}(t.sizeTree);r&&null!==i&&null!==a&&(n=i.scrollTop-a.offsetTop),e({ranges:l,scrollTop:n-=o})}),Vw(Tw(d,zw(vw),Nw(DE)),i),Vw(Tw(a,Pw(d),zw(([,e])=>void 0!==e),Ow(),Nw(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:d}},Ew(Yb,ub,lE,eE,IE));function DE(e){return{align:"start",index:0,offset:e.scrollTop}}const FE=Ww(([{topItemsIndexes:e}])=>{const t=Bw(0);return Vw(Tw(t,zw(e=>e>=0),Nw(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Ew(ME));function RE(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const PE=RE(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BE=Ww(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:l},{listState:s},{beforeUnshiftWith:c,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:C}])=>{const p=qw(Tw(s,Pw(o),Dw(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},l])=>{const s=r+a;let c=0;return t===o&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(c=s-n,0!==c&&(c+=l))),[c,i,o,s]},[0,[],0,0]),zw(([e])=>0!==e),Pw(r,l,n,i,h,C),zw(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===cE),Nw(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Yw),e))));function m(n){n>0?(Lw(t,{behavior:"auto",top:-n}),Lw(e,0)):(Lw(e,0),Lw(t,{behavior:"auto",top:-n}))}return Mw(Tw(p,Pw(e,a)),([t,n,r])=>{r&&PE()?Lw(e,n-t):m(-t)}),Mw(Tw(Qw(jw(a,!1),e,C),zw(([e,t,n])=>!e&&!n&&0!==t),Nw(([e,t])=>t),Rw(1)),m),Vw(Tw(u,Nw(e=>({top:-e}))),t),Mw(Tw(c,Pw(f,d),Nw(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(0===t.length)return a(e);let o=0;const l=pb(r,0);let s=0,c=0;for(;s<e;){s++,o+=l;let n=t.length===c+1?1/0:t[c+1]-t[c]-1;s+n>e&&(o-=l,n=e-s+1),s+=n,o+=a(n),c++}return o})),n=>{Lw(e,n),requestAnimationFrame(()=>{Lw(t,{top:n}),requestAnimationFrame(()=>{Lw(e,0),Lw(C,!1)})})}),{deviation:e}},Ew(ub,fE,ME,Yb,nb,Nb)),jE=Ww(([e,t,n,r,i,a,o,l,s,c,d])=>({...e,...t,...n,...r,...i,...a,...o,...l,...s,...c,...d}),Ew(gE,OE,eE,NE,LE,zE,HE,IE,kE,nb,xE)),_E=Ww(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:l,itemSize:s,sizeRanges:c,sizes:d,statefulTotalCount:u,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:C,initialTopMostItemIndex:p,scrolledToInitialItem:m},A,g,v,y,{scrollToIndex:w},b,{topItemCount:E},{groupCounts:M},L])=>{const{listState:H,minOverscanItemCount:x,topItemsIndexes:V,rangeChanged:k,...S}=y;return Vw(k,L.scrollSeekRangeChanged),Vw(Tw(L.windowViewportRect,Nw(e=>e.visibleHeight)),A.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:M,heightEstimates:l,initialItemFinalLocationReached:C,initialTopMostItemIndex:p,scrolledToInitialItem:m,sizeRanges:c,topItemCount:E,topItemsIndexes:V,totalCount:f,...v,groupIndices:o,itemSize:s,listState:H,minOverscanItemCount:x,scrollToIndex:w,statefulTotalCount:u,trackItemSizes:h,rangeChanged:k,...S,...L,...A,sizes:d,...g}},Ew(Yb,lE,ub,TE,ZE,ME,rE,BE,FE,$b,jE));function qE(e,t){const n={},r={};let i=0;const a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(const e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}const UE=typeof document>"u"?i.useEffect:i.useLayoutEffect;function WE(t,n,r){const a=Object.keys(n.required||{}),o=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),s=Object.keys(n.events||{}),c=i.createContext({});function d(e,t){void 0!==e.propsReady&&Lw(e.propsReady,!1);for(const r of a){Lw(e[n.required[r]],t[r])}for(const r of o)if(r in t){Lw(e[n.optional[r]],t[r])}void 0!==e.propsReady&&Lw(e.propsReady,!0)}function u(e){return s.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>t?.();return function(i,a){switch(i){case 1:return a?n===a?void 0:(r(),n=a,t=Mw(e,a),t):(r(),yw);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef(function(f,h){const{children:C,...p}=f,[m]=i.useState(()=>ww(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}(t),e=>{d(e,p)})),[A]=i.useState(gw(u,m));var g;UE(()=>{for(const e of s)e in p&&Mw(A[e],p[e]);return()=>{Object.values(A).map(Hw)}},[p,A,m]),UE(()=>{d(m,p)}),i.useImperativeHandle(h,pw((g=m,l.reduce((e,t)=>(e[t]=e=>{Lw(g[n.methods[t]],e)},e),{}))));const v=r;return e(c.Provider,{value:m,children:void 0===r?C:e(v,{...qE([...a,...o,...s],p),children:C})})});return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(c)[e];UE(()=>Mw(n,t),[t,n])},useEmitterValue:parseInt(i.version,10)>=18?e=>{const t=i.useContext(c)[e],n=i.useCallback(e=>Mw(t,e),[t]);return i.useSyncExternalStore(n,()=>xw(t),()=>xw(t))}:e=>{const t=i.useContext(c)[e],[n,r]=i.useState(gw(xw,t));return UE(()=>Mw(t,e=>{e!==n&&r(pw(e))}),[t,n]),n},usePublisher:e=>{const t=i.useContext(c);return i.useCallback(n=>{Lw(t[e],n)},[t,e])}}}const XE=i.createContext(void 0),QE=i.createContext(void 0),GE="-webkit-sticky",KE="sticky",YE=RE(()=>{if(typeof document>"u")return KE;const e=document.createElement("div");return e.style.position=GE,e.style.position===GE?GE:KE}),JE=typeof document>"u"?i.useEffect:i.useLayoutEffect;function $E(e){return"self"in e}function eM(e,t,n,r=yw,a,o){const l=i.useRef(null),s=i.useRef(null),c=i.useRef(null),d=i.useCallback(n=>{let r,i,a;const l=n.target;if(function(e){return"body"in e}(l)||$E(l)){const e=$E(l)?l:l.defaultView;a=!0===o?ib(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else a=!0===o?ib(l,l.scrollLeft):l.scrollTop,r=!0===o?l.scrollWidth:l.scrollHeight,i=!0===o?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:i})};!0===n.suppressFlushSync?d():M.flushSync(d),null!==s.current&&(a===s.current||a<=0||a===r-i)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,o]);return i.useEffect(()=>{const e=a??l.current;return r(a??l.current),d({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",d,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",d)}},[l,d,n,r,a]),{scrollByCallback:function(e){!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:ab(l.current,e.top)}}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(!0===o?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let a,d,u;$E(r)?(d=Math.max(Db(r.document.documentElement,!0===o?"width":"height"),!0===o?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),a=!0===o?r.innerWidth:r.innerHeight,u=!0===o?ib(r,r.scrollX):r.scrollY):(d=r[!0===o?"scrollWidth":"scrollHeight"],a=Db(r,!0===o?"width":"height"),u=!0===o?ib(r,r.scrollLeft):r.scrollTop);const f=d-a;if(void 0===n.top)return void r.scrollTo(n);const h=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=h,sE(a,d)||h===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:a}),void(i&&t(!0));i?(s.current=h,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:ab(r,h)}),r.scrollTo(n)}}}function tM(e){return e}const nM=Ww(()=>{const e=Bw(e=>`Item ${e}`),t=Bw(e=>`Group ${e}`),n=Bw({}),r=Bw(tM),i=Bw("div"),a=Bw(yw),o=(e,t=null)=>jw(Tw(n,Nw(t=>t[e]),Ow()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:i,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),rM=Ww(([e,t])=>({...e,...t}),Ew(_E,nM)),iM=({height:t})=>e("div",{style:{height:t}}),aM={overflowAnchor:"none",position:YE(),zIndex:1},oM={overflowAnchor:"none"},lM={...oM,display:"inline-block",height:"100%"},sM=i.memo(function({showTopList:t=!1}){const n=HM("listState"),r=xM("sizeRanges"),a=HM("useWindowScroll"),o=HM("customScrollParent"),l=xM("windowScrollContainerState"),s=xM("scrollContainerState"),c=o||a?l:s,d=HM("itemContent"),u=HM("context"),f=HM("groupContent"),h=HM("trackItemSizes"),C=HM("itemSize"),p=HM("log"),A=xM("gap"),g=HM("horizontalDirection"),{callbackRef:v}=sb(r,C,h,t?yw:c,p,A,o,g,HM("skipAnimationFrameInResizeObserver")),[y,w]=i.useState(0);LM("deviation",e=>{y!==e&&w(e)});const b=HM("EmptyPlaceholder"),E=HM("ScrollSeekPlaceholder")??iM,M=HM("ListComponent"),L=HM("ItemComponent"),H=HM("GroupComponent"),x=HM("computeItemKey"),V=HM("isSeeking"),k=HM("groupIndices").length>0,S=HM("alignToBottom"),Z=HM("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginInlineStart:0===y?S?"auto":0:y,paddingInlineEnd:n.offsetBottom,paddingInlineStart:n.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===y?S?"auto":0:y,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...Z?{}:{visibility:"hidden"}};return t||0!==n.totalCount||null==b?e(M,{...CM(M,u),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:v,style:O,children:(t?n.topItems:n.items).map(e=>{const t=e.originalIndex,r=x(t+n.firstItemIndex,e.data,u);return V?m(E,{...CM(E,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?m(H,{...CM(H,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:aM},f(e.index,u)):m(L,{...CM(L,u),...pM(L,e.data),"data-index":t,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:g?lM:oM},k?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})}):e(b,{...CM(b,u)})}),cM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},dM={outline:"none",overflowX:"auto",position:"relative"},uM=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),fM=(e,t,n=0)=>({...uM(e),position:t?"relative":"absolute",top:t?-n:0}),hM={position:YE(),top:0,width:"100%",zIndex:1};function CM(e,t){if("string"!=typeof e)return{context:t}}function pM(e,t){return{item:"string"==typeof e?void 0:t}}const mM=i.memo(function(){const t=HM("HeaderComponent"),n=xM("headerHeight"),r=HM("HeaderFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,HM("skipAnimationFrameInResizeObserver")),o=HM("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),AM=i.memo(function(){const t=HM("FooterComponent"),n=xM("footerHeight"),r=HM("HeaderFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,HM("skipAnimationFrameInResizeObserver")),o=HM("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null});function gM({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:a,context:o,...l}){const s=r("scrollContainerState"),c=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:C,scrollToCallback:p}=eM(s,d,c,u,void 0,f);return t("scrollTo",p),t("scrollBy",h),e(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:C,style:{...f?dM:cM,...a},tabIndex:0,...l,...CM(c,o),children:i})})}function vM({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:a,style:o,context:l,...s}){const c=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),C=n("customScrollParent"),p=i.useRef(null),m=n("scrollerRef"),{scrollByCallback:A,scrollerRef:g,scrollToCallback:v}=eM(c,u,d,m,C);return JE(()=>(g.current=C??p.current?.ownerDocument.defaultView,()=>{g.current=null}),[g,C]),t("windowScrollTo",v),t("scrollBy",A),e(d,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...0===f?void 0:{height:f+h}},...s,...CM(d,l),children:a})})}const yM=({children:t})=>{const n=i.useContext(XE),r=xM("viewportHeight"),a=xM("fixedItemHeight"),o=HM("alignToBottom"),l=HM("horizontalDirection"),s=ob(i.useMemo(()=>Aw(r,e=>Db(e,l?"width":"height")),[r,l]),!0,HM("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),a(n.itemHeight))},[n,r,a]),e("div",{"data-viewport-type":"element",ref:s,style:uM(o),children:t})},wM=({children:t})=>{const n=i.useContext(XE),r=xM("windowViewportRect"),a=xM("fixedItemHeight"),o=HM("customScrollParent"),l=HM("useWindowScroll"),s=HM("topListHeight"),c=db(r,o,HM("skipAnimationFrameInResizeObserver")),d=HM("alignToBottom");return i.useEffect(()=>{n&&(a(n.itemHeight),r({listHeight:0,offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))},[n,r,a]),e("div",{"data-viewport-type":"window",ref:c,style:fM(d,l,s),children:t})},bM=({children:t})=>{const n=HM("TopItemListComponent")??"div",r=HM("headerHeight"),i={...hM,marginTop:`${r}px`},a=HM("context");return e(n,{style:i,...CM(n,a),children:t})},EM=i.memo(function(t){const r=HM("useWindowScroll"),i=HM("topItemsIndexes").length>0,a=HM("customScrollParent"),o=HM("context");return n(a||r?kM:VM,{...t,context:o,children:[i&&e(bM,{children:e(sM,{showTopList:!0})}),n(a||r?wM:yM,{children:[e(mM,{}),e(sM,{}),e(AM,{})]})]})}),{Component:MM,useEmitter:LM,useEmitterValue:HM,usePublisher:xM}=WE(rM,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},EM),VM=gM({useEmitter:LM,useEmitterValue:HM,usePublisher:xM}),kM=vM({useEmitter:LM,useEmitterValue:HM,usePublisher:xM}),SM=MM,ZM=Ww(()=>{const e=Bw(e=>n("td",{children:["Item $",e]})),t=Bw(null),r=Bw(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=Bw(null),a=Bw(null),o=Bw({}),l=Bw(tM),s=Bw(yw),c=(e,t=null)=>jw(Tw(o,Nw(t=>t[e]),Ow()),t);return{components:o,computeItemKey:l,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:a,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});Ew(_E,ZM),YE();const OM={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},zM={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:NM,floor:IM,max:TM,min:DM,round:FM}=Math;function RM(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function PM(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function BM(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}const jM=Ww(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:l,scrollTo:s,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:C,propsReady:p},{customScrollParent:m,useWindowScroll:A,windowScrollContainerState:g,windowScrollTo:v,windowViewportRect:y},w])=>{const b=Bw(0),E=Bw(0),M=Bw(OM),L=Bw({height:0,width:0}),H=Bw({height:0,width:0}),x=_w(),V=_w(),k=Bw(0),S=Bw(null),Z=Bw({column:0,row:0}),O=_w(),z=_w(),N=Bw(!1),I=Bw(0),T=Bw(!0),D=Bw(!1),F=Bw(!1);Mw(Tw(C,Pw(I),zw(([e,t])=>!oE(t))),()=>{Lw(T,!1)}),Mw(Tw(Qw(C,T,H,L,I,D),zw(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{void 0!==e?(Lw(D,!0),iE(1,()=>{Lw(x,e)}),kw(Tw(c),()=>{Lw(t,[0,0]),Lw(T,!0)})):Lw(T,!0)}),Vw(Tw(z,zw(e=>null!=e&&e.scrollTop>0),Iw(0)),E),Mw(Tw(C,Pw(z),zw(([,e])=>null!=e)),([,e])=>{e&&(Lw(L,e.viewport),Lw(H,e.item),Lw(Z,e.gap),e.scrollTop>0&&(Lw(N,!0),kw(Tw(c,Fw(1)),e=>{Lw(N,!1)}),Lw(s,{top:e.scrollTop})))}),Vw(Tw(L,Nw(({height:e})=>e)),u),Vw(Tw(Qw(Gw(L,PM),Gw(H,PM),Gw(Z,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),Gw(c)),Nw(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),Vw(Tw(Qw(Gw(b),r,Gw(Z,BM),Gw(H,PM),Gw(L,PM),Gw(S),Gw(E),Gw(N),Gw(T),Gw(I)),zw(([,,,,,,,e])=>!e),Nw(([e,[t,n],r,i,a,o,l,,s,c])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:C}=a;if(0===l&&(0===e||0===C))return OM;if(0===h){const t=aE(c,e);return function(e){return{...zM,items:e}}(RM(t,t+Math.max(l-1,0),o))}const p=_M(C,h,d);let m,A;s?0===t&&0===n&&l>0?(m=0,A=l-1):(m=p*IM((t+u)/(f+u)),A=p*NM((n+u)/(f+u))-1,A=DM(e-1,TM(A,p-1)),m=DM(A,TM(0,m))):(m=0,A=-1);const g=RM(m,A,o),{bottom:v,top:y}=qM(a,r,i,g),w=NM(e/p);return{bottom:v,itemHeight:f,items:g,itemWidth:h,offsetBottom:w*f+(w-1)*u-v,offsetTop:y,top:y}})),M),Vw(Tw(S,zw(e=>null!==e),Nw(e=>e.length)),b),Vw(Tw(Qw(L,H,M,Z),zw(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Nw(([e,t,{items:n},r])=>{const{bottom:i,top:a}=qM(e,r,t,n);return[a,i]}),Ow(zb)),t);const R=Bw(!1);Vw(Tw(c,Pw(R),Nw(([e,t])=>t||0!==e)),R);const P=qw(Tw(Qw(M,b),zw(([{items:e}])=>e.length>0),Pw(R),zw(([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),Nw(([[,e]])=>e-1),Ow())),B=qw(Tw(Gw(M),zw(({items:e})=>e.length>0&&0===e[0].index),Iw(0),Ow())),j=qw(Tw(Gw(M),Pw(N),zw(([{items:e},t])=>e.length>0&&!t),Nw(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Ow(Ob),Rw(0)));Vw(j,h.scrollSeekRangeChanged),Vw(Tw(x,Pw(L,H,b,Z),Nw(([e,t,n,r,i])=>{const a=nE(e),{align:o,behavior:l,offset:s}=a;let c=a.index;"LAST"===c&&(c=r-1),c=TM(0,c,DM(r-1,c));let d=UM(t,i,n,c);return"end"===o?d=FM(d-t.height+n.height):"center"===o&&(d=FM(d-t.height/2+n.height/2)),void 0!==s&&0!==s&&(d+=s),{behavior:l,top:d}})),s);const _=jw(Tw(M,Nw(e=>e.offsetBottom+e.bottom)),0);return Vw(Tw(y,Nw(e=>({height:e.visibleHeight,width:e.visibleWidth}))),L),{customScrollParent:m,data:S,deviation:k,footerHeight:i,gap:Z,headerHeight:a,increaseViewportBy:e,initialItemCount:E,itemDimensions:H,overscan:n,restoreStateFrom:z,scrollBy:o,scrollContainerState:l,scrollHeight:V,scrollTo:s,scrollToIndex:x,scrollTop:c,smoothScrollTargetReached:d,totalCount:b,useWindowScroll:A,viewportDimensions:L,windowScrollContainerState:g,windowScrollTo:v,windowViewportRect:y,...h,gridState:M,horizontalDirection:F,initialTopMostItemIndex:I,totalListHeight:_,...f,endReached:P,propsReady:p,rangeChanged:j,startReached:B,stateChanged:O,stateRestoreInProgress:N,...w}},Ew(gE,ub,fE,NE,eE,IE,nb));function _M(e,t,n){return TM(1,IM((e+n)/(IM(t)+n)))}function qM(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const a=UM(e,t,n,r[0].index);return{bottom:UM(e,t,n,r[r.length-1].index)+i,top:a}}function UM(e,t,n,r){const i=_M(e.width,n.width,t.column),a=IM(r/i),o=a*n.height+TM(0,a-1)*t.row;return o>0?o+t.row:o}const WM=Ww(()=>{const e=Bw(e=>`Item ${e}`),t=Bw({}),n=Bw(null),r=Bw("virtuoso-grid-item"),i=Bw("virtuoso-grid-list"),a=Bw(tM),o=Bw("div"),l=Bw(yw),s=(e,n=null)=>jw(Tw(t,Nw(t=>t[e]),Ow()),n),c=Bw(!1),d=Bw(!1);return Vw(Gw(d),c),{components:t,computeItemKey:a,context:n,FooterComponent:s("Footer"),HeaderComponent:s("Header"),headerFooterTag:o,itemClassName:r,ItemComponent:s("Item","div"),itemContent:e,listClassName:i,ListComponent:s("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:s("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),XM=Ww(([e,t])=>({...e,...t}),Ew(jM,WM)),QM=i.memo(function(){const t=tL("gridState"),n=tL("listClassName"),r=tL("itemClassName"),a=tL("itemContent"),o=tL("computeItemKey"),l=tL("isSeeking"),s=nL("scrollHeight"),c=tL("ItemComponent"),d=tL("ListComponent"),u=tL("ScrollSeekPlaceholder"),f=tL("context"),h=nL("itemDimensions"),C=nL("gap"),p=tL("log"),A=tL("stateRestoreInProgress"),g=nL("reportReadyState"),v=ob(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(null!==n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}C({column:aL("column-gap",getComputedStyle(e).columnGap,p),row:aL("row-gap",getComputedStyle(e).rowGap,p)})},[s,h,C,p]),!0,!1);return JE(()=>{t.itemHeight>0&&t.itemWidth>0&&g(!0)},[t]),A?null:e(d,{className:n,ref:v,...CM(d,f),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(n=>{const i=o(n.index,n.data,f);return l?e(u,{...CM(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):m(c,{...CM(c,f),className:r,"data-index":n.index,key:i},a(n.index,n.data,f))})})}),GM=i.memo(function(){const t=tL("HeaderComponent"),n=nL("headerHeight"),r=tL("headerFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,!1),o=tL("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),KM=i.memo(function(){const t=tL("FooterComponent"),n=nL("footerHeight"),r=tL("headerFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,!1),o=tL("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),YM=({children:t})=>{const n=i.useContext(QE),r=nL("itemDimensions"),a=nL("viewportDimensions"),o=ob(i.useMemo(()=>e=>{a(e.getBoundingClientRect())},[a]),!0,!1);return i.useEffect(()=>{n&&(a({height:n.viewportHeight,width:n.viewportWidth}),r({height:n.itemHeight,width:n.itemWidth}))},[n,a,r]),e("div",{ref:o,style:uM(!1),children:t})},JM=({children:t})=>{const n=i.useContext(QE),r=nL("windowViewportRect"),a=nL("itemDimensions"),o=tL("customScrollParent"),l=tL("useWindowScroll"),s=db(r,o,!1);return i.useEffect(()=>{n&&(a({height:n.itemHeight,width:n.itemWidth}),r({listHeight:0,offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:n.viewportWidth}))},[n,r,a]),e("div",{ref:s,style:fM(!1,l),children:t})},$M=i.memo(function({...t}){const r=tL("useWindowScroll"),i=tL("customScrollParent"),a=i||r?iL:rL,o=i||r?JM:YM,l=tL("context");return e(a,{...t,...CM(a,l),children:n(o,{children:[e(GM,{}),e(QM,{}),e(KM,{})]})})}),{useEmitter:eL,useEmitterValue:tL,usePublisher:nL}=WE(XM,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},$M),rL=gM({useEmitter:eL,useEmitterValue:tL,usePublisher:nL}),iL=vM({useEmitter:eL,useEmitterValue:tL,usePublisher:nL});function aL(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,$w),"normal"===t?0:parseInt(t??"0",10)}const oL=({optionsList:r=[],onSelectVariable:i,dropdownPosition:a,position:s="relative",width:c,height:d="160px",zIndex:u=9999,highlightedIndex:f})=>{const h={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},C=e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"STEPGROUP"!==e?.parentVariableType||"LOCAL"!==e.type&&"STEPGROUP"!==e?.type?"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":h[e.type||""]||"":"step_group_variable"},p=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;function m(e){if(e.endsWith("px")){const t=parseInt(e.slice(0,-2),10);return isNaN(t)?212:t-66}return 212}const A=o(null);l(()=>{void 0!==f&&f>=0&&requestAnimationFrame(()=>{A.current?.scrollToIndex({index:f,behavior:"auto",align:"center"})})},[f,r]);return e("div",{className:I("ff-variable-dropdown",s),role:"listbox","aria-label":"Variable suggestions",style:a?{top:a.top,left:a.left,width:c,height:d,zIndex:u}:{width:c,height:d,zIndex:u},children:K(r)?e("div",{className:"ff-variable-option ff-variable-option-no-data",role:"status","aria-live":"polite","aria-label":"No variable options available",children:e(U,{as:"span",fontSize:12,children:"No Option"})}):e(SM,{"aria-label":"Variable options",totalCount:r.length,ref:A,data:r,itemContent:a=>{const o=r[a];return o?e("div",{className:I("ff-variable-data",{"ff-variable-data--highlighted":f===a}),onMouseDown:()=>i(o),role:"option","aria-selected":f===a,"aria-label":p(o),children:c.endsWith("px")?n(t,{children:[e(Y,{title:xn(p(o),m(c),"pixel")?p(o):"",placement:"bottom",style:{width:`${m(c)}px`},children:e(U,{as:"span",fontSize:12,className:"ff-truncated_text",children:p(o)})}),e(q,{name:C(o),height:24,width:24})]}):e(Cw,{option:o})},`${o.id}-${a}`):null},style:{height:d,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},lL=({data:r=[],width:i,height:a,lineChartWidth:o,yAxisLabel:s,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:C,textSize:p,fontWeight:m,numberSize:A,chartName:g,shouldCenterSinglePoint:v,xAxisLabelGap:y=16,isLeftOverflow:w=!1})=>{const b=40,E=i-80,M=a-80,[L,H]=c(!1),[x,V]=c({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{H(!1),V(e=>({...e,tooltip:{...e.tooltip,visible:!1}}))};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[]);if(!(r&&r.length>0&&r?.some(e=>Array.isArray(e?.data)&&e?.data?.length>0))){const t=[];for(let e=6;e>=0;e--){const n=new Date;n.setDate(n.getDate()-e);const r=n?.toLocaleDateString("en-US",{day:"numeric",month:"short"});t.push(r)}const r=1024,o=6,l=7;return n("div",{className:"ff-line-chart-text",style:{width:i+20+y,gap:y},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:a},children:e(U,{className:"ff-line-chart-yAxisLabel",fontSize:p,fontWeight:"semi-bold",children:s})}),e("div",{className:"ff-line-chart-svg",children:e("svg",{height:a,width:i,className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:M,x2:E,y2:M,stroke:f,strokeWidth:1}),e("text",{x:E/2.1,y:M+b/1.2,textAnchor:"middle",fill:C,className:"ff-line-chart-x-axis-label",style:{fontSize:p,fontWeight:m},children:d}),t.map((t,n)=>e("text",{x:n*(E/(l-1)),y:M+15,textAnchor:0===n?"start":n===l-1?"end":"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:t},t)),Array.from({length:o}).map((t,n)=>{const i=n*r/(o-1),a=i/1024;return e("text",{x:-10,y:M-i*M/r,textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:a?.toFixed(1)},`y-${n}`)})]})})})]})}function k(e){if(!isNaN(e))return parseFloat(e);const t=Vr,n=e.match(t);if(!n)throw new Error("Invalid input format. Use '<value> <unit>' format (e.g., '10.9580078125 KB') or just a number.");const r=parseFloat(n[1]);switch(n[2]?n[2].toUpperCase():null){case"GB":return parseFloat((1024*r).toFixed(2));case"MB":return parseFloat(r.toFixed(2));case"KB":return parseFloat((r/1024).toFixed(2));default:throw new Error("Invalid unit. Supported units are GB, MB, and KB.")}}const S=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),Z="date",O=S?"totalMemory":"value",z=e=>{const t=r?.[0]?.data?.length;if(1===t)return v?E/2:E;const n=r[0].data.findIndex(t=>t[Z]===e);return-1===n?0:n/(t-1)*E},N=Math.max(...r?.flatMap(e=>e?.data?.map(e=>k(e[O]))),5),I=e=>{if("memory"===g){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>k(e[O]))));return M-e*M/(t>1024?t:1024)}return M-e*M/(0===N?1024:N)},T=e=>{if(1===e?.length){const t=e?.[0],n=z(t[Z]),r=I(k(t[O]));return`M 0 ${I(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[Z]),a=I(k(n[O]));if(0===r)return`M ${i} ${a}`;const o=e[r-1],l=o?z(o[Z]):0;return`${t} C ${l+(i-l)/2} ${o?I(k(o[O])):0}, ${i-(i-l)/2} ${a}, ${i} ${a}`},"")},D=r[0].data,F=g?`${g} line chart`:"Line chart";return n("section",{className:"ff-line-chart-text",style:{width:i+20+y,gap:y},"aria-label":F,children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:a},children:e(U,{className:"ff-line-chart-yAxisLabel",fontSize:p,fontWeight:"semi-bold",children:s})}),n("div",{className:"ff-line-chart-svg",children:[e("svg",{height:a,width:i,onMouseMove:e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left-b;if(e.clientY-t.top-b>M)return H(!1),void V({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});let i={hoverValues:{},dotPositions:{}},a=null;r.forEach((e,t)=>{const r=e.data.reduce((e,t)=>{const r=Math.abs(n-z(t[Z]));return r<e.distance?{point:t,distance:r}:e},{point:null,distance:1/0}).point;r&&(a=r[Z],i.hoverValues[t]=((e,t=2)=>{let n="";if("string"==typeof e){const t=e.match(Lr),r=e.match(Hr);t&&(e=parseFloat(t[0])),r&&(n=r[0])}const r=Math.pow(10,t);return`${Math.ceil(e*r)/r} ${n}`.trim()})(r[O]),i.dotPositions[t]={x:z(r[Z]),y:I(k(r[O]))})}),H(!0),V({cursorX:n,hoverValues:i.hoverValues,dotPositions:i.dotPositions,currentXValue:a,tooltip:a?{visible:!0,left:e.clientX+10,top:e.clientY-20}:{visible:!1,left:0,top:0}})},onMouseLeave:()=>V({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null}),className:"ff-line-chart-svg",role:"img","aria-label":F,children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:0,x2:0,y2:M,strokeWidth:2}),e("line",{x1:0,y1:M,x2:E,y2:M,stroke:f,strokeWidth:1}),e("text",{x:E/2.1,y:M+b/1.2,textAnchor:"middle",fill:C,className:"ff-line-chart-x-axis-label",style:{fontSize:p,fontWeight:m},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:T(r.data),fill:"none",stroke:r.color,strokeWidth:o,opacity:(a=r.data,a.every(e=>0===k(e[O]))?.5:1)}),x.dotPositions[i]&&n(t,{children:[e("line",{x1:x.dotPositions[i].x,y1:0,x2:x.dotPositions[i].x,y2:M,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:x.dotPositions[i].x,cy:x.dotPositions[i].y,r:5,fill:"white",stroke:r.color,strokeWidth:o,style:{transition:"cx 0.1s, cy 0.1s"}}),e("line",{x1:0,y1:x.dotPositions[i].y,x2:E,y2:x.dotPositions[i].y,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"})]})]},i):null;var a}),(()=>{if(1===D.length){const t=D?.[0];return e("text",{x:v?E/2:E,y:M+15,textAnchor:v?"middle":"end",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=t[Z]?String(t[Z]):""},String(t[Z]))}if(D.length<7)return D.map(t=>e("text",{x:z(t[Z]),y:M+15,textAnchor:"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=t[Z]?String(t[Z]):""},String(t[Z])));{const t=(i-80-7*9.2)/6;return Array.from({length:7}).map((n,r)=>{const i=Math.floor(r*(D?.length-1)/6),a=D[i];return e("text",{x:r*t,y:M+15,fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=a?.[Z]?String(a?.[Z]):""},String(a?.[Z]))})}})(),(()=>{if("memory"===g){const t=Math.max(N,1024);return Array.from({length:6}).map((n,r)=>{const i=r*t/5,a=i/1024;return e("text",{x:-10,y:I(i),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:a.toFixed(1)},`y-${r}`)})}return Array.from({length:6}).map((t,n)=>{const r=n*N/5;return e("text",{x:-10,y:I(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:r.toFixed(0)},`y-${n}`)})})()]})}),L&&x.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",role:"tooltip","aria-live":"polite",style:{left:w&&x.tooltip.left/2>i/1.75?x.tooltip.left-180:x.tooltip.left,top:x.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:x.currentXValue}),Object.entries(x.hoverValues).map(([t,i])=>!1!==r[Number(t)]?.show&&n("div",{className:"ff-line-chart-inner-tooltip",children:["default"!==r[Number(t)]?.name&&e("div",{className:"ff-line-chart-status-dot",style:{backgroundColor:r[Number(t)]?.color}}),r[Number(t)]?.name,": ",i]},t))]})]})]})},sL=({onClose:t,top:r="100px",left:i="0px",className:a,description:o="Download and Install the fireflink client to run the script",onClick:s=()=>{},optionZIndex:c=10000001})=>{l(()=>{const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]);return n("section",{className:`ff-download-client-wrapper ${a}`,role:"dialog","aria-label":"Download client",style:{top:r,left:i,zIndex:c},children:[n("header",{className:"ff-download-client-header-wrapper",children:[e("div",{className:"ff-download-client-hollow-triangle"}),e(U,{fontWeight:"semi-bold",lineHeight:"32px",className:"ff-download-client-header-text",id:"download-client-title",children:"Download client"}),e(q,{name:"close",color:"var(--brand-color)",className:"ff-download-client-close-icon",height:12,width:12,"aria-label":"Close download client"})]}),n("div",{className:"ff-download-client-content-text",role:"group","aria-labelledby":"download-client-title",children:[e(U,{as:"div",color:"var(--download-client-content-text-color)",fontWeight:"semi-bold",textAlign:"center",lineHeight:"26px",children:o}),e(U,{as:"div",className:"ff-download-client-description-text",textAlign:"center",fontWeight:"medium",lineHeight:"26px",children:"Choose OS to Download"}),e("div",{className:"ff-download-client-os-wrapper",role:"group","aria-label":"Choose operating system",children:["windows","mac_icon","linux"]?.map(t=>e("button",{type:"button",className:"ff-os-version-wrapper",onClick:()=>{s("mac_icon"===t?"mac":t)},"aria-label":`Download for ${"mac_icon"===t?"macOS":t}`,children:e(q,{name:t,height:36,width:36})},t))})]})]})},cL=({legendName:t,height:r,width:i,children:a})=>e("div",{className:"ff_fieldSet_container",role:"group","aria-label":t||"Fieldset",children:n("fieldset",{className:"ff_fieldSet",style:{height:r,width:i},"aria-label":t||"Fieldset",children:[e("legend",{className:"ff_legend_container",children:e(U,{color:"var(--license_header_text_color)",fontSize:8,lineHeight:"12px",children:t})}),e("div",{className:"ff_children_container",role:"region","aria-label":`${t||"Fieldset"} content`,children:a})]})}),dL=({onSelectVariable:t,dropdownPosition:n,filteredOptions:r=[],position:i="relative",width:a="100%",zIndex:s,truncateTextValue:c=34,highlightedIndex:d})=>{const u=o(null);return l(()=>{u.current?.scrollIntoView({block:"nearest"})},[d]),e("div",{className:I(`ff-variable-dropdown-container ${i}`),style:n?{top:n.top+30,left:n.left-30,width:a,zIndex:s}:{width:a,zIndex:s},children:K(r)?e("div",{className:"ff-variable-option no-data",children:e(U,{as:"div",children:"No Option",fontSize:14})}):r?.map((n,r)=>e("div",{className:I("ff-variable-option",{"ff-variable-option--highlighted":d===r}),onMouseDown:()=>t(n),ref:d===r?u:null,children:e(Y,{title:xn(n?.name,c,"pixel")?n?.name:"",children:e(U,{children:Hn(n?.name,c,"pixel")})})},n?.id))})},uL=a(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:a=[],placeholder:s="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:C="",dropdownWidth:p="100%",dropdownHeight:m="160px",isHash:A=!1,isOnlyHash:g=!1,dataFiles:v=[],showAddVariableIcon:y=!0,helperText:w="",error:E,autoComplete:M="off",required:L=!1,zIndex:H=9999,truncateTextValue:x=34,formProps:V={},getSelectedVariable:k=()=>{},symbol:S="$",type:Z="text",clearIcon:O=!0,inputTitle:z="",onBlur:N,helperTextWidth:T,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...F},R)=>{const[P,B]=c(!1),[j,_]=c(!1),[W,X]=c(0),[Q,G]=c(!1),[J,$]=c(null),[ee,te]=c(0),[ne,re]=c(!1),[ie,ae]=c([]),[oe,le]=c(!1),se=o(null),ce=o(null),[de,ue]=c("auto"),fe=D?.isShowIcon;l(()=>{const e=ce.current?.querySelector(".ff-input-container");if(!e)return;const t=new ResizeObserver(e=>{for(let t of e){const e=`${t.contentRect.width}px`;ue(e)}});return t.observe(e),()=>{t.disconnect()}},[]),b(R,()=>se.current),l(()=>{null!==J&&se.current&&(se.current.setSelectionRange(J,J),se.current.focus())},[J]),l(()=>{A&&B(C.startsWith("#"));const e=v?.find(e=>e.name===C),t=a?.find(e=>e?.name===C);if(C.startsWith("#")&&A){const e=C.slice(1).toLowerCase(),t=v.filter(t=>t.name.toLowerCase().includes(e));ae(t),B(!0)}const n=null!==e&&C.startsWith("#"),r=null!==t&&C.startsWith("$"),i=C.length>(t?.name.length||0),o=C.length>0&&!r||C.startsWith("#");g?re(!1):r||n||C.includes("$")||C.includes("#")?(re(!1),o&&re(!0)):i&&!C.includes("$")&&re(!0)},[C]);const he=()=>{se.current&&te(se.current.selectionStart||0)},Ce=he,pe=he;l(()=>{se.current&&te(se.current.selectionStart||0)},[C]);const me=e=>{if(se.current){const{selectionStart:t,selectionEnd:n}=se.current,r=`${e.name}`;let a;if(a=A&&"#"===C[0]?e.name+C.slice(n||1):e.name,d){d({target:{value:a}},e),k(e.name)}se.current.value=a,i?.(e),$((t||0)+r.length),B(!1),_(!0)}};const Ae=function(e,t,n){let r=!1,i="";const a="}"===C[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const o=e.lastIndexOf(S,t-1),l=e.indexOf(S,t);if(-1!==o&&(g&&"$"===e[o]?r=!1:t===o+1?(r=!0,i=""):(i=e.slice(o+1,-1===l?void 0:l),t>o+1&&(i=e.slice(o+1,t)),r=!0),j&&a&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>e.name.toLowerCase().includes(i.toLowerCase()))||(n=[])}return{showDropdown:r,searchString:i}}(C,ee,a),ge=C.startsWith("#"),ve=ge?ie:a?.filter(e=>e?.name?.toLowerCase()?.includes(Ae?.searchString?.toLowerCase()));l(()=>{X(0)},[A,Ae?.showDropdown]);const ye=Boolean(Ae?.showDropdown&&Q),we=Boolean(P&&A&&Q),be=Boolean((ge?we:ye)&&ve.length),Ee=Boolean(ge?we:ye);l(()=>{if(!Ee)return void le(!1);const e=()=>{if(!ce.current)return;const e=ce.current.getBoundingClientRect(),t=window.innerHeight-e.bottom,n=e.top,r=Math.max(ve.length,1),i=r<4?40*r+10:parseInt(m,10)||160;le(t<i+10&&n>t)};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[Ee,m,ve.length]);return n("div",{className:I("ff-add-variable-container",{"ff-dropdown-flip":oe}),children:[n("div",{className:"ff-add-variable-input",ref:ce,children:[e(Y,{title:z,style:{width:"100%"},children:e(Vi,{...F,name:"add_variable",ref:se,type:Z,className:I("ff-variable-input-container",{"ff-variable-input-container--show-icon":fe}),value:C,onKeyDown:e=>{switch(e.key){case"ArrowDown":if(!be)return;e.preventDefault(),e.stopPropagation(),X(e=>e<ve.length-1?e+1:e);break;case"ArrowUp":if(!be)return;e.preventDefault(),e.stopPropagation(),X(e=>e>0?e-1:0);break;case"Enter":{if(!be)return;e.preventDefault(),e.stopPropagation();const t=ve[W];t&&me(t);break}case"Escape":if(!be)return;e.preventDefault(),e.stopPropagation(),B(!1),G(!1),X(0)}},onChange:d,onPaste:()=>{re(!0)},variant:"primary",label:t,placeholder:s,onClick:Ce,onKeyUp:pe,onFocus:()=>G(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||G(!1)})(e),N?.(e)},autoComplete:M,helperText:w,error:E,required:L,helperTextWidth:T,...V})}),!K(C)&&ne&&y&&e("div",{className:"ff-create-variable-container",onClick:f,children:e(U,{fontWeight:"regular",fontSize:"10px",color:"var(--brand-color)",cursor:"pointer",children:"Create Variable"})}),!K(C)&&!g&&e("div",{className:I("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":fe}),children:O&&e(Y,{title:"Cancel",style:{zIndex:99999},children:e(q,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),fe&&e("div",{className:"ff-info-icon-container",children:e(Y,{title:fe&&!D?.isIconDisable?D?.iconToolTipTitle:"",children:e(q,{name:D?.iconName||"",hoverEffect:!1,height:16,width:16,color:D?.iconColor||"var(--text-area-default-color)",onClick:e=>{D?.onIconClick&&D?.onIconClick(e)},disabled:D?.isIconDisable,cursorType:"pointer"})})})]}),Ae?.showDropdown&&Q&&e(oL,{position:"absolute",zIndex:H,truncateTextValue:x,width:de,height:ve.length<4?"auto":m,optionsList:ve,onSelectVariable:me,highlightedIndex:W}),P&&A&&Q&&e(dL,{position:"relative",zIndex:H,truncateTextValue:x,width:de,filteredOptions:ve,onSelectVariable:me,highlightedIndex:W})]})}),fL=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:a,onValueChange:o,variableName:s,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:C,handleSubmit:p,mode:m="create",disabled:A,dataFiles:g=[],truncateTextValue:v=34,isEnterKeySubmit:y=!1,showHideValueOption:w=!0})=>{const[b,E]=c(!1),[M,L]=c(""),[H,x]=c(),[V,k]=c(!1),[S,Z]=c(!1),[O,z]=c({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===m&&z({name:s,value:d,isChecked:h})},[]);const N=e=>e&&0!==e.length?" "===e[0]||" "===e[e.length-1]?"Space is not allowed at starting and at the end":qn.test(e)?e.length<3?"Name should contain at least 3 characters":e.length>25?"Name can contain at most 25 characters":"":"Name should be alphanumeric":"Variable Name is required";function I(e){const t=!!e,n=qn.test(e),r=$r.test(e),i=e.length>=3&&e.length<=25;return t&&n&&r&&i}l(()=>{const e=N(s);E(!!e),L(e)},[s]),l(()=>{if("edit"!==m)return;const{name:e,value:t,isChecked:n}=O;Z(s!==e||d!==t||h!==n)},[m,s,d,h,O]);const T=()=>{!V&&I(s)&&(k(!0),p())};l(()=>{if(!y)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!I(s)||V||"edit"===m&&!S||T()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[y,s,d,h,V,m,S,f]);return e(vn,{zIndex:1350,onClose:i,isOpen:t,title:"create"===m?"Create Variable":"Edit Variable",width:"284px",height:w?"280px":"250px",top:"30%",right:8,isFooterRequired:!0,overlay:!0,footerContent:e(()=>n("div",{className:"ff-create-slider-footer",role:"group","aria-label":"Form actions",children:[e(W,{onClick:i,label:"Cancel",variant:"tertiary"}),e(W,{variant:"primary",label:"create"===m?"Create":"Update",type:"submit",onClick:T,disabled:!I(s)||V||"edit"===m&&!S})]}),{}),children:n("div",{className:"ff-create-variable-slider",role:"form","aria-label":"Create or edit variable form",children:[e("div",{className:"ff-create-variable-slider-input",role:"group","aria-label":"Variable name input",children:e(Vi,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:s||"",onChange:e=>{k(!1),a(e.target.value)},error:b,helperText:M,onBlur:e=>{const t=e.target.value,n=N(t);E(!!n),L(n)}})}),e("div",{role:"group","aria-label":"Variable type selection",children:e(Za,{label:"Variable Type",required:!0,onChange:e=>{u(e),k(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===m})}),e("div",{role:"group","aria-label":"Variable value input",children:e(uL,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:v,dataFiles:g,dropdownWidth:"100%",setHashInputValue:x,hashInputValue:H||{},value:d||"",type:h?"password":"text",onChange:(e,t)=>{const n=e.target.value;o(n,t)},showAddVariableIcon:!1})}),w&&n("div",{className:"ff-hide-value-content",role:"group","aria-label":"Hide value option",children:[e(En,{onChange:e=>C(e.target.checked),name:"hideValue",label:"Hide Value",checked:h,disabled:A}),e(Y,{title:"Once the value is hidden, it cannot be undone",children:e(q,{name:"info",width:12,height:12})})]})]})})},hL=e=>{if(null==e||""===e)return{};return{width:e,flex:`0 0 ${"number"==typeof e?`${e}px`:e}`}},CL=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:a="row",noDataContent:o,height:l="100%",withFixedHeader:s=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,C]=c(-1),p="number"==typeof r[0]?.width?Math.max(r[0]?.width-8,0):void 0,m=(e,t)=>{let n=e[t.accessor];return t.cell?t.cell({value:n,row:e,column:t.accessor}):t.accessor||n&&"object"!=typeof n?n:"--"},A=t=>t.map((t,n)=>e("table",{className:"ff-table-accordion__table",cellSpacing:0,children:e("tbody",{className:"ff-table-accordion__tbody",children:e("tr",{className:"ff-table-accordion__body-row",children:r.map((n,r)=>e("td",{className:"ff-table-accordion__body-cell",style:hL(n.width),children:"column"===a&&0===r?"":e(U,{as:"div",className:"ff-table-accordion__cell-typography",children:n.cell?m(t,n):e(Qs,{placement:"bottom",children:m(t,n)})})},n.accessor+r))},t.id||n)})},`accordion-table-${n}`));return n("div",{style:{height:l},className:I("ff-table-accordion",{"ff-table-accordion--fixed-header":s}),children:[e("table",{cellSpacing:0,className:I("ff-table-accordion__table",{"ff-table-accordion__table--fixed-header":s}),children:e("thead",{children:e("tr",{className:"ff-table-accordion__header-row",children:r.map(t=>e("th",{style:hL(t.width),className:I("ff-table-accordion__header-cell",d&&`ff-table-accordion__header-cell--${d}`),children:e("div",{children:e(U,{fontWeight:"semi-bold",fontSize:12,children:t.header})})},`header-${t.header}`))})})}),"row"===a&&i.map((n,r)=>e(wn,{highlightText:t,headerTitle:"string"==typeof n.title?e("div",{style:{maxWidth:void 0!==p?`${p}px`:"100%"},children:e(Qs,{children:e(yn,{text:n.title,highlight:t})})}):e(Qs,{children:"row.title"}),color:"var(--text-color)",accordionContent:A(n.data),disable:n.disable,disableInfoMessage:n.disableInfoMessage,accordionStateIconName:"arrows_down_icon",AccordionStateIconWidth:u,AccordionStateIconHeight:f,className:"ff-table-accordion__row-accordion"},`accordion-row-${r}`)),"column"===a&&i.map((i,a)=>n("div",{className:"ff-table-accordion__column-group",children:[e("div",{className:"ff-display-flex",children:n("div",{className:`ff-table-accordion__column-header ${i.disable&&"ff-table-accordion__column-header--disabled"}`,style:r[0]?hL(r[0].width):{},children:[e("div",{className:"ff-table-accordion__column-label",children:e(U,{as:"div",children:e(Qs,{children:e(yn,{text:"string"==typeof i.title?i.title:"",highlight:t})})})}),e("div",{className:"ff-table-accordion__column-toggle",onClick:()=>{!i.disable&&(e=>{C(e===h?-1:e)})(a)},children:e(q,{name:h===a?"arrows_down_icon":"arrows_right_icon",color:"var(--table-with-accordion-icon-color)",width:u,height:f,hoverEffect:!1})})]})}),h===a&&e("div",{children:A(i.data)})]},`column-accordion-${a}`)),K(i)&&e("div",{className:"ff-table-accordion__empty-state",style:{height:`calc(${l} - 50px)`},children:o})]})},pL=({progressPercentage:t,totalMemory:r,usedMemory:i,color:a="var(--brand-color)",trackColor:o="#f0f0f0",height:l=10,label:s,labelFontSize:c=12,labelTextColor:d="var(--ff-card-status-text-color)",showPercentage:u=!1,percentageFontSize:f=10,percentageTextColor:h="var(--tooltip-text-color)",progressBarWidth:C="200px"})=>{const p=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),i=n[2];return"gb"===i?1024*r:"kb"===i?r/1024:r};let m=0,A=s;if(void 0!==r&&void 0!==i){const e=p(i),t=p(r);t>0?(m=e/t*100,A=s||i):(m=0,A="0MB")}else m=t||0;const g=Math.max(0,Math.min(m,100));return n("section",{className:"ff-progress-bar-container "+(A?"ff-has-label":""),style:{width:C},"aria-label":"Progress bar container",children:[e("div",{className:"ff-progress-bar-track",style:{backgroundColor:o,height:`${l}px`},"aria-label":A?`${A} progress`:"Progress",children:e("div",{className:"ff-progress-bar",style:{width:`${g}%`,backgroundColor:a,height:`${l}px`},children:u&&e(U,{className:"ff-progress-bar-percentage",fontSize:f,color:h,children:`${Math.round(g)}%`})})}),A&&e("div",{className:"ff-progress-bar-label","aria-label":"Progress label",children:e(U,{fontSize:c,color:d,children:e(Y,{title:xn(A,10,"count")?A:"",children:Hn(A,10,"count")})})})]})},mL=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:a=!1,type:l="button",className:s="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:C="auto",buttonHeight:p="auto",selectedFile:m={},handleCloseIcon:A,isMandatory:g=!1})=>{const v=o(null),[y,w]=c(0);u(()=>{v.current&&w(v.current.getBoundingClientRect().width-10)},[C]);const b=m?.name||i,E=y?Hn(b,y,"pixel"):b,M=!!y&&xn(b,y,"pixel"),L=m?.name?`Choose file, selected ${m.name}`:`Choose file, ${i}`;return e("div",{ref:v,style:{width:C},role:"group","aria-label":L,children:e(Y,{title:M?b:"",children:e(W,{variant:t,label:E,type:l,onClick:r,buttonWidth:C,buttonHeight:p,isChooseFile:h,size:n,disabled:a,className:s,iconName:f,style:d,iconPosition:"right",selectedFile:m,handleCloseIcon:A,isMandatory:g})})})},AL=({selected:t="text",handleClick:r,tabList:i})=>{const a=i?.includes("Automation"),o=i?.includes("Manual");return n("div",{className:"ff-script-switch-container",children:[e(Y,{title:a?"Automation":"Add Automation",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Automation"===t?"active":""),onClick:()=>r(a?"Automation":"Add Automation"),children:e(q,{name:a?"automation_testcase":"add_testcase",color:"Automation"===t?"var(--primary-button-text-color)":"var(--description-text)"})})}),e(Y,{title:o?"Manual":"Add Manual",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Manual"===t?"active":""),onClick:()=>r(o?"Manual":"Add Manual"),children:e(q,{name:o?"manual_testcase":"add_testcase",color:"Manual"===t?"var(--primary-button-text-color)":"var(--description-text)"})})})]})},gL=({selected:t,handleClick:n,tabList:r})=>e("div",{className:"ff-switch-container",children:r.map(r=>e(Y,{title:t===r.name?null:r.tooltip,zIndex:1e3,children:e("div",{className:"ff-switch-button "+(t===r.name?"active":""),onClick:()=>n(r.name),children:e(q,{name:r.icon,color:t===r.name?"var(--primary-button-text-color)":"var(--description-text)"})})},r.name))}),vL=({onModalClose:t,MediaSrc:r,fileName:a,onDeleteClick:o,mediaType:s,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:C,isMediaIcon:p=!1,previewOnly:m=!1,iconName:A="video_preview",isDisabled:g=!1})=>{const[v,y]=c(!1),w=i.useRef(null),b=()=>{y(!0),h&&h(d)},E=()=>{t?.(),y(!1)},M=()=>{C&&C(d)};return l(()=>{m&&y(!0)},[m]),n("section",{"aria-label":"Media preview",role:"region",children:[!m&&(p?e(q,{name:A,hoverEffect:!0,onClick:b,disabled:g,"aria-label":"Open media preview"}):e(fw,{mediaSrc:r,mediaType:s,onDownloadClick:M,onDeleteClick:()=>o?.(r),onExpandClick:b,fileName:a,fileId:d,thumbnailMediaSrc:u,isDelete:f})),v&&e(Op,{isOpen:v,onClose:E,isFooterDisplayed:!1,isHeaderDisplayed:!1,customWidth:"1130px",customHeight:"570px",zIndex:1e4,children:n("div",{className:"media-wrapper","aria-label":"Media preview modal",children:[n("div",{className:"ff-expand-icons","aria-label":"Media preview actions",children:[e(Y,{title:"Download File",children:e(q,{name:"download_file_icon",onClick:M,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Download media file"})}),e(Y,{title:"Expand",children:e(q,{name:"expand",onClick:b,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Expand media preview"})}),e(Y,{title:"close",children:e(q,{name:"close",onClick:E,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Close media preview"})})]}),"image"===s&&e("img",{src:r,alt:a||"Media preview image",height:"auto"}),"video"===s&&e("video",{src:r,controls:!0,controlsList:"nodownload",className:"ff-video-preview",ref:w,onCanPlay:()=>{if(w.current){const e=w.current.play();void 0!==e&&e.catch(e=>{console.error("Autoplay failed:",e)})}}})]})})]})},yL=({children:t,orientation:r="",navBarIcons:a=[],mobileHeight:o=448,mobileWidth:l=220,UtilityBar:s,tooltip:c={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?o:l,C=f?l:o,p=s&&"top"===u,m=s&&"bottom"===u,A=s&&"left"===u;return n("section",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",A?"ff-side-nav-left":"",p?"navbar-top":"",m?"navbar-bottom":""].filter(Boolean).join(" "),"aria-label":"Mobile preview",children:[p&&e("nav",{className:"ff-nav-bar top-nav-bar","aria-label":"Top navigation bar",children:a.map(({title:t,name:n,className:r,...i},o)=>{const l=c?.[n]??o;return e(Y,{title:c?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${o===a.length-1?"last-icon":""} ${p?"navbar-top":""}`,"aria-label":t||n||"Navigation icon",children:e(q,{name:n,...i})})},l)})}),e("main",{className:"ff-mobileskin-container",style:{height:h+16,width:C+16},"aria-label":"Mobile device frame",children:e("div",{className:"ff-mobile-container",style:{width:C,height:h,background:d||"transparent"},children:e("div",{className:"ff-mobile-image-container","aria-label":"Mobile screen content",children:i.isValidElement(t)?t:e("img",{src:t,alt:"Mobile content",style:{width:f?"100%":2.1*l+"px",height:f?"100%":.5*o+"px"}})})})}),s&&m&&e("nav",{className:"ff-nav-bar","aria-label":"Bottom navigation bar",children:a?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-nav-bar-icon ${t?.className||""} ${n===a.length-1?"last-icon":""}`,"aria-label":r||i?.name||"Navigation icon",children:e(Y,{title:r,children:e(q,{...i})})},n)})}),s&&A&&e("aside",{className:"ff-side-nav-bar","aria-label":"Side navigation bar",children:a?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-sidebar ${t?.className||""} ${n===a.length-1?"last-icon":""}`,"aria-label":r||i?.name||"Navigation icon",children:e(Y,{title:r,placement:"bottom",children:e(q,{...i})})},n)})})]})},wL=a(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:a=16,placeholder:l="Enter text",iconName:s="right_arrow_filled_icon",iconPosition:c="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:C="send",submitPrompt:p,onPromptChange:m,onBlur:A,onFocus:g,disableInput:v,isAdditionalIcon:y=!1,additionalIconName:w,additionIconToolTip:b,onAdditionalIconClick:E},M)=>{const L=o(null);Zn([{key:"Enter",action:()=>H()}],L);const H=e=>{f&&p?.(f.trim())};return n("section",{className:I("ff-prompt-container",{"icon-left":"left"===c,"icon-right":"left"!==c}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:L,"aria-label":"Prompt input container",children:[e(Y,{placement:"top",title:C,children:e(q,{name:s,className:"ff-prompt-icon",height:i,width:a,onClick:p,color:h,disabled:K(f),"aria-label":C||"Send prompt"})}),e("input",{ref:M,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:m,onFocus:g,onBlur:A,value:f,readOnly:v,"aria-label":l||"Prompt input"}),y&&w&&e(Y,{placement:"top",title:b,children:e(q,{name:w,className:"ff-prompt-icon additional-icon",height:i,width:a,onClick:E,"aria-label":b||"Additional action"})})]})}),bL=({content:t,isVisible:n,maxWidth:r=300,onClick:i,isClickable:a=!0,arrowPosition:o="left"})=>e("section",{onClick:i,style:{width:`${r}px`,"--triangle-position":r-4+"px"},className:I("ff-chat-msg-box",{visible:n,hidden:!n,pointer:a,default:!a,"chat-arrow-left":"left"===o,"chat-arrow-right":"left"!==o}),role:"note","aria-label":"Message box",children:e("div",{className:I("content",`arrow-${o}`),"aria-label":"Message content",children:e(U,{children:t})})}),EL=({iconName:r,iconPosition:{top:i,left:a,bottom:o,right:l},hoverIconPosition:{top:s,left:d,bottom:u,right:f},modalPosition:{top:h,left:C,bottom:p,right:m},modalWidth:A,modalHeight:g,headerContent:v="Header Content",footerContent:y="Footer Content",iconWidth:w,iconHeight:b,modalHeading:E="Ask Fia",children:M,onClearChat:H})=>{const[x,V]=c(!1),[k,S]=c(!1),Z=`${E} chat window`;return n(t,{children:[n("div",{style:{top:void 0!==i?`${i}px`:void 0,left:void 0!==a?`${a}px`:void 0,bottom:void 0!==o?`${o}px`:void 0,right:void 0!==l?`${l}px`:void 0},className:"ff-dynamic-icon-container",children:[e(q,{className:"ff-dynamic-icon",name:r,onClick:()=>{S(e=>!e),setTimeout(()=>V(e=>!e),10)},height:b,width:w,"aria-label":"Open chat modal"}),e("div",{style:{top:void 0!==s?`${s}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-chat-icon-hover",children:e(q,{name:"ask_fia_icon",height:32,width:82})})]}),k&&L(e("div",{className:I("ff-dynamic-modal",{open:x}),role:"dialog","aria-modal":"true","aria-label":Z,style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==C?`${C}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0,position:"fixed",height:g,width:A},children:n("div",{className:"ff-dynamic-modal-content",children:[v&&e("header",{className:"ff-dynamic-modal-header",children:n("div",{className:"header-container",children:[n("div",{className:"header-left",children:[e(q,{height:16,width:16,name:"fia_icon"}),e(U,{fontWeight:"medium",children:E})]}),n("div",{className:"header-right",children:[e("span",{className:"action",children:e(Y,{title:"Clear chat",placement:"bottom",children:e(q,{height:16,width:16,name:"delete",color:"var(--tooltip-text-color)",onClick:H,"aria-label":"Clear chat"})})}),e("span",{className:"action",children:e(Y,{title:"Close",placement:"bottom",children:e(q,{height:16,width:16,name:"close",color:"var(--tooltip-text-color)",onClick:()=>(V(!1),void setTimeout(()=>S(!1),300)),"aria-label":"Close chat modal"})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:M}),y&&e("footer",{className:"ff-dynamic-modal-footer",children:y})]})}),document.body)]})},ML=a(({iconName:r,hoverTitle:i,iconPosition:{top:a,left:o,bottom:l,right:s},hoverIconPosition:{top:c,left:d,bottom:u,right:f},modalPosition:{top:h,left:C,bottom:p,right:m},modalWidth:A,modalHeight:g,headerContent:v="Header Content",footerContent:y="Footer Content",iconWidth:w,iconHeight:E,children:M,isVisible:H,isOpen:x,onOpen:V,onClose:k,isIconVisible:S},Z)=>{b(Z,()=>({closeModal:k}));const O=i?`${i} chat window`:"AI chat window";return n(t,{children:[S&&n("div",{style:{top:void 0!==a?`${a}px`:void 0,left:void 0!==o?`${o}px`:void 0,bottom:void 0!==l?`${l}px`:void 0,right:void 0!==s?`${s}px`:void 0},className:"ff-ai-dynamic-icon-container",children:[e(q,{className:"ff-ai-dynamic-icon",name:r,onClick:V,height:E,width:w,"aria-label":"Open AI chat modal"}),e("div",{style:{top:void 0!==c?`${c}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-ai-chat-icon-hover",children:e("div",{className:"ai-hover-leaf",children:e(U,{fontWeight:"bold",fontSize:14,color:"var(--chatbot-leaf-text)",children:i})})})]}),H&&L(e("div",{className:I("ff-ai-dynamic-modal",{open:x}),role:"dialog","aria-modal":"true","aria-label":O,style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==C?`${C}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0,position:"fixed",height:g,width:A},children:n("div",{className:"ff-ai-dynamic-modal-content",children:[v&&e("header",{className:"ff-ai-dynamic-modal-header",children:v}),e("div",{className:"ff-ai-dynamic-modal-body",children:M}),y&&e("footer",{className:"ff-ai-dynamic-modal-footer",children:y})]})}),document.body)]})}),LL=({variant:t,title:r,tabTitle:i,comment:a,profileShortName:o})=>n("article",{className:"ff-history-card","aria-label":`History card for ${i}`,children:[e("header",{className:I("header",`header--${t}`),children:e(U,{fontWeight:"semi-bold",children:i})}),n("div",{className:"body",children:[e("section",{className:"title","aria-label":"History card title",children:n("div",{className:"profile",children:[e(U,{className:I("avatar",`avatar--${t}`),children:o}),e(U,{children:r})]})}),n("section",{className:"comment-container","aria-label":"History card comments",children:[e(U,{fontWeight:"semi-bold",className:"heading",children:"Comments:"}),e(U,{color:"var(--details-page-value-color)",className:"comment",children:a})]})]})]}),HL=({onChange:t,disabled:r,checked:i=!1,id:a="toggle",path:o})=>{const l=`ff-toggle-${a}`;return n("div",{className:"ff--ai-switch-container",role:"group","aria-label":r?"AI toggle disabled":i?"AI toggle on":"AI toggle off",children:[e("input",{className:"ff--ai-switch-checkbox",id:l,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:i,"aria-label":"AI toggle","aria-checked":i}),e("label",{className:I("ff--ai-switch-label",{"ff--ai-switch-label--disabled":r}),htmlFor:l,children:e("span",{className:"ff--ai-switch-content",children:n("span",{className:"ff--ai-switch-content",children:[e(U,{className:I("ff--ai-switch-typography",{left:i,right:!i}),as:"div",fontWeight:"bold",fontSize:18,color:i?"var(--base-bg-color)":"var(--ff-ai-toggle-text-color)",children:"AI"}),e("img",{className:"ff--ai-switch-image",src:o,alt:"AI image"})]})})})]})},xL=a(({name:t,height:n=30,width:r=30,path:i="",onClick:a,color:s="var(--brand-color)",hoverEffect:c=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:C,y:p,tabIndex:m=-1,...A},g)=>{if(!_[t])return null;const v=o(null);l(()=>{v.current&&(void 0!==C&&v.current.setAttribute("x",String(C)),void 0!==p&&v.current.setAttribute("y",String(p)))},[C,p]);const y="function"==typeof a&&!u,w={ref:g,onClick:u?void 0:a,style:{height:`${n}px`,width:`${r}px`,cursor:u?"not-allowed":"pointer",opacity:u?.3:1},role:y?"button":void 0,"aria-label":t?`Animated setting ${t}`:"Animated setting","aria-disabled":!(!u&&y)||void 0,...A};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:"","aria-hidden":"true"})})}),VL=({id:r=0,serialNumber:i,activeId:a,setActiveId:s,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:C,onPreviousClick:p,disabled:m,isEditAccess:A,versionsLength:g,count:v,hiddenActions:y=[]})=>{const[w,b]=c(!1),[E,M]=c(!1),L=o(null),H=Array.isArray(y)?y:y?[y]:[],x=(e,t)=>{e.stopPropagation(),t()};l(()=>{L.current&&(()=>{if(L.current){const e=getComputedStyle(L.current),t=1.2*parseFloat(e.fontSize)*6;L.current.scrollHeight>t&&M(!0)}})()},[]);const V=e=>{e.stopPropagation(),b(!w)};return n("section",{className:`ff-prompt-container-Block ${a===r?"active":"inactive"} `,onClick:()=>{s(r),h()},"aria-label":`Prompt container ${i}`,children:[e(U,{fontSize:8,className:"ff-prompt-number-bg-color",as:"span",children:`Test cases ${i}`}),n(t,{children:[n("article",{className:"ff-prompt-content "+(w?"expanded":""),ref:L,"aria-label":"Prompt content",children:[d,w&&n(t,{children:[e("span",{role:"button","aria-label":"Collapse content",onClick:V,className:"read-less-btn",children:e(U,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read Less"})})," "]})]}),E&&!w&&e("div",{role:"button","aria-label":"Expand content",onClick:V,className:"read-more-btn",children:e(U,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read More"})})]}),n("footer",{className:"ff-prompt-icons","aria-label":"Prompt actions",children:[e("div",{className:"ff-prompt-icons-leftside","aria-label":"Prompt action icons",children:[{action:"delete",title:"Delete",color:"var(--ff-delete-button-attachment)"},{action:"edit",title:"Edit",color:"var(--label-edit-text-label-color)"},{action:"regenerate",title:"Regenerate",color:"var(--label-edit-text-label-color)"}].filter(e=>!H.includes(e.action)).map((t,n)=>{const r=A&&"delete"===t?.action||"regenerate"===t?.action&&(g??0)>=3||m;return e(Y,{title:t.title,placement:"bottom",children:e(q,{disabled:r,name:t.action,color:t.color,hoverEffect:!0,onClick:e=>((e,t)=>{e.stopPropagation(),u(t)})(e,t.action),"aria-label":t.title})},`${t?.title}-${n}`)})}),n("nav",{className:"ff-prompt-icons-rightside","aria-label":"Prompt navigation",children:[e(q,{disabled:1===v,className:"ff-prompt-icons-style",name:"arrow_left_accordian",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>x(e,p),cursorType:"pointer","aria-label":"Previous"}),f,e(q,{disabled:v===g,className:"ff-prompt-icons-style",name:"arrow_right_icon",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>x(e,C),cursorType:"pointer","aria-label":"Next"})]})]})]})},kL=a(({type:t="text",variant:r="primary",name:i="",label:a,disabled:o=!1,disableLinkIcon:l=!1,required:s=!1,placeholder:c="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:C="",onChange:p,onBlur:m,onFocus:A,autoComplete:g="off",autoFocus:v=!1,minValue:y=-1/0,maxValue:w=1/0,transparentBackground:b=!1,size:E="small",isLabelRequired:M=!0,onClick:L,onKeyUp:H,isViewMode:x=!1,...V},k)=>{const S=!K(d);return n("fieldset",{className:I("ff-link-input-fieldset",{"ff-link-input-fieldset--disabled":o}),"aria-label":a||i||"Link input",children:[n("div",{className:I("ff-link-input-container",{"ff-link-input-container--float":S,"ff-link-input-container--disabled":!!o}),children:[M&&n("label",{className:I(`ff-link-input-label-container ff-link-input-label-container--${E}`,{"ff-link-input-label-container--danger":!!u}),htmlFor:i,children:[s&&e("span",{className:"required-asterisk",children:"*"}),e("span",{className:I(`ff-link-input-label ff-link-input-label--${r}`,{"ff-link-input-label--no-hover":!!d,"ff-link-input-label--disabled":!!o,"ff-link-input-label--danger":!!u}),children:a})]}),e("input",{ref:k,name:i,value:d,type:t,spellCheck:!1,id:i,className:I(`ff-link-input ff-link-input-${r} default-input ff-link-input--${E}`,{"ff-link-input--transparentBackground":!!b,"ff-link-input--no-hover":!!d,"ff-link-input--disabled":!!o,"ff-link-input--danger":!!u,"ff-link-input--no-border":!!h,"ff-link-input--placeholder":!M},`${C}`),placeholder:c,disabled:x||o,onChange:p,onFocus:A,onBlur:m,autoComplete:g,autoFocus:v,min:y,max:w,onClick:L,onKeyUp:H,"aria-label":a||i||"Link input",...V}),e("div",{className:"input-link-icon","aria-label":"Link action",children:l||u||!S?e(q,{name:"link",disabled:!0,"aria-label":"Link icon"}):e(Y,{title:"Click here to navigate",children:e("span",{"aria-label":"Open link in new tab",children:e(q,{name:"link",disabled:!1,onClick:()=>{d&&!u&&window.open(d,"_blank")},"aria-label":"Open link"})})})})]}),f&&u&&e("span",{className:I("ff-link-input-message",{"ff-link-input-message--danger":!!u}),children:f})]})}),SL=({labelsList:r=[],height:i=""})=>{const a=Ai(),o=r[0]||"Chip",l=r.length>1?`plus ${r.length-1} additional labels`:"No additional labels",s=e("div",{className:"ff-chip-tooltip",children:r.filter((e,t)=>t>0).map((t,n)=>e(U,{as:"div",className:"ff-chip-tooltip-label",children:t},`label-${n}-${t}`))});return e(t,{children:!K(r)&&n("div",{className:"ff-chip-with-count-container",role:"group","aria-label":`${o} with count`,children:[e(U,{as:"div",fontWeight:"medium",className:"ff-chip-label",style:i?{height:i}:void 0,children:e(Qs,{children:r[0]||""})}),r.length>1&&n(t,{children:[n(U,{as:"div",className:"ff-chip-count","data-tooltip-id":`tooltip-${a}`,fontWeight:"medium",role:"status","aria-label":l,children:["+",r.length-1]}),e("div",{id:`tooltip-${a}`,className:"ff-chip-tooltip-template",children:e(U,{as:"div",children:s})})]})]})})};class ZL extends E{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const OL=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:a="To Add Group",disableButton:o=!1,stepCount:l=1,iconWidth:s=120,iconHeight:c=120,addContentLabel:d="step"})=>{const u=`${d}${l}: ${i} ${a}`.trim();return n("section",{className:"add-content-button "+(o?"disabled":""),"aria-label":u,children:[!K(t)&&e("div",{className:"icon-container",children:e(q,{name:t,width:s,height:c})}),n("div",{className:"typography-label-button",children:[n(U,{fontSize:"12px",fontWeight:"regular",lineHeight:"18px",children:[d+l," :"]}),e(U,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:"Click"}),e(Zp,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:o}),e(U,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:a})]})]})},zL=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:a,noBorder:o=!1,noPadding:l=!1,titleSize:s="12px"})=>{const[d,u]=c(0);return n("div",{className:"ff-tabs-slider-container",children:[n("div",{className:I(`ff-tab-row--${t} ff-tab-row-section`,{"ff-tab-row--no-border":o,"ff-tab-row--no-padding":l,"ff-tab-row--position":r.length>4}),children:[r.length>4&&e(q,{className:"ff-tab-icon ff-tab-icon--previous",name:""+(d?"arrow_left_accordian":""),onClick:()=>{d>0&&u(e=>e-1)},hoverEffect:!0}),e("div",{className:"ff-tab-row-carousel",children:e("div",{className:"carousel_inner",style:{transform:`translateX(-${100*d}%)`},children:r.map(r=>n("button",{onClick:()=>!r.disabled&&a(r.id),disabled:r.disabled,className:I(`ff-tab-button--${t}`,{disabled:r.disabled,active:i===r.id}),style:{flex:"0 0 25%"},children:[n("div",{className:"label-count-section",children:[e(Y,{title:r.label.length>9?r.label:"",children:e(U,{children:r.label.length>9?r.label.slice(0,9)+"...":r.label,fontSize:s,lineHeight:"18px",fontWeight:i===r.id?"semi-bold":"regular",color:i===r.id?"var(--tabs-label-active-color)":"var(--tabs-label-default-color)",className:I("ff-tab-label",{"ff-tab-label--active":i===r.id})})}),"default"===t&&r.count&&e("span",{className:I("tab-count",{"tab-count--active":i===r.id}),children:r.count})]}),e("div",{className:I("ff-tab-bar",{"ff-tab-bar--active":i===r.id})}),e("span",{className:"ff-defaultStatus "+("success"===r.status?"ff-successStatus":"error"===r.status?"ff-dangerStatus":"")})]},r.id))})}),r.length>4&&e(q,{className:"ff-tab-icon ff-tab-icon--next",name:""+(d<Math.ceil(r.length/4)-1?"arrow_right_icon":""),onClick:()=>{d<Math.ceil(r.length/4)-1&&u(e=>e+1)},hoverEffect:!0})]}),e("div",{className:"ff-tab-content",children:r.find(e=>e.id===i)?.component})]})},NL=a(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:a=!1,variant:o="default",backgroundColor:l=!1,border:s=!1},c)=>{const d={default:"var(--ff-avatar-background-color)",success:"var(--status-success-text-color)",danger:"var(--ff-delete-button-attachment)"};return e("button",{disabled:a,onClick:i,className:`\n ff-status-indicator\n ff-status-indicator--${o}\n ${l?`ff-status-indicator--with-bg ff-status-indicator--${o}-bg`:""}\n ${s?`ff-status-indicator--with-border ff-status-indicator--${o}-border`:""}\n `,ref:c,children:n("div",{className:"ff-status-indicator__content",children:[e(q,{name:"danger"===o?"close":r,color:d[o]||d.default,className:`ff-status-indicator__icon ff-status-indicator__icon--${o}`}),e(U,{as:"div",fontSize:12,className:`ff-status-indicator__label ff-status-indicator__label--${o}`,fontWeight:"medium",lineHeight:"20px",children:t})]})})}),IL=({rootLabel:t,childrenLabels:r,align:i="center",direction:a="horizontal"})=>{const o=r.length;return n("section","vertical"===a?{className:"ff-os-tree-vertical",style:{"--child-count":o},"aria-label":"Operating system tree",children:[n("header",{className:`ff-os-tree-vertical__row ff-os-tree-vertical__row--${i}`,"aria-label":"Root node",children:[e("div",{className:"ff-os-tree-vertical__root-label","aria-label":String(t),children:t}),e("div",{className:"ff-os-tree-vertical__horizontal-line"})]}),n("div",{className:"ff-os-tree-vertical__vertical-line-wrapper","aria-label":"Child nodes",children:[e("div",{className:"ff-os-tree-vertical__vertical-line"}),r.map((t,r)=>n("article",{className:"ff-os-tree-vertical__child","aria-label":`Child node ${r+1}`,children:[e("div",{className:"ff-os-tree-vertical__child-connector"}),e("div",{className:"ff-os-tree-vertical__child-label","aria-label":String(t),children:t})]},r))]})]}:{className:`ff-os-tree ff-os-tree--${i}`,style:{"--child-count":o},"aria-label":"Operating system tree",children:[n("header",{className:"ff-os-tree__root-wrapper","aria-label":"Root node",children:[e("div",{className:"ff-os-tree__root-label","aria-label":String(t),children:t}),e("div",{className:"ff-os-tree__vertical-root"})]}),e("div",{className:"ff-os-tree__horizontal-connector","aria-label":"Connectors",children:r.map((t,n)=>e("div",{className:"ff-os-tree__vertical-child"},n))}),e("div",{className:"ff-os-tree__children","aria-label":"Child nodes",children:r.map((t,n)=>e("article",{className:"ff-os-tree__child-container","aria-label":`Child node ${n+1}`,children:e("div",{className:"ff-os-tree__child-label","aria-label":String(t),children:t})},n))})]})},TL=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:a=30})=>{const[s,d]=c(Array(6).fill("")),[u,f]=c(a),[h,C]=c(!0),p=o(Array(6).fill(null));l(()=>{h||p.current[0]?.focus()},[h]),l(()=>{let e;return u>0&&(e=window.setInterval(()=>f(e=>e-1),1e3)),0===u&&C(!1),()=>clearInterval(e)},[u]);const m=e=>{e.preventDefault();const t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6),n=Array(6).fill("");t.split("").forEach((e,t)=>{n[t]=e}),d(n);const r=Math.min(t.length,5);p.current[r]?.focus()};return e(Op,{isOpen:!0,onClose:t,isFooterDisplayed:!1,isHeaderDisplayed:!1,zIndex:999999,customWidth:"340px",children:n("section",{className:"ff-otp-popup","aria-label":"OTP verification modal",children:[n("header",{className:"ff-otp-header","aria-label":"OTP header",children:[e(U,{fontSize:24,lineHeight:"36px",fontWeight:"semi-bold",children:"OTP Verification"}),e(q,{name:"close",height:16,width:16,onClick:t,className:"ff-close-icon","aria-label":"Close OTP verification"})]}),e("div",{className:"ff-otp-boxes","aria-label":"OTP input fields",children:s.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===s.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...s];r[t]=n,d(r),t<5&&p.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...s];n[t]="",d(n),t>0&&p.current[t-1]?.focus()}})(e,n),onPaste:m,ref:e=>p.current[n]=e,readOnly:!0,"aria-label":`OTP digit ${n+1}`},n))}),e(W,{variant:"primary",label:"Submit",onClick:()=>i(s.join("")),disabled:s.includes(""),className:"ff-submit-btn"}),n("div",{className:"ff-resend "+(h?"disabled":""),onClick:h?void 0:()=>{f(a),C(!0),d(Array(6).fill("")),r()},"aria-label":h?"Resend OTP disabled"+(u>0?` for ${u} seconds`:""):"Resend OTP","aria-disabled":h,children:["Re-send OTP",u>0?` (${u}s)`:""]})]})})},DL=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:a,mediaType:s,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:C=!0,showDownload:m=!0,showExpand:A=!0,width:g="800px",height:v="432px",showControls:y=!0,customStyle:w,overlay:b=!0,children:E,showControlDownload:M=!1,showControlExpand:L=!1,isFullscreen:H=!1})=>{const x=o(null),V=o(null),[k,S]=c(0),[Z,O]=c(0),[z,N]=c(!1),[I,T]=c(0);l(()=>{"video"===s&&x.current&&!E&&(i?x.current.play():x.current.pause())},[i,s,E]);const D=p(()=>{if(x.current&&!z){const e=x.current.currentTime/x.current.duration*100;T(e||0),S(x.current.currentTime)}},[z]),F=p(()=>{x.current&&O(x.current.duration)},[]),R=p(()=>{S(0),T(0),a?.()},[a]),P=p(e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`,[]),B=p(e=>{if(x.current){const t=e/100*x.current.duration;x.current.currentTime=t,T(e),S(t)}},[]),j=p(e=>{if(z||!V.current)return;const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B,z]),_=p(e=>{if(!V.current)return;N(!0);const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B]),W=p(e=>{if(!z||!V.current||!x.current)return;const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[z,B]),X=p(()=>{N(!1)},[]);return l(()=>{if(z)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",X),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",X)}},[z,W,X]),t?e(au,{isOpen:t,onClose:r,isMaximized:!1,showHeader:C,overlay:b,downloadHandler:()=>{},customStyle:w,header:n("header",{className:"ff-header-content","aria-label":"Media viewer header",children:[e(q,{width:23,height:23,name:"automatic_locator"}),e(U,{children:e("span",{className:"ff-header-title",children:u})})]}),icons:e(Y,{title:"Close",children:e(q,{name:"close",onClick:r,"aria-label":"Close media viewer"})}),width:g,height:v,zIndex:999,children:n("section",{className:"ff-video-wrapper","aria-label":"Media viewer content",children:[E||("video"===s?e("video",{ref:x,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:F,onEnded:R}):e("img",{src:d,alt:"Preview image",className:"ff-media-image"})),n("nav",{className:"ff-top-right-icons","aria-label":"Media viewer actions",children:[m&&e(Y,{title:"Download",children:e(q,{name:"download_file",color:"white",onClick:f,"aria-label":"Download media"})}),A&&e(Y,{title:H?"Minimize":"Maximize",children:e(q,{name:H?"collapse_icon":"expand_icon",color:"white",onClick:h,"aria-label":H?"Minimize media viewer":"Maximize media viewer"})})]}),"video"===s&&y&&!E&&n("section",{className:"ff-media-controls","aria-label":"Video controls",children:[e("button",{onClick:a,className:"ff-play-pause-btn","aria-label":i?"Pause video":"Play video",children:e(Y,{title:i?"Pause":"Play",children:e(q,{width:35,height:35,name:i?"pause_button":"play_button",color:"white","aria-label":i?"Pause video":"Play video"})})}),n("div",{className:"ff-progress-bar","aria-label":"Video progress",children:[e("span",{className:"ff-current-time",children:P(k)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:I,onChange:e=>B(parseFloat(e.target.value)),onClick:j,onMouseDown:_,ref:V,"aria-label":"Seek video"}),e("span",{className:"ff-total-time",children:P(Z)})]}),n("nav",{className:"ff-control-icons","aria-label":"Additional video actions",children:[M&&e(Y,{title:"Download",children:e(q,{name:"download_file",color:"white",onClick:f,cursorType:"pointer","aria-label":"Download video"})}),L&&e(Y,{title:H?"Minimize":"Maximize",children:e(q,{name:H?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer","aria-label":H?"Minimize video":"Maximize video"})})]})]})]})}):null},FL=({header:r,secondaryHeader:i,primaryCount:a,secondaryCount:o,primaryItems:l,secondaryItems:s,width:c,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:C,actions:p,tabsData:m,notchPosition:A="top-left"})=>{const g=i&&"secondary"===d?s:l,v=o&&parseInt(o)>0,y=a&&parseInt(a)>0,w=i&&(y||v),{tooltip:b="Download",iconName:E="download_file",disabled:M=!1,onClick:L,className:H=""}=p?.download||{},{tooltip:x="Delete",iconName:V="delete_icon",disabled:k=!1,onClick:S,className:Z=""}=p?.delete||{},O=()=>n("div",{className:"ff-dropdown-header-icons",children:[p?.download&&e(Y,{title:b,children:e(q,{name:E||"",className:`ff-dropdown-icon ff-download-icon ${H}`,onClick:L,width:18,height:20,disabled:M,hoverEffect:!0})}),p?.delete&&e(Y,{title:x,children:e(q,{name:V||"",className:`ff-dropdown-icon ff-delete-icon ${Z}`,onClick:S,width:25,height:25,disabled:k,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:c?{minWidth:c}:{},children:[e("div",{className:"ff-dropdown-notch "+("bottom-center"===A?"bottom-center":"top-left")}),e("div",{className:"ff-dropdown-header",children:e("div",{className:"ff-dropdown-header-content",children:i&&m&&u?n(t,{children:[e(gu,{tabsData:m,activeTabId:u,onTabClick:e=>{C&&C(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),w&&O()]}):i&&w?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),O()]}):i?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),o&&e("span",{className:"ff-dropdown-count",children:o})]})]}):e(U,{fontSize:16,fontWeight:"semi-bold",children:r})})}),e("ul",{className:"ff-dropdown-list",children:g?.map((t,n)=>e("li",{className:"ff-dropdown-item",children:t},n))})]})},RL=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const a=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...a&&{refId:a}})}return t.accessor||i&&"object"!=typeof i?i:"--"},PL=(t,n=[],r,i,a)=>{let o=n;const l=void 0!==i?!i:r;return K(n)&&(isNaN(t)||(o=Array(t).fill(!0))),e("div",{className:"tree-table-fn-space-container",children:o?.map((n,r)=>e("span",{className:`tree-table-fn-space-block tree-table-fn-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${a?"folder":""}`},r))})},BL=i.memo(({treeRowRef:r,col:i,colIndex:a,columnMeta:o,node:l,selected:s,select:c,onCheckBoxChange:d,onToggleExpand:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,isExpanding:p,columnTextColor:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b})=>{const E={color:`${m||"var(--ff-primary-text-color)"}`,width:o?.width??i?.width,position:o?.sticky?"sticky":void 0,left:o?.sticky?o.left:void 0,zIndex:o?.sticky?o.zIndex:void 0};return n("div",{className:`ff-table-tree-fn-td ${i.isTree&&l.container?"folder":""} ${o?.sticky?"sticky-tree-column":""}`,"data-col-index":a,style:E,children:[i.isTree&&PL(l.hierarchy,l.parentSiblings,l.lastChild,l.nextSibling,l.container),n("div",{className:"tree-fn-title-container",children:[i.isTree&&e("span",{className:`tree-table-fn-space-block last-tree-fn-block last-tree-fn-block tree-table-fn-space-block-${l.hierarchy} ${l?.expanded?"tree-fn-row-expanded":"tree-fn-row-collapsed"} ${l.container&&l.expandable?"":"no-tree-folder"}`,children:l.container&&l.expandable&&n("span",{onClick:()=>u(l),children:[" ",e(p?fu:T,{})]})}),n("span",{className:"tree-table-fn-td-content "+(i.isTree&&l.container?"folder":""),children:[!l?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===c&&!(A&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:"none"===l.selectedStatus?e(Y,{title:l?.currentEnvId&&l?.envId&&l?.currentEnvId!==l?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(En,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable,isDefaultHover:"none"===l.selectedStatus&&!!l.machine})}):e(En,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})}),i.isTree&&"radio"===c&&!(A&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:e(fc,{name:l.key,checked:s.includes(l.key),value:l.key,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})})]}),e("div",{className:"tree-table-cell-flex",children:l.isNewNode&&i.isTree?e(uu,{onCancel:h,onConfirm:f,value:l.value,label:l?.label,optionsList:l.options,selectedOption:l.selectedOption,withDropdown:"inputWithDropdown"===l.type,handleCustomError:C,inputFieldWidth:g,selectFieldWidth:v,confirmIconTooltip:l.confirmIconTooltip,cancelIconTooltip:l.cancelIconTooltip,isEditable:w,setIsEditable:b,isOnBlurTrue:!1,isDisable:{confirm:y},isTableTree:!0}):n(t,{children:[e("span",{className:"tree-table-fn-td-content-text",children:RL(l,i)}),i.actions&&!l?.isNewNode&&e("div",{className:"table-tree-fn-row-action",children:i.actions(l,r)})]})})]})]})]})});BL.displayName="TableCell";const jL=i.memo(({node:t,columnsData:n,columnMeta:r,selected:i,select:a,onRowClick:l,onToggleExpand:s,onCheckBoxChange:c,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,index:C,selectedNode:p,hideOnDisable:m,addModuleInputWidth:A,addModuleSelectWidth:g,disableEditLabelConfirmIcon:v,isEditable:y,setIsEditable:w,style:b})=>{const E=o(null);return e("div",{"data-level":t.hierarchy,ref:E,className:"ff-table-tree-fn-row show-tree "+(p&&p===t.key?"fn-selected-node":""),onClick:e=>l(e,t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||l(e,t)},role:"button",tabIndex:0,id:0===C?"table-fn-first-row":t.key,style:b,children:n.map((n,o)=>e(BL,{treeRowRef:E,col:n,colIndex:o,node:t,selected:i,select:a,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,hideOnDisable:m,addModuleInputWidth:A,addModuleSelectWidth:g,disableEditLabelConfirmIcon:v,isEditable:y,setIsEditable:w,columnMeta:r?.[o]},n.name))})});jL.displayName="TableRow";const _L=({flattenedTreeData:t,columnsData:n,columnMeta:r,rowHeight:i=32,startIndex:a=0,totalHeight:o=0,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,expanding:p,selectedNode:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b})=>e("div",{className:"ff-table-tree-fn-body",style:{height:`${o}px`,position:"relative"},children:t?.map((t,o)=>e(jL,{node:t,columnsData:n,columnMeta:r,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,isExpanding:t.key===p,index:a+o,selectedNode:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b,style:{transform:`translateY(${(a+o)*i}px)`,height:`${i}px`,position:"absolute",top:0,left:0,right:0}},t.key))}),qL=i.memo(({columnsData:t,columnMeta:r,totalWidth:i,rootNode:a,selected:s,onCheckBoxChange:d,selectedNode:u,tableHeaderBgColor:f,hideOnDisable:h,transparentHeader:C,showHeader:p=!0,showRootNodeColumnActions:m})=>{const A=o(null),[g,v]=c(!1);l(()=>{v(!0)},[]);const y=(e,t)=>{const n=r?.[e];return{width:n?.width??t,position:n?.sticky?"sticky":void 0,left:n?.sticky?n.left:void 0,zIndex:n?.sticky?n.zIndex:void 0}};return n("div",{className:"ff-table-tree-fn-head",children:[p&&e("div",{className:"ff-table-tree-fn-row no-hover",style:{minWidth:i},children:t.map(({name:t,width:n},i)=>e("div",{className:"ff-table-tree-fn-th "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:{...y(i,n),backgroundColor:C?"transparent":f,pointerEvents:C?"none":"auto"},children:t},t))}),a&&e("div",{className:"ff-table-tree-fn-row show-tree "+(u&&u===a?.node?.key?"hover":""),ref:A,children:t.map((t,i)=>e("div",{className:"ff-table-tree-fn-td "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:y(i,t.width),children:n("span",{className:"tree-table-fn-default-content "+(0===i?"ff-table-root-index-0":""),children:[0===i&&"checkbox"===a.select&&!(h&&a.node.isDisabled)&&e(En,{checked:"partially"!==a?.node?.selectedStatus&&("completely"===a?.node?.selectedStatus||!1),partial:"partially"===a?.node?.selectedStatus,onChange:e=>d(e,a?.node),disabled:a?.node?.isDisabled}),0===i&&"radio"===a.select&&!(h&&a.node.isDisabled)&&e(fc,{name:a.node.key,checked:s.includes(a.node.key),value:a.node.key,onChange:e=>d(e,a.node),disabled:a.node.isDisabled}),n("div",{className:"tree-table-cell-flex",children:[e(Qs,{children:"name"===t.accessor?a.node[t.accessor]:RL(a.node,t)}),a.cell&&0===i&&e("span",{className:"table-tree--fn-root-cell",children:a.cell(a.node)}),a.actions&&0===i&&g&&A.current&&e("div",{className:"table-tree-fn-row-action",children:a.actions(a.node,A)}),m&&t.actions&&"name"!==t.accessor&&e("div",{className:"table-tree-fn-row-action",children:t.actions(a.node,A)})]})]})},i))})]})});qL.displayName="TableHead";const UL=32,WL="__root__",XL=(e,t)=>{if(!e?.length)return[];const n=new Map,r=new Map,i=new Map,a=new Map;t&&t.key&&n.set(String(t.key),t),e.forEach(e=>{n.set(String(e.key),e);const t=e.parentId?String(e.parentId):WL;r.has(t)||(r.set(t,[]),a.set(t,{container:0,resource:0})),r.get(t)?.push(e);const i=a.get(t);i&&(e.container?i.container++:i.resource++)}),r.forEach(e=>{e.forEach((e,t)=>{i.set(String(e.key),t)})});const o=e=>{const t=e.parentId?String(e.parentId):WL,o=r.get(t);if(!o||0===o.length)return!1;if((i.get(String(e.key))??0)<o.length-1)return!0;const l=n.get(t),s=a.get(t);if(l&&s){const t=o.filter(e=>e.container).reduce((e,t)=>e+(t.totalResourceCount??0),0),n=o.filter(e=>!e.container).length,r=Math.max(0,(l.totalResourceCount??0)-(t+n));if(e.container){return s.container<(l.subContainerCount??0)||r>0}return s.resource<r}return!1},l=e=>{if(void 0!==e.selectedStatus)return e.selectedStatus;let r=e;for(;r?.parentId;){const e=n.get(String(r.parentId));if(!e)break;if("completely"===e.selectedStatus)return"completely";if("none"===e.selectedStatus)return"none";r=e}return"completely"===t?.selectedStatus?"completely":"none"===t?.selectedStatus?"none":e.selectedStatus};return e.map(e=>{const t=e,r=t.parentSiblings&&t.parentSiblings.length>0,i=r?t.parentSiblings:(e=>{const t=[];let r=e;for(;r&&(r.parentId&&t.unshift(o(r)),r.parentId);)r=n.get(String(r.parentId));return t})(e),a=r?t.hierarchy:i.length;return{...e,lastChild:!o(e),parentSiblings:i,hierarchy:a,selectedStatus:l(e)}})},QL=a(({treeData:t,columnsData:r,selected:i=[],select:a=null,onChange:s=()=>{},onClick:d=()=>{},onExpand:f=()=>{},loadMore:h=()=>{},tableBorder:m,height:A="calc(100vh - 134px)",newNode:g,onAddConfirm:v=()=>{},onAddCancel:y=()=>{},handleEditFieldError:w,loading:b=!1,rootNode:E,pagination:M=!0,selectedNode:L,tableHeaderBgColor:H="var(--border-color-as-bg)",hideOnDisable:x=!1,freezeColumns:V,addModuleInputWidth:k=150,addModuleSelectWidth:S,onScroll:Z,onScrollEnd:O,disableEditLabelConfirmIcon:z=!1,transparentHeader:N=!1,navigateTreeNode:I=null,handleRemoveNavigateTreeNode:T=()=>{},scrollThreshold:D=128,showHeader:F=!0,resetScroll:R=!1,setResetScroll:P=()=>{},showRootNodeColumnActions:B=!1},j)=>{const[_,q]=c(null),[U,W]=c(null),[X,Q]=c({start:0,end:20}),[G,Y]=c(!1),J=o(null),$=o(null),ee=o(0),te=o(b),ne=o(null),re=o(null),ie=o({lastScrollTop:0}),ae=o([]),oe=o(0),le=o(null),se=o(null),ce=o(null),de=o({key:null,attempts:0}),ue=o(null),fe=(e,t)=>{const n=String(e??t);return n.endsWith("%")?{value:parseFloat(n),unit:"%"}:{value:parseFloat(n)||0,unit:"px"}},he=C(()=>{let e=0,t=0;return r.map((n,r)=>{const{value:i,unit:a}=fe(n.width,400),o=!!V&&r<V,l="%"===a?`${i}%`:`${i}px`,s=`calc(${e}px + ${t}%)`;return o&&("%"===a?t+=i:e+=i),{width:l,sticky:o,left:s,zIndex:o?100+(V??0)-r:1}})},[r,V]),Ce=C(()=>{let e=0,t=0;return r.forEach(n=>{const{value:r,unit:i}=fe(n.width,400);"%"===i?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[r]),pe=C(()=>{if(!V)return"0px";let e=0,t=0;return he.slice(0,V).forEach(n=>{const r=parseFloat(n.width)||0;n.width.endsWith("%")?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[he,V]),me=C(()=>((e,t,n)=>{if(!t?.sourceId||!t.action)return e;const{sourceId:r,action:i,value:a="",error:o="",label:l,type:s,options:c,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t,C=t?.parentId,p=t?.hierarchy,m=c?.map(e=>({label:e,value:e})),A=d?{label:d,value:d}:void 0,g=new Map;e.forEach(e=>g.set(e.key,e)),n&&g.set(n.key,n);const v=g.get(r);let y;h&&(y=g.get(h));let w=v??("addInside"===i?y:void 0);!w&&"addInside"===i&&C&&(w=g.get(C));const b="addInside"===i&&!w&&e.length>=0;if(!w&&!b)return e;const E=[...e],M=w?e.findIndex(e=>e.key===w.key):-1;let L=null,H=0,x=M+1;switch(i){case"addAbove":{const t=w;if(!t)return e;L=t.parentId,H=t.hierarchy;break}case"addBelow":{const t=w;if(!t)return e;L=y?.parentId??t.parentId,H=y?.hierarchy??t.hierarchy;break}case"addInside":{if(b){L=C??h??r??null,H=p??1,x=E.length;break}const t=y??w;if(!t)return e;L=t.key,H=(t.hierarchy??0)+1;const n=E.findIndex(e=>e.key===r);-1!==n&&(x=n+1);break}}const V={hierarchy:H,parentId:L,sourceId:w?.key??r??h??"new-node",isNewNode:!0,key:"new-node",value:a,error:o,label:l,type:s,options:m,selectedOption:A,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":E.splice(M,0,V);break;case"addBelow":E.splice(M+1,0,V);break;case"addInside":E.splice(Math.max(0,x),0,V)}return E})(t,g,E?.node),[t,g,E]),Ae=C(()=>XL(me,E?.node),[me,E?.node]),ge=C(()=>Ae.filter(e=>!e.hide),[Ae]),ve=C(()=>{const e=new Map;return Ae.forEach(t=>e.set(t.key,t)),e},[Ae]),ye=C(()=>{const e=new Map;return ge.forEach((t,n)=>e.set(t.key,n)),e},[ge]),we=p(e=>{q(t=>t?e&&t!==e?t:null:t),e&&se.current?.key!==e||(se.current=null),ce.current&&(clearTimeout(ce.current),ce.current=null)},[]);l(()=>{te.current=b},[b]),l(()=>{ne.current=U},[U]);const be=p(e=>{ne.current=e,W(e)},[]),Ee=p(()=>{const e=J.current;if(!e)return;const t=ee.current||0,n=Math.max(0,e.scrollTop-t),r=e.clientHeight-t;let i=Math.floor(n/UL)-6,a=Math.ceil((n+r)/UL)+6;i=Math.max(0,i),a=Math.min(ge.length,a),Q(e=>e.start===i&&e.end===a?e:{start:i,end:a})},[ge.length]),Me=p(()=>{null===re.current&&(re.current=requestAnimationFrame(()=>{re.current=null,Ee()}))},[Ee]),Le=p(()=>{const e=J.current;if(!e)return;const n=e.scrollTop,r=n>ie.current.lastScrollTop?"down":"up";if(ie.current.lastScrollTop=n,Me(),Z?.(),le.current?.(),!M||b||ne.current||K(t))return;const i=e.scrollHeight,a=e.clientHeight;"down"===r&&i-(n+a)<D&&!t[t.length-1]?.lastResource&&(be("below"),h("below"))},[t,M,b,U,D,Me,Z,h,be]);l(()=>{if(b||!M||K(t))return;const e=t[0],n=!e?.lastResource,{totalSubContainerCount:r=0,totalResourceCount:i=0}=E?.node||{},a=r+i,o=ge.length<10&&ge.length<a;n&&o&&(be("above"),h("above"))},[b,M,t,ge.length,E,h,be]),u(()=>{const e=ae.current,t=ge,n=J.current;if(R&&n)return n.scrollTop=0,ie.current.lastScrollTop=0,void P(!1);if(n&&e.length>0&&t.length>0&&!b){const r=ie.current.lastScrollTop,i=Math.max(0,Math.floor(r/UL));let a=-1,o=-1;for(let t=i;t<e.length;t++){const n=e[t]?.key,r=ye.get(n??"");if(void 0!==r){a=t,o=r;break}}if(-1===a)for(let t=i-1;t>=0;t--){const n=e[t]?.key,r=ye.get(n??"");if(void 0!==r){a=t,o=r;break}}if(-1!==a&&-1!==o){const e=o-a,t=Math.max(0,r+e*UL);n.scrollTop!==t&&(n.scrollTop=t,ie.current.lastScrollTop=n.scrollTop,Ee())}else if("above"===U)0!==n.scrollTop&&(n.scrollTop=0,ie.current.lastScrollTop=0,Ee());else{const e=ee.current||0,r=Math.max(0,t.length*UL-(n.clientHeight-e));n.scrollTop>r&&(n.scrollTop=r,ie.current.lastScrollTop=r,Ee())}U&&be(null)}ae.current=t},[b,U,ye,ge,be,Ee,R,P]),l(()=>{const e=J.current;if(!e)return;const n=n=>{n.deltaY>=0||!M||K(t)||te.current||ne.current||e.scrollTop>1||t[0]?.lastResource||(be("above"),h("above"))};return e.addEventListener("wheel",n,{passive:!0}),()=>{e.removeEventListener("wheel",n)}},[M,t,h,be]),l(()=>{const e=J.current;if(e)return le.current=O?Js(()=>{O?.()},150):null,e.addEventListener("scroll",Le,{passive:!0}),()=>{e.removeEventListener("scroll",Le),le.current?.cancel()}},[Le,O]),l(()=>{const e=J.current;if(!e)return;const t=e=>{Date.now()<oe.current&&e.stopImmediatePropagation()};return e.addEventListener("scroll",t,{passive:!0,capture:!0}),()=>{e.removeEventListener("scroll",t,!0)}},[]),l(()=>{const e=$.current;if(!e)return;const t=new ResizeObserver(()=>{ee.current=e.getBoundingClientRect().height,Ee()});return t.observe(e),()=>t.disconnect()},[Ee]),u(()=>{if(!g||!J.current)return;const e=J.current,t=ye.get("new-node");if(void 0===t)return;const n=ee.current||0,r=e.clientHeight-n;if(r<=0)return;const i=t*UL,a=i+UL,o=Math.max(0,e.scrollTop-n);let l=o;i<o?l=i:a>o+r&&(l=Math.max(0,a-r)),l!==o&&(oe.current=Date.now()+300,e.scrollTop=l+n,ie.current.lastScrollTop=e.scrollTop,Ee());const s=requestAnimationFrame(()=>{Y(!0)});return()=>cancelAnimationFrame(s)},[g,ye,Ee]),l(()=>{g||Y(!1)},[g]),u(()=>{if(!_||b)return;const e=se.current;if(!e||e.key!==_){const e=requestAnimationFrame(()=>{we(_)});return()=>cancelAnimationFrame(e)}const t=ve.get(e.key);if(!t){const t=requestAnimationFrame(()=>{we(e.key)});return()=>cancelAnimationFrame(t)}if(Boolean(t.expanded)!==e.expanded)return;const n=requestAnimationFrame(()=>{we(e.key)});return()=>cancelAnimationFrame(n)},[ve,_,b,we]),l(()=>{de.current.key!==I&&(de.current={key:I,attempts:0}),!I&&ue.current&&(clearTimeout(ue.current),ue.current=null)},[I]),u(()=>{if(!I||g)return;const e=J.current;if(!e)return;const n=ye.get(I);if(void 0!==n){de.current={key:I,attempts:0};const t=ee.current||0,r=Math.max(UL,e.clientHeight-t),i=n*UL+16,a=Math.max(0,i-r/2)+t;return oe.current=Date.now()+400,e.scrollTo({top:a,behavior:"smooth"}),Me(),ue.current&&clearTimeout(ue.current),void(ue.current=setTimeout(()=>{T?.()},350))}if(b||U)return;const r=de.current;if(r.key!==I&&(r.key=I,r.attempts=0),r.attempts+=1,!(r.attempts>30))return M&&!0!==t[0]?.lastResource?(be("above"),void h("above")):void(r.attempts>2&&T?.());T?.()},[I,g,ye,b,U,M,t,h,Me,T,be]);const He=p(e=>{if(_)return;const t=!e?.expanded;q(e.key),se.current={key:e.key,expanded:t},ce.current&&clearTimeout(ce.current);const n=Date.now(),r=()=>{if(se.current?.key!==e.key)return;const t=te.current,i=Date.now()-n>=2e3;!t||i?we(e.key):ce.current=setTimeout(r,1e3)};ce.current=setTimeout(r,1e3),f?.(e)},[_,f,we]),xe=p((e,t)=>{_||s?.(e,t)},[s,_]),Ve=p((e,t)=>{_||d?.(e,t)},[d,_]);l(()=>()=>{null!==re.current&&(cancelAnimationFrame(re.current),re.current=null),ce.current&&clearTimeout(ce.current),ue.current&&clearTimeout(ue.current)},[]);const ke=ge.length*UL,Se=ge.slice(X.start,X.end);return e("div",{className:"tree-table-wrapper-container table-tree-fn",children:e("div",{className:"tree-table-fn-wrap",ref:j,children:e("div",{className:"table-fn-scrollable "+(ge.length?"":"table-fn-empty"),ref:J,style:{"--table-height":ge.length?A:"auto","--frozen-column-width":pe,border:m},children:n("div",{className:"tree-table-fn",style:{width:Ce},children:[e("div",{ref:$,style:{position:"sticky",top:0,zIndex:98},children:e(qL,{columnsData:r,columnMeta:he,totalWidth:Ce,rootNode:E,onCheckBoxChange:xe,selected:i,selectedNode:L,tableHeaderBgColor:H,hideOnDisable:x,transparentHeader:N,showHeader:F,showRootNodeColumnActions:B})}),e(_L,{flattenedTreeData:Se,columnsData:r,columnMeta:he,totalWidth:Ce,rowHeight:UL,startIndex:X.start,totalHeight:ke,selected:i,select:a,onRowClick:Ve,onToggleExpand:He,onCheckBoxChange:xe,onAddConfirm:v,onAddCancel:y,handleEditFieldError:w,expanding:_,selectedNode:L,hideOnDisable:x,addModuleInputWidth:k,addModuleSelectWidth:S,disableEditLabelConfirmIcon:z,isEditable:g?G:void 0,setIsEditable:g?e=>{Y(Boolean(e))}:void 0})]})})})})});QL.displayName="TableTreeFn";const GL=t=>e(oA,{logo:()=>"FireFlink"===t?.name?e(q,{height:100,width:100,name:"fire_flink_loader_logo","aria-label":"Loader logo"}):e("img",{src:t?.loaderName,width:100,height:100,alt:"loader"})}),KL=({isVisible:t})=>t?n("section",{className:"no_data_message","aria-live":"polite","aria-label":"No data available message",children:[e(q,{name:"no_content",width:120,height:120,"aria-label":"No data illustration"}),e(U,{fontSize:"20px",lineHeight:"30px",fontWeight:"semi-bold",children:"No Data Available"})]}):null,YL=({text:t=" No Results Found",iconName:r="no_license_found",fontSize:i="24px",textAlign:a="left",direction:o="column",iconWidth:l=120,iconHeight:s=120,fontWeight:c="semi-bold",marginTop:d="0px"})=>e("article",{className:"no_results_container","aria-live":"polite","aria-label":"No result found",children:n("section",{className:`no_results_container__${o}`,style:{marginTop:d},"aria-label":"No result content",children:[e(q,{name:r,width:l,height:s,"aria-label":"No result illustration"}),e("div",{"aria-label":"No result message",children:e(U,{as:"div",fontSize:i,lineHeight:"36px",fontWeight:c,color:"var(--text-color)",textAlign:a,children:t})})]})}),JL=({drawerProps:t,showDrawer:n,children:r,zIndex:i=1200,top:a="56px"})=>e("div",n?{"aria-label":"Layout with drawer",role:"region",children:e(vn,{isOpen:t?.isOpen??!0,...t,zIndex:i,top:a,children:r})}:{"aria-label":"Layout content",role:"region",children:r});const $L=({children:n,offlineContent:r,hasError:i=!1,onNetworkStatusChange:a,overlayClassName:o,overlayZIndex:s=99998,iconWidth:d=300,iconHeight:u=300})=>{const f=function(){const[e,t]=c(navigator.onLine);return l(()=>{const e=()=>{t(!0)},n=()=>{t(!1)};return window.addEventListener("online",e),window.addEventListener("offline",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}},[]),e}();return l(()=>{a&&a(f)},[f,a]),i||!f?e("section",{className:`offlineOverlay ${o??""}`,style:{zIndex:s},"aria-live":"polite","aria-label":"Network error overlay",children:r||e(q,{name:"offline_404_icon",height:u,width:d,"aria-label":"Offline error illustration"})}):e(t,{children:n})},eH=e=>{const t=Number.isFinite(e)&&e>0?e:0,n=Math.floor(t/60),r=Math.floor(t%60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`},tH=[.5,1,1.5,2],nH=({duration:r,currentTime:i,isPlaying:a=!1,onPlayPause:l=()=>{},onSeek:s=()=>{},isMuted:d=!1,onMuteToggle:u=()=>{},menuOptions:f,showCaptions:h=!1,onMenuOptionClick:C=()=>{},playbackRate:p=1,onPlaybackRateChange:m=()=>{},disabled:A=!1,seekStep:g=5,formatTime:v=eH,className:y="",style:w={}})=>{const b=r>0?i/r*100:0,E=o(null),M=o(null),[H,x]=c(!1),[V,k]=c({top:0,left:0}),[S,Z]=c(0),O=o(null),z=f??[...h?[{label:"Captions",value:"captions",icon:"captions"}]:[],{label:n("div",{ref:M,className:"playback-menu-option",children:["Playback Speed ",e(xi,{label:`${p.toFixed(1)} x`})]}),value:"playback-speed",icon:"playback",keepMenuOpen:!0}],N=e=>Math.min(Math.max(e,0),r||0);return n("div",{className:`ff-audio-player ${y}`,style:w,"aria-disabled":A,tabIndex:A?-1:0,role:"group","aria-label":A?"Audio player disabled":"Audio player",onKeyDown:e=>{if(A)return;if("INPUT"!==e.target.tagName)switch(e.key){case" ":case"Spacebar":e.preventDefault(),l();break;case"m":case"M":e.preventDefault(),u();break;case"ArrowRight":e.preventDefault(),s(N(i+g));break;case"ArrowLeft":e.preventDefault(),s(N(i-g))}},children:[e("button",{type:"button",className:"ff-audio-play-btn",onClick:l,disabled:A,"aria-label":a?"Pause":"Play",children:a?n("span",{className:"ff-audio-pause-shape",children:[e("span",{className:"ff-audio-pause-bar"}),e("span",{className:"ff-audio-pause-bar"})]}):e(q,{name:"play",width:8,height:8,cursorType:"pointer",withPadding:!1,className:"ff-audio-play"})}),e(U,{fontSize:8,className:"ff-audio-time",children:v(i)}),n("div",{className:"ff-audio-seek-wrap",children:[e("div",{className:"ff-audio-seek-track"}),e("div",{className:"ff-audio-seek-fill",style:{width:`${b}%`}}),e("input",{type:"range",className:"ff-audio-seek",min:0,max:r||0,step:1,value:i,disabled:A,onChange:e=>{s(Number(e.target.value))},"aria-label":"Seek"})]}),e(U,{fontSize:8,className:"ff-audio-time",children:v(r)}),e(q,{name:"speaker",onClick:A?()=>{}:u,disabled:A,withPadding:!1,className:"ff-audio-speaker-icon"+(d?" ff-audio-speaker-muted":""),cursorType:"pointer","aria-label":d?"Unmute audio":"Mute audio"}),e("div",{className:"ff-audio-more-wrap",ref:E,children:e(Da,{iconName:"more","aria-label":"More audio options",options:z,onOptionClick:e=>{if("playback-speed"===e.value){const e=M.current?.getBoundingClientRect();if(e){let t=e.top,n=e.right+8;t+102>window.innerHeight-8&&(t=Math.max(8,e.bottom-102)),n+36>window.innerWidth-8&&(n=Math.max(8,e.left-36-8)),k({top:t,left:n})}const t=tH.indexOf(p);return Z(t>=0?t:0),x(!0),void requestAnimationFrame(()=>O.current?.focus())}C(e)},dropdownPlacement:"bottomLeft",displayCard:!0,disabled:A,iconSize:12})}),H&&L(n(t,{children:[e("div",{className:"ff-audio-speed-overlay",onClick:()=>x(!1)}),e("div",{className:"ff-audio-speed-menu",style:{top:V.top,left:V.left},ref:O,tabIndex:-1,role:"listbox","aria-label":"Playback speed",onKeyDown:e=>{switch(e.key){case"ArrowDown":e.preventDefault(),Z(e=>(e+1)%tH.length);break;case"ArrowUp":e.preventDefault(),Z(e=>(e-1+tH.length)%tH.length);break;case"Enter":e.preventDefault(),m(tH[S]),x(!1);break;case"Escape":e.preventDefault(),x(!1)}},children:tH.map((t,r)=>{const i=t===p;return e("button",{type:"button",role:"option","aria-selected":i,className:["ff-audio-speed-option",r===S&&"ff-audio-speed-option-highlighted",i&&"ff-audio-speed-option-selected"].filter(Boolean).join(" "),onMouseEnter:()=>Z(r),onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),m(t),x(!1)},children:n(U,{fontSize:10,children:[t.toFixed(1),"x"]})},t)})})]}),document.body)]})};function rH(e,t,n,r,i,a="children"){return function e(o){for(let l=0;l<o.length;l++){const s=o[l];if(s&&s[t]===n){const e=[...o];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(s&&s[a]&&Array.isArray(s[a])){const t=e(s[a]);if(t)return{updatedArray:o.map((e,n)=>n===l?{...e,[a]:t.updatedArray}:e)}}}return null}(e)}const iH=(e,t)=>{if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Array.isArray(e),r=Array.isArray(t);if(n!==r)return!1;const i=n?e:Object.keys(e),a=r?t:Object.keys(t);if(i.length!==a.length)return!1;if(n)return i.every((e,t)=>iH(e,a[t]));{const n=new Set(a);return i.every(r=>n.has(r)&&iH(e[r],t[r]))}},aH=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return iH(e,r)}));function oH(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function lH(e,t){return e&t}function sH(e,t){return e|t}function cH(e,t){return e^t}function dH(e,t){return e&~t}function uH(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function fH(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var hH,CH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pH(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=CH.charAt(n>>6)+CH.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=CH.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=CH.charAt(n>>2)+CH.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function mH(e){var t,n="",r=0,i=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t){var a=CH.indexOf(e.charAt(t));a<0||(0==r?(n+=oH(a>>2),i=3&a,r=1):1==r?(n+=oH(i<<2|a>>4),i=15&a,r=2):2==r?(n+=oH(i),n+=oH(a>>2),i=3&a,r=3):(n+=oH(i<<2|a>>4),n+=oH(15&a),r=0))}return 1==r&&(n+=oH(i<<2)),n}var AH,gH=function(e){var t;if(void 0===hH){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(hH={},t=0;t<16;++t)hH[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)hH[n.charAt(t)]=t;for(t=0;t<8;++t)hH[r.charAt(t)]=-1}var i=[],a=0,o=0;for(t=0;t<e.length;++t){var l=e.charAt(t);if("="==l)break;if(-1!=(l=hH[l])){if(void 0===l)throw new Error("Illegal character at offset "+t);a|=l,++o>=2?(i[i.length]=a,a=0,o=0):a<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return i},vH={decode:function(e){var t;if(void 0===AH){var n="= \f\n\r\t \u2028\u2029";for(AH=Object.create(null),t=0;t<64;++t)AH["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(AH["-"]=62,AH._=63,t=0;t<9;++t)AH[n.charAt(t)]=-1}var r=[],i=0,a=0;for(t=0;t<e.length;++t){var o=e.charAt(t);if("="==o)break;if(-1!=(o=AH[o])){if(void 0===o)throw new Error("Illegal character at offset "+t);i|=o,++a>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,a=0):i<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=vH.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return vH.decode(e)}},yH=1e13,wH=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,i=this.buf,a=i.length;for(n=0;n<a;++n)(r=i[n]*e+t)<yH?t=0:r-=(t=0|r/yH)*yH,i[n]=r;t>0&&(i[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,i=r.length;for(t=0;t<i;++t)(n=r[t]-e)<0?(n+=yH,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(yH+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*yH+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),bH=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,EH=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function MH(e,t){return e.length>t&&(e=e.substring(0,t)+"…"),e}var LH,HH=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,i="",a=e;a<t;)n=this.get(a++),r=this.get(a++),i+=String.fromCharCode(n<<8|r);return i},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),i=(n?bH:EH).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=r>127,a=i?255:0,o="";r==a&&++e<t;)r=this.get(e);if(0===(n=t-e))return i?-1:0;if(n>4){for(o=r,n<<=3;!(128&(+o^a));)o=+o<<1,--n;o="("+n+" bit)\n"}i&&(r-=256);for(var l=new wH(r),s=e+1;s<t;++s)l.mulAdd(256,this.get(s));return o+l.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",a="",o=e+1;o<t;++o){for(var l=this.get(o),s=o==t-1?r:0,c=7;c>=s;--c)a+=l>>c&1?"1":"0";if(a.length>n)return i+MH(a,n)}return i+a},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return MH(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var a=e;a<t;++a)i+=this.hexByte(this.get(a));return r>n&&(i+="…"),i},e.prototype.parseOID=function(e,t,n){for(var r="",i=new wH,a=0,o=e;o<t;++o){var l=this.get(o);if(i.mulAdd(128,127&l),a+=7,!(128&l)){if(""===r)if((i=i.simplify())instanceof wH)i.sub(80),r="2."+i.toString();else{var s=i<80?i<40?0:1:2;r=s+"."+(i-40*s)}else r+="."+i.toString();if(r.length>n)return MH(r,n);i=new wH,a=0}}return a>0&&(r+=".incomplete"),r},e}(),xH=function(){function e(e,t,n,r,i){if(!(r instanceof VH))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return MH(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return MH(this.stream.parseStringISO(t,t+n),e);case 30:return MH(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substring(t,t+n)},e.decode=function(t){var n;n=t instanceof HH?t:new HH(t,0);var r=new HH(n),i=new VH(n),a=e.decodeLength(n),o=n.pos,l=o-r.pos,s=null,c=function(){var t=[];if(null!==a){for(var r=o+a;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var i=e.decode(n);if(i.tag.isEOC())break;t[t.length]=i}a=o-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)s=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var d=0;d<s.length;++d)if(s[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){s=null}if(null===s){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);n.pos=o+Math.abs(a)}return new e(r,l,a,i,s)},e}(),VH=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new wH;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),kH=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],SH=(1<<26)/kH[kH.length-1],ZH=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,a="",o=this.t,l=this.DB-o*this.DB%t;if(o-- >0)for(l<this.DB&&(n=this[o]>>l)>0&&(i=!0,a=oH(n));o>=0;)l<t?(n=(this[o]&(1<<l)-1)<<t-l,n|=this[--o]>>(l+=this.DB-t)):(n=this[o]>>(l-=t)&r,l<=0&&(l+=this.DB,--o)),n>0&&(i=!0),i&&(a+=oH(n));return i?a:"0"},e.prototype.negate=function(){var t=TH();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qH(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=TH();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new zH(t):new NH(t),this.exp(e,n)},e.prototype.clone=function(){var e=TH();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=TH();return this.bitwiseTo(e,lH,t),t},e.prototype.or=function(e){var t=TH();return this.bitwiseTo(e,sH,t),t},e.prototype.xor=function(e){var t=TH();return this.bitwiseTo(e,cH,t),t},e.prototype.andNot=function(e){var t=TH();return this.bitwiseTo(e,dH,t),t},e.prototype.not=function(){for(var e=TH(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=TH();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=TH();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+uH(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=fH(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,sH)},e.prototype.clearBit=function(e){return this.changeBit(e,dH)},e.prototype.flipBit=function(e){return this.changeBit(e,cH)},e.prototype.add=function(e){var t=TH();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=TH();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=TH();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=TH();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=TH();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=TH(),n=TH();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),a=_H(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new zH(t):t.isEven()?new IH(t):new NH(t);var o=[],l=3,s=n-1,c=(1<<n)-1;if(o[1]=r.convert(this),n>1){var d=TH();for(r.sqrTo(o[1],d);l<=c;)o[l]=TH(),r.mulTo(d,o[l-2],o[l]),l+=2}var u,f,h=e.t-1,C=!0,p=TH();for(i=qH(e[h])-1;h>=0;){for(i>=s?u=e[h]>>i-s&c:(u=(e[h]&(1<<i+1)-1)<<s-i,h>0&&(u|=e[h-1]>>this.DB+i-s)),l=n;!(1&u);)u>>=1,--l;if((i-=l)<0&&(i+=this.DB,--h),C)o[u].copyTo(a),C=!1;else{for(;l>1;)r.sqrTo(a,p),r.sqrTo(p,a),l-=2;l>0?r.sqrTo(a,p):(f=a,a=p,p=f),r.mulTo(p,o[u],a)}for(;h>=0&&!(e[h]&1<<i);)r.sqrTo(a,p),f=a,a=p,p=f,--i<0&&(i=this.DB-1,--h)}return r.revert(a)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),i=this.clone(),a=_H(1),o=_H(0),l=_H(0),s=_H(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&o.isEven()||(a.addTo(this,a),o.subTo(t,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),n?(l.isEven()&&s.isEven()||(l.addTo(this,l),s.subTo(t,s)),l.rShiftTo(1,l)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);r.compareTo(i)>=0?(r.subTo(i,r),n&&a.subTo(l,a),o.subTo(s,o)):(i.subTo(r,i),n&&l.subTo(a,l),s.subTo(o,s))}return 0!=i.compareTo(e.ONE)?e.ZERO:s.compareTo(t)>=0?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},e.prototype.pow=function(e){return this.exp(e,new OH)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=kH[kH.length-1]){for(t=0;t<kH.length;++t)if(n[0]==kH[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<kH.length;){for(var r=kH[t],i=t+1;i<kH.length&&r<SH;)r*=kH[i++];for(r=n.modInt(r);t<i;)if(r%kH[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,a=!1,o=0;--i>=0;){var l=8==r?255&+t[i]:jH(t,i);l<0?"-"==t.charAt(i)&&(a=!0):(a=!1,0==o?this[this.t++]=l:o+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-o)-1)<<o,this[this.t++]=l>>this.DB-o):this[this.t-1]|=l<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),a&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(e/this.DB),o=this.s<<n&this.DM,l=this.t-1;l>=0;--l)t[l+a+1]=this[l]>>r|o,o=(this[l]&i)<<n;for(l=a-1;l>=0;--l)t[l]=0;t[a]=o,t.t=this.t+a+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,a=(1<<r)-1;t[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)t[o-n-1]|=(this[o]&a)<<i,t[o-n]=this[o]>>r;r>0&&(t[this.t-n-1]|=(this.s&a)<<i),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),i=t.abs(),a=r.t;for(n.t=a+i.t;--a>=0;)n[a]=0;for(a=0;a<i.t;++a)n[a+r.t]=r.am(0,i[a],n,a,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var i=t.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=TH());var o=TH(),l=this.s,s=t.s,c=this.DB-qH(i[i.t-1]);c>0?(i.lShiftTo(c,o),a.lShiftTo(c,r)):(i.copyTo(o),a.copyTo(r));var d=o.t,u=o[d-1];if(0!=u){var f=u*(1<<this.F1)+(d>1?o[d-2]>>this.F2:0),h=this.FV/f,C=(1<<this.F1)/f,p=1<<this.F2,m=r.t,A=m-d,g=null==n?TH():n;for(o.dlShiftTo(A,g),r.compareTo(g)>=0&&(r[r.t++]=1,r.subTo(g,r)),e.ONE.dlShiftTo(d,g),g.subTo(o,o);o.t<d;)o[o.t++]=0;for(;--A>=0;){var v=r[--m]==u?this.DM:Math.floor(r[m]*h+(r[m-1]+p)*C);if((r[m]+=o.am(0,v,r,A,0,d))<v)for(o.dlShiftTo(A,g),r.subTo(g,r);r[m]<--v;)r.subTo(g,r)}null!=n&&(r.drShiftTo(d,n),l!=s&&e.ZERO.subTo(n,n)),r.t=d,r.clamp(),c>0&&r.rShiftTo(c,r),l<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=TH(),i=TH(),a=n.convert(this),o=qH(t)-1;for(a.copyTo(r);--o>=0;)if(n.sqrTo(r,i),(t&1<<o)>0)n.mulTo(i,a,r);else{var l=r;r=i,i=l}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=_H(n),i=TH(),a=TH(),o="";for(this.divRemTo(r,i,a);i.signum()>0;)o=(n+a.intValue()).toString(e).substring(1)+o,i.divRemTo(r,i,a);return a.intValue().toString(e)+o},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),a=!1,o=0,l=0,s=0;s<t.length;++s){var c=jH(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(a=!0):(l=n*l+c,++o>=r&&(this.dMultiply(i),this.dAddOffset(l,0),o=0,l=0))}o>0&&(this.dMultiply(Math.pow(n,o)),this.dAddOffset(l,0)),a&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sH,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],a=7&t;i.length=1+(t>>3),n.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,i,a=Math.min(e.t,this.t);for(r=0;r<a;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=a;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(t=t+1>>1)>kH.length&&(t=kH.length);for(var a=TH(),o=0;o<t;++o){a.fromInt(kH[Math.floor(Math.random()*kH.length)]);var l=a.modPow(i,this);if(0!=l.compareTo(e.ONE)&&0!=l.compareTo(n)){for(var s=1;s++<r&&0!=l.compareTo(n);)if(0==(l=l.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=l.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=TH();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var a=n.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)t(n);else{a<o&&(o=a),o>0&&(n.rShiftTo(o,n),r.rShiftTo(o,r));var l=function(){(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(l,0):(o>0&&r.lShiftTo(o,r),setTimeout(function(){t(r)},0))};setTimeout(l,10)}},e.prototype.fromNumberAsync=function(t,n,r,i){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sH,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>t&&a.subTo(e.ONE.shiftLeft(t-1),a),a.isProbablePrime(n)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,0)}else{var l=[],s=7&t;l.length=1+(t>>3),n.nextBytes(l),s>0?l[0]&=(1<<s)-1:l[0]=0,this.fromString(l,256)}},e}(),OH=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),zH=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),NH=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=TH();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ZH.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=TH();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),IH=function(){function e(e){this.m=e,this.r2=TH(),this.q3=TH(),ZH.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=TH();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function TH(){return new ZH(null)}function DH(e,t){return new ZH(e,t)}var FH="undefined"!=typeof navigator;FH&&"Microsoft Internet Explorer"==navigator.appName?(ZH.prototype.am=function(e,t,n,r,i,a){for(var o=32767&t,l=t>>15;--a>=0;){var s=32767&this[e],c=this[e++]>>15,d=l*s+c*o;i=((s=o*s+((32767&d)<<15)+n[r]+(1073741823&i))>>>30)+(d>>>15)+l*c+(i>>>30),n[r++]=1073741823&s}return i},LH=30):FH&&"Netscape"!=navigator.appName?(ZH.prototype.am=function(e,t,n,r,i,a){for(;--a>=0;){var o=t*this[e++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i},LH=26):(ZH.prototype.am=function(e,t,n,r,i,a){for(var o=16383&t,l=t>>14;--a>=0;){var s=16383&this[e],c=this[e++]>>14,d=l*s+c*o;i=((s=o*s+((16383&d)<<14)+n[r]+i)>>28)+(d>>14)+l*c,n[r++]=268435455&s}return i},LH=28),ZH.prototype.DB=LH,ZH.prototype.DM=(1<<LH)-1,ZH.prototype.DV=1<<LH;ZH.prototype.FV=Math.pow(2,52),ZH.prototype.F1=52-LH,ZH.prototype.F2=2*LH-52;var RH,PH,BH=[];for(RH="0".charCodeAt(0),PH=0;PH<=9;++PH)BH[RH++]=PH;for(RH="a".charCodeAt(0),PH=10;PH<36;++PH)BH[RH++]=PH;for(RH="A".charCodeAt(0),PH=10;PH<36;++PH)BH[RH++]=PH;function jH(e,t){var n=BH[e.charCodeAt(t)];return null==n?-1:n}function _H(e){var t=TH();return t.fromInt(e),t}function qH(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}ZH.ZERO=_H(0),ZH.ONE=_H(1);var UH=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var WH,XH,QH=null;if(null==QH){QH=[],XH=0;var GH=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var KH=new Uint32Array(256);for(self.crypto.getRandomValues(KH),GH=0;GH<KH.length;++GH)QH[XH++]=255&KH[GH]}var YH=0,JH=function(e){if((YH=YH||0)>=256||XH>=256)self.removeEventListener?self.removeEventListener("mousemove",JH,!1):self.detachEvent&&self.detachEvent("onmousemove",JH);else try{var t=e.x+e.y;QH[XH++]=255&t,YH+=1}catch(e){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",JH,!1):self.attachEvent&&self.attachEvent("onmousemove",JH))}function $H(){if(null==WH){for(WH=new UH;XH<256;){var e=Math.floor(65536*Math.random());QH[XH++]=255&e}for(WH.init(QH),XH=0;XH<QH.length;++XH)QH[XH]=0;XH=0}return WH.next()}var ex=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=$H()},e}();function tx(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}(function(e,t){var n,r,i,a,o,l,s,c,d,u,f,h,C=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),p=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,d=0;d<e.length;d+=16){for(n=C[0],r=C[1],i=C[2],a=C[3],o=C[4],l=C[5],s=C[6],c=C[7],u=0;u<64;u++)p[u]=u<16?e[u+d]:fx(fx(fx(dx(p[u-2]),p[u-7]),cx(p[u-15])),p[u-16]),f=fx(fx(fx(fx(c,sx(o)),ax(o,l,s)),ux[u]),p[u]),h=fx(lx(n),ox(n,r,i)),c=s,s=l,l=o,o=fx(a,f),a=i,i=r,r=n,n=fx(f,h);C[0]=fx(n,C[0]),C[1]=fx(r,C[1]),C[2]=fx(i,C[2]),C[3]=fx(a,C[3]),C[4]=fx(o,C[4]),C[5]=fx(l,C[5]),C[6]=fx(s,C[6]),C[7]=fx(c,C[7])}return C}(function(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e),8*e.length))}function nx(e){for(var t="0123456789abcdef",n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);n+=t.charAt(i>>>4&15)+t.charAt(15&i)}return n}function rx(e,t){return e>>>t|e<<32-t}function ix(e,t){return e>>>t}function ax(e,t,n){return e&t^~e&n}function ox(e,t,n){return e&t^e&n^t&n}function lx(e){return rx(e,2)^rx(e,13)^rx(e,22)}function sx(e){return rx(e,6)^rx(e,11)^rx(e,25)}function cx(e){return rx(e,7)^rx(e,18)^ix(e,3)}function dx(e){return rx(e,17)^rx(e,19)^ix(e,10)}var ux=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function fx(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function hx(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var a=new ex,o=[];t>2;){for(o[0]=0;0==o[0];)a.nextBytes(o);n[--t]=o[0]}return n[--t]=2,n[--t]=0,new ZH(n)}function Cx(e,t,n){for(var r="",i=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function px(e,t){var n=tx;if(e.length+64+2>t)throw"Message too long for RSA";var r,i="";for(r=0;r<t-e.length-64-2;r+=1)i+="\0";var a=n("")+i+""+e,o=new Array(32);(new ex).nextBytes(o);var l=Cx(o,a.length,n),s=[];for(r=0;r<a.length;r+=1)s[r]=a.charCodeAt(r)^l.charCodeAt(r);var c=Cx(s,o.length,n),d=[0];for(r=0;r<o.length;r+=1)d[r+1]=o[r]^c.charCodeAt(r);return new ZH(d.concat(s))}var mx=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e,t){void 0===t&&(t=hx);var n=this.n.bitLength()+7>>3,r=t(e,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var a=i.toString(16),o=a.length,l=0;l<2*n-o;l++)a="0"+a;return a},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16),this.d=DH(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,i,a,o,l){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16),this.d=DH(n,16),this.p=DH(r,16),this.q=DH(i,16),this.dmp1=DH(a,16),this.dmq1=DH(o,16),this.coeff=DH(l,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new ex,r=e>>1;this.e=parseInt(t,16);for(var i=new ZH(t,16);;){for(;this.p=new ZH(e-r,1,n),0!=this.p.subtract(ZH.ONE).gcd(i).compareTo(ZH.ONE)||!this.p.isProbablePrime(10););for(;this.q=new ZH(r,1,n),0!=this.q.subtract(ZH.ONE).gcd(i).compareTo(ZH.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var o=this.p.subtract(ZH.ONE),l=this.q.subtract(ZH.ONE),s=o.multiply(l);if(0==s.gcd(i).compareTo(ZH.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=DH(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var a=255&n[r];a<128?i+=String.fromCharCode(a):a>191&&a<224?(i+=String.fromCharCode((31&a)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&a)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new ex,i=e>>1;this.e=parseInt(t,16);var a=new ZH(t,16),o=this,l=function(){var t=function(){if(o.p.compareTo(o.q)<=0){var e=o.p;o.p=o.q,o.q=e}var t=o.p.subtract(ZH.ONE),r=o.q.subtract(ZH.ONE),i=t.multiply(r);0==i.gcd(a).compareTo(ZH.ONE)?(o.n=o.p.multiply(o.q),o.d=a.modInverse(i),o.dmp1=o.d.mod(t),o.dmq1=o.d.mod(r),o.coeff=o.q.modInverse(o.p),setTimeout(function(){n()},0)):setTimeout(l,0)},s=function(){o.q=TH(),o.q.fromNumberAsync(i,1,r,function(){o.q.subtract(ZH.ONE).gcda(a,function(e){0==e.compareTo(ZH.ONE)&&o.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(s,0)})})},c=function(){o.p=TH(),o.p.fromNumberAsync(e-i,1,r,function(){o.p.subtract(ZH.ONE).gcda(a,function(e){0==e.compareTo(ZH.ONE)&&o.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(l,0)},e.prototype.sign=function(e,t,n){var r=(Ax[n]||"")+t(e).toString(),i=this.n.bitLength()/4,a=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return DH("0001"+r+"00"+e,16)}(r,i);if(null==a)return null;var o=this.doPrivate(a);if(null==o)return null;for(var l=o.toString(16),s=l.length,c=0;c<i-s;c++)l="0"+l;return l},e.prototype.verify=function(e,t,n){var r=DH(t,16),i=this.doPublic(r);return null==i?null:function(e){for(var t in Ax)if(Ax.hasOwnProperty(t)){var n=Ax[t],r=n.length;if(e.substring(0,r)==n)return e.substring(r)}return e}(i.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var Ax={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function gx(e,t,n){if(!t||!e)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}
28
+ */function wy(){return gy||(gy=1,e=yy,"production"!==process.env.NODE_ENV&&function(){function t(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var a=r-1>>>1,o=e[a];if(!(i(o,t)>0))return;e[a]=t,e[r]=o,r=a}}(e,t,n)}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,a=e.length,o=a>>>1;r<o;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(i(s,t)<0)c<a&&i(d,s)<0?(e[r]=d,e[c]=t,r=c):(e[r]=s,e[l]=t,r=l);else{if(!(c<a&&i(d,t)<0))return;e[r]=d,e[c]=t,r=c}}}(e,n,0)),t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error),"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,C=!1,p=!1,m="function"==typeof setTimeout?setTimeout:null,A="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function v(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))return;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function y(e){if(p=!1,v(e),!C)if(null!==n(s))C=!0,O(w);else{var t=n(c);null!==t&&z(y,t.startTime-e)}}function w(t,i){C=!1,p&&(p=!1,N()),h=!0;var a=f;try{return function(t,i){var a=i;for(v(a),u=n(s);null!==u&&(!(u.expirationTime>a)||t&&!x());){var o=u.callback;if("function"==typeof o){u.callback=null,f=u.priorityLevel;var l=o(u.expirationTime<=a);a=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),v(a)}else r(s);u=n(s)}if(null!==u)return!0;var d=n(c);return null!==d&&z(y,d.startTime-a),!1}(t,i)}finally{u=null,f=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b=!1,E=null,M=-1,L=5,H=-1;function x(){return!(e.unstable_now()-H<L)}var V,k=function(){if(null!==E){var t=e.unstable_now();H=t;var n=!0;try{n=E(!0,t)}finally{n?V():(b=!1,E=null)}}else b=!1};if("function"==typeof g)V=function(){g(k)};else if("undefined"!=typeof MessageChannel){var S=new MessageChannel,Z=S.port2;S.port1.onmessage=k,V=function(){Z.postMessage(null)}}else V=function(){m(k,0)};function O(e){E=e,b||(b=!0,V())}function z(t,n){M=m(function(){t(e.unstable_now())},n)}function N(){A(M),M=-1}var I=function(){};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){C||h||(C=!0,O(w))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){var t;switch(f){case 1:case 2:case 3:t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=I,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o,l,u=e.unstable_now();if("object"==typeof a&&null!==a){var f=a.delay;o="number"==typeof f&&f>0?u+f:u}else o=u;switch(r){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}var m=o+l,A={id:d++,callback:i,priorityLevel:r,startTime:o,expirationTime:m,sortIndex:-1};return o>u?(A.sortIndex=o,t(c,A),null===n(s)&&A===n(c)&&(p?N():p=!0,z(y,o-u))):(A.sortIndex=m,t(s,A),C||h||(C=!0,O(w))),A},e.unstable_shouldYield=x,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yy;var e}var by=(vy||(vy=1,"production"===process.env.NODE_ENV?my.exports=(py||(py=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,o=a>>>1;r<o;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(0>i(s,n))c<a&&0>i(d,s)?(e[r]=d,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<a&&0>i(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,C=!1,p=!1,m="function"==typeof setTimeout?setTimeout:null,A="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function v(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function y(e){if(p=!1,v(e),!C)if(null!==n(s))C=!0,O(w);else{var t=n(c);null!==t&&z(y,t.startTime-e)}}function w(t,i){C=!1,p&&(p=!1,A(L),L=-1),h=!0;var a=f;try{for(v(i),u=n(s);null!==u&&(!(u.expirationTime>i)||t&&!V());){var o=u.callback;if("function"==typeof o){u.callback=null,f=u.priorityLevel;var l=o(u.expirationTime<=i);i=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),v(i)}else r(s);u=n(s)}if(null!==u)var d=!0;else{var m=n(c);null!==m&&z(y,m.startTime-i),d=!1}return d}finally{u=null,f=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b,E=!1,M=null,L=-1,H=5,x=-1;function V(){return!(e.unstable_now()-x<H)}function k(){if(null!==M){var t=e.unstable_now();x=t;var n=!0;try{n=M(!0,t)}finally{n?b():(E=!1,M=null)}}else E=!1}if("function"==typeof g)b=function(){g(k)};else if("undefined"!=typeof MessageChannel){var S=new MessageChannel,Z=S.port2;S.port1.onmessage=k,b=function(){Z.postMessage(null)}}else b=function(){m(k,0)};function O(e){M=e,E||(E=!0,b())}function z(t,n){L=m(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){C||h||(C=!0,O(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:d++,callback:i,priorityLevel:r,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>o?(r.sortIndex=a,t(c,r),null===n(s)&&r===n(c)&&(p?(A(L),L=-1):p=!0,z(y,a-o))):(r.sortIndex=l,t(s,r),C||h||(C=!0,O(w))),r},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Ay)),Ay):my.exports=wy()),my.exports);const Ey=Symbol(),My=Symbol(),Ly="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,Hy=by.unstable_runWithPriority?e=>{try{by.unstable_runWithPriority(by.unstable_NormalPriority,e)}catch(t){if("Not implemented."!==t.message)throw t;e()}}:e=>e();function xy(e,t){const n=d(e)[Ey];if("object"==typeof process&&"production"!==process.env.NODE_ENV&&!n)throw new Error("useContextSelector requires special context");const{v:{current:r},n:{current:i},l:a}=n,o=t(r),[l,s]=v((e,n)=>{if(!n)return[r,o];if("p"in n)throw n.p;if(n.n===i)return Object.is(e[1],o)?e:[r,o];try{if("v"in n){if(Object.is(e[0],n.v))return e;const r=t(n.v);return Object.is(e[1],r)?e:[n.v,r]}}catch(e){}return[...e]},[r,o]);return Object.is(l[1],o)||s(),Ly(()=>(a.add(s),()=>{a.delete(s)}),[a]),l[1]}const Vy=function(e){const t=s({[Ey]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[My]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=o(e),i=o(0),[a,l]=c(null);a&&(a(e),l(null));const s=o();if(!s.current){const e=new Set,t=(t,n)=>{i.current+=1;const r={n:i.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{l(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()};s.current={[Ey]:{v:r,n:i,l:e,u:t}}}return Ly(()=>{r.current=e,i.current+=1,Hy(()=>{s.current[Ey].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),m(n,{value:s.current},t)}),delete t.Consumer,t}([hy,()=>{}]),ky=({children:t,useTableRef:n,totalWidth:r})=>{const i=o(null);return l(()=>{n&&i.current&&n(i)},[n]),e("table",{className:"ff-spreadsheet-table",ref:i,style:{minWidth:`${60+r}px`,tableLayout:"fixed"},children:t})},Sy=t=>e("tr",{...t}),Zy=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function Oy(){return xy(Vy,([,e])=>e)}function zy(e){return xy(Vy,([t])=>e(t))}const Ny=({selected:t,onSelect:n})=>{const i=r.useCallback(()=>{n()},[n]);return e("th",{className:"ff-spreadsheet-corner-header",onClick:i,tabIndex:0,children:e("div",{className:I("corner-header",{"ff-spreadsheet-header--selected":t}),children:e(q,{variant:t?"dark":"light",color:t?"var(--hover-color)":"var(--text-color)",name:"excel_corner_menu"})})})},Iy=t=>function(n){const i=Oy(),a=r.useCallback(()=>i({type:wA}),[i]),o=zy(e=>e.selected instanceof ov);return e(t,{...n,selected:o,onSelect:a})},Ty=t=>function(n){const i=Oy(),a=r.useCallback((e,t)=>i(function(e,t){return{type:yA,payload:{column:e,extend:t}}}(e,t)),[i]),o=zy(e=>e.selected.hasEntireColumn(n.column)),l=zy(e=>e.selectedColumn??void 0),s=zy(e=>e.active?jg(e.active,e.model.data):void 0);return e(t,{...n,cell:s,selected:o,selectedColumn:l,onSelect:a,scrollToColumn:n.scrollToColumn})},Dy=Ty(({column:t,label:i,selected:a,onSelect:o,setContextMenu:l,deleteColumn:s,addColumnLeft:c,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:h,minimumColumnWidth:p,maxColLimit:m,disableDeleteOption:A,contextMenu:g,onAddColumn:v,onDeleteColumn:y,setVisibleRange:w,scrollToColumn:b})=>{const E=Oy(),M=zy(e=>e.model.data),L=zy(e=>e.columnDimensions[t]?.width??p),H=zy(e=>e.model.data),{columnCount:x}=Iv(H),V=e=>{w(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return h&&b(h),n})},k=C(()=>[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{V("increment"),c(p),v?.(h??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:x>=m},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{V("increment"),d(p),v?.(h??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:x>=m},...A?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{V("decrement"),s(),y?.(h??t)},disableTooltip:"",visible:f?.contextDisable?.["Delete Column"]??!1,disable:!1}]],[h,t,M]),S=r.useCallback((e,n)=>{const r=n?t-1:t,i=Math.max(r,0);o(i,e.shiftKey);const a=e.clientX,l=Number(L),s=e=>{const t=e.clientX-a,n=Math.max(p,l+t);E(function(e,t){return{type:tg,payload:{column:e,width:t}}}(i,n))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),E(Dg())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),E(Tg())},[t,L]),Z=r.useCallback(e=>E(Zg(e)),[E]),O=r.useCallback(e=>{o(t,e.shiftKey)},[o,t]),z=r.useCallback(e=>{e.preventDefault(),o(t,e.shiftKey),l({open:u,contextType:"column",options:k})},[t,h,u,k]);return r.useEffect(()=>{void 0!==h&&"column"===g?.contextType&&l(e=>({open:e.open,contextType:"column",options:k}))},[t,h,u,k,"column"===g?.contextType]),n("th",{className:I("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":a}),style:{width:`${L}px`,minWidth:"100px"},onClick:O,onContextMenu:z,tabIndex:0,children:[e(U,{fontWeight:"medium",children:i??Fy(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>S(e,!1),onDoubleClick:()=>E(dg(t,L)),onClick:()=>Z({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>S(e,!0),onDoubleClick:()=>E(dg(t,L)),onClick:()=>Z({row:-1,column:t})})]},t)});function Fy(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const Ry=({row:t,label:i,selected:a,onSelect:o,setContextMenu:l,addRowTop:s,addRowBottom:c,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:C,disableDeleteOption:p,contextMenu:m,setVisibleRange:A,scrollToRow:g})=>{const v=Oy(),y=zy(e=>e.rowDimensions[t]?.height||32),w=zy(e=>e.model.data),{rowCount:b}=Iv(w),E=e=>{A(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return f&&g(f),n})},M=r.useMemo(()=>[{label:"Add Row Top",value:"Add Row Top",iconName:"plus_icon",action:()=>{E("increment"),s()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Top"]??!1,disable:b>=C},{label:"Add Row Bottom",value:"Add Row Bottom",iconName:"plus_icon",action:()=>{E("increment"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:b>=C},...p?[]:[{label:"Delete Row",value:"Delete Row",iconName:"delete",action:()=>{E("decrement"),d()},disableTooltip:"",visible:h?.contextDisable?.["Delete Row"]??!1,disable:!1}]],[f,t]),L=r.useCallback((e,n)=>{const r=n?t:t-1,i=Math.max(r,0);o(i,e.shiftKey);const a=e.clientY,l=y,s=e=>{const t=e.clientY-a,n=Math.max(32,l+t);v(cg(i,n))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),v(Dg())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c)},[y,t]),H=r.useCallback(e=>v(Zg(e)),[v]),x=r.useCallback(e=>{o(t,e.shiftKey)},[t]),V=r.useCallback(e=>{e.preventDefault(),o(t,e.shiftKey),l({open:u,contextType:"row",options:M})},[t,u,M,f]);return r.useEffect(()=>{void 0!==f&&"row"===m?.contextType&&l(e=>({open:e.open,contextType:"row",options:M}))},[t,u,M,f,"row"===m?.contextType]),n("th",{className:I("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":a}),style:{height:`${y}px`,minHeight:"32px"},onClick:x,onContextMenu:V,tabIndex:0,children:[e(U,{fontWeight:"medium",children:void 0!==i?i:t+1}),e("div",{className:"drag-row-selector drag-row-down",onMouseDown:e=>L(e,!0),onDoubleClick:()=>v(cg(t,y)),onClick:()=>H({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>L(e,!1),onDoubleClick:()=>v(cg(t,y)),onClick:()=>H({row:t,column:-1})})]})},Py=t=>function(n){const i=Oy(),a=zy(e=>e.selected.hasEntireRow(n.row)),o=zy(e=>e.active?jg(e.active,e.model.data):void 0),l=zy(e=>e.selectedRow??void 0),s=r.useCallback((e,t)=>i(function(e,t){return{type:vA,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:a,cell:o,selectedRow:l,onSelect:s,scrollToRow:n.scrollToRow})},By=r.memo(({row:t,column:n,DataViewer:i,active:a,dragging:o,mode:l,data:s,evaluatedData:c,select:d,activate:u,edit:f,editable:h,setCellDimensions:C,setCellData:p})=>{const m=r.useRef(null),A=r.useMemo(()=>({row:t,column:n}),[t,n]),g=r.useCallback(e=>{e.preventDefault(),window.getSelection()?.removeAllRanges(),"view"===l&&(C(A,mv(e.currentTarget)),e.shiftKey?d(A):(u(A),"dropDown"===s?.inputType?.type&&h&&!s?.readOnly&&f()))},[l,C,A,d,u,f,h,s]),v=r.useCallback(e=>{o&&(C(A,mv(e.currentTarget)),d(A))},[C,d,o,A]);return r.useEffect(()=>{const e=m.current;if(!e)return;const t=()=>{o||C(A,mv(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[C,A,o]),s&&s.DataViewer&&(i=s.DataViewer),e("td",{ref:m,style:{...s?.style,..."dropDown"===s?.inputType?.type&&{fontSize:"12px"},textDecoration:"underline"===s?.style?.textDecoration?s?.style?.textDecoration:"none"},className:I("ff-spreadsheet-cell",s?.className,{"ff-spreadsheet-active-cell":a||o}),onMouseEnter:v,onMouseDown:g,tabIndex:0,children:e(i,{row:t,column:n,cell:s,active:a,evaluatedCell:c,setCellData:p,inputValue:()=>null})})}),jy=t=>function(n){const{row:i,column:a}=n,o=Oy(),l=r.useMemo(()=>({row:i,column:a}),[i,a]),s=r.useCallback(e=>o(Og(l,e)),[o,l]),c=r.useCallback(e=>o(function(e){return{type:EA,payload:{point:e}}}(e)),[o]),d=r.useCallback(e=>o(Zg(e)),[o]),u=r.useCallback(()=>o(Pg()),[o]),f=r.useCallback((e,t)=>o(zg(e,t)),[o]),h=zy(e=>pv(e.active,l)),C=zy(e=>h?e.mode:"view"),p=zy(e=>e.editable),m=zy(e=>jg(l,e.model.data)),A=zy(e=>jg(l,e.model.evaluatedData)),g=zy(e=>e.dragging),v=zy(e=>e.copied?.has(l)||!1);return e(t,{...n,active:h,copied:v,dragging:g,mode:C,evaluatedData:A,data:m,select:c,activate:d,edit:u,editable:p,setCellDimensions:f,setCellData:s})},_y=({cell:r,evaluatedCell:i,active:a})=>{const o=function(e,t){const n=t?.value??e?.value;if(n&&"object"==typeof n)return n.toString();return n}(r,i);return e("span","boolean"==typeof o?{className:"ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean",children:qy(o)}:{className:I("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":Vv(o)}),children:a||"dropDown"!==r?.inputType?.type?a||"file"!==r?.inputType?.type?!a&&o:e(t,{children:K(r?.value)?n("div",{className:"ff-spreadsheet-data-viewer--without-fileType",children:[e(q,{name:"attachment_icon"})," Attachment"]}):(n=>{if(K(n))return e(t,{});return JSON.parse(n).map(t=>e("div",{className:"ff-spreadsheet-data-viewer--fileType",children:e(zi,{width:r?.style?.width??100,title:t?.name?.split("*")?.[0]??""})},t.name))})(o)}):n("div",{className:"ff-spreadsheet-data-viewer--dropdownType",children:[o,e(q,{name:"arrow_down",height:8,className:"dropdownType-icon"})]})})};function qy(e){return e?"TRUE":"FALSE"}const Uy=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:a={}},s)=>{const c=o(null);i.useImperativeHandle(s,()=>c.current),l(()=>{if(c.current&&document.activeElement!==c.current){const e=String(t)?.endsWith("\n")?`${t}\n`:t;e!==c.current.innerText&&(c.current.innerText=e)}},[t]);return e("div",{style:a,children:e("div",{ref:c,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),void document.execCommand("insertLineBreak");c.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:()=>{if(c.current){let e=c.current.innerText;e.endsWith("\n")&&(e=e.slice(0,-1)),n?.(e)}},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)},spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{outline:"none",transition:"border 0.2s",whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"inherit",fontSize:"inherit",lineHeight:"normal",minHeight:"24px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),Wy=({onChange:t,cell:n})=>{const i=r.useRef(null),a=r.useCallback(e=>{const{contextDisable:r,...i}=n;t({...i,value:e,inputType:i.inputType??{type:"text"}})},[t,n]);r.useEffect(()=>{i.current&&function(e){if(e)if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.selectionStart=e.selectionEnd=e.value.length;else if(e.isContentEditable){const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)}}(i.current)},[]);return e("div",{className:"ff-spreadsheet-data-editor",children:e(Uy,{ref:i,initialValue:n?.value??"",onChange:a,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,width:"100%",height:"100%",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},Xy=t=>{const i=r.useRef(null),a=r.useRef(null),o=Oy(),l=r.useCallback((e,t)=>o(Og(e,t)),[o]),s=r.useCallback(e=>o(Zg(e)),[o]),c=r.useCallback(()=>o(Pg()),[o]),d=r.useCallback(e=>o({type:rg,payload:{autofill:e}}),[o]),u=r.useCallback(e=>o(function(e){return{type:DA,payload:{changes:e}}}(e)),[o]),f=r.useCallback(()=>{o({type:ZA})},[o]),h=zy(e=>e.rowDimensions),C=zy(e=>e.active),p=zy(e=>e.mode),m=zy(e=>e.active?jg(e.active,e.model.data):void 0),A=zy(e=>e.selected),g=zy(e=>A&&Mv(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),v=zy(e=>{let t=C?bv(C,e.rowDimensions,e.columnDimensions):void 0;return t={top:t?.top?t?.top:0,height:t?.height?t?.height:0,left:t?.left?t?.left:0,width:t?.width?t?.width:0},t}),y=r.useMemo(()=>!C||!v||C.row<t.visibleRowRange.start||C.row>=t.visibleRowRange.end||C.column<t.visibleColRange.start||C.column>=t.visibleColRange.end,[C,v,t.visibleRowRange,t.visibleColRange]),w=r.useRef(void 0),b=r.useRef(null),E=r.useRef(void 0),M=r.useCallback(e=>{C&&l(C,e)},[l,C]),[L,H]=r.useState({value:"",name:""}),[x,V]=r.useState(!1),[k,S]=r.useState(),[Z,O]=r.useState([]),[z,N]=r.useState("var(--ff-select-text-color)");r.useEffect(()=>{m&&C&&t.getActiveCell({value:m.value,active:C});const n=i.current;if(!y&&n&&(n.focus({preventScroll:!0}),"dropDown"===m?.inputType?.type)){H({value:m?.value,name:m?.value}),N(m?.style?.color),V(e=>!e);const t=m?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value,color:t.color}));S(t)}},[i,y,C?.row,C?.column]),r.useEffect(()=>{if("file"===m?.inputType?.type&&m?.value)try{const e=JSON.parse(m.value).map(e=>new File([new Blob],e.name.split("*")[0]??"default"));O(e)}catch(e){console.error("Error parsing cell value for files:",e),O([])}else O([])},[m?.inputType?.type,m?.value]),r.useEffect(()=>{"dropDown"===m?.inputType?.type&&m?.value!==L.value&&H({value:m?.value,name:m?.value})},[m?.value,m?.inputType?.type,L.value]),r.useEffect(()=>{const e=b.current,t=E.current;if(b.current=C,E.current=m,!e||!t)return;const n=C?.row!==e.row||C?.column!==e.column;if(n||"edit"!==p){const e=w.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||m===t||u([{prevCell:t,nextCell:m||null}]),w.current=m}});const T=m&&m.DataEditor||t.DataEditor,D=m&&m.readOnly,F=r.useCallback(e=>{if(!C)return;const t=e.currentTarget.closest(".ff-excel-spreadsheet");if(!t)return void e.preventDefault();e.stopPropagation();const n=document.body.style.userSelect,r=document.body.style.overflow;document.body.style.userSelect="none",document.body.style.overflow="hidden";let i=null;const a=()=>{i&&(cancelAnimationFrame(i),i=null)},o=e=>{const n=t.getBoundingClientRect();let r=0,o=0;e.clientY<n.top+50?o=-12:e.clientY>n.bottom-50&&(o=12),e.clientX<n.left+50?r=-12:e.clientX>n.right-50&&(r=12),0!==r||0!==o?(e=>{a();const n=()=>{const{x:r,y:a}=e;0!==r&&(t.scrollLeft+=r),0!==a&&(t.scrollTop+=a),i=requestAnimationFrame(n)};i=requestAnimationFrame(n)})({x:r,y:o}):a()},l=()=>{a(),document.body.style.userSelect=n,document.body.style.overflow=r,document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l),d(!0)},[s,d,C]),R=r.useCallback(e=>{e.preventDefault(),t.setContextMenu({open:t.contextOption?.open??!1,contextType:t.contextOption?.contextType??null,options:t.contextOption?.options||[]})},[t]),P=g?.height!==v?.height||g?.width!==v?.width,B=r.useCallback(e=>{C&&P&&(zg(C,mv(e.currentTarget)),s(C))},[C,P]),j=t.isAtRight?t.maxWidth-(v?.left-t.scrollPos.left)+100:t.maxWidth,_=t.isAtBottom?t.maxHeight-(v?.top-t.scrollPos.top)+64:t.maxHeight,q=["file","dropDown"].includes(m?.inputType?.type||""),U="dropDown"===m?.inputType?.type;return n("div",{ref:i,className:I("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${p}`,{"ff-spreadsheet-active-cell--hidden":y,"ff-spreadsheet-active-cell--dragging":P&&"text"!==m?.inputType?.type}),onMouseDown:B,style:{...v,backgroundColor:m?.style?.backgroundColor,...q?{display:"flex",alignItems:U?"center":m?.style?.alignContent,justifyContent:U?"flex-start":m?.style?.textAlign}:{},..."edit"===p&&C?{minWidth:Math.min(v?.width,t.maxWidth),minHeight:Math.min(v?.height,t.maxHeight),height:"auto",maxWidth:`${j}px`,maxHeight:`${_}px`,overflow:"auto",..."dropDown"===m?.inputType?.type?{}:{padding:"2px 4px 0px 4px",width:"max-content"}}:{}},onContextMenu:R,onClick:"view"!==p||D?void 0:c,tabIndex:0,children:[e("div",{className:q?"":"active-cell-main",style:U?{width:"100%"}:void 0,children:"dropDown"===m?.inputType?.type?e(Za,{...m?.inputType?.inputProps,dropDownRef:a,showOptions:{open:!("edit"!==p||!C),toggle:x},selectedOption:L,optionsList:k||[],height:26,showLabel:!1,disabled:!t.editable,showBorder:!1,selectedOptionColor:z,optionZIndex:5e3,onChange:e=>{const t=K(e.color)?m?.style:{...m?.style,color:e.color};H({value:e.value,name:e.label}),N(e.color||"var(--ff-select-text-color)"),M({...m,value:e.value,style:t,inputType:m?.inputType})}}):"file"===m?.inputType?.type?e(rA,{...m?.inputType?.inputProps,label:"",onFileListClick:e=>{const n=e.target.closest(".ff-attachment-files"),r=e.target.closest(".ff-icon-container, .ff-icon-click, .ff-icon-danger");if(n&&!r&&m?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(m.value),r=n.parentElement?.querySelectorAll(".ff-attachment-files")||[],i=Array.from(r).indexOf(n);if(-1===i||!e[i])return void console.error("File index not found or invalid");const a=e[i];t.attachmentAction.viewAttachment(a.id,a.name?.split("*")[0]??"default")}catch(e){console.error("Error parsing cell value:",e)}else console.warn("Missing file element, icon click, cell value, or viewAttachment action")},selectedFiles:Z,onFilesChange:async(e,n,r)=>{try{if("ADD"===r&&"file"===m?.inputType?.type){let n=[];try{m?.value&&(n=JSON.parse(m.value))}catch(e){console.error("Error parsing cell.value:",e)}let r=0;const i=e.filter((e,t,i)=>{const a=e.name.split("*")[0],o=i.findIndex(e=>e.name.split("*")[0]===a)!==t,l=n.some(e=>e.name.split("*")[0]===a);return!o&&!l||(r++,!1)});if(n.length+i.length>5)return void dc.info("Cannot upload more than 5 files.");if(t.attachmentAction?.addAttachment&&i.length>0)try{let e=0,r=0,a=0;const l=Z?.length+i?.length,s=l>0?25*l:1,c=[...n],d=i?.map(async e=>{try{if(e.name.includes("*"))return{file:e,status:"existing",data:{name:e.name}};const n=await(t?.attachmentAction?.addAttachment(e));if(!n||"string"==typeof n&&0===n.trim().length)return{file:e,status:"failed",reason:"no response"};if("string"==typeof n)try{const t=JSON.parse(n);return 507===t.responseCode?{file:e,status:"memory_full",reason:"no memory"}:400===t.responseCode?{file:e,status:"failed",reason:"invalid file"}:t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,t),{file:e,status:"failed",reason:"invalid response"})}catch(t){return console.error(`Parse error for ${e.name}:`,t),{file:e,status:"failed",reason:"parse error"}}if("object"==typeof n&&null!==n){const t=n;return t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,n),{file:e,status:"failed",reason:"invalid response"})}return console.error(`Unknown response for ${e.name}:`,n),{file:e,status:"failed",reason:"unknown"}}catch(t){return console.error(`Upload failed for ${e.name}:`,t),{file:e,status:"failed",reason:"upload error"}}});if((await Promise.allSettled(d)).forEach(t=>{if("fulfilled"===t.status&&t.value){const{status:n,data:i}=t.value;"success"===n&&i?.id&&i?.name?(c.push(i),e++):"existing"===n&&i?.name?c.push(i):"memory_full"===n?a++:r++}else r++}),e>0||c.length>n.length){const e=c.length>0?JSON.stringify(c):"";M({...m,value:e,style:m?.style,inputType:m?.inputType}),o(cg(C?.row||0,Math.max(s,h?.[C.row]?.height||s))),O(c.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}a>0&&dc.info("No memory available to add the file"),e>0&&dc.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&dc.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),dc.error("Operation failed")}}else if("DELETE"===r&&"file"===m?.inputType?.type)try{let e=[...m&&JSON.parse(m.value)],r=0;for(const i of n||[]){const n=e.findIndex(e=>e.name.split("*")[0]===i.name.split("*")[0]),a=e[n]?.id;if(-1!==n&&a&&t.attachmentAction?.deleteAttachment)try{const o=await t.attachmentAction.deleteAttachment(a);"SUCCESS"===o||"object"==typeof o&&null!==o&&("status"in o&&"SUCCESS"===o.status||"responseCode"in o&&200===o.responseCode)?(e.splice(n,1),r++):console.error(`Delete failed for ${i.name}: Invalid response`,o)}catch(e){console.error(`Delete error for ${i.name}:`,e),dc.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:a,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),dc.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";M({...m,value:t,style:m?.style,inputType:m?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),dc.success(`${r} file${r>1?"s":""} deleted successfully`)}else if(n?.length){const t=e?.filter(e=>e.id&&e.name);if(t.length<e.length){const e=t.length>0?JSON.stringify(t):"";M({...m,value:e,style:m?.style,inputType:m?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),dc.error("Failed to delete file(s). Invalid file data detected.")}else dc.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),dc.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),dc.error("Operation failed")}},disabled:!t.editable,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:t.editable,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:t.editable,isInfoIconRequired:!1,truncateMaxLimit:(v?.width??0)-60}):"edit"===p&&C&&t.editable?e(T,{row:C.row,column:C.column,cell:m,onChange:M,exitEditMode:f}):e(Uy,{initialValue:m?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...m?.style,height:"100%",width:"100%",textDecoration:"underline"===m?.style?.textDecoration?"underline":"none",backgroundColor:P?"#1e161f00":m?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(m?.inputType?.type??"")&&("edit"===p||C&&e("div",{onMouseDown:F,className:"select_dot"}))]},`${C?.row}-${C?.column}`)},Qy=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const a=zy(e=>e.active),o=zy(e=>e.autoFill),l=zy(e=>a?bv(a,e.rowDimensions,e.columnDimensions):void 0),{width:s,height:c,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,C=s,p=c;return o.open&&s&&c&&l&&(s-h>c-f?(C=s,p=l.height):(p=c,C=l.width)),e("div",{className:I("ff-spreadsheet-floating-rect",{[`ff-spreadsheet-floating-rect--${i}`]:i,"ff-spreadsheet-floating-rect--dragging":n,"ff-spreadsheet-floating-rect--hidden":r}),style:{width:(C??0)+1,height:(p??0)+1,top:d,left:u}})},Gy=({scrollPos:t={top:0,left:0}})=>{const n=zy(e=>e.selected),i=zy(e=>e.dragging),a=zy(e=>e.selected.size(e.model.data)<2),o=zy(e=>n&&Mv(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(o)return{...o,top:o.top-1,left:o.left-1,height:o.height-1,width:o.width-1}},[o,t]);return e(Qy,{variant:"selected",dimensions:l,dragging:i,hidden:a||!o})},Ky=({scrollPos:t={top:0,left:0}})=>{const n=zy(e=>e.copied),i=null===n,a=zy(e=>n&&Ev(e.rowDimensions,e.columnDimensions,n)),o=r.useMemo(()=>{if(a)return{...a,top:a.top-1,left:a.left-1,height:a.height-1,width:a.width-1}},[a,t]);return e(Qy,{variant:"copied",dimensions:o,hidden:i||!a,dragging:!1})},Yy=i.forwardRef(({getColorValue:t,disabled:n,initialColor:r},a)=>{const l=o(null);i.useImperativeHandle(a,()=>l.current);const[s,d]=c(r);return e("div",{className:I("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:s},onClick:()=>{l.current&&!n&&l.current.click()},"aria-label":"Select color"+(n?"":`, current color ${s}`),"aria-disabled":n,children:e("input",{type:"color",disabled:n,className:I("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:l,"aria-label":"Color picker",onChange:e=>{d(e.target.value),t(e.target.value.replace("#",""))}})})});Yy.displayName="ColorBarSelector";const Jy=e=>{switch(e.toUpperCase()){case"LEFT":default:return"left";case"RIGHT":return"right";case"CENTER":return"center";case"JUSTIFY":return"justify";case"BOTTOM":return"end";case"TOP":return"start"}},$y=e=>{switch(e){case"left":return"LEFT";case"right":return"RIGHT";case"center":return"CENTER";case"justify":return"JUSTIFY";case"end":default:return"BOTTOM";case"start":return"TOP"}},ew=e=>zv.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function tw(e,t=100){const{border:n}=e;let r="",i="",a="",o="";return"THIN"!==n.top&&(r="MEDIUM"===n.top?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.right&&(i="MEDIUM"===n.right?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.bottom&&(a="MEDIUM"===n.bottom?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==n.left&&(o="MEDIUM"===n.left?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),{fontSize:kv(ew(String(e.size))),fontFamily:(l=e.name,Ov.some(e=>e.label===l)?l:"Poppins"),color:`#${e.color}`,backgroundColor:`#${e.backgroundColor}`,fontWeight:e.bold?"bold":"normal",fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":"normal",borderTop:r,borderRight:i,borderBottom:a,borderLeft:o,textAlign:Jy(e.alignment.horizontal),alignContent:Jy(e.alignment.vertical),height:e.height??32,width:e.width??t};var l}const nw=e=>{if(!e||"none"===e)return"THIN";if(e.includes("solid")||e.includes("dashed")||e.includes("dotted")){if(e.includes("2px")||e.includes("medium"))return"MEDIUM";if(e.includes("3px")||e.includes("medium"))return"THICK"}return"THIN"},rw=(e,t=100)=>({name:e.fontFamily||"Arial",size:Sv(e.fontSize?.toString()||"12"),bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,underline:"underline"===e.textDecoration,color:e.color?.replace("#","")||"000000",backgroundColor:e.backgroundColor?.replace("#","")||"FFFFFF",borderColor:"F2F2F2",border:{top:nw(e.borderTop?e.borderTop.toString():void 0),right:nw(e.borderRight?e.borderRight.toString():void 0),bottom:nw(e.borderBottom?e.borderBottom.toString():void 0),left:nw(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:$y(e.textAlign),vertical:$y(e.alignContent),wrapText:!1},width:e.width||t,height:e.height||32}),iw=({toolbar:t="show",editable:r,onBold:i,onItalic:a,setUnderlineType:s,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:C,setBorderType:p,setFormatePainter:m})=>{const A=zy(e=>e.selected instanceof ov),[g,v]=c("disable"===t||!r),y=zy(e=>e.active?jg(e.active,e.model.data):null),w=zy(e=>e.model.data),b=zy(e=>e.formattedStyle.open),E={...Zv.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[M,L]=c(y?.style||E),H=o(null);l(()=>{y?.style&&JSON.stringify(y.style)!==JSON.stringify(M)&&L(y?.style||E),A?v(!r):y&&"boolean"==typeof y.readOnly&&v(y.readOnly||"disable"===t||!r||"dropDown"===y?.inputType?.type)},[y,r]);const x=rw(M),[V,k]=c("border-none"),[S,Z]=c({label:"",value:""}),[O,z]=c({label:"",value:""}),[N,I]=c({color:E.color,backgroundColor:E.backgroundColor,borderColor:E.borderColor}),T=[{value:"border-all-sides",label:"All Border",icon:"all_borders"},{value:"border-bottom",label:"Border Bottom",icon:"border_bottom"},{value:"border-left",label:"Border Left",icon:"border_left"},{value:"border-right",label:"Border Right",icon:"border_right"},{value:"border-top",label:"Border Top",icon:"border_top"},{value:"border-none",label:"No Border",icon:"no_border"}],D=zv.map(e=>({label:e,value:e})),F=o(null),R=o(null);l(()=>{let e=setTimeout(()=>{d(w,N.color)},0);return()=>{clearTimeout(e)}},[N.color]),l(()=>{let e=setTimeout(()=>{C(w,N.backgroundColor)},0);return()=>{clearTimeout(e)}},[N.backgroundColor]);return l(()=>{const e=M.fontFamily,t=`${Sv(M.fontSize)}`;Z({label:e??"Times New Roman",value:e??"Times New Roman"}),z({label:t??"11",value:t??"11"})},[M]),n("div",{className:"ff-excel-toolbar",role:"toolbar","aria-label":"Excel formatting toolbar",children:[n("div",{className:"ff-excel-toolbar-font ","aria-label":"Font controls",children:[e("div",{className:"ff-excel-toolbar-font-family","aria-label":"Font family selector",children:e(Za,{disabled:g,height:24,tooltip:!0,showToolTip:!0,showLabel:!1,optionZIndex:2e3,onChange:e=>{Z({label:e.label,value:e.label}),f(w,e.value)},required:!1,optionsList:Ov,selectedOption:S})}),e("div",{className:"ff-excel-toolbar-font-size","aria-label":"Font size selector",children:e(Za,{disabled:g,height:24,showLabel:!1,optionZIndex:2e3,required:!1,onChange:e=>{z({label:e.label,value:e.value}),u(w,e.value)},optionsList:D,selectedOption:O})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon","aria-label":"Text alignment controls",children:[e(Y,{placement:"top",title:"Text Left",children:e(q,{disabled:g,variant:"left"===M.textAlign?"dark":"light",hoverEffect:"left"!==M.textAlign,onClick:()=>h(w,"left"),name:"text_align_left"})}),e(Y,{placement:"top",title:"Text Center",children:e(q,{disabled:g,variant:"center"===M.textAlign?"dark":"light",hoverEffect:"center"!==M.textAlign,onClick:()=>h(w,"center"),name:"text_align_center"})}),e(Y,{placement:"top",title:"Text Right",children:e(q,{disabled:g,variant:"right"===M.textAlign?"dark":"light",hoverEffect:"right"!==M.textAlign,onClick:()=>h(w,"right"),name:"text_align_right"})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-text","aria-label":"Text styling controls",children:[e(Y,{placement:"top",title:"Bold",children:e(q,{disabled:g,variant:x.bold?"dark":"light",hoverEffect:!x.bold,onClick:()=>i(w),name:"bold"})}),e(Y,{placement:"top",title:"Italic",children:e(q,{disabled:g,variant:x.italic?"dark":"light",hoverEffect:!x.italic,onClick:()=>a(w),name:"italic"})}),e(Y,{placement:"top",title:"Underline",children:e("div",{className:"ff-excel-toolbar-icon-underline",children:e(q,{disabled:g,variant:"underline"===M.textDecoration?"dark":"light",hoverEffect:"underline"!==M.textDecoration,onClick:()=>s(w),name:"underline"})})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon","aria-label":"Formatting tools",children:[e(Y,{placement:"top",title:"Format Painter",children:e(q,{disabled:g,variant:b?"dark":"light",hoverEffect:!b,onClick:()=>{m(w)},name:"formate_painter"})}),e(Y,{placement:"top",title:"Text Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(q,{disabled:g,hoverEffect:!0,width:12,height:10,onClick:()=>{d(w,N.color),F.current?.click()},name:"text_color"}),e(Yy,{ref:F,disabled:g,getColorValue:e=>{I(t=>({...t,color:e}))},initialColor:N.color})]})}),e(Y,{placement:"top",title:"Background Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(q,{disabled:g,hoverEffect:!0,width:12,height:10,onClick:()=>{C(w,N.backgroundColor),R.current?.click()},name:"fill_color"}),e(Yy,{ref:R,disabled:g,getColorValue:e=>{I(t=>({...t,backgroundColor:e}))},initialColor:N.backgroundColor})]})})]}),e("div",{className:"ff-excel-toolbar-divider"}),e("div",{className:"ff-excel-toolbar-menu","aria-label":"Border controls",children:n("div",{className:"ff-excel-toolbar-menu-option",children:[e(Y,{placement:"top",title:"Border Type",children:e(q,{hoverEffect:!0,disabled:g,onClick:()=>p(w,V,"var(--input-hover-border-color)"),name:(()=>{const e=T.find(e=>e.value===V);return e?e.icon:""})()})}),e("span",{ref:H,children:e(Da,{disabled:g,iconName:"arrow_down",targetRef:H,iconSize:12,zIndex:2e3,options:T,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;p(w,t,"var(--input-hover-border-color)"),k(t)}})})]})})]})},aw=(e,t)=>{let n,r=null;const i=function(...i){const a=this;null===r||Date.now()-r>=t?(e.apply(a,i),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(a,i),r=Date.now()},t-(Date.now()-r)))};return i.cancel=()=>{n&&clearTimeout(n),n=null,r=null},i},ow=r.forwardRef(function(t,i){const{className:a,columnLabels:o=[],rowLabels:l=[],toolbar:s,editable:c,onKeyDown:d,Table:u=ky,Row:f=Sy,sheetHeight:h,HeaderRow:C=Zy,DataEditor:p=Wy,DataViewer:m=_y,onSelect:A=()=>{},onActivate:g=()=>{},onEvaluatedDataChange:v=()=>{},contextOption:y,attachmentAction:w,workRef:b,minimumColumnWidth:E,setContextMenu:M,maxRowLimit:L,maxColLimit:H,disableDeleteOption:x,contextMenu:V,getActiveCell:k,onAddColumn:S,onDeleteColumn:Z}=t,O=32,z=E||100,N=r.useRef(!1),T=zy(e=>e.model.data),[D,F]=r.useState(!1),[R,P]=r.useState(0),[B,j]=r.useState(0),[_,q]=r.useState({top:0,left:0}),[U,W]=r.useState(!1),[X,Q]=r.useState(!1),G=r.useMemo(()=>{const e=t.createFormulaParser||Dv,n=new jv(e,t.data);let r={},i={};t.data.forEach((e,t)=>{let n=O;e.forEach(e=>{if(e){const t=parseFloat(String(e.style?.height).replace("px",""))||O;n=Math.max(n,t)}}),r[t]={top:0,height:n}});const a=t.data[0]?t.data[0].length:0;for(let e=0;e<a;e++){let n=z;t.data.forEach(t=>{const r=t[e];if(r){const e=parseFloat(String(r.style?.width).replace("px",""))||z;n=Math.max(n,e)}}),i[e]={left:0,width:n}}return F(e=>!e),{...hy,model:n,selected:t.selected||hy.selected,rowDimensions:r,columnDimensions:i}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(Cy,G),[Y,J]=K,$=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=Kg(e);return{rows:t?Math.max(i,t.length):i,columns:n?Math.max(r,n.length):r}}(Y.model.data,l,o),[Y.model.data,l,o]),[ee,te]=r.useState({start:0,end:Math.min(20,$.rows)}),[ne,re]=r.useState({start:0,end:Math.min(15,$.columns)}),ie=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.rowDimensions[n]?.height||O;return t},[Y.rowDimensions,O]),ae=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.columnDimensions[n]?.width||z;return t},[Y.columnDimensions,z]),oe=r.useRef(!0);r.useEffect(()=>{oe.current?oe.current=!1:J(function(e){return{type:ig,payload:{minimumColumnWidth:e}}}(E))},[E]);const le=ie($.rows),se=ae($.columns),ce=ie(ee.start),de=le-ie(ee.end),ue=ae(ne.start),fe=se-ae(ne.end),he=Y.mode,Ce=r.useRef(null),pe=e=>r.useCallback((...t)=>J(e(...t)),[e]),me=pe(sg),Ae=pe(Rg),ge=pe(Fg),ve=pe(Bg),ye=pe(Ng),we=pe(Ig),be=pe(xg),Ee=pe(Tg),Me=pe(Dg),Le=pe(Vg),He=pe(kg),xe=pe(Sg),Ve=pe(ug),ke=pe(fg),Se=pe(Cg),Ze=pe(Ag),Oe=pe(pg),ze=pe(mg),Ne=pe(hg),Ie=pe(gg),Te=pe(vg),De=pe(yg),Fe=pe(lg),Re=pe(wg),Pe=pe(bg),Be=pe(Eg),je=pe(Mg),_e=pe(Lg),qe=pe(Hg);r.useImperativeHandle(i,()=>({removeSelect:ve}));const Ue=r.useRef(Y.active);r.useEffect(()=>{if(Y.active!==Ue.current)if(Y.active)g(Y.active);else{const e=b.current;e&&xv(e)&&document.activeElement&&document.activeElement.blur()}Ue.current=Y.active},[g,Y.active]);const We=r.useRef(Y.model.evaluatedData);r.useEffect(()=>{Y?.model?.evaluatedData!==We?.current&&v(Y?.model?.evaluatedData),We.current=Y.model.evaluatedData},[Y?.model?.evaluatedData,v]);const Xe=r.useRef(Y.selected);r.useEffect(()=>{Y.selected.equals(Xe.current)||t.selected&&Y.selected.equals(t.selected)||A(Y.selected),Xe.current=Y.selected},[Y.selected,A,t.selected]);const Qe=r.useRef(t.selected);r.useEffect(()=>{t.selected&&Qe.current&&!t.selected.equals(Qe.current)&&xe(t.selected),Qe.current=t.selected},[t.selected,xe]);let Ge=r.useRef();r.useEffect(()=>{me(c),void 0!==Ge.current&&t.data!==Ge.current&&Le(t.data),Ge.current=t.data},[t.data,Le,c]);const Ke=r.useRef(t.createFormulaParser);r.useEffect(()=>{t.createFormulaParser!==Ke.current&&t.createFormulaParser&&He(t.createFormulaParser),Ke.current=t.createFormulaParser},[t.createFormulaParser,He]);const Ye=r.useCallback(e=>{const{model:t,selected:n}=Y,{data:r}=t,i=n.toRange(r);if(i){!function(e,t){e.clipboardData?.setData(hv,t)}(e,Lv(function(e,t,n){const r=[],i=t.column-e.column;for(let a=e.row;a<=t.row;a++){const o=a-e.row;r[o]=r[o]||Array(i);for(let i=e.column;i<=t.column;i++)r[o][i-e.column]=jg({row:a,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Je=r.useCallback(e=>{Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),Ye(e),Ae())},[he,Ye,Ae]),$e=r.useCallback(e=>{Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),Ye(e),ge())},[he,Ye,ge]),et=r.useCallback(e=>{if(Hv(Ce.current,he)&&(e.preventDefault(),e.stopPropagation(),e.clipboardData)){const t=function(e){return window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?e.clipboardData.getData(hv):""}(e);ye(t)}},[he,ye]),tt=r.useCallback(e=>{e.persist();const t=e.ctrlKey||e.metaKey,n=e.key.toLowerCase();t&&"b"===n?(e.preventDefault(),Ve(T)):t&&"i"===n?(e.preventDefault(),ke(T)):t&&"u"===n&&(e.preventDefault(),Se(T)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==sy(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),we(e))},[Y,d,we]),nt=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Fe(Y.active)},[Y]),rt=r.useCallback(()=>{Me(),document.removeEventListener("mouseup",rt)},[Me]),it=r.useCallback(e=>{Y.dragging||1!==e.buttons||"view"!==he||(Ee(),document.addEventListener("mouseup",rt))},[Y,Ee,rt,he]),at=r.useMemo(()=>jy(t.Cell||By),[t.Cell,D,c]),ot=r.useMemo(()=>Iy(t.CornerIndicator||Ny),[t.CornerIndicator,D]),lt=r.useMemo(()=>Py(t.RowIndicator||Ry),[t.RowIndicator,D]),st=r.useMemo(()=>Ty(t.ColumnIndicator||Dy),[t.ColumnIndicator,D]);r.useEffect(()=>(document.addEventListener("cut",Je),document.addEventListener("copy",$e),document.addEventListener("paste",et),()=>{document.removeEventListener("cut",Je),document.removeEventListener("copy",$e),document.removeEventListener("paste",et)}),[Je,$e,et]);const ct=e=>{const t=new ResizeObserver(e=>{const t=e[0];if(t&&Ce.current){const e=t.target;if(e){const{clientWidth:t,clientHeight:n}=e;j(Math.min(Ce.current.clientHeight,n)),P(Math.min(Ce.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},dt=r.useCallback(e=>{const t=e.target,{scrollTop:n,clientHeight:r,scrollLeft:i,clientWidth:a}=t;q({top:n,left:i});let o=0;for(;o<$.rows&&ie(o)<n;)o++;let l=o;for(;l<$.rows&&ie(l)<n+r;)l++;o=Math.max(0,o-10),l=Math.min($.rows,l+10),te({start:o,end:l});const s=l===$.rows;W(s);let c=0;for(;c<$.columns&&ae(c)<i;)c++;let d=c;for(;d<$.columns&&ae(d)<i+a;)d++;c=Math.max(0,c-10),d=Math.min($.columns,d+10),re({start:c,end:d});const u=d===$.columns;Q(u),V.open&&M({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},[$.rows,$.columns,ie,ae]),ut=r.useMemo(()=>aw(dt,16),[dt]),ft=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.rowDimensions?.[n]?.height||O;requestAnimationFrame(()=>{Ce.current&&e>=$.rows-1&&Ce?.current?.scrollTo({top:t+O,behavior:"smooth"})})})},ht=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.columnDimensions?.[n]?.width||z;requestAnimationFrame(()=>{Ce.current&&e>=$.columns-1&&Ce.current.scrollTo({left:t+60,behavior:"smooth"})})})};r.useEffect(()=>{N.current||(te({start:0,end:Math.min(20,$.rows)}),re({start:0,end:Math.min(15,$.columns)}))},[$.rows,$.columns,N.current]);const Ct=Cv(ee.end,ee.start),pt=Cv(ne.end,ne.start),mt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${ue}px`}},"left-spacer")," ",pt.map(t=>e("col",{style:{width:`${Y.columnDimensions[t]?.width||z}px`}},t)),e("col",{style:{width:`${fe}px`}},"right-spacer")," "]}),At=r.useMemo(()=>n(u,{useTableRef:ct,totalWidth:se,children:[mt,n("tbody",{children:[n(C,{children:[e(ot,{}),e("div",{className:"spacer left"}),pt.map(n=>e(st,{column:n,minimumColumnWidth:E,setContextMenu:t.setContextMenu,label:n in o?o[n]:void 0,deleteColumn:qe,addColumnLeft:Be,addColumnRight:je,columnContextEnable:t.columnContextEnable,maxColLimit:H,disableDeleteOption:x,contextMenu:V,onAddColumn:S,onDeleteColumn:Z,setVisibleRange:re,scrollToColumn:ht},n)),e("div",{className:"spacer right"})]}),e("tr",{style:{height:`${ce}px`}}),Ct.map(r=>n(f,{row:r,children:[e(lt,{label:r in l?l?.[r]:void 0,row:r,addRowTop:Re,addRowBottom:Pe,deleteRow:_e,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:L,disableDeleteOption:x,contextMenu:V,setVisibleRange:te,scrollToRow:ft},r),e("div",{className:"spacer left"}),pt.map(t=>e(at,{row:r,column:t,DataViewer:m},`${r}-${t}`)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${de}px`}})]})]}),[u,$.rows,$.columns,f,C,ot,o,st,l,lt,at,m,ee,ne,ce,de,ue,fe,Y.rowDimensions,Y.columnDimensions]),gt=r.useMemo(()=>e(Xy,{attachmentAction:w,contextOption:y,getActiveCell:k,setContextMenu:t.setContextMenu,DataEditor:p,visibleRowRange:ee,visibleColRange:ne,maxHeight:B-64,maxWidth:R-E,totalHeight:le,totalWidth:se,isAtBottom:U,isAtRight:X,scrollPos:_,editable:c},Y.active?`${Y.active.row}-${Y.active.column}`:"no-active"),[p,ee,ne,Y.active,B,R,le,se,U,X,c]),vt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${R}px`},className:I("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),e("div",{style:{height:`${B}px`},className:I("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),"hide"!==s&&e("div",{className:"ff-excel-toolbar-container",children:e(iw,{editable:c,toolbar:s,onBold:Ve,onItalic:ke,setUnderlineType:Se,setColor:Ie,setBorderType:Ne,setFontSize:Oe,setFontFamily:ze,setTextAlign:Ze,setBackgroundColor:Te,setFormatePainter:De})}),n("div",{ref:Ce,style:{height:h},className:I("ff-excel-spreadsheet",a),onKeyPress:be,onKeyDown:tt,onClick:nt,onMouseMove:it,onScroll:e=>ut(e),children:[At,gt,e(Gy,{scrollPos:_}),e(Ky,{scrollPos:_})]})]}),[a,be,tt,it,At,gt,R]);return e(Vy.Provider,{value:K,children:vt})}),lw=({contextMenu:t,position:r,editable:i})=>{if(!t.open)return null;return i&&e("div",{onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},className:"ff-excel-menu",role:"menu","aria-label":"Excel context menu",style:{left:r.x,top:r.y,position:"absolute",zIndex:9999999999},children:t.options.map(t=>{if(!t.visible){const i=t.disable;return e(Y,{title:i?t.disableTooltip:"",children:n("div",{className:"ff-excel-menu-options "+(i?"disabled":""),role:"menuitem","aria-label":t.label,"aria-disabled":i,onClick:()=>{i||t.action()},children:[t.iconName&&e(q,{name:t.iconName,height:16,width:16,color:(r=t.label,r.includes("Delete")?"var(--label-edit-error-text)":"var(--brand-color)"),disabled:i}),e(U,{as:"label",children:t.label})]})},t.label)}var r;return null})})},sw=({excelData:r,contextOption:a,toolbar:s="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:C=!0,contextHeightPositioning:p=0,contextWidthPositioning:m=0,onSave:A=()=>Promise.resolve(),onSaveInfoChange:g,attachmentAction:v={addAttachment:()=>Promise.resolve(""),deleteAttachment:()=>Promise.resolve(""),viewAttachment:()=>Promise.resolve()},onSaveDelay:y=3e3,scroller:w=!1,columnContextEnable:b=!0,rowContextEnable:E=!0,sheetBarContextEnable:M=!0,minimumColumnWidth:L=100,disableDeleteOption:H=!1,maxRowLimit:x=1/0,maxColLimit:V=1/0,maxSheetLimit:k=1/0,getActiveCell:S=()=>{}})=>{const Z=o(null),[O,z]=c([]),[N,T]=c(""),[D,F]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[R,P]=c({name:"defaultSheet",index:0}),[B,j]=c({defaultSheet:[[Zv]]}),[_,W]=c([[Zv]]),[X,Q]=c((A.length,{})),[G,J]=c({x:0,y:0}),$=o(""),ee=o(null),te=o(null),ne=o(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);z(t),K(t.length)||($.current=t[0]||"",P({name:t[0]||"",index:0}));const n={},r={};e.forEach(e=>{const t=e.sheetName,i=e.data,a=Math.max(u,i.length),o=Math.max(f,Math.max(...i.map(e=>e.length)));let l=Array.from({length:a},()=>Array(o).fill({value:"",style:Zv.style,readOnly:!1,inputType:void 0}));i.forEach((e,t)=>{e.forEach((e,n)=>{var r;t<a&&n<o&&(l[t]||(l[t]=[]),l[t][n]={value:(r=e.value,null==r?null:r),style:K(e?.style)?Zv.style:tw(e?.style,L),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const s=new Set([...e?.rows?.readOnly?e.rows.readOnly.map(e=>`r${e}`):[],...e?.columns?.readOnly?e.columns.readOnly.map(e=>`c${e}`):[],...e?.cells?.readOnly?e.cells.readOnly.map(([e,t])=>`${e},${t}`):[]]);if(l.forEach((t,n)=>{t.forEach((t,r)=>{l[n]||(l[n]=[]);const i=s.has(`r${n+1}`)||s.has(`c${r+1}`)||s.has(`${n+1},${r+1}`),a=((t,n,r)=>r?.inputType?r.inputType:e?.rows?.inputType?.[t+1]||e?.columns?.inputType?.[n+1]||e?.cells?.inputType?.[`${t+1},${n+1}`]||{type:"text"})(n,r,t||Zv);l[n][r]={...t,value:t?.value??"",readOnly:t?.readOnly?t.readOnly:i,inputType:a,contextDisable:t?.contextDisable}})}),n[t]=l,A.length>1){const e=i[0]||[];r[t]=Array.from({length:o},(t,n)=>({newData:"",oldData:e[n]?.value||""}))}}),j(n),A.length>1&&Q(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&W(n[i])}},[r]),l(()=>{g&&g(N),"File saved"===N&&setTimeout(()=>{T("")},2e3)},[N]),l(()=>{T("Saving..."),re(ae())},[B,$.current]);const re=i.useCallback(Js(e=>{if(A.length>1){const t={...X};O.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Q(t);const n=O.map(e=>({sheetName:e,headers:t[e]||[]}));A(e,n)}else A(e);T("File saved")},y),[A,X,O]),ie=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),re(ae()))},[A]);i.useEffect(()=>(document.addEventListener("keydown",ie),()=>{document.removeEventListener("keydown",ie)}),[ie]);const ae=()=>O.map(e=>{const t=B[e]?.map(e=>{const t=e.reduce((e,t,n)=>{const r=""!==String(t?.value??"").trim(),i=t?.style?.width,a=t?.style?.height;return r||(void 0!==i&&i!==L||void 0!==a&&32!==a)?n:e},-1),n=e.map((e,n)=>e&&e.style&&n<=t?{value:e.value,style:rw(e.style,L),readOnly:e.readOnly,inputType:e.inputType,contextDisable:e.contextDisable}:null).filter(e=>null!==e);return n.length>0?n:[]})||[],n=t.filter((e,n)=>{const r=t.slice(n+1).some(e=>e.length>0);return e.length>0||r});return{sheetName:e,data:K(n.length)?[[]]:n}}),[oe,le]=c(null),se=()=>O.length>=k,ce=()=>{if(se())return;const e=((e,t)=>{const n=t.map(e=>e.toLowerCase());let r=`${e}1`,i=2;for(;n.includes(r.toLowerCase());)r=`${e}${i}`,i++;return r})("Sheet",O),t=Array.from({length:u},()=>Array.from({length:f},()=>Zv));z(t=>[...t,e]),P({index:O?.length,name:e}),j({...B,[e]:t}),W(t),A.length>1&&Q(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),$.current=e},de=(e=[[Zv]])=>{W(e)},ue=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void le(null);const i=(r.textContent||"").trim();if(!i)return dc.warning("Sheet name cannot be empty."),r.textContent=R.name,void le(null);if(i.length>50)return dc.warning("The sheet name cannot be greater than 50 characters"),r.textContent=R.name,void le(null);if(O.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return dc.warning("Sheet name already exists"),r.textContent=R.name,void le(null);let a=O;de(B?.[n]),a.splice(t,1,i);const o=function(e,t,n){if(!(t in e))throw new Error(`Key "${t}" not found in object`);const{[t]:r,...i}=e;return{...i,[n]:r??[]}}(B,n,i);$.current=i,P(e=>({...e,name:i})),j(o),A.length>1&&Q(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),le(null)};const fe=(e,t)=>{e!==R.name&&t!==R.index&&(P({index:t,name:e}),z(n=>{const r=[...n];return r[t]=e,r}),de(B[e]),$.current=e)},he=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&D.open&&(F({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[D.open]);i.useEffect(()=>(document.addEventListener("contextmenu",he),document.addEventListener("click",e=>he(e,!0)),()=>{document.removeEventListener("contextmenu",he),document.removeEventListener("click",e=>he(e,!0))}),[he]);const Ce=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ce(),disableTooltip:"Sheet limit reached",visible:!1,disable:se()},...H?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(O.length>1){let n=O.slice();n.splice(t,1);const r={...B};delete r[e];const i=Math.min(t,n.length-1);z(n),j(r),A.length>1&&Q(t=>{const n={...t};return delete n[e],n});const a=n[i]?n[i]:"";P({index:i,name:a}),de(r?.[a]),$.current=a}else dc.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];F(e=>({...e,open:!0,contextType:"sheet",options:r}))};l(()=>{ne.current?.removeSelect()},[R.name]);return e(t,{children:O.length>0&&n("section",{ref:ee,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=te.current?.parentElement?.getBoundingClientRect(),n=window.scrollX,r=window.scrollY;let i=e.clientX-(t?.left||0)+n,a=e.clientY-(t?.top||0)+r;const o=300,l=window.innerWidth,s=window.innerHeight,c=l-e.clientX,d=e.clientX,u=s-e.clientY,f=e.clientY;c<o&&d>=o?i=e.clientX-(t?.left||0)+n-150:i+=2,u<200&&f>=200?a=e.clientY-(t?.top||0)+r-20:a+=2,e.target.classList.contains("ff-excel-tab-list")?J({x:i,y:a-(H?32:65)}):(i+o>l&&(i=l-o-2),i<0&&(i=2),J({x:i+m,y:a+p}))},onClick:e=>{e.stopPropagation(),D.open&&F({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},"aria-label":"Excel spreadsheet workspace",role:"region",children:[e("div",{ref:te,className:"ff-excel-sheet","aria-label":"Spreadsheet content",children:e(ow,{ref:ne,editable:C,attachmentAction:v,toolbar:s,sheetHeight:h,setContextMenu:F,contextOption:a,data:_,columnContextEnable:b,rowContextEnable:E,minimumColumnWidth:L,onEvaluatedDataChange:e=>{j(t=>({...t,[$.current]:e}))},workRef:ee,scroller:w,maxRowLimit:x,maxColLimit:V,disableDeleteOption:H,contextMenu:D,getActiveCell:S,onAddColumn:(e,t)=>{A.length>1&&Q(n=>{const r=R.name,i=[...n[r]||[]],a=t?e:e+1;return i.splice(a,0,{newData:"",oldData:""}),{...n,[r]:i}})},onDeleteColumn:e=>{A.length>1&&Q(t=>{const n=R.name,r=[...t[n]||[]];return r.splice(e,1),{...t,[n]:r}})}},R.name)}),"hide"!==d&&n("nav",{className:"ff-excel-sheet-bar","aria-label":"Sheet navigation",children:["show"===d&&n("div",{className:"ff-excel-add-sheet-set","aria-label":"Sheet actions",children:[e(Y,{title:se()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(q,{disabled:!C||se(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ce,name:"plus_icon",height:20,width:20})}),e(Da,{options:(t=>t.map((t,r)=>({label:n("div",{style:{display:"flex",gap:"8px"},children:[R?.name===t?e(q,{height:16,width:16,name:"tick"}):e("div",{style:{height:"16px",width:"24px"}}),e(Y,{title:xn(t,20,"count")?t:"",children:e(U,{children:Hn(t,20,"count")})})]}),name:r,value:t})))(O),targetRef:Z,onOptionClick:e=>{const{value:t,name:n=""}=e;fe(t,parseInt(n))},dropdownPlacement:"top",iconName:"show_script",tooltipTitle:"All Sheets",tooltipPlacement:"top",dropdownHeight:215,selectedValue:R.name})]}),e("div",{className:"ff-excel-tab-container",role:"tablist","aria-label":"Worksheet tabs",children:O.map((t,n)=>e(U,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{fe(t,n),M&&Ce(e,t,n)},className:I("ff-excel-tab-list",{active:t===R.name}),role:"tab","aria-selected":t===R.name,"aria-label":`Sheet ${t}`,onClick:()=>{fe(t,n)},suppressContentEditableWarning:oe===n,onDoubleClick:e=>{"show"===d&&(le(n),null===oe&&setTimeout(()=>(e=>{const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)})(e.target),0))},contentEditable:C&&oe===n,onBlur:e=>{ue(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),ue(e,n,t))},children:t})},t))})]}),D.open&&e(lw,{contextMenu:D,position:G,editable:C}),e(cc,{})]})})},cw=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:i=!1})=>{const a=i?"filter":"module";return e("div",{className:I("ff-module-chip",{"ff-filter-chip":i,[`ff-${a}-chip--active`]:n,[`ff-${a}-chip--hover`]:!n}),onClick:r,"aria-label":t||`${a} chip`,children:e(U,{lineHeight:"18px",className:"module-typography",children:t})})},dw=({x:e,y:t,radius:n,startAngle:r,endAngle:i})=>{const a=e+n*Math.cos(r),o=t+n*Math.sin(r),l=e+n*Math.cos(i),s=t+n*Math.sin(i),c=i-r>Math.PI?1:0;return i-r>=2*Math.PI?`\n M ${e+n} ${t}\n A ${n} ${n} 0 1 1 ${e-n} ${t} \n A ${n} ${n} 0 1 1 ${e+n} ${t}\n `:`M ${a} ${o} A ${n} ${n} 0 ${c} 1 ${l} ${s}`},uw=({radius:t=15,lineWidth:r=5,label:i,percentageValue:a,icon:l,fontSize:s=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:C})=>{const[p,m]=c({x:0,y:0}),[A,g]=c(!1),v=o(null);let y=-Math.PI/2;const w=2*(t+r),{backgroundArcPath:b,foregroundArcPath:E}=((e,t,n)=>{const r=t,i=r+Math.max(0,Math.min(e,100))/100*2*Math.PI;return{backgroundArcPath:dw({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:dw({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(a,y,t),M=()=>{g(!0)},L=()=>{m({x:0,y:0}),g(!1)},H=e=>{if(v.current){const t=v.current.getBoundingClientRect();m({x:e.clientX-t.left,y:e.clientY-t.top})}},x=i?`${i} radial chart at ${a}%`:`Radial chart at ${a}%`;return n("section",{ref:v,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${s}px`},onClick:C,"aria-label":x,children:[e("svg",{width:w,height:w,viewBox:`0 0 ${w} ${w}`,role:"img","aria-label":x,children:n("g",{transform:`translate(${t+r}, ${t+r})`,children:[e("path",{d:b,fill:"none",stroke:f,strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),e("path",{d:E,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),h&&e("path",{d:E,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:M,onMouseLeave:L,onMouseMove:H}),l?e("foreignObject",{x:"-10",y:"-10",width:"20",height:"20",children:e(q,{className:"ff-radial-chart-icon-padding",name:l,height:20,width:20,withPadding:!1})}):e("text",{x:"0",y:"0",fill:d||u,textAnchor:"middle",dominantBaseline:"central",children:`${Math.round(a)}%`})]})}),A&&n("div",{className:"ff-icon-radial-chart-tooltip",style:{position:"absolute",left:`${p.x+15}px`,top:p.y-5+"px"},children:[e(U,{children:`${i} : `}),n(U,{children:[a,"%"]})]})]})},fw=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:a,onDownloadClick:o,height:l="75px",width:s="79px",fileName:c,thumbnailMediaSrc:d,isDelete:u})=>e("figure",{className:"ff-attach-media-container",style:{height:l,width:s},"aria-label":c?`Attached media ${c}`:"Attached media",children:n("div",{className:"ff-media-wrapper",style:{height:l,width:s},children:[e("img",{src:d||t,alt:c?`Preview of ${c}`:"Attached media preview"}),n("div",{className:"ff-hover-icons","aria-label":"Media actions",children:[n("div",{className:"ff-top-icons",children:[e("div",{className:"ff-icon-container",children:e(Y,{title:"Download File",placement:"bottom",children:e(q,{name:"download_file_icon",height:10,width:10,onClick:o,color:"var(--icons-default-color)","aria-label":"Download file"})})}),u&&e("div",{className:"ff-icon-container",children:e(Y,{title:"Delete",placement:"bottom",children:e(q,{name:"delete",height:10,width:10,color:"var(--ff-delete-button-attachment)",onClick:()=>{a&&a(r)},"aria-label":"Delete file"})})})]}),e("div",{className:"ff-expand-icon-container",children:e(Y,{title:"Maximize",placement:"bottom",children:e(q,{name:"expand_icon",height:16,width:16,onClick:i,"aria-label":"Expand media"})})})]}),e(U,{color:"var(--text-area-default-color)",fontWeight:"medium",className:"ff-media-text",children:c})]})}),hw=({icon:r,status:i,count:a,text:o,style:s={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=c(!1),C=["total defects","defect density","open defects","closed defects","quality score"],p=C.includes(i.toLowerCase()),m=C.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:s,onClick:()=>(e=>{C.includes(e.toLowerCase())||(h(!0),u(e))})(i),children:[n("div",{className:"ff-status-bar",children:[e("div",{children:e(q,{name:r,height:20,width:20,hoverEffect:!1})}),!C.includes(i.toLowerCase())&&e(U,{fontWeight:"semi-bold",fontSize:"10px",textAlign:"center",lineHeight:"15px",className:"ff-status-text",as:"div",children:i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()})]}),e("div",{className:"ff-content "+(m?"red-background":""),children:n(t,p?{children:[e(U,{fontWeight:"semi-bold",fontSize:"10px",className:"ff-text",lineHeight:"15px",color:"var(--ff-chip-text-color)",children:o}),e(U,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"36px",children:"defect density"===i.toLowerCase()?n(t,{children:[a.toString().padStart(2,"0"),e(U,{fontSize:"15px",fontWeight:"semi-bold",children:"/ Modules"})]}):"quality score"===i.toLowerCase()?`${parseFloat(a.toString()).toFixed(2)}%`:a.toString().padStart(2,"0")})]}:{children:[e(U,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"24px",color:f?"var(--base-bg-color)":"",children:a.toString().padStart(2,"0")}),e(U,{className:"ff-text",lineHeight:"18px",color:f?"var(--base-bg-color)":"var(--ff-chip-text-color)",children:o})]})})]})},Cw=({option:t})=>{const r=o(null),[i,a]=c(!1);l(()=>{const e=r.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth)},n=requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",t)}},[t]);const s={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},d=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;return n("div",{style:{width:"-webkit-fill-available"},className:"ff-variable-option ff-variable-data",role:"option","aria-label":d(t),children:[e(Y,{title:i?d(t):"",style:{width:"calc(100% - 32px)"},children:e("span",{ref:r,className:"ff-truncated_text","aria-label":d(t),children:d(t)})}),e(q,{name:(e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"LOCAL"===e.type&&"STEPGROUP"===e?.parentVariableType?"step_group_variable":"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":s[e.type||""]||""})(t),height:24,width:24})]})};function pw(e){return()=>e}function mw(e){e()}function Aw(e,t){return n=>e(t(n))}function gw(e,t){return()=>e(t)}function vw(e){return void 0!==e}function yw(){}function ww(e,t){return t(e),e}function bw(e,t){return t(e)}function Ew(...e){return e}function Mw(e,t){return e(1,t)}function Lw(e,t){e(0,t)}function Hw(e){e(2)}function xw(e){return e(4)}function Vw(e,t){return Mw(e,function(e,t){return n=>e(t,n)}(t,0))}function kw(e,t){const n=e(1,e=>{n(),t(e)});return n}function Sw(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Zw(e,t){return e===t}function Ow(e=Zw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function zw(e){return t=>n=>{e(n)&&t(n)}}function Nw(e){return t=>Aw(t,e)}function Iw(e){return t=>()=>{t(e)}}function Tw(e,...t){const n=function(...e){return t=>e.reduceRight(bw,t)}(...t);return(t,r)=>{switch(t){case 2:return void Hw(e);case 1:return Mw(e,n(r))}}}function Dw(e,t){return n=>r=>{n(t=e(t,r))}}function Fw(e){return t=>n=>{e>0?e--:t(n)}}function Rw(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function Pw(...e){const t=Array.from({length:e.length});let n=0,r=null;const i=2**e.length-1;return e.forEach((e,a)=>{const o=2**a;Mw(e,e=>{const l=n;n|=o,t[a]=e,l!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{const o=()=>{e([a].concat(t))};n===i?o():r=o}}function Bw(e){let t=e;const n=_w();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function jw(e,t){return ww(Bw(t),t=>Vw(e,t))}function _w(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach(e=>{e(n)});case 2:return void e.splice(0);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function qw(e){return ww(_w(),t=>Vw(e,t))}const Uw={singleton:!0};function Ww(e,t=[],n=Uw){const{singleton:r}=n;return{constructor:e,dependencies:t,id:Xw(),singleton:r}}const Xw=()=>Symbol("id");function Qw(...e){const t=_w(),n=Array.from({length:e.length});let r=0;const i=2**e.length-1;return e.forEach((e,a)=>{const o=2**a;Mw(e,e=>{n[a]=e,r|=o,r===i&&Lw(t,n)})}),function(e,a){switch(e){case 2:return void Hw(t);case 1:return r===i&&a(n),Mw(t,a)}}}function Gw(e,t=Zw){return Tw(e,Ow(t))}function Kw(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(mw)}}(...e.map(e=>Mw(e,n)))}}}const Yw=0,Jw=1,$w=2,eb=3,tb={[Yw]:"debug",[eb]:"error",[Jw]:"log",[$w]:"warn"},nb=Ww(()=>{const e=Bw(eb);return{log:Bw((t,n,r=Jw)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??xw(e))&&console[tb[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function rb(e){const t=function(e){return"self"in e?e.document.documentElement:e}(e);return"rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction}function ib(e,t){return rb(e)?-t:t}function ab(e,t){return rb(e)?-t:t}function ob(e,t,n){return lb(e,t,n).callbackRef}function lb(e,t,n){const r=i.useRef(null);let a=e=>{};const o=i.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return a=e=>{e&&t?(o?.observe(e),r.current=e):(r.current&&o?.unobserve(r.current),r.current=null)},{callbackRef:a,ref:r}}function sb(e,t,n,r,a,o,l,s,c){const d=i.useCallback(n=>{const i=function(e,t,n,r){const i=e.length;if(0===i)return null;const a=[];for(let o=0;o<i;o++){const i=e.item(o);if(void 0===i.dataset.index)continue;const l=parseInt(i.dataset.index,10),s=parseFloat(i.dataset.knownSize),c=t(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},eb),c===s)continue;const d=a[a.length-1];0===a.length||d.size!==c||d.endIndex!==l-1?a.push({endIndex:l,size:c,startIndex:l}):a[a.length-1].endIndex++}return a}(n.children,t,s?"offsetWidth":"offsetHeight",a);let c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;const d="window"===c.lastElementChild?.dataset.viewportType;let u;d&&(u=c.ownerDocument.defaultView);const f=l?s?l.scrollWidth:l.scrollHeight:d?s?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,h=l?s?l.offsetWidth:l.offsetHeight:d?s?u.innerWidth:u.innerHeight:s?c.offsetWidth:c.offsetHeight,C=l?s?ib(l,l.scrollLeft):l.scrollTop:d?s?ib(u,u.scrollX||u.document.documentElement.scrollLeft):u.scrollY||u.document.documentElement.scrollTop:s?ib(c,c.scrollLeft):c.scrollTop;r({scrollHeight:f,scrollTop:Math.max(C,0),viewportHeight:h}),o?.(s?cb("column-gap",getComputedStyle(n).columnGap,a):cb("row-gap",getComputedStyle(n).rowGap,a)),null!==i&&e(i)},[e,t,a,o,l,r,s]);return lb(d,n,c)}function cb(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,$w),"normal"===t?0:parseInt(t??"0",10)}function db(e,t,n){const r=i.useRef(null),a=i.useCallback(n=>{if(!n?.offsetParent)return;const i=n.getBoundingClientRect(),a=i.width;let o,s;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;s=e.height-Math.max(0,n),o=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;s=e.innerHeight-Math.max(0,i.top),o=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:o,visibleHeight:s,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:o,ref:l}=lb(a,!0,n),s=i.useCallback(()=>{a(l.current)},[a,l]);return i.useEffect(()=>{if(t){t.addEventListener("scroll",s);const e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}const e=l.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,l]),o}const ub=Ww(()=>{const e=_w(),t=_w(),n=Bw(0),r=_w(),i=Bw(0),a=_w(),o=_w(),l=Bw(0),s=Bw(0),c=Bw(0),d=Bw(0),u=_w(),f=_w(),h=Bw(!1),C=Bw(!1),p=Bw(!1);return Vw(Tw(e,Nw(({scrollTop:e})=>e)),t),Vw(Tw(e,Nw(({scrollHeight:e})=>e)),o),Vw(t,i),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:s,footerHeight:d,headerHeight:l,horizontalDirection:C,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:p,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),fb={lvl:0};function hb(e,t){const n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]);const a=[];for(let o=1;o<n;o++){const{index:n,value:l}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=l}return a.push({end:1/0,start:r,value:i}),a}function Cb(e){return e===fb}function pb(e,t){if(!Cb(e))return t===e.k?e.v:t<e.k?pb(e.l,t):pb(e.r,t)}function mb(e,t,n="k"){if(Cb(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=mb(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return mb(e.l,t,n)}function Ab(e,t,n){return Cb(e)?Vb(t,n,1):t===e.k?Mb(e,{k:t,v:n}):t<e.k?kb(Mb(e,{l:Ab(e.l,t,n)})):kb(Mb(e,{r:Ab(e.r,t,n)}))}function gb(){return fb}function vb(e,t,n){if(Cb(e))return[];return function(e){return hb(e,({k:e,v:t})=>({index:e,value:t}))}(bb(e,mb(e,t)[0],n))}function yb(e,t){if(Cb(e))return fb;const{k:n,l:r,r:i}=e;if(t===n){if(Cb(r))return i;if(Cb(i))return r;const[t,n]=xb(r);return Eb(Mb(e,{k:t,l:Lb(r),v:n}))}return Eb(Mb(e,t<n?{l:yb(r,t)}:{r:yb(i,t)}))}function wb(e){return Cb(e)?[]:[...wb(e.l),{k:e.k,v:e.v},...wb(e.r)]}function bb(e,t,n){if(Cb(e))return[];const{k:r,l:i,r:a,v:o}=e;let l=[];return r>t&&(l=l.concat(bb(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:o}),r<=n&&(l=l.concat(bb(a,t,n))),l}function Eb(e){const{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Hb(t))return Sb(Mb(e,{lvl:n-1}));if(!Cb(t)&&!Cb(t.r))return Mb(t.r,{l:Mb(t,{r:t.r.l}),lvl:n,r:Mb(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(Hb(e))return Zb(Mb(e,{lvl:n-1}));if(!Cb(r)&&!Cb(r.l)){const t=r.l,i=Hb(t)?r.lvl-1:r.lvl;return Mb(t,{l:Mb(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Zb(Mb(r,{l:t.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function Mb(e,t){return Vb(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function Lb(e){return Cb(e.r)?e.l:Eb(Mb(e,{r:Lb(e.r)}))}function Hb(e){return Cb(e)||e.lvl>e.r.lvl}function xb(e){return Cb(e.r)?[e.k,e.v]:xb(e.r)}function Vb(e,t,n,r=fb,i=fb){return{k:e,l:r,lvl:n,r:i,v:t}}function kb(e){return Zb(Sb(e))}function Sb(e){const{l:t}=e;return Cb(t)||t.lvl!==e.lvl?e:Mb(t,{r:Mb(e,{l:t.r})})}function Zb(e){const{lvl:t,r:n}=e;return Cb(n)||Cb(n.r)||n.lvl!==t||n.r.lvl!==t?e:Mb(n,{l:Mb(e,{r:n.l}),lvl:t+1})}function Ob(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function zb(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const Nb=Ww(()=>({recalcInProgress:Bw(!1)}),[],{singleton:!0});function Ib(e,t,n){return e[Tb(e,t,n)]}function Tb(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=n(e[a],t);if(0===o)return a;if(-1===o){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Db(e,t){return Math.round(e.getBoundingClientRect()[t])}function Fb(e){return!Cb(e.groupOffsetTree)}function Rb({index:e},t){return t===e?0:t<e?-1:1}function Pb({offset:e},t){return t===e?0:t<e?-1:1}function Bb(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:a}=Ib(t,e,Rb),o=e-r,l=a*o+(o-1)*n+i;return l>0?l+n:l}function jb(e,t){if(!Fb(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _b(e,t,n){if(function(e){return void 0!==e.groupIndex}(e))return t.groupIndices[e.groupIndex]+1;let r=jb("LAST"===e.index?n:e.index,t);return r=Math.max(0,Math.min(n,r)),r}function qb(e,t,n,r=0){return r>0&&(t=Math.max(t,Ib(e,r,Rb).offset)),hb(function(e,t,n,r){const i=Tb(e,t,r),a=Tb(e,n,r,i);return e.slice(i,a+1)}(e,t,n,Pb),Qb)}function Ub(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Yw);const a=e.sizeTree;let o=a,l=0;if(n.length>0&&Cb(a)&&2===t.length){const e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Ab(Ab(t,n,e),n+1,r),o)}else[o,l]=function(e,t){let n=Cb(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),Cb(e)){e=Ab(e,0,i);continue}const o=vb(e,a-1,t+1);if(o.some(Gb(r)))continue;let l=!1,s=!1;for(const{end:n,start:r,value:a}of o)l?(t>=r||i===a)&&(e=yb(e,r)):(s=a!==i,l=!0),n>t&&t>=r&&a!==i&&(e=Ab(e,t+1,a));s&&(e=Ab(e,a,i))}return[e,n]}(o,t);if(o===a)return e;const{lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u}=Xb(e.offsetTree,l,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Ab(e,t,Bb(t,u,i)),gb()),lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u,sizeTree:o}}function Wb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Xb(e,t,n,r){let i=e,a=0,o=0,l=0,s=0;if(0===t)i=[];else{s=Tb(i,t-1,Rb),l=i[s].offset;const e=mb(n,t-1);a=e[0],o=e[1],i.length&&i[s].size===mb(n,t)[1]&&(s-=1),i=i.slice(0,s+1)}for(const{start:e,value:s}of vb(n,t,1/0)){const t=e-a,n=t*o+l+t*r;i.push({index:e,offset:n,size:s}),a=e,l=n,o=s}return{lastIndex:a,lastOffset:l,lastSize:o,offsetTree:i}}function Qb(e){return{index:e.index,value:e}}function Gb(e){const{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Kb={offsetHeight:"height",offsetWidth:"width"},Yb=Ww(([{log:e},{recalcInProgress:t}])=>{const n=_w(),r=_w(),i=jw(r,0),a=_w(),o=_w(),l=Bw(0),s=Bw([]),c=Bw(void 0),d=Bw(void 0),u=Bw(void 0),f=Bw(void 0),h=Bw((e,t)=>Db(e,Kb[t])),C=Bw(void 0),p=Bw(0),m={groupIndices:[],groupOffsetTree:gb(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:gb()},A=jw(Tw(n,Pw(s,e,p),Dw(Ub,m),Ow()),m),g=jw(Tw(s,Ow(),Dw((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Nw(({prev:e})=>e)),[]);Vw(Tw(s,zw(e=>e.length>0),Pw(A,p),Nw(([e,t,n])=>{const r=e.reduce((e,r,i)=>Ab(e,r,Bb(r,t.offsetTree,n)||i),gb());return{...t,groupIndices:e,groupOffsetTree:r}})),A),Vw(Tw(r,Pw(A),zw(([e,{lastIndex:t}])=>e<t),Nw(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Vw(c,d);const v=jw(Tw(c,Nw(e=>void 0===e)),!0);Vw(Tw(d,zw(e=>void 0!==e&&Cb(xw(A).sizeTree)),Nw(e=>{const t=xw(u),n=xw(s).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Vw(Tw(f,zw(e=>void 0!==e&&e.length>0&&Cb(xw(A).sizeTree)),Nw(e=>{const t=[];let n=e[0],r=0;for(let i=1;i<e.length;i++){const a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Vw(Tw(s,Pw(u,d),zw(([,e,t])=>void 0!==e&&void 0!==t),Nw(([e,t,n])=>{const r=[];for(let i=0;i<e.length;i++){const a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),void 0!==o&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);const y=qw(Tw(n,Pw(A),Dw(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),Nw(e=>e.changed)));Mw(Tw(l,Dw((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Nw(e=>e.diff)),e=>{const{groupIndices:n}=xw(A);if(e>0)Lw(t,!0),Lw(a,e+Wb(e,n));else if(e<0){const t=xw(g);t.length>0&&(e-=Wb(-e,t)),Lw(o,e)}}),Mw(Tw(l,Pw(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},eb)});const w=qw(a);Vw(Tw(a,Pw(A),Nw(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=pb(t.sizeTree,0);let a=0,o=0;for(;a<e;){const e=t.groupIndices[o],l=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+l-1,size:i,startIndex:e+1}),o++,a+=l+1}const l=wb(t.sizeTree);return a!==e&&l.shift(),l.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return wb(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);const b=qw(Tw(o,Pw(A,p),Nw(([e,{offsetTree:t},n])=>Bb(-e,t,n))));return Vw(Tw(o,Pw(A,p),Nw(([e,t,n])=>{if(t.groupIndices.length>0){if(Cb(t.sizeTree))return t;let r=gb();const i=xw(g);let a=0,o=0,l=0;for(;a<-e;){l=i[o];const e=i[o+1]-l-1;o++,a+=e+1}if(r=wb(t.sizeTree).reduce((t,{k:n,v:r})=>Ab(t,Math.max(0,n+e),r),r),a!==-e){r=Ab(r,0,pb(t.sizeTree,l));r=Ab(r,1,mb(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...Xb(t.offsetTree,0,r,n)}}const r=wb(t.sizeTree).reduce((t,{k:n,v:r})=>Ab(t,Math.max(0,n+e),r),gb());return{...t,sizeTree:r,...Xb(t.offsetTree,0,r,n)}})),A),{beforeUnshiftWith:w,data:C,defaultItemSize:d,firstItemIndex:l,fixedItemSize:c,fixedGroupSize:u,gap:p,groupIndices:s,heightEstimates:f,itemSize:h,listRefresh:y,shiftWith:o,shiftWithOffset:b,sizeRanges:n,sizes:A,statefulTotalCount:i,totalCount:r,trackItemSizes:v,unshiftWith:a}},Ew(nb,Nb),{singleton:!0});function Jb(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const $b=Ww(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const a=_w(),o=_w(),l=qw(Tw(a,Nw(Jb)));return Vw(Tw(l,Nw(e=>e.totalCount)),n),Vw(Tw(l,Nw(e=>e.groupIndices)),e),Vw(Tw(Qw(i,t,r),zw(([e,t])=>Fb(t)),Nw(([e,t,n])=>mb(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),Ow(),Nw(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},Ew(Yb,ub)),eE=Ww(([{log:e}])=>{const t=Bw(!1),n=qw(Tw(t,zw(e=>e),Ow()));return Mw(t,t=>{t&&xw(e)("props updated",{},Yw)}),{didMount:n,propsReady:t}},Ew(nb),{singleton:!0}),tE=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function nE(e){const t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),(!t.behavior||!tE)&&(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}const rE=Ww(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:l,scrollingInProgress:s,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=_w(),C=_w(),p=Bw(0);let m=null,A=null,g=null;function v(){null!==m&&(m(),m=null),null!==g&&(g(),g=null),A&&(clearTimeout(A),A=null),Lw(s,!1)}return Vw(Tw(h,Pw(n,u,r,p,l,o,f),Pw(e,a,i),Nw(([[e,n,r,i,a,o,l,c],u,f,p])=>{const y=nE(e),{align:w,behavior:b,offset:E}=y,M=i-1,L=_b(y,n,M);let H=Bb(L,n.offsetTree,u)+o;"end"===w?(H+=f+mb(n.sizeTree,L)[1]-r+p,L===M&&(H+=l)):"center"===w?H+=(f+mb(n.sizeTree,L)[1]-r+p)/2:H-=a,void 0!==E&&0!==E&&(H+=E);const x=t=>{v(),t?(c("retrying to scroll to",{location:e},Yw),Lw(h,e)):(Lw(C,!0),c("list did not change, scroll successful",{},Yw))};if(v(),"smooth"===b){let e=!1;g=Mw(t,t=>{e=e||t}),m=kw(d,()=>{x(e)})}else m=kw(Tw(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),x);return A=setTimeout(()=>{v()},1200),Lw(s,!0),c("scrolling from index to",{behavior:b,index:L,top:H},Yw),{behavior:b,top:H}})),c),{scrollTargetReached:C,scrollToIndex:h,topListHeight:p}},Ew(Yb,ub,nb),{singleton:!0});function iE(e,t){0===e?t():requestAnimationFrame(()=>{iE(e-1,t)})}function aE(e,t){if(void 0===e)return 0;const n=t-1,r="number"==typeof e?e:"LAST"===e.index?n:e.index;return Math.max(0,Math.min(r,n))}function oE(e){return void 0===e||("number"==typeof e?0===e:!(0!==e.index||void 0!==e.align&&"start"!==e.align||void 0!==e.offset&&0!==e.offset))}const lE=Ww(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{const l=Bw(!0),s=Bw(0),c=Bw(!0);return Vw(Tw(o,Pw(s),zw(([e,t])=>!oE(t)),Iw(!1)),l),Vw(Tw(o,Pw(s),zw(([e,t])=>!oE(t)),Iw(!1)),c),Mw(Tw(Qw(t,o),Pw(l,n,e,c),zw(([[,e],t,{sizeTree:n},r,i])=>e&&(!Cb(n)||vw(r))&&!t&&!i),Pw(s)),([,e])=>{if(void 0===e)return Lw(l,!0),void Lw(c,!0);kw(i,()=>{Lw(c,!0)}),iE(4,()=>{kw(r,()=>{Lw(l,!0)}),Lw(a,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:s,scrolledToInitialItem:l}},Ew(Yb,ub,rE,eE),{singleton:!0});function sE(e,t){return Math.abs(e-t)<1.01}const cE="up",dE="down",uE={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},fE=Ww(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{const o=Bw(!1),l=Bw(!0),s=_w(),c=_w(),d=Bw(4),u=Bw(0),f=jw(Tw(Kw(Tw(Gw(i),Fw(1),Iw(!0)),Tw(Gw(i),Fw(1),Iw(!1),Sw(100))),Ow()),!1),h=jw(Tw(Kw(Tw(n,Iw(!0)),Tw(n,Iw(!1),Sw(200))),Ow()),!1);Vw(Tw(Qw(Gw(i),Gw(u)),Nw(([e,t])=>e<=t),Ow()),l),Vw(Tw(l,Rw(50)),c);const C=qw(Tw(Qw(r,Gw(a),Gw(t),Gw(e),Gw(d)),Dw((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{const l={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-o){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:l}}let s;return s=l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:s,state:l}},uE),Ow((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),p=jw(Tw(r,Dw((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!sE(e.scrollHeight,t)){const i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),zw(e=>e.changed),Nw(e=>e.jump)),0);Vw(Tw(C,Nw(e=>e.atBottom)),o),Vw(Tw(o,Rw(50)),s);const m=Bw(dE);Vw(Tw(r,Nw(({scrollTop:e})=>e),Ow(),Dw((e,t)=>xw(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?cE:dE,prevScrollTop:t},{direction:dE,prevScrollTop:0}),Nw(e=>e.direction)),m),Vw(Tw(r,Rw(50),Iw("none")),m);const A=Bw(0);return Vw(Tw(f,zw(e=>!e),Iw(0)),A),Vw(Tw(i,Rw(100),Pw(f),zw(([e,t])=>t),Dw(([e,t],[n])=>[t,n],[0,0]),Nw(([e,t])=>t-e)),A),{atBottomState:C,atBottomStateChange:s,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:u,isAtBottom:o,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:p,scrollDirection:m,scrollVelocity:A}},Ew(ub)),hE="top",CE="bottom",pE="none";function mE(e,t,n){return"number"==typeof e?n===cE&&t===hE||n===dE&&t===CE?e:0:n===cE?t===hE?e.main:e.reverse:t===CE?e.main:e.reverse}function AE(e,t){return"number"==typeof e?e:e[t]??0}const gE=Ww(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const a=_w(),o=Bw(0),l=Bw(0),s=Bw(0);return{increaseViewportBy:l,listBoundary:a,overscan:s,topListHeight:o,visibleRange:jw(Tw(Qw(Gw(r),Gw(i),Gw(n),Gw(a,zb),Gw(s),Gw(o),Gw(t),Gw(e),Gw(l)),Nw(([e,t,n,[r,i],a,o,l,s,c])=>{const d=e-s,u=o+l,f=Math.max(n-d,0);let h=pE;const C=AE(c,hE),p=AE(c,CE);return r-=s,i+=n+l,(r+=n+l)>e+u-C&&(h=cE),(i-=s)<e-f+t+p&&(h=dE),h!==pE?[Math.max(d-n-mE(a,hE,h)-C,0),d-f-l+t+mE(a,CE,h)+p]:null}),zw(e=>null!==e),Ow(zb)),[0,0])}},Ew(ub),{singleton:!0});const vE={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function yE(e,t,n,r,i,a){const{lastIndex:o,lastOffset:l,lastSize:s}=i;let c=0,d=0;if(e.length>0){c=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-o,f=c,h=l+u*s+(u-1)*r-d;return{bottom:d,firstItemIndex:a,items:bE(e,i,a),offsetBottom:h,offsetTop:c,top:f,topItems:bE(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function wE(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-o>=e)break;o++}const l=e+o,s=aE(t,l);return yE(Array.from({length:l}).map((e,t)=>({data:a[t+s],index:t+s,offset:0,size:0})),[],l,i,n,r)}function bE(e,t,n){if(0===e.length)return[];if(!Fb(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));const r=e[0].index,i=e[e.length-1].index,a=[],o=vb(t.groupOffsetTree,r,i);let l,s=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=o.shift(),s=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:s,type:"group"}:{groupIndex:s,index:r.index-(s+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function EE(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}const ME=Ww(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:l,visibleRange:s},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:C}])=>{const p=Bw([]),m=Bw(0),A=_w(),g=Bw(0);Vw(a.topItemsIndexes,p);const v=jw(Tw(Qw(h,C,Gw(s,zb),Gw(i),Gw(r),Gw(c),d,Gw(p),Gw(t),Gw(n),Gw(g),e),zw(([e,t,,n,,,,,,,,r])=>{const i=void 0!==r&&r.length!==n;return e&&!t&&!i}),Nw(([,,[e,t],n,r,i,a,o,l,s,c,d])=>{const u=r,{offsetTree:f,sizeTree:h}=u,C=xw(m);if(0===n)return{...vE,totalCount:n};if(0===e&&0===t)return 0===C?{...vE,totalCount:n}:wE(C,i,r,l,s,d||[]);if(Cb(h))return C>0?null:yE(function(e,t,n){if(Fb(t)){const r=jb(e,t);return[{index:mb(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(aE(i,n),u,d),[],n,s,u,l);const p=[];if(o.length>0){const e=o[0],t=o[o.length-1];let n=0;for(const r of vb(h,e,t)){const i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)p.push({data:d?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return yE([],p,n,s,u,l);const A=o.length>0?o[o.length-1]+1:0,g=qb(f,e,t,A);if(0===g.length)return null;const v=n-1,y=ww([],n=>{for(const r of g){const i=r.value;let a=i.offset,o=r.start;const l=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+s)/(l+s));const t=o-r.start;a+=t*l+t*s}o<A&&(a+=(A-o)*l,o=A);const c=Math.min(r.end,v);for(let e=o;e<=c&&!(a>=t);e++)n.push({data:d?.[e],index:e,offset:a,size:l}),a+=l+s}}),w=EE(c,hE),b=EE(c,CE);if(y.length>0&&(w>0||b>0)){const e=y[0],t=y[y.length-1];if(w>0&&e.index>A){const t=Math.min(w,e.index-A),n=[];let r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){const t=vb(h,i,i)[0]?.value??e.size;r-=t+s,n.unshift({data:d?.[i],index:i,offset:r,size:t})}y.unshift(...n)}if(b>0&&t.index<v){const e=Math.min(b,v-t.index);let n=t.offset+t.size+s;for(let r=t.index+1;r<=t.index+e;r++){const e=vb(h,r,r)[0]?.value??t.size;y.push({data:d?.[r],index:r,offset:n,size:e}),n+=e+s}}}return yE(y,p,n,s,u,l)}),zw(e=>null!==e),Ow()),vE);Vw(Tw(e,zw(vw),Nw(e=>e?.length)),i),Vw(Tw(v,Nw(e=>e.topListHeight)),u),Vw(u,l),Vw(Tw(v,Nw(e=>[e.top,e.bottom])),o),Vw(Tw(v,Nw(e=>e.items)),A);const y=qw(Tw(v,zw(({items:e})=>e.length>0),Pw(i,e),zw(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Nw(([,e,t])=>[e-1,t]),Ow(zb),Nw(([e])=>e))),w=qw(Tw(v,Rw(200),zw(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Nw(({items:e})=>e[0].index),Ow())),b=qw(Tw(v,zw(({items:e})=>e.length>0),Nw(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),Ow(Ob)));return{endReached:y,initialItemCount:m,itemsRendered:A,listState:v,minOverscanItemCount:g,rangeChanged:b,startReached:w,topItemsIndexes:p,...f}},Ew(Yb,$b,gE,lE,rE,fE,eE,Nb),{singleton:!0}),LE=Ww(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const a=_w(),o=jw(Tw(Qw(n,e,r,t,i),Nw(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Vw(Gw(o),a),{totalListHeight:o,totalListHeightChanged:a}},Ew(ub,ME),{singleton:!0}),HE=Ww(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Bw(!1);return{alignToBottom:n,paddingTopAddition:jw(Tw(Qw(n,e,t),zw(([e])=>e),Nw(([,e,t])=>Math.max(0,e-t)),Rw(0),Ow()),0)}},Ew(ub,LE),{singleton:!0}),xE=Ww(()=>({context:Bw(null)})),VE=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>a?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,kE=Ww(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:l,viewportHeight:s},{scrollToIndex:c}])=>{const d=_w();return Vw(Tw(d,Pw(t,s,n,a,i,r,l),Pw(e),Nw(([[e,t,n,r,i,a,l,s],c])=>{const{calculateViewLocation:d=VE,done:u,...f}=e,h=_b(e,t,r-1),C=Bb(h,t.offsetTree,c)+i+a,p=d({itemBottom:C+mb(t.sizeTree,h)[1],itemTop:C,locationParams:f,viewportBottom:s+n-l,viewportTop:s+a});return null===p?u?.():u&&kw(Tw(o,zw(e=>!e),Fw(xw(o)?1:2)),u),p}),zw(e=>null!==e)),c),{scrollIntoView:d}},Ew(Yb,ub,rE,ME,nb),{singleton:!0});function SE(e){return!1!==e&&("smooth"===e?"smooth":"auto")}const ZE=Ww(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:l},{didMount:s,propsReady:c},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const C=Bw(!1),p=_w();let m=null;function A(e){Lw(o,{align:"end",behavior:e,index:"LAST"})}function g(e){const t=kw(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(xw(d)("scrolling to bottom due to increased size",{},Yw),A("auto"))});setTimeout(t,100)}Mw(Tw(Qw(Tw(Gw(t),Fw(1)),s),Pw(Gw(C),a,l,u),Nw(([[e,t],n,r,i,a])=>{let o=t&&i,l="auto";return o&&(l=((e,t)=>"function"==typeof e?SE(e(t)):t&&SE(e))(n,r||a),o=o&&!1!==l),{followOutputBehavior:l,shouldFollow:o,totalCount:e}}),zw(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0===xw(n)?m=kw(e,()=>{xw(d)("following output to ",{totalCount:r},Yw),A(t),m=null}):requestAnimationFrame(()=>{xw(d)("following output to ",{totalCount:r},Yw),A(t)})}),Mw(Tw(Qw(Gw(C),t,c),zw(([e,,t])=>!1!==e&&t),Dw(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),zw(({refreshed:e})=>e),Pw(C,t)),([,e])=>{xw(l)&&g(!1!==e)}),Mw(p,()=>{g(!1!==xw(C))}),Mw(Qw(Gw(C),i),([e,t])=>{!1!==e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&A("auto")});const v=Bw(null),y=_w();return Vw(Kw(Tw(Gw(r),Nw(e=>e?.length??0)),Tw(Gw(t))),y),Mw(Tw(Qw(Tw(y,Fw(1)),s),Pw(Gw(v),l,u,f),Nw(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),zw(e=>!!e),Rw(0)),t=>{null!==m&&(m(),m=null),void 0===xw(n)?m=kw(e,()=>{xw(d)("scrolling into view",{}),Lw(h,t),m=null}):requestAnimationFrame(()=>{xw(d)("scrolling into view",{}),Lw(h,t)})}),{autoscrollToBottom:p,followOutput:C,scrollIntoViewOnChange:v}},Ew(Yb,fE,rE,lE,eE,nb,ub,xE,kE)),OE=Ww(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:l}])=>(Vw(Tw(l,Pw(a),zw(([,e])=>0!==e),Pw(i,r,t,n,e),Nw(([[,e],t,n,r,i,a=[]])=>wE(e,t,n,r,i,a))),o),{}),Ew(Yb,lE,ME,eE),{singleton:!0}),zE=Ww(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Bw(0);return Mw(Tw(e,Pw(r),zw(([,e])=>0!==e),Nw(([,e])=>({top:e}))),e=>{kw(Tw(n,Fw(1),zw(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Lw(t,e)})})}),{initialScrollTop:r}},Ew(eE,ub,ME),{singleton:!0}),NE=Ww(([{scrollVelocity:e}])=>{const t=Bw(!1),n=_w(),r=Bw(!1);return Vw(Tw(e,Pw(r,t,n),zw(([e,t])=>!1!==t&&void 0!==t),Nw(([e,t,n,r])=>{const{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),Ow()),t),Mw(Tw(Qw(t,e,n),Pw(r)),([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Ew(fE),{singleton:!0}),IE=Ww(([{scrollContainerState:e,scrollTo:t}])=>{const n=_w(),r=_w(),i=_w(),a=Bw(!1),o=Bw(void 0);return Vw(Tw(Qw(n,r),Nw(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),Vw(Tw(t,Pw(r),Nw(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Ew(ub)),TE=Ww(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:l,windowViewportRect:s}])=>{const c=_w(),d=Bw(void 0),u=Bw(null),f=Bw(null);return Vw(l,u),Vw(s,f),Mw(Tw(c,Pw(t,r,o,u,f,n)),([e,t,n,r,i,a,o])=>{const l=function(e){return wb(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}})}(t.sizeTree);r&&null!==i&&null!==a&&(n=i.scrollTop-a.offsetTop),e({ranges:l,scrollTop:n-=o})}),Vw(Tw(d,zw(vw),Nw(DE)),i),Vw(Tw(a,Pw(d),zw(([,e])=>void 0!==e),Ow(),Nw(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:d}},Ew(Yb,ub,lE,eE,IE));function DE(e){return{align:"start",index:0,offset:e.scrollTop}}const FE=Ww(([{topItemsIndexes:e}])=>{const t=Bw(0);return Vw(Tw(t,zw(e=>e>=0),Nw(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Ew(ME));function RE(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const PE=RE(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BE=Ww(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:l},{listState:s},{beforeUnshiftWith:c,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:C}])=>{const p=qw(Tw(s,Pw(o),Dw(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},l])=>{const s=r+a;let c=0;return t===o&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(c=s-n,0!==c&&(c+=l))),[c,i,o,s]},[0,[],0,0]),zw(([e])=>0!==e),Pw(r,l,n,i,h,C),zw(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===cE),Nw(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Yw),e))));function m(n){n>0?(Lw(t,{behavior:"auto",top:-n}),Lw(e,0)):(Lw(e,0),Lw(t,{behavior:"auto",top:-n}))}return Mw(Tw(p,Pw(e,a)),([t,n,r])=>{r&&PE()?Lw(e,n-t):m(-t)}),Mw(Tw(Qw(jw(a,!1),e,C),zw(([e,t,n])=>!e&&!n&&0!==t),Nw(([e,t])=>t),Rw(1)),m),Vw(Tw(u,Nw(e=>({top:-e}))),t),Mw(Tw(c,Pw(f,d),Nw(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(0===t.length)return a(e);let o=0;const l=pb(r,0);let s=0,c=0;for(;s<e;){s++,o+=l;let n=t.length===c+1?1/0:t[c+1]-t[c]-1;s+n>e&&(o-=l,n=e-s+1),s+=n,o+=a(n),c++}return o})),n=>{Lw(e,n),requestAnimationFrame(()=>{Lw(t,{top:n}),requestAnimationFrame(()=>{Lw(e,0),Lw(C,!1)})})}),{deviation:e}},Ew(ub,fE,ME,Yb,nb,Nb)),jE=Ww(([e,t,n,r,i,a,o,l,s,c,d])=>({...e,...t,...n,...r,...i,...a,...o,...l,...s,...c,...d}),Ew(gE,OE,eE,NE,LE,zE,HE,IE,kE,nb,xE)),_E=Ww(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:l,itemSize:s,sizeRanges:c,sizes:d,statefulTotalCount:u,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:C,initialTopMostItemIndex:p,scrolledToInitialItem:m},A,g,v,y,{scrollToIndex:w},b,{topItemCount:E},{groupCounts:M},L])=>{const{listState:H,minOverscanItemCount:x,topItemsIndexes:V,rangeChanged:k,...S}=y;return Vw(k,L.scrollSeekRangeChanged),Vw(Tw(L.windowViewportRect,Nw(e=>e.visibleHeight)),A.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:M,heightEstimates:l,initialItemFinalLocationReached:C,initialTopMostItemIndex:p,scrolledToInitialItem:m,sizeRanges:c,topItemCount:E,topItemsIndexes:V,totalCount:f,...v,groupIndices:o,itemSize:s,listState:H,minOverscanItemCount:x,scrollToIndex:w,statefulTotalCount:u,trackItemSizes:h,rangeChanged:k,...S,...L,...A,sizes:d,...g}},Ew(Yb,lE,ub,TE,ZE,ME,rE,BE,FE,$b,jE));function qE(e,t){const n={},r={};let i=0;const a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(const e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}const UE=typeof document>"u"?i.useEffect:i.useLayoutEffect;function WE(t,n,r){const a=Object.keys(n.required||{}),o=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),s=Object.keys(n.events||{}),c=i.createContext({});function d(e,t){void 0!==e.propsReady&&Lw(e.propsReady,!1);for(const r of a){Lw(e[n.required[r]],t[r])}for(const r of o)if(r in t){Lw(e[n.optional[r]],t[r])}void 0!==e.propsReady&&Lw(e.propsReady,!0)}function u(e){return s.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>t?.();return function(i,a){switch(i){case 1:return a?n===a?void 0:(r(),n=a,t=Mw(e,a),t):(r(),yw);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef(function(f,h){const{children:C,...p}=f,[m]=i.useState(()=>ww(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}(t),e=>{d(e,p)})),[A]=i.useState(gw(u,m));var g;UE(()=>{for(const e of s)e in p&&Mw(A[e],p[e]);return()=>{Object.values(A).map(Hw)}},[p,A,m]),UE(()=>{d(m,p)}),i.useImperativeHandle(h,pw((g=m,l.reduce((e,t)=>(e[t]=e=>{Lw(g[n.methods[t]],e)},e),{}))));const v=r;return e(c.Provider,{value:m,children:void 0===r?C:e(v,{...qE([...a,...o,...s],p),children:C})})});return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(c)[e];UE(()=>Mw(n,t),[t,n])},useEmitterValue:parseInt(i.version,10)>=18?e=>{const t=i.useContext(c)[e],n=i.useCallback(e=>Mw(t,e),[t]);return i.useSyncExternalStore(n,()=>xw(t),()=>xw(t))}:e=>{const t=i.useContext(c)[e],[n,r]=i.useState(gw(xw,t));return UE(()=>Mw(t,e=>{e!==n&&r(pw(e))}),[t,n]),n},usePublisher:e=>{const t=i.useContext(c);return i.useCallback(n=>{Lw(t[e],n)},[t,e])}}}const XE=i.createContext(void 0),QE=i.createContext(void 0),GE="-webkit-sticky",KE="sticky",YE=RE(()=>{if(typeof document>"u")return KE;const e=document.createElement("div");return e.style.position=GE,e.style.position===GE?GE:KE}),JE=typeof document>"u"?i.useEffect:i.useLayoutEffect;function $E(e){return"self"in e}function eM(e,t,n,r=yw,a,o){const l=i.useRef(null),s=i.useRef(null),c=i.useRef(null),d=i.useCallback(n=>{let r,i,a;const l=n.target;if(function(e){return"body"in e}(l)||$E(l)){const e=$E(l)?l:l.defaultView;a=!0===o?ib(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else a=!0===o?ib(l,l.scrollLeft):l.scrollTop,r=!0===o?l.scrollWidth:l.scrollHeight,i=!0===o?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:i})};!0===n.suppressFlushSync?d():M.flushSync(d),null!==s.current&&(a===s.current||a<=0||a===r-i)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,o]);return i.useEffect(()=>{const e=a??l.current;return r(a??l.current),d({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",d,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",d)}},[l,d,n,r,a]),{scrollByCallback:function(e){!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:ab(l.current,e.top)}}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(!0===o?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let a,d,u;$E(r)?(d=Math.max(Db(r.document.documentElement,!0===o?"width":"height"),!0===o?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),a=!0===o?r.innerWidth:r.innerHeight,u=!0===o?ib(r,r.scrollX):r.scrollY):(d=r[!0===o?"scrollWidth":"scrollHeight"],a=Db(r,!0===o?"width":"height"),u=!0===o?ib(r,r.scrollLeft):r.scrollTop);const f=d-a;if(void 0===n.top)return void r.scrollTo(n);const h=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=h,sE(a,d)||h===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:a}),void(i&&t(!0));i?(s.current=h,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:ab(r,h)}),r.scrollTo(n)}}}function tM(e){return e}const nM=Ww(()=>{const e=Bw(e=>`Item ${e}`),t=Bw(e=>`Group ${e}`),n=Bw({}),r=Bw(tM),i=Bw("div"),a=Bw(yw),o=(e,t=null)=>jw(Tw(n,Nw(t=>t[e]),Ow()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:i,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),rM=Ww(([e,t])=>({...e,...t}),Ew(_E,nM)),iM=({height:t})=>e("div",{style:{height:t}}),aM={overflowAnchor:"none",position:YE(),zIndex:1},oM={overflowAnchor:"none"},lM={...oM,display:"inline-block",height:"100%"},sM=i.memo(function({showTopList:t=!1}){const n=HM("listState"),r=xM("sizeRanges"),a=HM("useWindowScroll"),o=HM("customScrollParent"),l=xM("windowScrollContainerState"),s=xM("scrollContainerState"),c=o||a?l:s,d=HM("itemContent"),u=HM("context"),f=HM("groupContent"),h=HM("trackItemSizes"),C=HM("itemSize"),p=HM("log"),A=xM("gap"),g=HM("horizontalDirection"),{callbackRef:v}=sb(r,C,h,t?yw:c,p,A,o,g,HM("skipAnimationFrameInResizeObserver")),[y,w]=i.useState(0);LM("deviation",e=>{y!==e&&w(e)});const b=HM("EmptyPlaceholder"),E=HM("ScrollSeekPlaceholder")??iM,M=HM("ListComponent"),L=HM("ItemComponent"),H=HM("GroupComponent"),x=HM("computeItemKey"),V=HM("isSeeking"),k=HM("groupIndices").length>0,S=HM("alignToBottom"),Z=HM("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginInlineStart:0===y?S?"auto":0:y,paddingInlineEnd:n.offsetBottom,paddingInlineStart:n.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===y?S?"auto":0:y,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...Z?{}:{visibility:"hidden"}};return t||0!==n.totalCount||null==b?e(M,{...CM(M,u),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:v,style:O,children:(t?n.topItems:n.items).map(e=>{const t=e.originalIndex,r=x(t+n.firstItemIndex,e.data,u);return V?m(E,{...CM(E,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?m(H,{...CM(H,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:aM},f(e.index,u)):m(L,{...CM(L,u),...pM(L,e.data),"data-index":t,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:g?lM:oM},k?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})}):e(b,{...CM(b,u)})}),cM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},dM={outline:"none",overflowX:"auto",position:"relative"},uM=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),fM=(e,t,n=0)=>({...uM(e),position:t?"relative":"absolute",top:t?-n:0}),hM={position:YE(),top:0,width:"100%",zIndex:1};function CM(e,t){if("string"!=typeof e)return{context:t}}function pM(e,t){return{item:"string"==typeof e?void 0:t}}const mM=i.memo(function(){const t=HM("HeaderComponent"),n=xM("headerHeight"),r=HM("HeaderFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,HM("skipAnimationFrameInResizeObserver")),o=HM("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),AM=i.memo(function(){const t=HM("FooterComponent"),n=xM("footerHeight"),r=HM("HeaderFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,HM("skipAnimationFrameInResizeObserver")),o=HM("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null});function gM({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:a,context:o,...l}){const s=r("scrollContainerState"),c=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:C,scrollToCallback:p}=eM(s,d,c,u,void 0,f);return t("scrollTo",p),t("scrollBy",h),e(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:C,style:{...f?dM:cM,...a},tabIndex:0,...l,...CM(c,o),children:i})})}function vM({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:a,style:o,context:l,...s}){const c=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),C=n("customScrollParent"),p=i.useRef(null),m=n("scrollerRef"),{scrollByCallback:A,scrollerRef:g,scrollToCallback:v}=eM(c,u,d,m,C);return JE(()=>(g.current=C??p.current?.ownerDocument.defaultView,()=>{g.current=null}),[g,C]),t("windowScrollTo",v),t("scrollBy",A),e(d,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...0===f?void 0:{height:f+h}},...s,...CM(d,l),children:a})})}const yM=({children:t})=>{const n=i.useContext(XE),r=xM("viewportHeight"),a=xM("fixedItemHeight"),o=HM("alignToBottom"),l=HM("horizontalDirection"),s=ob(i.useMemo(()=>Aw(r,e=>Db(e,l?"width":"height")),[r,l]),!0,HM("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),a(n.itemHeight))},[n,r,a]),e("div",{"data-viewport-type":"element",ref:s,style:uM(o),children:t})},wM=({children:t})=>{const n=i.useContext(XE),r=xM("windowViewportRect"),a=xM("fixedItemHeight"),o=HM("customScrollParent"),l=HM("useWindowScroll"),s=HM("topListHeight"),c=db(r,o,HM("skipAnimationFrameInResizeObserver")),d=HM("alignToBottom");return i.useEffect(()=>{n&&(a(n.itemHeight),r({listHeight:0,offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))},[n,r,a]),e("div",{"data-viewport-type":"window",ref:c,style:fM(d,l,s),children:t})},bM=({children:t})=>{const n=HM("TopItemListComponent")??"div",r=HM("headerHeight"),i={...hM,marginTop:`${r}px`},a=HM("context");return e(n,{style:i,...CM(n,a),children:t})},EM=i.memo(function(t){const r=HM("useWindowScroll"),i=HM("topItemsIndexes").length>0,a=HM("customScrollParent"),o=HM("context");return n(a||r?kM:VM,{...t,context:o,children:[i&&e(bM,{children:e(sM,{showTopList:!0})}),n(a||r?wM:yM,{children:[e(mM,{}),e(sM,{}),e(AM,{})]})]})}),{Component:MM,useEmitter:LM,useEmitterValue:HM,usePublisher:xM}=WE(rM,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},EM),VM=gM({useEmitter:LM,useEmitterValue:HM,usePublisher:xM}),kM=vM({useEmitter:LM,useEmitterValue:HM,usePublisher:xM}),SM=MM,ZM=Ww(()=>{const e=Bw(e=>n("td",{children:["Item $",e]})),t=Bw(null),r=Bw(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=Bw(null),a=Bw(null),o=Bw({}),l=Bw(tM),s=Bw(yw),c=(e,t=null)=>jw(Tw(o,Nw(t=>t[e]),Ow()),t);return{components:o,computeItemKey:l,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:a,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});Ew(_E,ZM),YE();const OM={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},zM={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:NM,floor:IM,max:TM,min:DM,round:FM}=Math;function RM(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function PM(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function BM(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}const jM=Ww(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:l,scrollTo:s,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:C,propsReady:p},{customScrollParent:m,useWindowScroll:A,windowScrollContainerState:g,windowScrollTo:v,windowViewportRect:y},w])=>{const b=Bw(0),E=Bw(0),M=Bw(OM),L=Bw({height:0,width:0}),H=Bw({height:0,width:0}),x=_w(),V=_w(),k=Bw(0),S=Bw(null),Z=Bw({column:0,row:0}),O=_w(),z=_w(),N=Bw(!1),I=Bw(0),T=Bw(!0),D=Bw(!1),F=Bw(!1);Mw(Tw(C,Pw(I),zw(([e,t])=>!oE(t))),()=>{Lw(T,!1)}),Mw(Tw(Qw(C,T,H,L,I,D),zw(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{void 0!==e?(Lw(D,!0),iE(1,()=>{Lw(x,e)}),kw(Tw(c),()=>{Lw(t,[0,0]),Lw(T,!0)})):Lw(T,!0)}),Vw(Tw(z,zw(e=>null!=e&&e.scrollTop>0),Iw(0)),E),Mw(Tw(C,Pw(z),zw(([,e])=>null!=e)),([,e])=>{e&&(Lw(L,e.viewport),Lw(H,e.item),Lw(Z,e.gap),e.scrollTop>0&&(Lw(N,!0),kw(Tw(c,Fw(1)),e=>{Lw(N,!1)}),Lw(s,{top:e.scrollTop})))}),Vw(Tw(L,Nw(({height:e})=>e)),u),Vw(Tw(Qw(Gw(L,PM),Gw(H,PM),Gw(Z,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),Gw(c)),Nw(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),Vw(Tw(Qw(Gw(b),r,Gw(Z,BM),Gw(H,PM),Gw(L,PM),Gw(S),Gw(E),Gw(N),Gw(T),Gw(I)),zw(([,,,,,,,e])=>!e),Nw(([e,[t,n],r,i,a,o,l,,s,c])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:C}=a;if(0===l&&(0===e||0===C))return OM;if(0===h){const t=aE(c,e);return function(e){return{...zM,items:e}}(RM(t,t+Math.max(l-1,0),o))}const p=_M(C,h,d);let m,A;s?0===t&&0===n&&l>0?(m=0,A=l-1):(m=p*IM((t+u)/(f+u)),A=p*NM((n+u)/(f+u))-1,A=DM(e-1,TM(A,p-1)),m=DM(A,TM(0,m))):(m=0,A=-1);const g=RM(m,A,o),{bottom:v,top:y}=qM(a,r,i,g),w=NM(e/p);return{bottom:v,itemHeight:f,items:g,itemWidth:h,offsetBottom:w*f+(w-1)*u-v,offsetTop:y,top:y}})),M),Vw(Tw(S,zw(e=>null!==e),Nw(e=>e.length)),b),Vw(Tw(Qw(L,H,M,Z),zw(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Nw(([e,t,{items:n},r])=>{const{bottom:i,top:a}=qM(e,r,t,n);return[a,i]}),Ow(zb)),t);const R=Bw(!1);Vw(Tw(c,Pw(R),Nw(([e,t])=>t||0!==e)),R);const P=qw(Tw(Qw(M,b),zw(([{items:e}])=>e.length>0),Pw(R),zw(([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),Nw(([[,e]])=>e-1),Ow())),B=qw(Tw(Gw(M),zw(({items:e})=>e.length>0&&0===e[0].index),Iw(0),Ow())),j=qw(Tw(Gw(M),Pw(N),zw(([{items:e},t])=>e.length>0&&!t),Nw(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Ow(Ob),Rw(0)));Vw(j,h.scrollSeekRangeChanged),Vw(Tw(x,Pw(L,H,b,Z),Nw(([e,t,n,r,i])=>{const a=nE(e),{align:o,behavior:l,offset:s}=a;let c=a.index;"LAST"===c&&(c=r-1),c=TM(0,c,DM(r-1,c));let d=UM(t,i,n,c);return"end"===o?d=FM(d-t.height+n.height):"center"===o&&(d=FM(d-t.height/2+n.height/2)),void 0!==s&&0!==s&&(d+=s),{behavior:l,top:d}})),s);const _=jw(Tw(M,Nw(e=>e.offsetBottom+e.bottom)),0);return Vw(Tw(y,Nw(e=>({height:e.visibleHeight,width:e.visibleWidth}))),L),{customScrollParent:m,data:S,deviation:k,footerHeight:i,gap:Z,headerHeight:a,increaseViewportBy:e,initialItemCount:E,itemDimensions:H,overscan:n,restoreStateFrom:z,scrollBy:o,scrollContainerState:l,scrollHeight:V,scrollTo:s,scrollToIndex:x,scrollTop:c,smoothScrollTargetReached:d,totalCount:b,useWindowScroll:A,viewportDimensions:L,windowScrollContainerState:g,windowScrollTo:v,windowViewportRect:y,...h,gridState:M,horizontalDirection:F,initialTopMostItemIndex:I,totalListHeight:_,...f,endReached:P,propsReady:p,rangeChanged:j,startReached:B,stateChanged:O,stateRestoreInProgress:N,...w}},Ew(gE,ub,fE,NE,eE,IE,nb));function _M(e,t,n){return TM(1,IM((e+n)/(IM(t)+n)))}function qM(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const a=UM(e,t,n,r[0].index);return{bottom:UM(e,t,n,r[r.length-1].index)+i,top:a}}function UM(e,t,n,r){const i=_M(e.width,n.width,t.column),a=IM(r/i),o=a*n.height+TM(0,a-1)*t.row;return o>0?o+t.row:o}const WM=Ww(()=>{const e=Bw(e=>`Item ${e}`),t=Bw({}),n=Bw(null),r=Bw("virtuoso-grid-item"),i=Bw("virtuoso-grid-list"),a=Bw(tM),o=Bw("div"),l=Bw(yw),s=(e,n=null)=>jw(Tw(t,Nw(t=>t[e]),Ow()),n),c=Bw(!1),d=Bw(!1);return Vw(Gw(d),c),{components:t,computeItemKey:a,context:n,FooterComponent:s("Footer"),HeaderComponent:s("Header"),headerFooterTag:o,itemClassName:r,ItemComponent:s("Item","div"),itemContent:e,listClassName:i,ListComponent:s("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:s("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),XM=Ww(([e,t])=>({...e,...t}),Ew(jM,WM)),QM=i.memo(function(){const t=tL("gridState"),n=tL("listClassName"),r=tL("itemClassName"),a=tL("itemContent"),o=tL("computeItemKey"),l=tL("isSeeking"),s=nL("scrollHeight"),c=tL("ItemComponent"),d=tL("ListComponent"),u=tL("ScrollSeekPlaceholder"),f=tL("context"),h=nL("itemDimensions"),C=nL("gap"),p=tL("log"),A=tL("stateRestoreInProgress"),g=nL("reportReadyState"),v=ob(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(null!==n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}C({column:aL("column-gap",getComputedStyle(e).columnGap,p),row:aL("row-gap",getComputedStyle(e).rowGap,p)})},[s,h,C,p]),!0,!1);return JE(()=>{t.itemHeight>0&&t.itemWidth>0&&g(!0)},[t]),A?null:e(d,{className:n,ref:v,...CM(d,f),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(n=>{const i=o(n.index,n.data,f);return l?e(u,{...CM(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):m(c,{...CM(c,f),className:r,"data-index":n.index,key:i},a(n.index,n.data,f))})})}),GM=i.memo(function(){const t=tL("HeaderComponent"),n=nL("headerHeight"),r=tL("headerFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,!1),o=tL("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),KM=i.memo(function(){const t=tL("FooterComponent"),n=nL("footerHeight"),r=tL("headerFooterTag"),a=ob(i.useMemo(()=>e=>{n(Db(e,"height"))},[n]),!0,!1),o=tL("context");return null!=t?e(r,{ref:a,children:e(t,{...CM(t,o)})}):null}),YM=({children:t})=>{const n=i.useContext(QE),r=nL("itemDimensions"),a=nL("viewportDimensions"),o=ob(i.useMemo(()=>e=>{a(e.getBoundingClientRect())},[a]),!0,!1);return i.useEffect(()=>{n&&(a({height:n.viewportHeight,width:n.viewportWidth}),r({height:n.itemHeight,width:n.itemWidth}))},[n,a,r]),e("div",{ref:o,style:uM(!1),children:t})},JM=({children:t})=>{const n=i.useContext(QE),r=nL("windowViewportRect"),a=nL("itemDimensions"),o=tL("customScrollParent"),l=tL("useWindowScroll"),s=db(r,o,!1);return i.useEffect(()=>{n&&(a({height:n.itemHeight,width:n.itemWidth}),r({listHeight:0,offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:n.viewportWidth}))},[n,r,a]),e("div",{ref:s,style:fM(!1,l),children:t})},$M=i.memo(function({...t}){const r=tL("useWindowScroll"),i=tL("customScrollParent"),a=i||r?iL:rL,o=i||r?JM:YM,l=tL("context");return e(a,{...t,...CM(a,l),children:n(o,{children:[e(GM,{}),e(QM,{}),e(KM,{})]})})}),{useEmitter:eL,useEmitterValue:tL,usePublisher:nL}=WE(XM,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},$M),rL=gM({useEmitter:eL,useEmitterValue:tL,usePublisher:nL}),iL=vM({useEmitter:eL,useEmitterValue:tL,usePublisher:nL});function aL(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,$w),"normal"===t?0:parseInt(t??"0",10)}const oL=({optionsList:r=[],onSelectVariable:i,dropdownPosition:a,position:s="relative",width:c,height:d="160px",zIndex:u=9999,highlightedIndex:f})=>{const h={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},C=e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"STEPGROUP"!==e?.parentVariableType||"LOCAL"!==e.type&&"STEPGROUP"!==e?.type?"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":h[e.type||""]||"":"step_group_variable"},p=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;function m(e){if(e.endsWith("px")){const t=parseInt(e.slice(0,-2),10);return isNaN(t)?212:t-66}return 212}const A=o(null);l(()=>{void 0!==f&&f>=0&&requestAnimationFrame(()=>{A.current?.scrollToIndex({index:f,behavior:"auto",align:"center"})})},[f,r]);return e("div",{className:I("ff-variable-dropdown",s),role:"listbox","aria-label":"Variable suggestions",style:a?{top:a.top,left:a.left,width:c,height:d,zIndex:u}:{width:c,height:d,zIndex:u},children:K(r)?e("div",{className:"ff-variable-option ff-variable-option-no-data",role:"status","aria-live":"polite","aria-label":"No variable options available",children:e(U,{as:"span",fontSize:12,children:"No Option"})}):e(SM,{"aria-label":"Variable options",totalCount:r.length,ref:A,data:r,itemContent:a=>{const o=r[a];return o?e("div",{className:I("ff-variable-data",{"ff-variable-data--highlighted":f===a}),onMouseDown:()=>i(o),role:"option","aria-selected":f===a,"aria-label":p(o),children:c.endsWith("px")?n(t,{children:[e(Y,{title:xn(p(o),m(c),"pixel")?p(o):"",placement:"bottom",style:{width:`${m(c)}px`},children:e(U,{as:"span",fontSize:12,className:"ff-truncated_text",children:p(o)})}),e(q,{name:C(o),height:24,width:24})]}):e(Cw,{option:o})},`${o.id}-${a}`):null},style:{height:d,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},lL=({data:r=[],width:i,height:a,lineChartWidth:o,yAxisLabel:s,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:C,textSize:p,fontWeight:m,numberSize:A,chartName:g,shouldCenterSinglePoint:v,xAxisLabelGap:y=16,isLeftOverflow:w=!1})=>{const b=40,E=i-80,M=a-80,[L,H]=c(!1),[x,V]=c({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{H(!1),V(e=>({...e,tooltip:{...e.tooltip,visible:!1}}))};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[]);if(!(r&&r.length>0&&r?.some(e=>Array.isArray(e?.data)&&e?.data?.length>0))){const t=[];for(let e=6;e>=0;e--){const n=new Date;n.setDate(n.getDate()-e);const r=n?.toLocaleDateString("en-US",{day:"numeric",month:"short"});t.push(r)}const r=1024,o=6,l=7;return n("div",{className:"ff-line-chart-text",style:{width:i+20+y,gap:y},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:a},children:e(U,{className:"ff-line-chart-yAxisLabel",fontSize:p,fontWeight:"semi-bold",children:s})}),e("div",{className:"ff-line-chart-svg",children:e("svg",{height:a,width:i,className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:M,x2:E,y2:M,stroke:f,strokeWidth:1}),e("text",{x:E/2.1,y:M+b/1.2,textAnchor:"middle",fill:C,className:"ff-line-chart-x-axis-label",style:{fontSize:p,fontWeight:m},children:d}),t.map((t,n)=>e("text",{x:n*(E/(l-1)),y:M+15,textAnchor:0===n?"start":n===l-1?"end":"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:t},t)),Array.from({length:o}).map((t,n)=>{const i=n*r/(o-1),a=i/1024;return e("text",{x:-10,y:M-i*M/r,textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:a?.toFixed(1)},`y-${n}`)})]})})})]})}function k(e){if(!isNaN(e))return parseFloat(e);const t=Vr,n=e.match(t);if(!n)throw new Error("Invalid input format. Use '<value> <unit>' format (e.g., '10.9580078125 KB') or just a number.");const r=parseFloat(n[1]);switch(n[2]?n[2].toUpperCase():null){case"GB":return parseFloat((1024*r).toFixed(2));case"MB":return parseFloat(r.toFixed(2));case"KB":return parseFloat((r/1024).toFixed(2));default:throw new Error("Invalid unit. Supported units are GB, MB, and KB.")}}const S=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),Z="date",O=S?"totalMemory":"value",z=e=>{const t=r?.[0]?.data?.length;if(1===t)return v?E/2:E;const n=r[0].data.findIndex(t=>t[Z]===e);return-1===n?0:n/(t-1)*E},N=Math.max(...r?.flatMap(e=>e?.data?.map(e=>k(e[O]))),5),I=e=>{if("memory"===g){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>k(e[O]))));return M-e*M/(t>1024?t:1024)}return M-e*M/(0===N?1024:N)},T=e=>{if(1===e?.length){const t=e?.[0],n=z(t[Z]),r=I(k(t[O]));return`M 0 ${I(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[Z]),a=I(k(n[O]));if(0===r)return`M ${i} ${a}`;const o=e[r-1],l=o?z(o[Z]):0;return`${t} C ${l+(i-l)/2} ${o?I(k(o[O])):0}, ${i-(i-l)/2} ${a}, ${i} ${a}`},"")},D=r[0].data,F=g?`${g} line chart`:"Line chart";return n("section",{className:"ff-line-chart-text",style:{width:i+20+y,gap:y},"aria-label":F,children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:a},children:e(U,{className:"ff-line-chart-yAxisLabel",fontSize:p,fontWeight:"semi-bold",children:s})}),n("div",{className:"ff-line-chart-svg",children:[e("svg",{height:a,width:i,onMouseMove:e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left-b;if(e.clientY-t.top-b>M)return H(!1),void V({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});let i={hoverValues:{},dotPositions:{}},a=null;r.forEach((e,t)=>{const r=e.data.reduce((e,t)=>{const r=Math.abs(n-z(t[Z]));return r<e.distance?{point:t,distance:r}:e},{point:null,distance:1/0}).point;r&&(a=r[Z],i.hoverValues[t]=((e,t=2)=>{let n="";if("string"==typeof e){const t=e.match(Lr),r=e.match(Hr);t&&(e=parseFloat(t[0])),r&&(n=r[0])}const r=Math.pow(10,t);return`${Math.ceil(e*r)/r} ${n}`.trim()})(r[O]),i.dotPositions[t]={x:z(r[Z]),y:I(k(r[O]))})}),H(!0),V({cursorX:n,hoverValues:i.hoverValues,dotPositions:i.dotPositions,currentXValue:a,tooltip:a?{visible:!0,left:e.clientX+10,top:e.clientY-20}:{visible:!1,left:0,top:0}})},onMouseLeave:()=>V({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null}),className:"ff-line-chart-svg",role:"img","aria-label":F,children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:0,x2:0,y2:M,strokeWidth:2}),e("line",{x1:0,y1:M,x2:E,y2:M,stroke:f,strokeWidth:1}),e("text",{x:E/2.1,y:M+b/1.2,textAnchor:"middle",fill:C,className:"ff-line-chart-x-axis-label",style:{fontSize:p,fontWeight:m},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:T(r.data),fill:"none",stroke:r.color,strokeWidth:o,opacity:(a=r.data,a.every(e=>0===k(e[O]))?.5:1)}),x.dotPositions[i]&&n(t,{children:[e("line",{x1:x.dotPositions[i].x,y1:0,x2:x.dotPositions[i].x,y2:M,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:x.dotPositions[i].x,cy:x.dotPositions[i].y,r:5,fill:"white",stroke:r.color,strokeWidth:o,style:{transition:"cx 0.1s, cy 0.1s"}}),e("line",{x1:0,y1:x.dotPositions[i].y,x2:E,y2:x.dotPositions[i].y,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"})]})]},i):null;var a}),(()=>{if(1===D.length){const t=D?.[0];return e("text",{x:v?E/2:E,y:M+15,textAnchor:v?"middle":"end",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=t[Z]?String(t[Z]):""},String(t[Z]))}if(D.length<7)return D.map(t=>e("text",{x:z(t[Z]),y:M+15,textAnchor:"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=t[Z]?String(t[Z]):""},String(t[Z])));{const t=(i-80-7*9.2)/6;return Array.from({length:7}).map((n,r)=>{const i=Math.floor(r*(D?.length-1)/6),a=D[i];return e("text",{x:r*t,y:M+15,fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:A},children:null!=a?.[Z]?String(a?.[Z]):""},String(a?.[Z]))})}})(),(()=>{if("memory"===g){const t=Math.max(N,1024);return Array.from({length:6}).map((n,r)=>{const i=r*t/5,a=i/1024;return e("text",{x:-10,y:I(i),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:a.toFixed(1)},`y-${r}`)})}return Array.from({length:6}).map((t,n)=>{const r=n*N/5;return e("text",{x:-10,y:I(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:A},children:r.toFixed(0)},`y-${n}`)})})()]})}),L&&x.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",role:"tooltip","aria-live":"polite",style:{left:w&&x.tooltip.left/2>i/1.75?x.tooltip.left-180:x.tooltip.left,top:x.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:x.currentXValue}),Object.entries(x.hoverValues).map(([t,i])=>!1!==r[Number(t)]?.show&&n("div",{className:"ff-line-chart-inner-tooltip",children:["default"!==r[Number(t)]?.name&&e("div",{className:"ff-line-chart-status-dot",style:{backgroundColor:r[Number(t)]?.color}}),r[Number(t)]?.name,": ",i]},t))]})]})]})},sL=({onClose:t,top:r="100px",left:i="0px",className:a,description:o="Download and Install the fireflink client to run the script",onClick:s=()=>{},optionZIndex:c=10000001})=>{l(()=>{const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]);return n("section",{className:`ff-download-client-wrapper ${a}`,role:"dialog","aria-label":"Download client",style:{top:r,left:i,zIndex:c},children:[n("header",{className:"ff-download-client-header-wrapper",children:[e("div",{className:"ff-download-client-hollow-triangle"}),e(U,{fontWeight:"semi-bold",lineHeight:"32px",className:"ff-download-client-header-text",id:"download-client-title",children:"Download client"}),e(q,{name:"close",color:"var(--brand-color)",className:"ff-download-client-close-icon",height:12,width:12,"aria-label":"Close download client"})]}),n("div",{className:"ff-download-client-content-text",role:"group","aria-labelledby":"download-client-title",children:[e(U,{as:"div",color:"var(--download-client-content-text-color)",fontWeight:"semi-bold",textAlign:"center",lineHeight:"26px",children:o}),e(U,{as:"div",className:"ff-download-client-description-text",textAlign:"center",fontWeight:"medium",lineHeight:"26px",children:"Choose OS to Download"}),e("div",{className:"ff-download-client-os-wrapper",role:"group","aria-label":"Choose operating system",children:["windows","mac_icon","linux"]?.map(t=>e("button",{type:"button",className:"ff-os-version-wrapper",onClick:()=>{s("mac_icon"===t?"mac":t)},"aria-label":`Download for ${"mac_icon"===t?"macOS":t}`,children:e(q,{name:t,height:36,width:36})},t))})]})]})},cL=({legendName:t,height:r,width:i,children:a})=>e("div",{className:"ff_fieldSet_container",role:"group","aria-label":t||"Fieldset",children:n("fieldset",{className:"ff_fieldSet",style:{height:r,width:i},"aria-label":t||"Fieldset",children:[e("legend",{className:"ff_legend_container",children:e(U,{color:"var(--license_header_text_color)",fontSize:8,lineHeight:"12px",children:t})}),e("div",{className:"ff_children_container",role:"region","aria-label":`${t||"Fieldset"} content`,children:a})]})}),dL=({onSelectVariable:t,dropdownPosition:n,filteredOptions:r=[],position:i="relative",width:a="100%",zIndex:s,truncateTextValue:c=34,highlightedIndex:d})=>{const u=o(null);return l(()=>{u.current?.scrollIntoView({block:"nearest"})},[d]),e("div",{className:I(`ff-variable-dropdown-container ${i}`),style:n?{top:n.top+30,left:n.left-30,width:a,zIndex:s}:{width:a,zIndex:s},children:K(r)?e("div",{className:"ff-variable-option no-data",children:e(U,{as:"div",children:"No Option",fontSize:14})}):r?.map((n,r)=>e("div",{className:I("ff-variable-option",{"ff-variable-option--highlighted":d===r}),onMouseDown:()=>t(n),ref:d===r?u:null,children:e(Y,{title:xn(n?.name,c,"pixel")?n?.name:"",children:e(U,{children:Hn(n?.name,c,"pixel")})})},n?.id))})},uL=a(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:a=[],placeholder:s="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:C="",dropdownWidth:p="100%",dropdownHeight:m="160px",isHash:A=!1,isOnlyHash:g=!1,dataFiles:v=[],showAddVariableIcon:y=!0,helperText:w="",error:E,autoComplete:M="off",required:L=!1,zIndex:H=9999,truncateTextValue:x=34,formProps:V={},getSelectedVariable:k=()=>{},symbol:S="$",type:Z="text",clearIcon:O=!0,inputTitle:z="",onBlur:N,helperTextWidth:T,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...F},R)=>{const[P,B]=c(!1),[j,_]=c(!1),[W,X]=c(0),[Q,G]=c(!1),[J,$]=c(null),[ee,te]=c(0),[ne,re]=c(!1),[ie,ae]=c([]),[oe,le]=c(!1),se=o(null),ce=o(null),[de,ue]=c("auto"),fe=D?.isShowIcon;l(()=>{const e=ce.current?.querySelector(".ff-input-container");if(!e)return;const t=new ResizeObserver(e=>{for(let t of e){const e=`${t.contentRect.width}px`;ue(e)}});return t.observe(e),()=>{t.disconnect()}},[]),b(R,()=>se.current),l(()=>{null!==J&&se.current&&(se.current.setSelectionRange(J,J),se.current.focus())},[J]),l(()=>{A&&B(C.startsWith("#"));const e=v?.find(e=>e.name===C),t=a?.find(e=>e?.name===C);if(C.startsWith("#")&&A){const e=C.slice(1).toLowerCase(),t=v.filter(t=>t.name.toLowerCase().includes(e));ae(t),B(!0)}const n=null!==e&&C.startsWith("#"),r=null!==t&&C.startsWith("$"),i=C.length>(t?.name.length||0),o=C.length>0&&!r||C.startsWith("#");g?re(!1):r||n||C.includes("$")||C.includes("#")?(re(!1),o&&re(!0)):i&&!C.includes("$")&&re(!0)},[C]);const he=()=>{se.current&&te(se.current.selectionStart||0)},Ce=he,pe=he;l(()=>{se.current&&te(se.current.selectionStart||0)},[C]);const me=e=>{if(se.current){const{selectionStart:t,selectionEnd:n}=se.current,r=`${e.name}`;let a;if(a=A&&"#"===C[0]?e.name+C.slice(n||1):e.name,d){d({target:{value:a}},e),k(e.name)}se.current.value=a,i?.(e),$((t||0)+r.length),B(!1),_(!0)}};const Ae=function(e,t,n){let r=!1,i="";const a="}"===C[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const o=e.lastIndexOf(S,t-1),l=e.indexOf(S,t);if(-1!==o&&(g&&"$"===e[o]?r=!1:t===o+1?(r=!0,i=""):(i=e.slice(o+1,-1===l?void 0:l),t>o+1&&(i=e.slice(o+1,t)),r=!0),j&&a&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>e.name.toLowerCase().includes(i.toLowerCase()))||(n=[])}return{showDropdown:r,searchString:i}}(C,ee,a),ge=C.startsWith("#"),ve=ge?ie:a?.filter(e=>e?.name?.toLowerCase()?.includes(Ae?.searchString?.toLowerCase()));l(()=>{X(0)},[A,Ae?.showDropdown]);const ye=Boolean(Ae?.showDropdown&&Q),we=Boolean(P&&A&&Q),be=Boolean((ge?we:ye)&&ve.length),Ee=Boolean(ge?we:ye);l(()=>{if(!Ee)return void le(!1);const e=()=>{if(!ce.current)return;const e=ce.current.getBoundingClientRect(),t=window.innerHeight-e.bottom,n=e.top,r=Math.max(ve.length,1),i=r<4?40*r+10:parseInt(m,10)||160;le(t<i+10&&n>t)};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[Ee,m,ve.length]);return n("div",{className:I("ff-add-variable-container",{"ff-dropdown-flip":oe}),children:[n("div",{className:"ff-add-variable-input",ref:ce,children:[e(Y,{title:z,style:{width:"100%"},children:e(Vi,{...F,name:"add_variable",ref:se,type:Z,className:I("ff-variable-input-container",{"ff-variable-input-container--show-icon":fe}),value:C,onKeyDown:e=>{switch(e.key){case"ArrowDown":if(!be)return;e.preventDefault(),e.stopPropagation(),X(e=>e<ve.length-1?e+1:e);break;case"ArrowUp":if(!be)return;e.preventDefault(),e.stopPropagation(),X(e=>e>0?e-1:0);break;case"Enter":{if(!be)return;e.preventDefault(),e.stopPropagation();const t=ve[W];t&&me(t);break}case"Escape":if(!be)return;e.preventDefault(),e.stopPropagation(),B(!1),G(!1),X(0)}},onChange:d,onPaste:()=>{re(!0)},variant:"primary",label:t,placeholder:s,onClick:Ce,onKeyUp:pe,onFocus:()=>G(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||G(!1)})(e),N?.(e)},autoComplete:M,helperText:w,error:E,required:L,helperTextWidth:T,...V})}),!K(C)&&ne&&y&&e("div",{className:"ff-create-variable-container",onClick:f,children:e(U,{fontWeight:"regular",fontSize:"10px",color:"var(--brand-color)",cursor:"pointer",children:"Create Variable"})}),!K(C)&&!g&&e("div",{className:I("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":fe}),children:O&&e(Y,{title:"Cancel",style:{zIndex:99999},children:e(q,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),fe&&e("div",{className:"ff-info-icon-container",children:e(Y,{title:fe&&!D?.isIconDisable?D?.iconToolTipTitle:"",children:e(q,{name:D?.iconName||"",hoverEffect:!1,height:16,width:16,color:D?.iconColor||"var(--text-area-default-color)",onClick:e=>{D?.onIconClick&&D?.onIconClick(e)},disabled:D?.isIconDisable,cursorType:"pointer"})})})]}),Ae?.showDropdown&&Q&&e(oL,{position:"absolute",zIndex:H,truncateTextValue:x,width:de,height:0===ve.length?"auto":m,optionsList:ve,onSelectVariable:me,highlightedIndex:W},Ae?.searchString||""),P&&A&&Q&&e(dL,{position:"relative",zIndex:H,truncateTextValue:x,width:de,filteredOptions:ve,onSelectVariable:me,highlightedIndex:W})]})}),fL=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:a,onValueChange:o,variableName:s,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:C,handleSubmit:p,mode:m="create",disabled:A,dataFiles:g=[],truncateTextValue:v=34,isEnterKeySubmit:y=!1,showHideValueOption:w=!0})=>{const[b,E]=c(!1),[M,L]=c(""),[H,x]=c(),[V,k]=c(!1),[S,Z]=c(!1),[O,z]=c({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===m&&z({name:s,value:d,isChecked:h})},[]);const N=e=>e&&0!==e.length?" "===e[0]||" "===e[e.length-1]?"Space is not allowed at starting and at the end":qn.test(e)?e.length<3?"Name should contain at least 3 characters":e.length>25?"Name can contain at most 25 characters":"":"Name should be alphanumeric":"Variable Name is required";function I(e){const t=!!e,n=qn.test(e),r=$r.test(e),i=e.length>=3&&e.length<=25;return t&&n&&r&&i}l(()=>{const e=N(s);E(!!e),L(e)},[s]),l(()=>{if("edit"!==m)return;const{name:e,value:t,isChecked:n}=O;Z(s!==e||d!==t||h!==n)},[m,s,d,h,O]);const T=()=>{!V&&I(s)&&(k(!0),p())};l(()=>{if(!y)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!I(s)||V||"edit"===m&&!S||T()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[y,s,d,h,V,m,S,f]);return e(vn,{zIndex:1350,onClose:i,isOpen:t,title:"create"===m?"Create Variable":"Edit Variable",width:"284px",height:w?"280px":"250px",top:"30%",right:8,isFooterRequired:!0,overlay:!0,footerContent:e(()=>n("div",{className:"ff-create-slider-footer",role:"group","aria-label":"Form actions",children:[e(W,{onClick:i,label:"Cancel",variant:"tertiary"}),e(W,{variant:"primary",label:"create"===m?"Create":"Update",type:"submit",onClick:T,disabled:!I(s)||V||"edit"===m&&!S})]}),{}),children:n("div",{className:"ff-create-variable-slider",role:"form","aria-label":"Create or edit variable form",children:[e("div",{className:"ff-create-variable-slider-input",role:"group","aria-label":"Variable name input",children:e(Vi,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:s||"",onChange:e=>{k(!1),a(e.target.value)},error:b,helperText:M,onBlur:e=>{const t=e.target.value,n=N(t);E(!!n),L(n)}})}),e("div",{role:"group","aria-label":"Variable type selection",children:e(Za,{label:"Variable Type",required:!0,onChange:e=>{u(e),k(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===m})}),e("div",{role:"group","aria-label":"Variable value input",children:e(uL,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:v,dataFiles:g,dropdownWidth:"100%",setHashInputValue:x,hashInputValue:H||{},value:d||"",type:h?"password":"text",onChange:(e,t)=>{const n=e.target.value;o(n,t)},showAddVariableIcon:!1})}),w&&n("div",{className:"ff-hide-value-content",role:"group","aria-label":"Hide value option",children:[e(En,{onChange:e=>C(e.target.checked),name:"hideValue",label:"Hide Value",checked:h,disabled:A}),e(Y,{title:"Once the value is hidden, it cannot be undone",children:e(q,{name:"info",width:12,height:12})})]})]})})},hL=e=>{if(null==e||""===e)return{};return{width:e,flex:`0 0 ${"number"==typeof e?`${e}px`:e}`}},CL=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:a="row",noDataContent:o,height:l="100%",withFixedHeader:s=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,C]=c(-1),p="number"==typeof r[0]?.width?Math.max(r[0]?.width-8,0):void 0,m=(e,t)=>{let n=e[t.accessor];return t.cell?t.cell({value:n,row:e,column:t.accessor}):t.accessor||n&&"object"!=typeof n?n:"--"},A=t=>t.map((t,n)=>e("table",{className:"ff-table-accordion__table",cellSpacing:0,children:e("tbody",{className:"ff-table-accordion__tbody",children:e("tr",{className:"ff-table-accordion__body-row",children:r.map((n,r)=>e("td",{className:"ff-table-accordion__body-cell",style:hL(n.width),children:"column"===a&&0===r?"":e(U,{as:"div",className:"ff-table-accordion__cell-typography",children:n.cell?m(t,n):e(Qs,{placement:"bottom",children:m(t,n)})})},n.accessor+r))},t.id||n)})},`accordion-table-${n}`));return n("div",{style:{height:l},className:I("ff-table-accordion",{"ff-table-accordion--fixed-header":s}),children:[e("table",{cellSpacing:0,className:I("ff-table-accordion__table",{"ff-table-accordion__table--fixed-header":s}),children:e("thead",{children:e("tr",{className:"ff-table-accordion__header-row",children:r.map(t=>e("th",{style:hL(t.width),className:I("ff-table-accordion__header-cell",d&&`ff-table-accordion__header-cell--${d}`),children:e("div",{children:e(U,{fontWeight:"semi-bold",fontSize:12,children:t.header})})},`header-${t.header}`))})})}),"row"===a&&i.map((n,r)=>e(wn,{highlightText:t,headerTitle:"string"==typeof n.title?e("div",{style:{maxWidth:void 0!==p?`${p}px`:"100%"},children:e(Qs,{children:e(yn,{text:n.title,highlight:t})})}):e(Qs,{children:"row.title"}),color:"var(--text-color)",accordionContent:A(n.data),disable:n.disable,disableInfoMessage:n.disableInfoMessage,accordionStateIconName:"arrows_down_icon",AccordionStateIconWidth:u,AccordionStateIconHeight:f,className:"ff-table-accordion__row-accordion"},`accordion-row-${r}`)),"column"===a&&i.map((i,a)=>n("div",{className:"ff-table-accordion__column-group",children:[e("div",{className:"ff-display-flex",children:n("div",{className:`ff-table-accordion__column-header ${i.disable&&"ff-table-accordion__column-header--disabled"}`,style:r[0]?hL(r[0].width):{},children:[e("div",{className:"ff-table-accordion__column-label",children:e(U,{as:"div",children:e(Qs,{children:e(yn,{text:"string"==typeof i.title?i.title:"",highlight:t})})})}),e("div",{className:"ff-table-accordion__column-toggle",onClick:()=>{!i.disable&&(e=>{C(e===h?-1:e)})(a)},children:e(q,{name:h===a?"arrows_down_icon":"arrows_right_icon",color:"var(--table-with-accordion-icon-color)",width:u,height:f,hoverEffect:!1})})]})}),h===a&&e("div",{children:A(i.data)})]},`column-accordion-${a}`)),K(i)&&e("div",{className:"ff-table-accordion__empty-state",style:{height:`calc(${l} - 50px)`},children:o})]})},pL=({progressPercentage:t,totalMemory:r,usedMemory:i,color:a="var(--brand-color)",trackColor:o="#f0f0f0",height:l=10,label:s,labelFontSize:c=12,labelTextColor:d="var(--ff-card-status-text-color)",showPercentage:u=!1,percentageFontSize:f=10,percentageTextColor:h="var(--tooltip-text-color)",progressBarWidth:C="200px"})=>{const p=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),i=n[2];return"gb"===i?1024*r:"kb"===i?r/1024:r};let m=0,A=s;if(void 0!==r&&void 0!==i){const e=p(i),t=p(r);t>0?(m=e/t*100,A=s||i):(m=0,A="0MB")}else m=t||0;const g=Math.max(0,Math.min(m,100));return n("section",{className:"ff-progress-bar-container "+(A?"ff-has-label":""),style:{width:C},"aria-label":"Progress bar container",children:[e("div",{className:"ff-progress-bar-track",style:{backgroundColor:o,height:`${l}px`},"aria-label":A?`${A} progress`:"Progress",children:e("div",{className:"ff-progress-bar",style:{width:`${g}%`,backgroundColor:a,height:`${l}px`},children:u&&e(U,{className:"ff-progress-bar-percentage",fontSize:f,color:h,children:`${Math.round(g)}%`})})}),A&&e("div",{className:"ff-progress-bar-label","aria-label":"Progress label",children:e(U,{fontSize:c,color:d,children:e(Y,{title:xn(A,10,"count")?A:"",children:Hn(A,10,"count")})})})]})},mL=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:a=!1,type:l="button",className:s="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:C="auto",buttonHeight:p="auto",selectedFile:m={},handleCloseIcon:A,isMandatory:g=!1})=>{const v=o(null),[y,w]=c(0);u(()=>{v.current&&w(v.current.getBoundingClientRect().width-10)},[C]);const b=m?.name||i,E=y?Hn(b,y,"pixel"):b,M=!!y&&xn(b,y,"pixel"),L=m?.name?`Choose file, selected ${m.name}`:`Choose file, ${i}`;return e("div",{ref:v,style:{width:C},role:"group","aria-label":L,children:e(Y,{title:M?b:"",children:e(W,{variant:t,label:E,type:l,onClick:r,buttonWidth:C,buttonHeight:p,isChooseFile:h,size:n,disabled:a,className:s,iconName:f,style:d,iconPosition:"right",selectedFile:m,handleCloseIcon:A,isMandatory:g})})})},AL=({selected:t="text",handleClick:r,tabList:i})=>{const a=i?.includes("Automation"),o=i?.includes("Manual");return n("div",{className:"ff-script-switch-container",children:[e(Y,{title:a?"Automation":"Add Automation",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Automation"===t?"active":""),onClick:()=>r(a?"Automation":"Add Automation"),children:e(q,{name:a?"automation_testcase":"add_testcase",color:"Automation"===t?"var(--primary-button-text-color)":"var(--description-text)"})})}),e(Y,{title:o?"Manual":"Add Manual",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Manual"===t?"active":""),onClick:()=>r(o?"Manual":"Add Manual"),children:e(q,{name:o?"manual_testcase":"add_testcase",color:"Manual"===t?"var(--primary-button-text-color)":"var(--description-text)"})})})]})},gL=({selected:t,handleClick:n,tabList:r})=>e("div",{className:"ff-switch-container",children:r.map(r=>e(Y,{title:t===r.name?null:r.tooltip,zIndex:1e3,children:e("div",{className:"ff-switch-button "+(t===r.name?"active":""),onClick:()=>n(r.name),children:e(q,{name:r.icon,color:t===r.name?"var(--primary-button-text-color)":"var(--description-text)"})})},r.name))}),vL=({onModalClose:t,MediaSrc:r,fileName:a,onDeleteClick:o,mediaType:s,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:C,isMediaIcon:p=!1,previewOnly:m=!1,iconName:A="video_preview",isDisabled:g=!1})=>{const[v,y]=c(!1),w=i.useRef(null),b=()=>{y(!0),h&&h(d)},E=()=>{t?.(),y(!1)},M=()=>{C&&C(d)};return l(()=>{m&&y(!0)},[m]),n("section",{"aria-label":"Media preview",role:"region",children:[!m&&(p?e(q,{name:A,hoverEffect:!0,onClick:b,disabled:g,"aria-label":"Open media preview"}):e(fw,{mediaSrc:r,mediaType:s,onDownloadClick:M,onDeleteClick:()=>o?.(r),onExpandClick:b,fileName:a,fileId:d,thumbnailMediaSrc:u,isDelete:f})),v&&e(Op,{isOpen:v,onClose:E,isFooterDisplayed:!1,isHeaderDisplayed:!1,customWidth:"1130px",customHeight:"570px",zIndex:1e4,children:n("div",{className:"media-wrapper","aria-label":"Media preview modal",children:[n("div",{className:"ff-expand-icons","aria-label":"Media preview actions",children:[e(Y,{title:"Download File",children:e(q,{name:"download_file_icon",onClick:M,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Download media file"})}),e(Y,{title:"Expand",children:e(q,{name:"expand",onClick:b,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Expand media preview"})}),e(Y,{title:"close",children:e(q,{name:"close",onClick:E,color:"var(--icons-default-color)",className:"header-icons","aria-label":"Close media preview"})})]}),"image"===s&&e("img",{src:r,alt:a||"Media preview image",height:"auto"}),"video"===s&&e("video",{src:r,controls:!0,controlsList:"nodownload",className:"ff-video-preview",ref:w,onCanPlay:()=>{if(w.current){const e=w.current.play();void 0!==e&&e.catch(e=>{console.error("Autoplay failed:",e)})}}})]})})]})},yL=({children:t,orientation:r="",navBarIcons:a=[],mobileHeight:o=448,mobileWidth:l=220,UtilityBar:s,tooltip:c={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?o:l,C=f?l:o,p=s&&"top"===u,m=s&&"bottom"===u,A=s&&"left"===u;return n("section",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",A?"ff-side-nav-left":"",p?"navbar-top":"",m?"navbar-bottom":""].filter(Boolean).join(" "),"aria-label":"Mobile preview",children:[p&&e("nav",{className:"ff-nav-bar top-nav-bar","aria-label":"Top navigation bar",children:a.map(({title:t,name:n,className:r,...i},o)=>{const l=c?.[n]??o;return e(Y,{title:c?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${o===a.length-1?"last-icon":""} ${p?"navbar-top":""}`,"aria-label":t||n||"Navigation icon",children:e(q,{name:n,...i})})},l)})}),e("main",{className:"ff-mobileskin-container",style:{height:h+16,width:C+16},"aria-label":"Mobile device frame",children:e("div",{className:"ff-mobile-container",style:{width:C,height:h,background:d||"transparent"},children:e("div",{className:"ff-mobile-image-container","aria-label":"Mobile screen content",children:i.isValidElement(t)?t:e("img",{src:t,alt:"Mobile content",style:{width:f?"100%":2.1*l+"px",height:f?"100%":.5*o+"px"}})})})}),s&&m&&e("nav",{className:"ff-nav-bar","aria-label":"Bottom navigation bar",children:a?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-nav-bar-icon ${t?.className||""} ${n===a.length-1?"last-icon":""}`,"aria-label":r||i?.name||"Navigation icon",children:e(Y,{title:r,children:e(q,{...i})})},n)})}),s&&A&&e("aside",{className:"ff-side-nav-bar","aria-label":"Side navigation bar",children:a?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-sidebar ${t?.className||""} ${n===a.length-1?"last-icon":""}`,"aria-label":r||i?.name||"Navigation icon",children:e(Y,{title:r,placement:"bottom",children:e(q,{...i})})},n)})})]})},wL=a(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:a=16,placeholder:l="Enter text",iconName:s="right_arrow_filled_icon",iconPosition:c="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:C="send",submitPrompt:p,onPromptChange:m,onBlur:A,onFocus:g,disableInput:v,isAdditionalIcon:y=!1,additionalIconName:w,additionIconToolTip:b,onAdditionalIconClick:E},M)=>{const L=o(null);Zn([{key:"Enter",action:()=>H()}],L);const H=e=>{f&&p?.(f.trim())};return n("section",{className:I("ff-prompt-container",{"icon-left":"left"===c,"icon-right":"left"!==c}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:L,"aria-label":"Prompt input container",children:[e(Y,{placement:"top",title:C,children:e(q,{name:s,className:"ff-prompt-icon",height:i,width:a,onClick:p,color:h,disabled:K(f),"aria-label":C||"Send prompt"})}),e("input",{ref:M,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:m,onFocus:g,onBlur:A,value:f,readOnly:v,"aria-label":l||"Prompt input"}),y&&w&&e(Y,{placement:"top",title:b,children:e(q,{name:w,className:"ff-prompt-icon additional-icon",height:i,width:a,onClick:E,"aria-label":b||"Additional action"})})]})}),bL=({content:t,isVisible:n,maxWidth:r=300,onClick:i,isClickable:a=!0,arrowPosition:o="left"})=>e("section",{onClick:i,style:{width:`${r}px`,"--triangle-position":r-4+"px"},className:I("ff-chat-msg-box",{visible:n,hidden:!n,pointer:a,default:!a,"chat-arrow-left":"left"===o,"chat-arrow-right":"left"!==o}),role:"note","aria-label":"Message box",children:e("div",{className:I("content",`arrow-${o}`),"aria-label":"Message content",children:e(U,{children:t})})}),EL=({iconName:r,iconPosition:{top:i,left:a,bottom:o,right:l},hoverIconPosition:{top:s,left:d,bottom:u,right:f},modalPosition:{top:h,left:C,bottom:p,right:m},modalWidth:A,modalHeight:g,headerContent:v="Header Content",footerContent:y="Footer Content",iconWidth:w,iconHeight:b,modalHeading:E="Ask Fia",children:M,onClearChat:H})=>{const[x,V]=c(!1),[k,S]=c(!1),Z=`${E} chat window`;return n(t,{children:[n("div",{style:{top:void 0!==i?`${i}px`:void 0,left:void 0!==a?`${a}px`:void 0,bottom:void 0!==o?`${o}px`:void 0,right:void 0!==l?`${l}px`:void 0},className:"ff-dynamic-icon-container",children:[e(q,{className:"ff-dynamic-icon",name:r,onClick:()=>{S(e=>!e),setTimeout(()=>V(e=>!e),10)},height:b,width:w,"aria-label":"Open chat modal"}),e("div",{style:{top:void 0!==s?`${s}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-chat-icon-hover",children:e(q,{name:"ask_fia_icon",height:32,width:82})})]}),k&&L(e("div",{className:I("ff-dynamic-modal",{open:x}),role:"dialog","aria-modal":"true","aria-label":Z,style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==C?`${C}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0,position:"fixed",height:g,width:A},children:n("div",{className:"ff-dynamic-modal-content",children:[v&&e("header",{className:"ff-dynamic-modal-header",children:n("div",{className:"header-container",children:[n("div",{className:"header-left",children:[e(q,{height:16,width:16,name:"fia_icon"}),e(U,{fontWeight:"medium",children:E})]}),n("div",{className:"header-right",children:[e("span",{className:"action",children:e(Y,{title:"Clear chat",placement:"bottom",children:e(q,{height:16,width:16,name:"delete",color:"var(--tooltip-text-color)",onClick:H,"aria-label":"Clear chat"})})}),e("span",{className:"action",children:e(Y,{title:"Close",placement:"bottom",children:e(q,{height:16,width:16,name:"close",color:"var(--tooltip-text-color)",onClick:()=>(V(!1),void setTimeout(()=>S(!1),300)),"aria-label":"Close chat modal"})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:M}),y&&e("footer",{className:"ff-dynamic-modal-footer",children:y})]})}),document.body)]})},ML=a(({iconName:r,hoverTitle:i,iconPosition:{top:a,left:o,bottom:l,right:s},hoverIconPosition:{top:c,left:d,bottom:u,right:f},modalPosition:{top:h,left:C,bottom:p,right:m},modalWidth:A,modalHeight:g,headerContent:v="Header Content",footerContent:y="Footer Content",iconWidth:w,iconHeight:E,children:M,isVisible:H,isOpen:x,onOpen:V,onClose:k,isIconVisible:S},Z)=>{b(Z,()=>({closeModal:k}));const O=i?`${i} chat window`:"AI chat window";return n(t,{children:[S&&n("div",{style:{top:void 0!==a?`${a}px`:void 0,left:void 0!==o?`${o}px`:void 0,bottom:void 0!==l?`${l}px`:void 0,right:void 0!==s?`${s}px`:void 0},className:"ff-ai-dynamic-icon-container",children:[e(q,{className:"ff-ai-dynamic-icon",name:r,onClick:V,height:E,width:w,"aria-label":"Open AI chat modal"}),e("div",{style:{top:void 0!==c?`${c}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-ai-chat-icon-hover",children:e("div",{className:"ai-hover-leaf",children:e(U,{fontWeight:"bold",fontSize:14,color:"var(--chatbot-leaf-text)",children:i})})})]}),H&&L(e("div",{className:I("ff-ai-dynamic-modal",{open:x}),role:"dialog","aria-modal":"true","aria-label":O,style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==C?`${C}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0,position:"fixed",height:g,width:A},children:n("div",{className:"ff-ai-dynamic-modal-content",children:[v&&e("header",{className:"ff-ai-dynamic-modal-header",children:v}),e("div",{className:"ff-ai-dynamic-modal-body",children:M}),y&&e("footer",{className:"ff-ai-dynamic-modal-footer",children:y})]})}),document.body)]})}),LL=({variant:t,title:r,tabTitle:i,comment:a,profileShortName:o})=>n("article",{className:"ff-history-card","aria-label":`History card for ${i}`,children:[e("header",{className:I("header",`header--${t}`),children:e(U,{fontWeight:"semi-bold",children:i})}),n("div",{className:"body",children:[e("section",{className:"title","aria-label":"History card title",children:n("div",{className:"profile",children:[e(U,{className:I("avatar",`avatar--${t}`),children:o}),e(U,{children:r})]})}),n("section",{className:"comment-container","aria-label":"History card comments",children:[e(U,{fontWeight:"semi-bold",className:"heading",children:"Comments:"}),e(U,{color:"var(--details-page-value-color)",className:"comment",children:a})]})]})]}),HL=({onChange:t,disabled:r,checked:i=!1,id:a="toggle",path:o})=>{const l=`ff-toggle-${a}`;return n("div",{className:"ff--ai-switch-container",role:"group","aria-label":r?"AI toggle disabled":i?"AI toggle on":"AI toggle off",children:[e("input",{className:"ff--ai-switch-checkbox",id:l,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:i,"aria-label":"AI toggle","aria-checked":i}),e("label",{className:I("ff--ai-switch-label",{"ff--ai-switch-label--disabled":r}),htmlFor:l,children:e("span",{className:"ff--ai-switch-content",children:n("span",{className:"ff--ai-switch-content",children:[e(U,{className:I("ff--ai-switch-typography",{left:i,right:!i}),as:"div",fontWeight:"bold",fontSize:18,color:i?"var(--base-bg-color)":"var(--ff-ai-toggle-text-color)",children:"AI"}),e("img",{className:"ff--ai-switch-image",src:o,alt:"AI image"})]})})})]})},xL=a(({name:t,height:n=30,width:r=30,path:i="",onClick:a,color:s="var(--brand-color)",hoverEffect:c=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:C,y:p,tabIndex:m=-1,...A},g)=>{if(!_[t])return null;const v=o(null);l(()=>{v.current&&(void 0!==C&&v.current.setAttribute("x",String(C)),void 0!==p&&v.current.setAttribute("y",String(p)))},[C,p]);const y="function"==typeof a&&!u,w={ref:g,onClick:u?void 0:a,style:{height:`${n}px`,width:`${r}px`,cursor:u?"not-allowed":"pointer",opacity:u?.3:1},role:y?"button":void 0,"aria-label":t?`Animated setting ${t}`:"Animated setting","aria-disabled":!(!u&&y)||void 0,...A};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:"","aria-hidden":"true"})})}),VL=({id:r=0,serialNumber:i,activeId:a,setActiveId:s,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:C,onPreviousClick:p,disabled:m,isEditAccess:A,versionsLength:g,count:v,hiddenActions:y=[]})=>{const[w,b]=c(!1),[E,M]=c(!1),L=o(null),H=Array.isArray(y)?y:y?[y]:[],x=(e,t)=>{e.stopPropagation(),t()};l(()=>{L.current&&(()=>{if(L.current){const e=getComputedStyle(L.current),t=1.2*parseFloat(e.fontSize)*6;L.current.scrollHeight>t&&M(!0)}})()},[]);const V=e=>{e.stopPropagation(),b(!w)};return n("section",{className:`ff-prompt-container-Block ${a===r?"active":"inactive"} `,onClick:()=>{s(r),h()},"aria-label":`Prompt container ${i}`,children:[e(U,{fontSize:8,className:"ff-prompt-number-bg-color",as:"span",children:`Test cases ${i}`}),n(t,{children:[n("article",{className:"ff-prompt-content "+(w?"expanded":""),ref:L,"aria-label":"Prompt content",children:[d,w&&n(t,{children:[e("span",{role:"button","aria-label":"Collapse content",onClick:V,className:"read-less-btn",children:e(U,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read Less"})})," "]})]}),E&&!w&&e("div",{role:"button","aria-label":"Expand content",onClick:V,className:"read-more-btn",children:e(U,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read More"})})]}),n("footer",{className:"ff-prompt-icons","aria-label":"Prompt actions",children:[e("div",{className:"ff-prompt-icons-leftside","aria-label":"Prompt action icons",children:[{action:"delete",title:"Delete",color:"var(--ff-delete-button-attachment)"},{action:"edit",title:"Edit",color:"var(--label-edit-text-label-color)"},{action:"regenerate",title:"Regenerate",color:"var(--label-edit-text-label-color)"}].filter(e=>!H.includes(e.action)).map((t,n)=>{const r=A&&"delete"===t?.action||"regenerate"===t?.action&&(g??0)>=3||m;return e(Y,{title:t.title,placement:"bottom",children:e(q,{disabled:r,name:t.action,color:t.color,hoverEffect:!0,onClick:e=>((e,t)=>{e.stopPropagation(),u(t)})(e,t.action),"aria-label":t.title})},`${t?.title}-${n}`)})}),n("nav",{className:"ff-prompt-icons-rightside","aria-label":"Prompt navigation",children:[e(q,{disabled:1===v,className:"ff-prompt-icons-style",name:"arrow_left_accordian",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>x(e,p),cursorType:"pointer","aria-label":"Previous"}),f,e(q,{disabled:v===g,className:"ff-prompt-icons-style",name:"arrow_right_icon",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>x(e,C),cursorType:"pointer","aria-label":"Next"})]})]})]})},kL=a(({type:t="text",variant:r="primary",name:i="",label:a,disabled:o=!1,disableLinkIcon:l=!1,required:s=!1,placeholder:c="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:C="",onChange:p,onBlur:m,onFocus:A,autoComplete:g="off",autoFocus:v=!1,minValue:y=-1/0,maxValue:w=1/0,transparentBackground:b=!1,size:E="small",isLabelRequired:M=!0,onClick:L,onKeyUp:H,isViewMode:x=!1,...V},k)=>{const S=!K(d);return n("fieldset",{className:I("ff-link-input-fieldset",{"ff-link-input-fieldset--disabled":o}),"aria-label":a||i||"Link input",children:[n("div",{className:I("ff-link-input-container",{"ff-link-input-container--float":S,"ff-link-input-container--disabled":!!o}),children:[M&&n("label",{className:I(`ff-link-input-label-container ff-link-input-label-container--${E}`,{"ff-link-input-label-container--danger":!!u}),htmlFor:i,children:[s&&e("span",{className:"required-asterisk",children:"*"}),e("span",{className:I(`ff-link-input-label ff-link-input-label--${r}`,{"ff-link-input-label--no-hover":!!d,"ff-link-input-label--disabled":!!o,"ff-link-input-label--danger":!!u}),children:a})]}),e("input",{ref:k,name:i,value:d,type:t,spellCheck:!1,id:i,className:I(`ff-link-input ff-link-input-${r} default-input ff-link-input--${E}`,{"ff-link-input--transparentBackground":!!b,"ff-link-input--no-hover":!!d,"ff-link-input--disabled":!!o,"ff-link-input--danger":!!u,"ff-link-input--no-border":!!h,"ff-link-input--placeholder":!M},`${C}`),placeholder:c,disabled:x||o,onChange:p,onFocus:A,onBlur:m,autoComplete:g,autoFocus:v,min:y,max:w,onClick:L,onKeyUp:H,"aria-label":a||i||"Link input",...V}),e("div",{className:"input-link-icon","aria-label":"Link action",children:l||u||!S?e(q,{name:"link",disabled:!0,"aria-label":"Link icon"}):e(Y,{title:"Click here to navigate",children:e("span",{"aria-label":"Open link in new tab",children:e(q,{name:"link",disabled:!1,onClick:()=>{d&&!u&&window.open(d,"_blank")},"aria-label":"Open link"})})})})]}),f&&u&&e("span",{className:I("ff-link-input-message",{"ff-link-input-message--danger":!!u}),children:f})]})}),SL=({labelsList:r=[],height:i=""})=>{const a=Ai(),o=r[0]||"Chip",l=r.length>1?`plus ${r.length-1} additional labels`:"No additional labels",s=e("div",{className:"ff-chip-tooltip",children:r.filter((e,t)=>t>0).map((t,n)=>e(U,{as:"div",className:"ff-chip-tooltip-label",children:t},`label-${n}-${t}`))});return e(t,{children:!K(r)&&n("div",{className:"ff-chip-with-count-container",role:"group","aria-label":`${o} with count`,children:[e(U,{as:"div",fontWeight:"medium",className:"ff-chip-label",style:i?{height:i}:void 0,children:e(Qs,{children:r[0]||""})}),r.length>1&&n(t,{children:[n(U,{as:"div",className:"ff-chip-count","data-tooltip-id":`tooltip-${a}`,fontWeight:"medium",role:"status","aria-label":l,children:["+",r.length-1]}),e("div",{id:`tooltip-${a}`,className:"ff-chip-tooltip-template",children:e(U,{as:"div",children:s})})]})]})})};class ZL extends E{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const OL=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:a="To Add Group",disableButton:o=!1,stepCount:l=1,iconWidth:s=120,iconHeight:c=120,addContentLabel:d="step"})=>{const u=`${d}${l}: ${i} ${a}`.trim();return n("section",{className:"add-content-button "+(o?"disabled":""),"aria-label":u,children:[!K(t)&&e("div",{className:"icon-container",children:e(q,{name:t,width:s,height:c})}),n("div",{className:"typography-label-button",children:[n(U,{fontSize:"12px",fontWeight:"regular",lineHeight:"18px",children:[d+l," :"]}),e(U,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:"Click"}),e(Zp,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:o}),e(U,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:a})]})]})},zL=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:a,noBorder:o=!1,noPadding:l=!1,titleSize:s="12px"})=>{const[d,u]=c(0);return n("div",{className:"ff-tabs-slider-container",children:[n("div",{className:I(`ff-tab-row--${t} ff-tab-row-section`,{"ff-tab-row--no-border":o,"ff-tab-row--no-padding":l,"ff-tab-row--position":r.length>4}),children:[r.length>4&&e(q,{className:"ff-tab-icon ff-tab-icon--previous",name:""+(d?"arrow_left_accordian":""),onClick:()=>{d>0&&u(e=>e-1)},hoverEffect:!0}),e("div",{className:"ff-tab-row-carousel",children:e("div",{className:"carousel_inner",style:{transform:`translateX(-${100*d}%)`},children:r.map(r=>n("button",{onClick:()=>!r.disabled&&a(r.id),disabled:r.disabled,className:I(`ff-tab-button--${t}`,{disabled:r.disabled,active:i===r.id}),style:{flex:"0 0 25%"},children:[n("div",{className:"label-count-section",children:[e(Y,{title:r.label.length>9?r.label:"",children:e(U,{children:r.label.length>9?r.label.slice(0,9)+"...":r.label,fontSize:s,lineHeight:"18px",fontWeight:i===r.id?"semi-bold":"regular",color:i===r.id?"var(--tabs-label-active-color)":"var(--tabs-label-default-color)",className:I("ff-tab-label",{"ff-tab-label--active":i===r.id})})}),"default"===t&&r.count&&e("span",{className:I("tab-count",{"tab-count--active":i===r.id}),children:r.count})]}),e("div",{className:I("ff-tab-bar",{"ff-tab-bar--active":i===r.id})}),e("span",{className:"ff-defaultStatus "+("success"===r.status?"ff-successStatus":"error"===r.status?"ff-dangerStatus":"")})]},r.id))})}),r.length>4&&e(q,{className:"ff-tab-icon ff-tab-icon--next",name:""+(d<Math.ceil(r.length/4)-1?"arrow_right_icon":""),onClick:()=>{d<Math.ceil(r.length/4)-1&&u(e=>e+1)},hoverEffect:!0})]}),e("div",{className:"ff-tab-content",children:r.find(e=>e.id===i)?.component})]})},NL=a(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:a=!1,variant:o="default",backgroundColor:l=!1,border:s=!1},c)=>{const d={default:"var(--ff-avatar-background-color)",success:"var(--status-success-text-color)",danger:"var(--ff-delete-button-attachment)"};return e("button",{disabled:a,onClick:i,className:`\n ff-status-indicator\n ff-status-indicator--${o}\n ${l?`ff-status-indicator--with-bg ff-status-indicator--${o}-bg`:""}\n ${s?`ff-status-indicator--with-border ff-status-indicator--${o}-border`:""}\n `,ref:c,children:n("div",{className:"ff-status-indicator__content",children:[e(q,{name:"danger"===o?"close":r,color:d[o]||d.default,className:`ff-status-indicator__icon ff-status-indicator__icon--${o}`}),e(U,{as:"div",fontSize:12,className:`ff-status-indicator__label ff-status-indicator__label--${o}`,fontWeight:"medium",lineHeight:"20px",children:t})]})})}),IL=({rootLabel:t,childrenLabels:r,align:i="center",direction:a="horizontal"})=>{const o=r.length;return n("section","vertical"===a?{className:"ff-os-tree-vertical",style:{"--child-count":o},"aria-label":"Operating system tree",children:[n("header",{className:`ff-os-tree-vertical__row ff-os-tree-vertical__row--${i}`,"aria-label":"Root node",children:[e("div",{className:"ff-os-tree-vertical__root-label","aria-label":String(t),children:t}),e("div",{className:"ff-os-tree-vertical__horizontal-line"})]}),n("div",{className:"ff-os-tree-vertical__vertical-line-wrapper","aria-label":"Child nodes",children:[e("div",{className:"ff-os-tree-vertical__vertical-line"}),r.map((t,r)=>n("article",{className:"ff-os-tree-vertical__child","aria-label":`Child node ${r+1}`,children:[e("div",{className:"ff-os-tree-vertical__child-connector"}),e("div",{className:"ff-os-tree-vertical__child-label","aria-label":String(t),children:t})]},r))]})]}:{className:`ff-os-tree ff-os-tree--${i}`,style:{"--child-count":o},"aria-label":"Operating system tree",children:[n("header",{className:"ff-os-tree__root-wrapper","aria-label":"Root node",children:[e("div",{className:"ff-os-tree__root-label","aria-label":String(t),children:t}),e("div",{className:"ff-os-tree__vertical-root"})]}),e("div",{className:"ff-os-tree__horizontal-connector","aria-label":"Connectors",children:r.map((t,n)=>e("div",{className:"ff-os-tree__vertical-child"},n))}),e("div",{className:"ff-os-tree__children","aria-label":"Child nodes",children:r.map((t,n)=>e("article",{className:"ff-os-tree__child-container","aria-label":`Child node ${n+1}`,children:e("div",{className:"ff-os-tree__child-label","aria-label":String(t),children:t})},n))})]})},TL=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:a=30})=>{const[s,d]=c(Array(6).fill("")),[u,f]=c(a),[h,C]=c(!0),p=o(Array(6).fill(null));l(()=>{h||p.current[0]?.focus()},[h]),l(()=>{let e;return u>0&&(e=window.setInterval(()=>f(e=>e-1),1e3)),0===u&&C(!1),()=>clearInterval(e)},[u]);const m=e=>{e.preventDefault();const t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6),n=Array(6).fill("");t.split("").forEach((e,t)=>{n[t]=e}),d(n);const r=Math.min(t.length,5);p.current[r]?.focus()};return e(Op,{isOpen:!0,onClose:t,isFooterDisplayed:!1,isHeaderDisplayed:!1,zIndex:999999,customWidth:"340px",children:n("section",{className:"ff-otp-popup","aria-label":"OTP verification modal",children:[n("header",{className:"ff-otp-header","aria-label":"OTP header",children:[e(U,{fontSize:24,lineHeight:"36px",fontWeight:"semi-bold",children:"OTP Verification"}),e(q,{name:"close",height:16,width:16,onClick:t,className:"ff-close-icon","aria-label":"Close OTP verification"})]}),e("div",{className:"ff-otp-boxes","aria-label":"OTP input fields",children:s.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===s.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...s];r[t]=n,d(r),t<5&&p.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...s];n[t]="",d(n),t>0&&p.current[t-1]?.focus()}})(e,n),onPaste:m,ref:e=>p.current[n]=e,readOnly:!0,"aria-label":`OTP digit ${n+1}`},n))}),e(W,{variant:"primary",label:"Submit",onClick:()=>i(s.join("")),disabled:s.includes(""),className:"ff-submit-btn"}),n("div",{className:"ff-resend "+(h?"disabled":""),onClick:h?void 0:()=>{f(a),C(!0),d(Array(6).fill("")),r()},"aria-label":h?"Resend OTP disabled"+(u>0?` for ${u} seconds`:""):"Resend OTP","aria-disabled":h,children:["Re-send OTP",u>0?` (${u}s)`:""]})]})})},DL=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:a,mediaType:s,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:C=!0,showDownload:m=!0,showExpand:A=!0,width:g="800px",height:v="432px",showControls:y=!0,customStyle:w,overlay:b=!0,children:E,showControlDownload:M=!1,showControlExpand:L=!1,isFullscreen:H=!1})=>{const x=o(null),V=o(null),[k,S]=c(0),[Z,O]=c(0),[z,N]=c(!1),[I,T]=c(0);l(()=>{"video"===s&&x.current&&!E&&(i?x.current.play():x.current.pause())},[i,s,E]);const D=p(()=>{if(x.current&&!z){const e=x.current.currentTime/x.current.duration*100;T(e||0),S(x.current.currentTime)}},[z]),F=p(()=>{x.current&&O(x.current.duration)},[]),R=p(()=>{S(0),T(0),a?.()},[a]),P=p(e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`,[]),B=p(e=>{if(x.current){const t=e/100*x.current.duration;x.current.currentTime=t,T(e),S(t)}},[]),j=p(e=>{if(z||!V.current)return;const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B,z]),_=p(e=>{if(!V.current)return;N(!0);const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B]),W=p(e=>{if(!z||!V.current||!x.current)return;const t=V.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[z,B]),X=p(()=>{N(!1)},[]);return l(()=>{if(z)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",X),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",X)}},[z,W,X]),t?e(au,{isOpen:t,onClose:r,isMaximized:!1,showHeader:C,overlay:b,downloadHandler:()=>{},customStyle:w,header:n("header",{className:"ff-header-content","aria-label":"Media viewer header",children:[e(q,{width:23,height:23,name:"automatic_locator"}),e(U,{children:e("span",{className:"ff-header-title",children:u})})]}),icons:e(Y,{title:"Close",children:e(q,{name:"close",onClick:r,"aria-label":"Close media viewer"})}),width:g,height:v,zIndex:999,children:n("section",{className:"ff-video-wrapper","aria-label":"Media viewer content",children:[E||("video"===s?e("video",{ref:x,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:F,onEnded:R}):e("img",{src:d,alt:"Preview image",className:"ff-media-image"})),n("nav",{className:"ff-top-right-icons","aria-label":"Media viewer actions",children:[m&&e(Y,{title:"Download",children:e(q,{name:"download_file",color:"white",onClick:f,"aria-label":"Download media"})}),A&&e(Y,{title:H?"Minimize":"Maximize",children:e(q,{name:H?"collapse_icon":"expand_icon",color:"white",onClick:h,"aria-label":H?"Minimize media viewer":"Maximize media viewer"})})]}),"video"===s&&y&&!E&&n("section",{className:"ff-media-controls","aria-label":"Video controls",children:[e("button",{onClick:a,className:"ff-play-pause-btn","aria-label":i?"Pause video":"Play video",children:e(Y,{title:i?"Pause":"Play",children:e(q,{width:35,height:35,name:i?"pause_button":"play_button",color:"white","aria-label":i?"Pause video":"Play video"})})}),n("div",{className:"ff-progress-bar","aria-label":"Video progress",children:[e("span",{className:"ff-current-time",children:P(k)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:I,onChange:e=>B(parseFloat(e.target.value)),onClick:j,onMouseDown:_,ref:V,"aria-label":"Seek video"}),e("span",{className:"ff-total-time",children:P(Z)})]}),n("nav",{className:"ff-control-icons","aria-label":"Additional video actions",children:[M&&e(Y,{title:"Download",children:e(q,{name:"download_file",color:"white",onClick:f,cursorType:"pointer","aria-label":"Download video"})}),L&&e(Y,{title:H?"Minimize":"Maximize",children:e(q,{name:H?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer","aria-label":H?"Minimize video":"Maximize video"})})]})]})]})}):null},FL=({header:r,secondaryHeader:i,primaryCount:a,secondaryCount:o,primaryItems:l,secondaryItems:s,width:c,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:C,actions:p,tabsData:m,notchPosition:A="top-left"})=>{const g=i&&"secondary"===d?s:l,v=o&&parseInt(o)>0,y=a&&parseInt(a)>0,w=i&&(y||v),{tooltip:b="Download",iconName:E="download_file",disabled:M=!1,onClick:L,className:H=""}=p?.download||{},{tooltip:x="Delete",iconName:V="delete_icon",disabled:k=!1,onClick:S,className:Z=""}=p?.delete||{},O=()=>n("div",{className:"ff-dropdown-header-icons",children:[p?.download&&e(Y,{title:b,children:e(q,{name:E||"",className:`ff-dropdown-icon ff-download-icon ${H}`,onClick:L,width:18,height:20,disabled:M,hoverEffect:!0})}),p?.delete&&e(Y,{title:x,children:e(q,{name:V||"",className:`ff-dropdown-icon ff-delete-icon ${Z}`,onClick:S,width:25,height:25,disabled:k,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:c?{minWidth:c}:{},children:[e("div",{className:"ff-dropdown-notch "+("bottom-center"===A?"bottom-center":"top-left")}),e("div",{className:"ff-dropdown-header",children:e("div",{className:"ff-dropdown-header-content",children:i&&m&&u?n(t,{children:[e(gu,{tabsData:m,activeTabId:u,onTabClick:e=>{C&&C(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),w&&O()]}):i&&w?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),O()]}):i?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(U,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),o&&e("span",{className:"ff-dropdown-count",children:o})]})]}):e(U,{fontSize:16,fontWeight:"semi-bold",children:r})})}),e("ul",{className:"ff-dropdown-list",children:g?.map((t,n)=>e("li",{className:"ff-dropdown-item",children:t},n))})]})},RL=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const a=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...a&&{refId:a}})}return t.accessor||i&&"object"!=typeof i?i:"--"},PL=(t,n=[],r,i,a)=>{let o=n;const l=void 0!==i?!i:r;return K(n)&&(isNaN(t)||(o=Array(t).fill(!0))),e("div",{className:"tree-table-fn-space-container",children:o?.map((n,r)=>e("span",{className:`tree-table-fn-space-block tree-table-fn-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${a?"folder":""}`},r))})},BL=i.memo(({treeRowRef:r,col:i,colIndex:a,columnMeta:o,node:l,selected:s,select:c,onCheckBoxChange:d,onToggleExpand:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,isExpanding:p,columnTextColor:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b})=>{const E={color:`${m||"var(--ff-primary-text-color)"}`,width:o?.width??i?.width,position:o?.sticky?"sticky":void 0,left:o?.sticky?o.left:void 0,zIndex:o?.sticky?o.zIndex:void 0};return n("div",{className:`ff-table-tree-fn-td ${i.isTree&&l.container?"folder":""} ${o?.sticky?"sticky-tree-column":""}`,"data-col-index":a,style:E,children:[i.isTree&&PL(l.hierarchy,l.parentSiblings,l.lastChild,l.nextSibling,l.container),n("div",{className:"tree-fn-title-container",children:[i.isTree&&e("span",{className:`tree-table-fn-space-block last-tree-fn-block last-tree-fn-block tree-table-fn-space-block-${l.hierarchy} ${l?.expanded?"tree-fn-row-expanded":"tree-fn-row-collapsed"} ${l.container&&l.expandable?"":"no-tree-folder"}`,children:l.container&&l.expandable&&n("span",{onClick:()=>u(l),children:[" ",e(p?fu:T,{})]})}),n("span",{className:"tree-table-fn-td-content "+(i.isTree&&l.container?"folder":""),children:[!l?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===c&&!(A&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:"none"===l.selectedStatus?e(Y,{title:l?.currentEnvId&&l?.envId&&l?.currentEnvId!==l?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(En,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable,isDefaultHover:"none"===l.selectedStatus&&!!l.machine})}):e(En,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})}),i.isTree&&"radio"===c&&!(A&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:e(fc,{name:l.key,checked:s.includes(l.key),value:l.key,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})})]}),e("div",{className:"tree-table-cell-flex",children:l.isNewNode&&i.isTree?e(uu,{onCancel:h,onConfirm:f,value:l.value,label:l?.label,optionsList:l.options,selectedOption:l.selectedOption,withDropdown:"inputWithDropdown"===l.type,handleCustomError:C,inputFieldWidth:g,selectFieldWidth:v,confirmIconTooltip:l.confirmIconTooltip,cancelIconTooltip:l.cancelIconTooltip,isEditable:w,setIsEditable:b,isOnBlurTrue:!1,isDisable:{confirm:y},isTableTree:!0}):n(t,{children:[e("span",{className:"tree-table-fn-td-content-text",children:RL(l,i)}),i.actions&&!l?.isNewNode&&e("div",{className:"table-tree-fn-row-action",children:i.actions(l,r)})]})})]})]})]})});BL.displayName="TableCell";const jL=i.memo(({node:t,columnsData:n,columnMeta:r,selected:i,select:a,onRowClick:l,onToggleExpand:s,onCheckBoxChange:c,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,index:C,selectedNode:p,hideOnDisable:m,addModuleInputWidth:A,addModuleSelectWidth:g,disableEditLabelConfirmIcon:v,isEditable:y,setIsEditable:w,style:b})=>{const E=o(null);return e("div",{"data-level":t.hierarchy,ref:E,className:"ff-table-tree-fn-row show-tree "+(p&&p===t.key?"fn-selected-node":""),onClick:e=>l(e,t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||l(e,t)},role:"button",tabIndex:0,id:0===C?"table-fn-first-row":t.key,style:b,children:n.map((n,o)=>e(BL,{treeRowRef:E,col:n,colIndex:o,node:t,selected:i,select:a,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,hideOnDisable:m,addModuleInputWidth:A,addModuleSelectWidth:g,disableEditLabelConfirmIcon:v,isEditable:y,setIsEditable:w,columnMeta:r?.[o]},n.name))})});jL.displayName="TableRow";const _L=({flattenedTreeData:t,columnsData:n,columnMeta:r,rowHeight:i=32,startIndex:a=0,totalHeight:o=0,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,expanding:p,selectedNode:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b})=>e("div",{className:"ff-table-tree-fn-body",style:{height:`${o}px`,position:"relative"},children:t?.map((t,o)=>e(jL,{node:t,columnsData:n,columnMeta:r,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:C,isExpanding:t.key===p,index:a+o,selectedNode:m,hideOnDisable:A,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y,isEditable:w,setIsEditable:b,style:{transform:`translateY(${(a+o)*i}px)`,height:`${i}px`,position:"absolute",top:0,left:0,right:0}},t.key))}),qL=i.memo(({columnsData:t,columnMeta:r,totalWidth:i,rootNode:a,selected:s,onCheckBoxChange:d,selectedNode:u,tableHeaderBgColor:f,hideOnDisable:h,transparentHeader:C,showHeader:p=!0,showRootNodeColumnActions:m})=>{const A=o(null),[g,v]=c(!1);l(()=>{v(!0)},[]);const y=(e,t)=>{const n=r?.[e];return{width:n?.width??t,position:n?.sticky?"sticky":void 0,left:n?.sticky?n.left:void 0,zIndex:n?.sticky?n.zIndex:void 0}};return n("div",{className:"ff-table-tree-fn-head",children:[p&&e("div",{className:"ff-table-tree-fn-row no-hover",style:{minWidth:i},children:t.map(({name:t,width:n},i)=>e("div",{className:"ff-table-tree-fn-th "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:{...y(i,n),backgroundColor:C?"transparent":f,pointerEvents:C?"none":"auto"},children:t},t))}),a&&e("div",{className:"ff-table-tree-fn-row show-tree "+(u&&u===a?.node?.key?"hover":""),ref:A,children:t.map((t,i)=>e("div",{className:"ff-table-tree-fn-td "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:y(i,t.width),children:n("span",{className:"tree-table-fn-default-content "+(0===i?"ff-table-root-index-0":""),children:[0===i&&"checkbox"===a.select&&!(h&&a.node.isDisabled)&&e(En,{checked:"partially"!==a?.node?.selectedStatus&&("completely"===a?.node?.selectedStatus||!1),partial:"partially"===a?.node?.selectedStatus,onChange:e=>d(e,a?.node),disabled:a?.node?.isDisabled}),0===i&&"radio"===a.select&&!(h&&a.node.isDisabled)&&e(fc,{name:a.node.key,checked:s.includes(a.node.key),value:a.node.key,onChange:e=>d(e,a.node),disabled:a.node.isDisabled}),n("div",{className:"tree-table-cell-flex",children:[e(Qs,{children:"name"===t.accessor?a.node[t.accessor]:RL(a.node,t)}),a.cell&&0===i&&e("span",{className:"table-tree--fn-root-cell",children:a.cell(a.node)}),a.actions&&0===i&&g&&A.current&&e("div",{className:"table-tree-fn-row-action",children:a.actions(a.node,A)}),m&&t.actions&&"name"!==t.accessor&&e("div",{className:"table-tree-fn-row-action",children:t.actions(a.node,A)})]})]})},i))})]})});qL.displayName="TableHead";const UL=32,WL="__root__",XL=(e,t)=>{if(!e?.length)return[];const n=new Map,r=new Map,i=new Map,a=new Map;t&&t.key&&n.set(String(t.key),t),e.forEach(e=>{n.set(String(e.key),e);const t=e.parentId?String(e.parentId):WL;r.has(t)||(r.set(t,[]),a.set(t,{container:0,resource:0})),r.get(t)?.push(e);const i=a.get(t);i&&(e.container?i.container++:i.resource++)}),r.forEach(e=>{e.forEach((e,t)=>{i.set(String(e.key),t)})});const o=e=>{const t=e.parentId?String(e.parentId):WL,o=r.get(t);if(!o||0===o.length)return!1;if((i.get(String(e.key))??0)<o.length-1)return!0;const l=n.get(t),s=a.get(t);if(l&&s){const t=o.filter(e=>e.container).reduce((e,t)=>e+(t.totalResourceCount??0),0),n=o.filter(e=>!e.container).length,r=Math.max(0,(l.totalResourceCount??0)-(t+n));if(e.container){return s.container<(l.subContainerCount??0)||r>0}return s.resource<r}return!1},l=e=>{if(void 0!==e.selectedStatus)return e.selectedStatus;let r=e;for(;r?.parentId;){const e=n.get(String(r.parentId));if(!e)break;if("completely"===e.selectedStatus)return"completely";if("none"===e.selectedStatus)return"none";r=e}return"completely"===t?.selectedStatus?"completely":"none"===t?.selectedStatus?"none":e.selectedStatus};return e.map(e=>{const t=e,r=t.parentSiblings&&t.parentSiblings.length>0,i=r?t.parentSiblings:(e=>{const t=[];let r=e;for(;r&&(r.parentId&&t.unshift(o(r)),r.parentId);)r=n.get(String(r.parentId));return t})(e),a=r?t.hierarchy:i.length;return{...e,lastChild:!o(e),parentSiblings:i,hierarchy:a,selectedStatus:l(e)}})},QL=a(({treeData:t,columnsData:r,selected:i=[],select:a=null,onChange:s=()=>{},onClick:d=()=>{},onExpand:f=()=>{},loadMore:h=()=>{},tableBorder:m,height:A="calc(100vh - 134px)",newNode:g,onAddConfirm:v=()=>{},onAddCancel:y=()=>{},handleEditFieldError:w,loading:b=!1,rootNode:E,pagination:M=!0,selectedNode:L,tableHeaderBgColor:H="var(--border-color-as-bg)",hideOnDisable:x=!1,freezeColumns:V,addModuleInputWidth:k=150,addModuleSelectWidth:S,onScroll:Z,onScrollEnd:O,disableEditLabelConfirmIcon:z=!1,transparentHeader:N=!1,navigateTreeNode:I=null,handleRemoveNavigateTreeNode:T=()=>{},scrollThreshold:D=128,showHeader:F=!0,resetScroll:R=!1,setResetScroll:P=()=>{},showRootNodeColumnActions:B=!1},j)=>{const[_,q]=c(null),[U,W]=c(null),[X,Q]=c({start:0,end:20}),[G,Y]=c(!1),J=o(null),$=o(null),ee=o(0),te=o(b),ne=o(null),re=o(null),ie=o({lastScrollTop:0}),ae=o([]),oe=o(0),le=o(null),se=o(null),ce=o(null),de=o({key:null,attempts:0}),ue=o(null),fe=(e,t)=>{const n=String(e??t);return n.endsWith("%")?{value:parseFloat(n),unit:"%"}:{value:parseFloat(n)||0,unit:"px"}},he=C(()=>{let e=0,t=0;return r.map((n,r)=>{const{value:i,unit:a}=fe(n.width,400),o=!!V&&r<V,l="%"===a?`${i}%`:`${i}px`,s=`calc(${e}px + ${t}%)`;return o&&("%"===a?t+=i:e+=i),{width:l,sticky:o,left:s,zIndex:o?100+(V??0)-r:1}})},[r,V]),Ce=C(()=>{let e=0,t=0;return r.forEach(n=>{const{value:r,unit:i}=fe(n.width,400);"%"===i?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[r]),pe=C(()=>{if(!V)return"0px";let e=0,t=0;return he.slice(0,V).forEach(n=>{const r=parseFloat(n.width)||0;n.width.endsWith("%")?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[he,V]),me=C(()=>((e,t,n)=>{if(!t?.sourceId||!t.action)return e;const{sourceId:r,action:i,value:a="",error:o="",label:l,type:s,options:c,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t,C=t?.parentId,p=t?.hierarchy,m=c?.map(e=>({label:e,value:e})),A=d?{label:d,value:d}:void 0,g=new Map;e.forEach(e=>g.set(e.key,e)),n&&g.set(n.key,n);const v=g.get(r);let y;h&&(y=g.get(h));let w=v??("addInside"===i?y:void 0);!w&&"addInside"===i&&C&&(w=g.get(C));const b="addInside"===i&&!w&&e.length>=0;if(!w&&!b)return e;const E=[...e],M=w?e.findIndex(e=>e.key===w.key):-1;let L=null,H=0,x=M+1;switch(i){case"addAbove":{const t=w;if(!t)return e;L=t.parentId,H=t.hierarchy;break}case"addBelow":{const t=w;if(!t)return e;L=y?.parentId??t.parentId,H=y?.hierarchy??t.hierarchy;break}case"addInside":{if(b){L=C??h??r??null,H=p??1,x=E.length;break}const t=y??w;if(!t)return e;L=t.key,H=(t.hierarchy??0)+1;const n=E.findIndex(e=>e.key===r);-1!==n&&(x=n+1);break}}const V={hierarchy:H,parentId:L,sourceId:w?.key??r??h??"new-node",isNewNode:!0,key:"new-node",value:a,error:o,label:l,type:s,options:m,selectedOption:A,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":E.splice(M,0,V);break;case"addBelow":E.splice(M+1,0,V);break;case"addInside":E.splice(Math.max(0,x),0,V)}return E})(t,g,E?.node),[t,g,E]),Ae=C(()=>XL(me,E?.node),[me,E?.node]),ge=C(()=>Ae.filter(e=>!e.hide),[Ae]),ve=C(()=>{const e=new Map;return Ae.forEach(t=>e.set(t.key,t)),e},[Ae]),ye=C(()=>{const e=new Map;return ge.forEach((t,n)=>e.set(t.key,n)),e},[ge]),we=p(e=>{q(t=>t?e&&t!==e?t:null:t),e&&se.current?.key!==e||(se.current=null),ce.current&&(clearTimeout(ce.current),ce.current=null)},[]);l(()=>{te.current=b},[b]),l(()=>{ne.current=U},[U]);const be=p(e=>{ne.current=e,W(e)},[]),Ee=p(()=>{const e=J.current;if(!e)return;const t=ee.current||0,n=Math.max(0,e.scrollTop-t),r=e.clientHeight-t;let i=Math.floor(n/UL)-6,a=Math.ceil((n+r)/UL)+6;i=Math.max(0,i),a=Math.min(ge.length,a),Q(e=>e.start===i&&e.end===a?e:{start:i,end:a})},[ge.length]),Me=p(()=>{null===re.current&&(re.current=requestAnimationFrame(()=>{re.current=null,Ee()}))},[Ee]),Le=p(()=>{const e=J.current;if(!e)return;const n=e.scrollTop,r=n>ie.current.lastScrollTop?"down":"up";if(ie.current.lastScrollTop=n,Me(),Z?.(),le.current?.(),!M||b||ne.current||K(t))return;const i=e.scrollHeight,a=e.clientHeight;"down"===r&&i-(n+a)<D&&!t[t.length-1]?.lastResource&&(be("below"),h("below"))},[t,M,b,U,D,Me,Z,h,be]);l(()=>{if(b||!M||K(t))return;const e=t[0],n=!e?.lastResource,{totalSubContainerCount:r=0,totalResourceCount:i=0}=E?.node||{},a=r+i,o=ge.length<10&&ge.length<a;n&&o&&(be("above"),h("above"))},[b,M,t,ge.length,E,h,be]),u(()=>{const e=ae.current,t=ge,n=J.current;if(R&&n)return n.scrollTop=0,ie.current.lastScrollTop=0,void P(!1);if(n&&e.length>0&&t.length>0&&!b){const r=ie.current.lastScrollTop,i=Math.max(0,Math.floor(r/UL));let a=-1,o=-1;for(let t=i;t<e.length;t++){const n=e[t]?.key,r=ye.get(n??"");if(void 0!==r){a=t,o=r;break}}if(-1===a)for(let t=i-1;t>=0;t--){const n=e[t]?.key,r=ye.get(n??"");if(void 0!==r){a=t,o=r;break}}if(-1!==a&&-1!==o){const e=o-a,t=Math.max(0,r+e*UL);n.scrollTop!==t&&(n.scrollTop=t,ie.current.lastScrollTop=n.scrollTop,Ee())}else if("above"===U)0!==n.scrollTop&&(n.scrollTop=0,ie.current.lastScrollTop=0,Ee());else{const e=ee.current||0,r=Math.max(0,t.length*UL-(n.clientHeight-e));n.scrollTop>r&&(n.scrollTop=r,ie.current.lastScrollTop=r,Ee())}U&&be(null)}ae.current=t},[b,U,ye,ge,be,Ee,R,P]),l(()=>{const e=J.current;if(!e)return;const n=n=>{n.deltaY>=0||!M||K(t)||te.current||ne.current||e.scrollTop>1||t[0]?.lastResource||(be("above"),h("above"))};return e.addEventListener("wheel",n,{passive:!0}),()=>{e.removeEventListener("wheel",n)}},[M,t,h,be]),l(()=>{const e=J.current;if(e)return le.current=O?Js(()=>{O?.()},150):null,e.addEventListener("scroll",Le,{passive:!0}),()=>{e.removeEventListener("scroll",Le),le.current?.cancel()}},[Le,O]),l(()=>{const e=J.current;if(!e)return;const t=e=>{Date.now()<oe.current&&e.stopImmediatePropagation()};return e.addEventListener("scroll",t,{passive:!0,capture:!0}),()=>{e.removeEventListener("scroll",t,!0)}},[]),l(()=>{const e=$.current;if(!e)return;const t=new ResizeObserver(()=>{ee.current=e.getBoundingClientRect().height,Ee()});return t.observe(e),()=>t.disconnect()},[Ee]),u(()=>{if(!g||!J.current)return;const e=J.current,t=ye.get("new-node");if(void 0===t)return;const n=ee.current||0,r=e.clientHeight-n;if(r<=0)return;const i=t*UL,a=i+UL,o=Math.max(0,e.scrollTop-n);let l=o;i<o?l=i:a>o+r&&(l=Math.max(0,a-r)),l!==o&&(oe.current=Date.now()+300,e.scrollTop=l+n,ie.current.lastScrollTop=e.scrollTop,Ee());const s=requestAnimationFrame(()=>{Y(!0)});return()=>cancelAnimationFrame(s)},[g,ye,Ee]),l(()=>{g||Y(!1)},[g]),u(()=>{if(!_||b)return;const e=se.current;if(!e||e.key!==_){const e=requestAnimationFrame(()=>{we(_)});return()=>cancelAnimationFrame(e)}const t=ve.get(e.key);if(!t){const t=requestAnimationFrame(()=>{we(e.key)});return()=>cancelAnimationFrame(t)}if(Boolean(t.expanded)!==e.expanded)return;const n=requestAnimationFrame(()=>{we(e.key)});return()=>cancelAnimationFrame(n)},[ve,_,b,we]),l(()=>{de.current.key!==I&&(de.current={key:I,attempts:0}),!I&&ue.current&&(clearTimeout(ue.current),ue.current=null)},[I]),u(()=>{if(!I||g)return;const e=J.current;if(!e)return;const n=ye.get(I);if(void 0!==n){de.current={key:I,attempts:0};const t=ee.current||0,r=Math.max(UL,e.clientHeight-t),i=n*UL+16,a=Math.max(0,i-r/2)+t;return oe.current=Date.now()+400,e.scrollTo({top:a,behavior:"smooth"}),Me(),ue.current&&clearTimeout(ue.current),void(ue.current=setTimeout(()=>{T?.()},350))}if(b||U)return;const r=de.current;if(r.key!==I&&(r.key=I,r.attempts=0),r.attempts+=1,!(r.attempts>30))return M&&!0!==t[0]?.lastResource?(be("above"),void h("above")):void(r.attempts>2&&T?.());T?.()},[I,g,ye,b,U,M,t,h,Me,T,be]);const He=p(e=>{if(_)return;const t=!e?.expanded;q(e.key),se.current={key:e.key,expanded:t},ce.current&&clearTimeout(ce.current);const n=Date.now(),r=()=>{if(se.current?.key!==e.key)return;const t=te.current,i=Date.now()-n>=2e3;!t||i?we(e.key):ce.current=setTimeout(r,1e3)};ce.current=setTimeout(r,1e3),f?.(e)},[_,f,we]),xe=p((e,t)=>{_||s?.(e,t)},[s,_]),Ve=p((e,t)=>{_||d?.(e,t)},[d,_]);l(()=>()=>{null!==re.current&&(cancelAnimationFrame(re.current),re.current=null),ce.current&&clearTimeout(ce.current),ue.current&&clearTimeout(ue.current)},[]);const ke=ge.length*UL,Se=ge.slice(X.start,X.end);return e("div",{className:"tree-table-wrapper-container table-tree-fn",children:e("div",{className:"tree-table-fn-wrap",ref:j,children:e("div",{className:"table-fn-scrollable "+(ge.length?"":"table-fn-empty"),ref:J,style:{"--table-height":ge.length?A:"auto","--frozen-column-width":pe,border:m},children:n("div",{className:"tree-table-fn",style:{width:Ce},children:[e("div",{ref:$,style:{position:"sticky",top:0,zIndex:98},children:e(qL,{columnsData:r,columnMeta:he,totalWidth:Ce,rootNode:E,onCheckBoxChange:xe,selected:i,selectedNode:L,tableHeaderBgColor:H,hideOnDisable:x,transparentHeader:N,showHeader:F,showRootNodeColumnActions:B})}),e(_L,{flattenedTreeData:Se,columnsData:r,columnMeta:he,totalWidth:Ce,rowHeight:UL,startIndex:X.start,totalHeight:ke,selected:i,select:a,onRowClick:Ve,onToggleExpand:He,onCheckBoxChange:xe,onAddConfirm:v,onAddCancel:y,handleEditFieldError:w,expanding:_,selectedNode:L,hideOnDisable:x,addModuleInputWidth:k,addModuleSelectWidth:S,disableEditLabelConfirmIcon:z,isEditable:g?G:void 0,setIsEditable:g?e=>{Y(Boolean(e))}:void 0})]})})})})});QL.displayName="TableTreeFn";const GL=t=>e(oA,{logo:()=>"FireFlink"===t?.name?e(q,{height:100,width:100,name:"fire_flink_loader_logo","aria-label":"Loader logo"}):e("img",{src:t?.loaderName,width:100,height:100,alt:"loader"})}),KL=({isVisible:t})=>t?n("section",{className:"no_data_message","aria-live":"polite","aria-label":"No data available message",children:[e(q,{name:"no_content",width:120,height:120,"aria-label":"No data illustration"}),e(U,{fontSize:"20px",lineHeight:"30px",fontWeight:"semi-bold",children:"No Data Available"})]}):null,YL=({text:t=" No Results Found",iconName:r="no_license_found",fontSize:i="24px",textAlign:a="left",direction:o="column",iconWidth:l=120,iconHeight:s=120,fontWeight:c="semi-bold",marginTop:d="0px"})=>e("article",{className:"no_results_container","aria-live":"polite","aria-label":"No result found",children:n("section",{className:`no_results_container__${o}`,style:{marginTop:d},"aria-label":"No result content",children:[e(q,{name:r,width:l,height:s,"aria-label":"No result illustration"}),e("div",{"aria-label":"No result message",children:e(U,{as:"div",fontSize:i,lineHeight:"36px",fontWeight:c,color:"var(--text-color)",textAlign:a,children:t})})]})}),JL=({drawerProps:t,showDrawer:n,children:r,zIndex:i=1200,top:a="56px"})=>e("div",n?{"aria-label":"Layout with drawer",role:"region",children:e(vn,{isOpen:t?.isOpen??!0,...t,zIndex:i,top:a,children:r})}:{"aria-label":"Layout content",role:"region",children:r});const $L=({children:n,offlineContent:r,hasError:i=!1,onNetworkStatusChange:a,overlayClassName:o,overlayZIndex:s=99998,iconWidth:d=300,iconHeight:u=300})=>{const f=function(){const[e,t]=c(navigator.onLine);return l(()=>{const e=()=>{t(!0)},n=()=>{t(!1)};return window.addEventListener("online",e),window.addEventListener("offline",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}},[]),e}();return l(()=>{a&&a(f)},[f,a]),i||!f?e("section",{className:`offlineOverlay ${o??""}`,style:{zIndex:s},"aria-live":"polite","aria-label":"Network error overlay",children:r||e(q,{name:"offline_404_icon",height:u,width:d,"aria-label":"Offline error illustration"})}):e(t,{children:n})},eH=e=>{const t=Number.isFinite(e)&&e>0?e:0,n=Math.floor(t/60),r=Math.floor(t%60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`},tH=[.5,1,1.5,2],nH=({duration:r,currentTime:i,isPlaying:a=!1,onPlayPause:l=()=>{},onSeek:s=()=>{},isMuted:d=!1,onMuteToggle:u=()=>{},menuOptions:f,showCaptions:h=!1,onMenuOptionClick:C=()=>{},playbackRate:p=1,onPlaybackRateChange:m=()=>{},disabled:A=!1,seekStep:g=5,formatTime:v=eH,className:y="",style:w={}})=>{const b=r>0?i/r*100:0,E=o(null),M=o(null),[H,x]=c(!1),[V,k]=c({top:0,left:0}),[S,Z]=c(0),O=o(null),z=f??[...h?[{label:"Captions",value:"captions",icon:"captions"}]:[],{label:n("div",{ref:M,className:"playback-menu-option",children:["Playback Speed ",e(xi,{label:`${p.toFixed(1)} x`})]}),value:"playback-speed",icon:"playback",keepMenuOpen:!0}],N=e=>Math.min(Math.max(e,0),r||0);return n("div",{className:`ff-audio-player ${y}`,style:w,"aria-disabled":A,tabIndex:A?-1:0,role:"group","aria-label":A?"Audio player disabled":"Audio player",onKeyDown:e=>{if(A)return;if("INPUT"!==e.target.tagName)switch(e.key){case" ":case"Spacebar":e.preventDefault(),l();break;case"m":case"M":e.preventDefault(),u();break;case"ArrowRight":e.preventDefault(),s(N(i+g));break;case"ArrowLeft":e.preventDefault(),s(N(i-g))}},children:[e("button",{type:"button",className:"ff-audio-play-btn",onClick:l,disabled:A,"aria-label":a?"Pause":"Play",children:a?n("span",{className:"ff-audio-pause-shape",children:[e("span",{className:"ff-audio-pause-bar"}),e("span",{className:"ff-audio-pause-bar"})]}):e(q,{name:"play",width:8,height:8,cursorType:"pointer",withPadding:!1,className:"ff-audio-play"})}),e(U,{fontSize:8,className:"ff-audio-time",children:v(i)}),n("div",{className:"ff-audio-seek-wrap",children:[e("div",{className:"ff-audio-seek-track"}),e("div",{className:"ff-audio-seek-fill",style:{width:`${b}%`}}),e("input",{type:"range",className:"ff-audio-seek",min:0,max:r||0,step:1,value:i,disabled:A,onChange:e=>{s(Number(e.target.value))},"aria-label":"Seek"})]}),e(U,{fontSize:8,className:"ff-audio-time",children:v(r)}),e(q,{name:"speaker",onClick:A?()=>{}:u,disabled:A,withPadding:!1,className:"ff-audio-speaker-icon"+(d?" ff-audio-speaker-muted":""),cursorType:"pointer","aria-label":d?"Unmute audio":"Mute audio"}),e("div",{className:"ff-audio-more-wrap",ref:E,children:e(Da,{iconName:"more","aria-label":"More audio options",options:z,onOptionClick:e=>{if("playback-speed"===e.value){const e=M.current?.getBoundingClientRect();if(e){let t=e.top,n=e.right+8;t+102>window.innerHeight-8&&(t=Math.max(8,e.bottom-102)),n+36>window.innerWidth-8&&(n=Math.max(8,e.left-36-8)),k({top:t,left:n})}const t=tH.indexOf(p);return Z(t>=0?t:0),x(!0),void requestAnimationFrame(()=>O.current?.focus())}C(e)},dropdownPlacement:"bottomLeft",displayCard:!0,disabled:A,iconSize:12})}),H&&L(n(t,{children:[e("div",{className:"ff-audio-speed-overlay",onClick:()=>x(!1)}),e("div",{className:"ff-audio-speed-menu",style:{top:V.top,left:V.left},ref:O,tabIndex:-1,role:"listbox","aria-label":"Playback speed",onKeyDown:e=>{switch(e.key){case"ArrowDown":e.preventDefault(),Z(e=>(e+1)%tH.length);break;case"ArrowUp":e.preventDefault(),Z(e=>(e-1+tH.length)%tH.length);break;case"Enter":e.preventDefault(),m(tH[S]),x(!1);break;case"Escape":e.preventDefault(),x(!1)}},children:tH.map((t,r)=>{const i=t===p;return e("button",{type:"button",role:"option","aria-selected":i,className:["ff-audio-speed-option",r===S&&"ff-audio-speed-option-highlighted",i&&"ff-audio-speed-option-selected"].filter(Boolean).join(" "),onMouseEnter:()=>Z(r),onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),m(t),x(!1)},children:n(U,{fontSize:10,children:[t.toFixed(1),"x"]})},t)})})]}),document.body)]})};function rH(e,t,n,r,i,a="children"){return function e(o){for(let l=0;l<o.length;l++){const s=o[l];if(s&&s[t]===n){const e=[...o];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(s&&s[a]&&Array.isArray(s[a])){const t=e(s[a]);if(t)return{updatedArray:o.map((e,n)=>n===l?{...e,[a]:t.updatedArray}:e)}}}return null}(e)}const iH=(e,t)=>{if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Array.isArray(e),r=Array.isArray(t);if(n!==r)return!1;const i=n?e:Object.keys(e),a=r?t:Object.keys(t);if(i.length!==a.length)return!1;if(n)return i.every((e,t)=>iH(e,a[t]));{const n=new Set(a);return i.every(r=>n.has(r)&&iH(e[r],t[r]))}},aH=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return iH(e,r)}));function oH(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function lH(e,t){return e&t}function sH(e,t){return e|t}function cH(e,t){return e^t}function dH(e,t){return e&~t}function uH(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function fH(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var hH,CH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pH(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=CH.charAt(n>>6)+CH.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=CH.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=CH.charAt(n>>2)+CH.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function mH(e){var t,n="",r=0,i=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t){var a=CH.indexOf(e.charAt(t));a<0||(0==r?(n+=oH(a>>2),i=3&a,r=1):1==r?(n+=oH(i<<2|a>>4),i=15&a,r=2):2==r?(n+=oH(i),n+=oH(a>>2),i=3&a,r=3):(n+=oH(i<<2|a>>4),n+=oH(15&a),r=0))}return 1==r&&(n+=oH(i<<2)),n}var AH,gH=function(e){var t;if(void 0===hH){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(hH={},t=0;t<16;++t)hH[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)hH[n.charAt(t)]=t;for(t=0;t<8;++t)hH[r.charAt(t)]=-1}var i=[],a=0,o=0;for(t=0;t<e.length;++t){var l=e.charAt(t);if("="==l)break;if(-1!=(l=hH[l])){if(void 0===l)throw new Error("Illegal character at offset "+t);a|=l,++o>=2?(i[i.length]=a,a=0,o=0):a<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return i},vH={decode:function(e){var t;if(void 0===AH){var n="= \f\n\r\t \u2028\u2029";for(AH=Object.create(null),t=0;t<64;++t)AH["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(AH["-"]=62,AH._=63,t=0;t<9;++t)AH[n.charAt(t)]=-1}var r=[],i=0,a=0;for(t=0;t<e.length;++t){var o=e.charAt(t);if("="==o)break;if(-1!=(o=AH[o])){if(void 0===o)throw new Error("Illegal character at offset "+t);i|=o,++a>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,a=0):i<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=vH.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return vH.decode(e)}},yH=1e13,wH=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,i=this.buf,a=i.length;for(n=0;n<a;++n)(r=i[n]*e+t)<yH?t=0:r-=(t=0|r/yH)*yH,i[n]=r;t>0&&(i[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,i=r.length;for(t=0;t<i;++t)(n=r[t]-e)<0?(n+=yH,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(yH+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*yH+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),bH=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,EH=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function MH(e,t){return e.length>t&&(e=e.substring(0,t)+"…"),e}var LH,HH=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,i="",a=e;a<t;)n=this.get(a++),r=this.get(a++),i+=String.fromCharCode(n<<8|r);return i},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),i=(n?bH:EH).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=r>127,a=i?255:0,o="";r==a&&++e<t;)r=this.get(e);if(0===(n=t-e))return i?-1:0;if(n>4){for(o=r,n<<=3;!(128&(+o^a));)o=+o<<1,--n;o="("+n+" bit)\n"}i&&(r-=256);for(var l=new wH(r),s=e+1;s<t;++s)l.mulAdd(256,this.get(s));return o+l.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",a="",o=e+1;o<t;++o){for(var l=this.get(o),s=o==t-1?r:0,c=7;c>=s;--c)a+=l>>c&1?"1":"0";if(a.length>n)return i+MH(a,n)}return i+a},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return MH(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var a=e;a<t;++a)i+=this.hexByte(this.get(a));return r>n&&(i+="…"),i},e.prototype.parseOID=function(e,t,n){for(var r="",i=new wH,a=0,o=e;o<t;++o){var l=this.get(o);if(i.mulAdd(128,127&l),a+=7,!(128&l)){if(""===r)if((i=i.simplify())instanceof wH)i.sub(80),r="2."+i.toString();else{var s=i<80?i<40?0:1:2;r=s+"."+(i-40*s)}else r+="."+i.toString();if(r.length>n)return MH(r,n);i=new wH,a=0}}return a>0&&(r+=".incomplete"),r},e}(),xH=function(){function e(e,t,n,r,i){if(!(r instanceof VH))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return MH(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return MH(this.stream.parseStringISO(t,t+n),e);case 30:return MH(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substring(t,t+n)},e.decode=function(t){var n;n=t instanceof HH?t:new HH(t,0);var r=new HH(n),i=new VH(n),a=e.decodeLength(n),o=n.pos,l=o-r.pos,s=null,c=function(){var t=[];if(null!==a){for(var r=o+a;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var i=e.decode(n);if(i.tag.isEOC())break;t[t.length]=i}a=o-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)s=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var d=0;d<s.length;++d)if(s[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){s=null}if(null===s){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);n.pos=o+Math.abs(a)}return new e(r,l,a,i,s)},e}(),VH=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new wH;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),kH=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],SH=(1<<26)/kH[kH.length-1],ZH=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,a="",o=this.t,l=this.DB-o*this.DB%t;if(o-- >0)for(l<this.DB&&(n=this[o]>>l)>0&&(i=!0,a=oH(n));o>=0;)l<t?(n=(this[o]&(1<<l)-1)<<t-l,n|=this[--o]>>(l+=this.DB-t)):(n=this[o]>>(l-=t)&r,l<=0&&(l+=this.DB,--o)),n>0&&(i=!0),i&&(a+=oH(n));return i?a:"0"},e.prototype.negate=function(){var t=TH();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qH(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=TH();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new zH(t):new NH(t),this.exp(e,n)},e.prototype.clone=function(){var e=TH();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=TH();return this.bitwiseTo(e,lH,t),t},e.prototype.or=function(e){var t=TH();return this.bitwiseTo(e,sH,t),t},e.prototype.xor=function(e){var t=TH();return this.bitwiseTo(e,cH,t),t},e.prototype.andNot=function(e){var t=TH();return this.bitwiseTo(e,dH,t),t},e.prototype.not=function(){for(var e=TH(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=TH();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=TH();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+uH(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=fH(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,sH)},e.prototype.clearBit=function(e){return this.changeBit(e,dH)},e.prototype.flipBit=function(e){return this.changeBit(e,cH)},e.prototype.add=function(e){var t=TH();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=TH();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=TH();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=TH();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=TH();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=TH(),n=TH();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),a=_H(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new zH(t):t.isEven()?new IH(t):new NH(t);var o=[],l=3,s=n-1,c=(1<<n)-1;if(o[1]=r.convert(this),n>1){var d=TH();for(r.sqrTo(o[1],d);l<=c;)o[l]=TH(),r.mulTo(d,o[l-2],o[l]),l+=2}var u,f,h=e.t-1,C=!0,p=TH();for(i=qH(e[h])-1;h>=0;){for(i>=s?u=e[h]>>i-s&c:(u=(e[h]&(1<<i+1)-1)<<s-i,h>0&&(u|=e[h-1]>>this.DB+i-s)),l=n;!(1&u);)u>>=1,--l;if((i-=l)<0&&(i+=this.DB,--h),C)o[u].copyTo(a),C=!1;else{for(;l>1;)r.sqrTo(a,p),r.sqrTo(p,a),l-=2;l>0?r.sqrTo(a,p):(f=a,a=p,p=f),r.mulTo(p,o[u],a)}for(;h>=0&&!(e[h]&1<<i);)r.sqrTo(a,p),f=a,a=p,p=f,--i<0&&(i=this.DB-1,--h)}return r.revert(a)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),i=this.clone(),a=_H(1),o=_H(0),l=_H(0),s=_H(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&o.isEven()||(a.addTo(this,a),o.subTo(t,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),n?(l.isEven()&&s.isEven()||(l.addTo(this,l),s.subTo(t,s)),l.rShiftTo(1,l)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);r.compareTo(i)>=0?(r.subTo(i,r),n&&a.subTo(l,a),o.subTo(s,o)):(i.subTo(r,i),n&&l.subTo(a,l),s.subTo(o,s))}return 0!=i.compareTo(e.ONE)?e.ZERO:s.compareTo(t)>=0?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},e.prototype.pow=function(e){return this.exp(e,new OH)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=kH[kH.length-1]){for(t=0;t<kH.length;++t)if(n[0]==kH[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<kH.length;){for(var r=kH[t],i=t+1;i<kH.length&&r<SH;)r*=kH[i++];for(r=n.modInt(r);t<i;)if(r%kH[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,a=!1,o=0;--i>=0;){var l=8==r?255&+t[i]:jH(t,i);l<0?"-"==t.charAt(i)&&(a=!0):(a=!1,0==o?this[this.t++]=l:o+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-o)-1)<<o,this[this.t++]=l>>this.DB-o):this[this.t-1]|=l<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),a&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(e/this.DB),o=this.s<<n&this.DM,l=this.t-1;l>=0;--l)t[l+a+1]=this[l]>>r|o,o=(this[l]&i)<<n;for(l=a-1;l>=0;--l)t[l]=0;t[a]=o,t.t=this.t+a+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,a=(1<<r)-1;t[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)t[o-n-1]|=(this[o]&a)<<i,t[o-n]=this[o]>>r;r>0&&(t[this.t-n-1]|=(this.s&a)<<i),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),i=t.abs(),a=r.t;for(n.t=a+i.t;--a>=0;)n[a]=0;for(a=0;a<i.t;++a)n[a+r.t]=r.am(0,i[a],n,a,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var i=t.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=TH());var o=TH(),l=this.s,s=t.s,c=this.DB-qH(i[i.t-1]);c>0?(i.lShiftTo(c,o),a.lShiftTo(c,r)):(i.copyTo(o),a.copyTo(r));var d=o.t,u=o[d-1];if(0!=u){var f=u*(1<<this.F1)+(d>1?o[d-2]>>this.F2:0),h=this.FV/f,C=(1<<this.F1)/f,p=1<<this.F2,m=r.t,A=m-d,g=null==n?TH():n;for(o.dlShiftTo(A,g),r.compareTo(g)>=0&&(r[r.t++]=1,r.subTo(g,r)),e.ONE.dlShiftTo(d,g),g.subTo(o,o);o.t<d;)o[o.t++]=0;for(;--A>=0;){var v=r[--m]==u?this.DM:Math.floor(r[m]*h+(r[m-1]+p)*C);if((r[m]+=o.am(0,v,r,A,0,d))<v)for(o.dlShiftTo(A,g),r.subTo(g,r);r[m]<--v;)r.subTo(g,r)}null!=n&&(r.drShiftTo(d,n),l!=s&&e.ZERO.subTo(n,n)),r.t=d,r.clamp(),c>0&&r.rShiftTo(c,r),l<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=TH(),i=TH(),a=n.convert(this),o=qH(t)-1;for(a.copyTo(r);--o>=0;)if(n.sqrTo(r,i),(t&1<<o)>0)n.mulTo(i,a,r);else{var l=r;r=i,i=l}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=_H(n),i=TH(),a=TH(),o="";for(this.divRemTo(r,i,a);i.signum()>0;)o=(n+a.intValue()).toString(e).substring(1)+o,i.divRemTo(r,i,a);return a.intValue().toString(e)+o},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),a=!1,o=0,l=0,s=0;s<t.length;++s){var c=jH(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(a=!0):(l=n*l+c,++o>=r&&(this.dMultiply(i),this.dAddOffset(l,0),o=0,l=0))}o>0&&(this.dMultiply(Math.pow(n,o)),this.dAddOffset(l,0)),a&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sH,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],a=7&t;i.length=1+(t>>3),n.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,i,a=Math.min(e.t,this.t);for(r=0;r<a;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=a;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(t=t+1>>1)>kH.length&&(t=kH.length);for(var a=TH(),o=0;o<t;++o){a.fromInt(kH[Math.floor(Math.random()*kH.length)]);var l=a.modPow(i,this);if(0!=l.compareTo(e.ONE)&&0!=l.compareTo(n)){for(var s=1;s++<r&&0!=l.compareTo(n);)if(0==(l=l.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=l.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=TH();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var a=n.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)t(n);else{a<o&&(o=a),o>0&&(n.rShiftTo(o,n),r.rShiftTo(o,r));var l=function(){(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(l,0):(o>0&&r.lShiftTo(o,r),setTimeout(function(){t(r)},0))};setTimeout(l,10)}},e.prototype.fromNumberAsync=function(t,n,r,i){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sH,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>t&&a.subTo(e.ONE.shiftLeft(t-1),a),a.isProbablePrime(n)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,0)}else{var l=[],s=7&t;l.length=1+(t>>3),n.nextBytes(l),s>0?l[0]&=(1<<s)-1:l[0]=0,this.fromString(l,256)}},e}(),OH=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),zH=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),NH=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=TH();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ZH.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=TH();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),IH=function(){function e(e){this.m=e,this.r2=TH(),this.q3=TH(),ZH.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=TH();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function TH(){return new ZH(null)}function DH(e,t){return new ZH(e,t)}var FH="undefined"!=typeof navigator;FH&&"Microsoft Internet Explorer"==navigator.appName?(ZH.prototype.am=function(e,t,n,r,i,a){for(var o=32767&t,l=t>>15;--a>=0;){var s=32767&this[e],c=this[e++]>>15,d=l*s+c*o;i=((s=o*s+((32767&d)<<15)+n[r]+(1073741823&i))>>>30)+(d>>>15)+l*c+(i>>>30),n[r++]=1073741823&s}return i},LH=30):FH&&"Netscape"!=navigator.appName?(ZH.prototype.am=function(e,t,n,r,i,a){for(;--a>=0;){var o=t*this[e++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i},LH=26):(ZH.prototype.am=function(e,t,n,r,i,a){for(var o=16383&t,l=t>>14;--a>=0;){var s=16383&this[e],c=this[e++]>>14,d=l*s+c*o;i=((s=o*s+((16383&d)<<14)+n[r]+i)>>28)+(d>>14)+l*c,n[r++]=268435455&s}return i},LH=28),ZH.prototype.DB=LH,ZH.prototype.DM=(1<<LH)-1,ZH.prototype.DV=1<<LH;ZH.prototype.FV=Math.pow(2,52),ZH.prototype.F1=52-LH,ZH.prototype.F2=2*LH-52;var RH,PH,BH=[];for(RH="0".charCodeAt(0),PH=0;PH<=9;++PH)BH[RH++]=PH;for(RH="a".charCodeAt(0),PH=10;PH<36;++PH)BH[RH++]=PH;for(RH="A".charCodeAt(0),PH=10;PH<36;++PH)BH[RH++]=PH;function jH(e,t){var n=BH[e.charCodeAt(t)];return null==n?-1:n}function _H(e){var t=TH();return t.fromInt(e),t}function qH(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}ZH.ZERO=_H(0),ZH.ONE=_H(1);var UH=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var WH,XH,QH=null;if(null==QH){QH=[],XH=0;var GH=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var KH=new Uint32Array(256);for(self.crypto.getRandomValues(KH),GH=0;GH<KH.length;++GH)QH[XH++]=255&KH[GH]}var YH=0,JH=function(e){if((YH=YH||0)>=256||XH>=256)self.removeEventListener?self.removeEventListener("mousemove",JH,!1):self.detachEvent&&self.detachEvent("onmousemove",JH);else try{var t=e.x+e.y;QH[XH++]=255&t,YH+=1}catch(e){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",JH,!1):self.attachEvent&&self.attachEvent("onmousemove",JH))}function $H(){if(null==WH){for(WH=new UH;XH<256;){var e=Math.floor(65536*Math.random());QH[XH++]=255&e}for(WH.init(QH),XH=0;XH<QH.length;++XH)QH[XH]=0;XH=0}return WH.next()}var ex=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=$H()},e}();function tx(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}(function(e,t){var n,r,i,a,o,l,s,c,d,u,f,h,C=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),p=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,d=0;d<e.length;d+=16){for(n=C[0],r=C[1],i=C[2],a=C[3],o=C[4],l=C[5],s=C[6],c=C[7],u=0;u<64;u++)p[u]=u<16?e[u+d]:fx(fx(fx(dx(p[u-2]),p[u-7]),cx(p[u-15])),p[u-16]),f=fx(fx(fx(fx(c,sx(o)),ax(o,l,s)),ux[u]),p[u]),h=fx(lx(n),ox(n,r,i)),c=s,s=l,l=o,o=fx(a,f),a=i,i=r,r=n,n=fx(f,h);C[0]=fx(n,C[0]),C[1]=fx(r,C[1]),C[2]=fx(i,C[2]),C[3]=fx(a,C[3]),C[4]=fx(o,C[4]),C[5]=fx(l,C[5]),C[6]=fx(s,C[6]),C[7]=fx(c,C[7])}return C}(function(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e),8*e.length))}function nx(e){for(var t="0123456789abcdef",n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);n+=t.charAt(i>>>4&15)+t.charAt(15&i)}return n}function rx(e,t){return e>>>t|e<<32-t}function ix(e,t){return e>>>t}function ax(e,t,n){return e&t^~e&n}function ox(e,t,n){return e&t^e&n^t&n}function lx(e){return rx(e,2)^rx(e,13)^rx(e,22)}function sx(e){return rx(e,6)^rx(e,11)^rx(e,25)}function cx(e){return rx(e,7)^rx(e,18)^ix(e,3)}function dx(e){return rx(e,17)^rx(e,19)^ix(e,10)}var ux=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function fx(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function hx(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var a=new ex,o=[];t>2;){for(o[0]=0;0==o[0];)a.nextBytes(o);n[--t]=o[0]}return n[--t]=2,n[--t]=0,new ZH(n)}function Cx(e,t,n){for(var r="",i=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function px(e,t){var n=tx;if(e.length+64+2>t)throw"Message too long for RSA";var r,i="";for(r=0;r<t-e.length-64-2;r+=1)i+="\0";var a=n("")+i+""+e,o=new Array(32);(new ex).nextBytes(o);var l=Cx(o,a.length,n),s=[];for(r=0;r<a.length;r+=1)s[r]=a.charCodeAt(r)^l.charCodeAt(r);var c=Cx(s,o.length,n),d=[0];for(r=0;r<o.length;r+=1)d[r+1]=o[r]^c.charCodeAt(r);return new ZH(d.concat(s))}var mx=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e,t){void 0===t&&(t=hx);var n=this.n.bitLength()+7>>3,r=t(e,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var a=i.toString(16),o=a.length,l=0;l<2*n-o;l++)a="0"+a;return a},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16),this.d=DH(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,i,a,o,l){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=DH(e,16),this.e=parseInt(t,16),this.d=DH(n,16),this.p=DH(r,16),this.q=DH(i,16),this.dmp1=DH(a,16),this.dmq1=DH(o,16),this.coeff=DH(l,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new ex,r=e>>1;this.e=parseInt(t,16);for(var i=new ZH(t,16);;){for(;this.p=new ZH(e-r,1,n),0!=this.p.subtract(ZH.ONE).gcd(i).compareTo(ZH.ONE)||!this.p.isProbablePrime(10););for(;this.q=new ZH(r,1,n),0!=this.q.subtract(ZH.ONE).gcd(i).compareTo(ZH.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var o=this.p.subtract(ZH.ONE),l=this.q.subtract(ZH.ONE),s=o.multiply(l);if(0==s.gcd(i).compareTo(ZH.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=DH(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var a=255&n[r];a<128?i+=String.fromCharCode(a):a>191&&a<224?(i+=String.fromCharCode((31&a)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&a)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new ex,i=e>>1;this.e=parseInt(t,16);var a=new ZH(t,16),o=this,l=function(){var t=function(){if(o.p.compareTo(o.q)<=0){var e=o.p;o.p=o.q,o.q=e}var t=o.p.subtract(ZH.ONE),r=o.q.subtract(ZH.ONE),i=t.multiply(r);0==i.gcd(a).compareTo(ZH.ONE)?(o.n=o.p.multiply(o.q),o.d=a.modInverse(i),o.dmp1=o.d.mod(t),o.dmq1=o.d.mod(r),o.coeff=o.q.modInverse(o.p),setTimeout(function(){n()},0)):setTimeout(l,0)},s=function(){o.q=TH(),o.q.fromNumberAsync(i,1,r,function(){o.q.subtract(ZH.ONE).gcda(a,function(e){0==e.compareTo(ZH.ONE)&&o.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(s,0)})})},c=function(){o.p=TH(),o.p.fromNumberAsync(e-i,1,r,function(){o.p.subtract(ZH.ONE).gcda(a,function(e){0==e.compareTo(ZH.ONE)&&o.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(l,0)},e.prototype.sign=function(e,t,n){var r=(Ax[n]||"")+t(e).toString(),i=this.n.bitLength()/4,a=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return DH("0001"+r+"00"+e,16)}(r,i);if(null==a)return null;var o=this.doPrivate(a);if(null==o)return null;for(var l=o.toString(16),s=l.length,c=0;c<i-s;c++)l="0"+l;return l},e.prototype.verify=function(e,t,n){var r=DH(t,16),i=this.doPublic(r);return null==i?null:function(e){for(var t in Ax)if(Ax.hasOwnProperty(t)){var n=Ax[t],r=n.length;if(e.substring(0,r)==n)return e.substring(r)}return e}(i.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var Ax={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function gx(e,t,n){if(!t||!e)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}
29
29
  /**
30
30
  * @fileOverview
31
31
  * @name asn1-1.0.js
@@ -45,4 +45,4 @@ let r=n?.map(e=>({...e,stepId:Ai()}));const i=new Set(["group","pre","post","scr
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 a=typeof r;if("string"==a||"number"==a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"==a)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 o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a,o,l;e.exports=(i=n(3),a=n(5),l={},r.m=o=[function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function a(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),a=n.getBlockMap();return a.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,a.get(i)]])}function o(e){return a(e).toList()}function l(e){if(e)return o(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=o(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(),a=o(e);if(0<a.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<a.size;s+=1){var c=0===s?r:0,d=s===a.size-1?i:a.get(s).getText().length;t+=a.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"),a=i.getSelectionAfter(),o=i.getBlockForKey(a.getStartKey());return i=r.Modifier.insertText(i,a,"\n",o.getInlineStyleAt(a.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function C(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function p(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 A(e){var t=new i.Map({}),n=o(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"},a=0;a<n.size&&"break"!==r(a);a+=1);return t}var g=Object(i.Map)({code:{element:"pre"}}),v=r.DefaultDraftBlockRenderMap.merge(g);function y(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function w(e,t,n){var i,o=e.getSelection();i=o.getIsBackward()?o.getFocusKey():o.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,C,p,m,A,g,v=Math.min(d.getDepth()+1,n),y=(h=t,C=v,p=(f=e).getSelection(),A=(m=f.getCurrentContent()).getBlockMap(),g=a(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,C)),e.set("depth",t)}),A=A.merge(g),m.merge({blockMap:A,selectionBefore:p,selectionAfter:p}));return r.EditorState.push(e,y,"adjust-depth")}function b(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(!y(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return C(e);if(y(i)&&0===i.getLength()){var a=i.getDepth();if(0===a)return u(e);if(0<a)return w(e,-1,a)}}}(e)}function E(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 M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){return(L="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 H(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(),a=t.getEndOffset(),l=o(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?a:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var o=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)o(s)}return{v:e}}();if("object"===L(s))return s.v}return{}}function x(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var a=l(e),o=r;o<i;o+=1){var s=a.getEntityAt(o);if(!s){t=void 0;break}if(o===r)t=s;else if(t!==s){t=void 0;break}}return t}function V(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 k(e,t,n){Z[e]["".concat(e.toLowerCase(),"-").concat(n)]=M({},"".concat(t),n)}function S(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){M(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},Z.color,{},Z.bgcolor,{},Z.fontSize,{},Z.fontFamily,{CODE:Z.CODE,SUPERSCRIPT:Z.SUPERSCRIPT,SUBSCRIPT:Z.SUBSCRIPT})}var Z={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(),a=Object.keys(Z[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),o=r.EditorState.push(e,a,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(o=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(o=r.RichUtils.toggleInlineStyle(o,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(o=r.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),k(t,s,n))}return o}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?k("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?k("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?k("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&k("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 I(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(),a=n.getEndOffset(),l=o(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,o=e===l.size-1?a:l.get(e).getText().length;n===o&&0===n?(n=1,o=2):n===o&&--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<o;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===L(n))return n.v}return{}}function T(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 y}),n.d(t,"changeDepth",function(){return w}),n.d(t,"handleNewLine",function(){return b}),n.d(t,"getEntityRange",function(){return V}),n.d(t,"getCustomStyleMap",function(){return S}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return x}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return T}),n.d(t,"getSelectionInlineStyle",function(){return H}),n.d(t,"getSelectionCustomInlineStyle",function(){return I}),n.d(t,"getSelectedBlocksMap",function(){return a}),n.d(t,"getSelectedBlocksList",function(){return o}),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 C}),n.d(t,"clearEditorContent",function(){return p}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return A}),n.d(t,"blockRenderMap",function(){return v})}],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 o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a,o,l;e.exports=(i=n(5),a=n(3),l={},r.m=o=[function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),a=function(e,t,n){var r,a=e.textContent;return""===a.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:a,inlines:Array(a.length).fill(t),entities:Array(a.length).fill(n),blocks:[]}}},o=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 C(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 p=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 v});var m=" ",A=new RegExp("&nbsp;","g"),g=!0;function v(e,t){var n,v,y=(n=t,(v=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(A,m)))?(g=!0,{chunk:function e(t,n,i,m,A,v){var y=t.nodeName.toLowerCase();if(v){var w=v(y,t);if(w){var b=r.Entity.__create(w.type,w.mutability,w.data||{});return{chunk:d(b)}}}if("#text"===y&&"\n"!==t.textContent)return a(t,n,A);if("br"===y)return{chunk:o()};if("img"===y&&t instanceof HTMLImageElement){var E={};E.src=t.getAttribute&&t.getAttribute("src")||t.src,E.alt=t.alt,E.height=t.style.height,E.width=t.style.width,t.style.float&&(E.alignment=t.style.float);var M=r.Entity.__create("IMAGE","MUTABLE",E);return{chunk:d(M)}}if("video"===y&&t instanceof HTMLVideoElement){var L={};L.src=t.getAttribute&&t.getAttribute("src")||t.src,L.alt=t.alt,L.height=t.style.height,L.width=t.style.width,t.style.float&&(L.alignment=t.style.float);var H=r.Entity.__create("VIDEO","MUTABLE",L);return{chunk:d(H)}}if("iframe"===y&&t instanceof HTMLIFrameElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.height=t.height,x.width=t.width;var V=r.Entity.__create("EMBEDDED_LINK","MUTABLE",x);return{chunk:d(V)}}var k,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]}(y,m);S&&("ul"===y||"ol"===y?(m=y,i+=1):("unordered-list-item"!==S&&"ordered-list-item"!==S&&(m="",i=-1),g?(k=s(S,C(t)),g=!1):k=c(S,i,C(t)))),k=k||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var a=t;r=(r=n).withMutations(function(e){var t=a.style.color,n=a.style.backgroundColor,r=a.style.fontSize,i=a.style.fontFamily.replace(/^"|"$/g,""),o=a.style.fontWeight,l=a.style.textDecoration,s=a.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"===o&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(y,t,n);for(var Z=t.firstChild;Z;){var O=e(Z,n,i,m,p(Z)||A,v).chunk;k=u(k,O),Z=Z.nextSibling}return{chunk:k}}(v,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(y){var w=y.chunk,b=new i.OrderedMap({});w.entities&&w.entities.forEach(function(e){e&&(b=b.set(e,r.Entity.__get(e)))});var E=0;return{contentBlocks:w.text.split("\r").map(function(e,t){var n=E+e.length,a=w&&w.inlines.slice(E,n),o=w&&w.entities.slice(E,n),l=new i.List(a.map(function(e,t){var n={style:e,entity:null};return o[t]&&(n.entity=o[t]),r.CharacterMetadata.create(n)}));return E=n,new r.ContentBlock({key:Object(r.genKey)(),type:w&&w.blocks[t]&&w.blocks[t].type||"unstyled",depth:w&&w.blocks[t]&&w.blocks[t].depth,data:w&&w.blocks[t]&&w.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:b}}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 a(e){return"[object Function]"===i(e)}function o(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,o={validate:null,link:null};if(e.__compiled__[t]=o,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?o.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):a(n.validate)?o.validate=n.validate:d(t,n),void(a(n.normalize)?o.normalize=n.normalize:n.normalize?d(t,n):o.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(o).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 C(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function p(e,t){if(!(this instanceof p))return new p(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)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},p.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,a,o,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))&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,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))&&(a=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=o)),0<=this.__index__},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},p.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(C(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(C(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},p.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},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==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:a,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),a=n(0),o=n.n(a),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 C,p=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=[],A={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})}},g=function(){C=!0},v=function(){C=!1},y=function(){return C};function w(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function b(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function E(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 M(e){e.stopPropagation()}function L(e){return e[e.options[0]].icon}function H(e,t){if(e&&void 0===t)return e;var n={};return b(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=H(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var x=n(6),V=n.n(x),k=n(5);function S(e){return(S="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,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=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===S(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 I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var 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&&z(e,t)}(a,r.Component);var e,t,n=N(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,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=a,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,a=t.activeClassName,o=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(Z(e={},"rdw-option-active ".concat(a),o),Z(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":o,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 F(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 R(e,t){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P(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)}T.propTypes={onClick:o.a.func.isRequired,children:o.a.any,value:o.a.string,className:o.a.string,activeClassName:o.a.string,active:o.a.bool,disabled:o.a.bool,title:o.a.string},T.defaultProps={activeClassName:""},n(12);var j=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&&R(e,t)}(a,r.Component);var e,t,n=P(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,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=a,(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,a=t.className,o=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",a),"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",o),onClick:M},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)}}])&&F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(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 X(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=Q(e);if(t){var i=Q(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 Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}j.propTypes={children:o.a.any,onChange:o.a.func,className:o.a.string,expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,optionWrapperClassName:o.a.string,ariaLabel:o.a.string,title:o.a.string},n(13);var G=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)}(a,r.Component);var e,t,n=X(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,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,a=n.value;n.disabled||(r&&r(a),i&&(t.stopPropagation(),i(a)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=a,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,a=t.disabled,o=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,(q(e={},"rdw-dropdownoption-active ".concat(s),r),q(e,"rdw-dropdownoption-highlighted ".concat(u),o),q(e,"rdw-dropdownoption-disabled ".concat(c),a),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function K(e){return(K="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 Y(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"===K(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)}G.propTypes={children:o.a.any,value:o.a.any,onClick:o.a.func,onSelect:o.a.func,setHighlighted:o.a.func,index:o.a.number,disabled:o.a.bool,active:o.a.bool,highlighted:o.a.bool,className:o.a.string,activeClassName:o.a.string,disabledClassName:o.a.string,highlightedClassName:o.a.string,title:o.a.string},G.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)}(a,r.Component);var e,t,n=$(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n.apply(this,arguments)}return e=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,a=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,o){return i.a.createElement(T,{key:o,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||a["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,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(j,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:L(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(G,{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()}}])&&Y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 ae(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"===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 oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=ae(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(o.getCurrentContent(),o.getSelection(),s);o=l.EditorState.push(o,c,"change-inline-style")}o&&a(o)},t.changeKeys=function(e){if(e){var t={};return b(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,o=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.expanded,o=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:o,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=ue(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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=a,(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,a=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(T,{key:t,value:e.label,active:a===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,a=n.dropdownClassName,o=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,C=t.translations,p=this.state.blockTypes.filter(function(e){return e.label===l}),m=p&&p[0]&&p[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(j,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(a),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:o||C["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||C["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(G,{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}),a}();he.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Ce=he;function pe(e){return(pe="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 ge(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=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===pe(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 ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ye=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)}(a,r.Component);var e,t,n=ge(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=l.RichUtils.toggleBlockType(i,n);o&&a(o)};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=a,(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,a=r.expanded,o=r.currentBlockType,l=t.component||Ce,s=this.blocksTypes.find(function(e){return e.style===o});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();ye.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var we=ye;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 Ee(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 Me(e,t){return(Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Le(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=He(e);if(t){var i=He(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 He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var xe=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&&Me(e,t)}(a,r.Component);var e,t,n=Le(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,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=a,(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,a=t.dropdownClassName,o=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,C=e.translations,p=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),p=p||o&&0<=o.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(j,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(a),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||C["components.controls.fontsize.fontsize"]},p?i.a.createElement("span",null,p):i.a.createElement("img",{src:n,alt:""}),o.map(function(e,t){return i.a.createElement(G,{className:"rdw-fontsize-option",active:p===e,value:e,key:t},e)})))}}])&&Ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Ve(e){return(Ve="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 ke(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 Se(e,t){return(Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ze(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"===Ve(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)}xe.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.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&&Se(e,t)}(a,r.Component);var e,t,n=Ze(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);a&&i(a)};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=a,(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,a=r.expanded,o=r.currentFontSize,l=t.component||xe,s=o&&Number(o.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 Ie(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 Te(e,t){return(Te=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=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"===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 Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object},n(17);var Re=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&&Te(e,t)}(a,r.Component);var e,t,n=De(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,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=a,(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,a=n.dropdownClassName,o=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,C=t.doExpand,p=this.props.currentState.fontFamily;return p=p||o&&e&&o.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(j,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",a),onChange:c,expanded:u,doExpand:C,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||s["components.controls.fontfamily.fontfamily"]),o.map(function(e,t){return i.a.createElement(G,{active:p===e,value:e,key:t},e)})))}}])&&Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();Re.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Pe=Re;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 je(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 qe(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=Ue(e);if(t){var i=Ue(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 Ue(e){return(Ue=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&&_e(e,t)}(a,r.Component);var e,t,n=qe(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);a&&i(a)};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=a,(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,a=r.expanded,o=r.currentFontFamily,l=t.component||Pe,s=o&&o.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Xe(e){return(Xe="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 Qe(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 Ke(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"===Xe(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)}We.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.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&&Ge(e,t)}(a,r.Component);var e,t,n=Ke(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,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=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,a=e.indentDisabled,o=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(T,{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(T,{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(T,{onClick:this.indent,disabled:a,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(T,{onClick:this.outdent,disabled:o,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,a=t.doCollapse,o=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,C=n.dropdownClassName,p=n.title;return i.a.createElement(j,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(C),onChange:s,expanded:r,doExpand:o,doCollapse:a,onExpandEvent:l,"aria-label":"rdw-list-control",title:p||u["components.controls.list.list"]},i.a.createElement("img",{src:L(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(G,{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()}}])&&Qe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object,indentDisabled:o.a.bool,outdentDisabled:o.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)}(a,r.Component);var e,t,n=nt(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=l.RichUtils.toggleBlockType(i,e);a&&r(a)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,a=Object(s.changeDepth)(i,e,4);a&&r(a)},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,o=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=this.state,o=a.expanded,l=a.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:o,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}),a}();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 ot(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"===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 ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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&&lt(e,t)}(a,r.Component);var e,t,n=st(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n.apply(this,arguments)}return e=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,a=t.center,o=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(T,{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(T,{value:"center",className:d()(a.className),active:"center"===u,onClick:c,title:a.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(T,{value:"right",className:d()(o.className),active:"right"===u,onClick:c,title:o.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(T,{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,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,C=t.right,p=t.justify,m=t.className,A=t.dropdownClassName,g=t.title;return i.a.createElement(j,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(A),onChange:s,expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-textalign-control",title:g||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||L(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(G,{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(G,{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(G,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:C.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(G,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&ot(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 Ct(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=pt(e);if(t){var i=pt(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 pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=Ct(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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=a,(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,a=r.expanded,o=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:o},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 gt(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 vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(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=wt(e);if(t){var i=wt(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 wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object},n(20);var bt=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&&vt(e,t)}(a,r.Component);var e,t,n=yt(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,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];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,a=n.colors,o=t.currentState,l=o.color,s=o.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:M},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"},a.map(function(t,n){return i.a.createElement(T,{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=a,(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,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-color-picker",title:a||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(T,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),o?this.renderModal():void 0)}}])&&gt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();bt.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Et=bt;function Mt(e){return(Mt="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 Lt(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 xt(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=Vt(e);if(t){var i=Vt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Mt(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 Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kt=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)}(a,r.Component);var e,t,n=xt(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=Object(s.toggleCustomInlineStyle)(i,e,n);o&&a(o),t.doCollapse()};var r=e.editorState,i=e.modalHandler,o={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(o.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,o.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=o,i.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.currentColor,o=r.currentBgColor,l=r.expanded,s=t.component||Et,c=a&&a.substring(6),d=o&&o.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}})}}])&&Lt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();kt.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var St=kt,Zt=n(7),Ot=n.n(Zt);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 It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tt(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 Ft=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&&It(e,t)}(a,r.Component);var e,t,n=Tt(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,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,a=r.selectionText,o=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||o,linkTitle:i&&i.title||a})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,a=r.selectionText,o=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||o,linkTitle:i&&i.title||a})},e}return e=a,(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,a=this.state,o=a.linkTitle,l=a.linkTarget,s=a.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:M},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:o}),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||!o},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,a=t.unlink,o=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",o),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(T,{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(T,{disabled:!l.link,value:"ordered-list-item",className:d()(a.className),onClick:this.removeLink,title:a.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:a.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,a=e.doExpand,o=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,C=l.className,p=l.dropdownClassName,m=l.title,A=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(j,{className:d()("rdw-link-dropdown",C),optionWrapperClassName:d()(p),onChange:o,expanded:t&&!A,doExpand:a,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:L(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(G,{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(G,{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&&A?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}),a}();Ft.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object};var Rt=Ft;function Pt(e){return(Pt="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 jt(e,t){return(jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _t(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=qt(e);if(t){var i=qt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Pt(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 qt(e){return(qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ut(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?Ut(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){var t=Gt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Gt=Ot()(),Kt=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&&jt(e,t)}(a,r.Component);var e,t,n=_t(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var a=t.props.config.linkCallback;if("link"===e){var o=(a||Qt)({title:n,target:r,targetOption:i});t.addLink(o.title,o.target,o.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 a=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=a&&a.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,a=n.getSelection();if(i){var o=Object(s.getEntityRange)(n,i);a=a.getIsBackward()?a.merge({anchorOffset:o.end,focusOffset:o.start}):a.merge({anchorOffset:o.start,focusOffset:o.end}),r(l.RichUtils.toggleLink(n,a,null))}},t.addLink=function(e,n,r){var i=t.props,a=i.editorState,o=i.onChange,c=t.state.currentEntity,d=a.getSelection();if(c){var u=Object(s.getEntityRange)(a,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=a.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(a.getCurrentContent(),d,"".concat(e),a.getCurrentInlineStyle(),f),C=l.EditorState.push(a,h,"insert-characters");d=C.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),C=l.EditorState.acceptSelection(C,d),h=l.Modifier.insertText(C.getCurrentContent(),d," ",C.getCurrentInlineStyle(),void 0),o(l.EditorState.push(C,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,o=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=this.getCurrentValues(),o=a.link,l=a.selectionText,s=t.component||Rt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();Kt.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var Yt=Kt;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)}(a,r.Component);var e,t,n=tn(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,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=a,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,a=i.height,o=i.width;this.setState({embeddedLink:"",height:a,width:o})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,a=this.props,o=a.config.popupClassName,l=a.doCollapse,s=a.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",o),onClick:M},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,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:a||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();rn.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.a.object,doCollapse:o.a.func};var an=rn;function on(e){return(on="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"===on(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)}(a,r.Component);var e,t,n=cn(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,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,a=i.editorState,o=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=a.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();o(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),e.doCollapse()},e}return e=a,(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,a=t.component||an;return i.a.createElement(a,{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}),a}();un.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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 Cn(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 pn(e,t){return(pn=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"===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 An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);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&&pn(e,t)}(a,r.Component);var e,t,n=mn(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,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=a,(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:M},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,a=t.title,o=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":o,title:a||s["components.controls.emoji.emoji"]},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();gn.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.a.object};var vn=gn;function yn(e){return(yn="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 wn(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 bn(e,t){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function En(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=Mn(e);if(t){var i=Mn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===yn(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 Mn(e){return(Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ln=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&&bn(e,t)}(a,r.Component);var e,t,n=En(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,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,a=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,a,"insert-characters")),e.doCollapse()},e}return e=a,(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,a=t.component||vn;return i.a.createElement(a,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&wn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Hn(){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 xn(e){return(xn="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 Vn(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 kn(e,t){return(kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sn(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"===xn(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)}Ln.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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&&kn(e,t)}(a,r.Component);var e,t,n=Sn(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,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 a=r?n[i].getAsFile():n[i];e.uploadImage(a)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,a=i.height,o=i.width,l=e.props.onChange;isNaN(a)||(a+="px"),isNaN(o)||(o+="px"),l(n,a,o,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=a,(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,a=e.dragEnter,o=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,C=u.uploadEnabled,p=u.urlEnabled,m=u.previewImage,A=u.inputAccept,g=u.alt,v=c.doCollapse,y=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"},C&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},y["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),p&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},y["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":a})},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||y["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:A,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:y["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.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"},g.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:o,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||!o||!l||g.mandatory&&!s},y["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:v},y["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Hn,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-image-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:a||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),o?this.renderAddImageModal():void 0)}}])&&Vn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();On.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.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 In(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 Tn(e,t){return(Tn=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=Fn(e);if(t){var i=Fn(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 Fn(e){return(Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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&&Tn(e,t)}(a,r.Component);var e,t,n=Dn(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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 a=t.props,o=a.editorState,s=a.onChange,c={src:e,height:n,width:r};a.config.alt.present&&(c.alt=i);var d=o.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=a,(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,a=t.component||zn;return i.a.createElement(a,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&In(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Pn(e){var t=e.config,n=e.onChange,r=e.translations,a=t.icon,o=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(T,{className:d()(o),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:a,alt:""})))}Rn.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var Bn=Rn;n(31),Pn.propTypes={onChange:o.a.func,config:o.a.object,translations:o.a.object};var jn=Pn;function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qn(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 Un(e,t){return(Un=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=Xn(e);if(t){var i=Xn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_n(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 Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qn=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&&Un(e,t)}(a,r.Component);var e,t,n=Wn(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,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)}),b(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=a,(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,a=t.component||jn;return i.a.createElement(a,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&qn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Gn(e){return(Gn="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 Kn(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 Yn(e,t){return(Yn=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"===Gn(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)}Qn.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,config:o.a.object,translations:o.a.object,modalHandler:o.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&&Yn(e,t)}(a,r.Component);var e,t,n=Jn(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,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=a,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,C=t.redo,p=t.className,m=t.dropdownClassName,A=t.title;return i.a.createElement(j,{className:d()("rdw-history-dropdown",p),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-history-control",title:A||u["components.controls.history.history"]},i.a.createElement("img",{src:L(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(G,{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(G,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",C.className),title:C.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,a=t.redo,o=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",o),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(T,{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(T,{value:"redo",onClick:this.onChange,className:d()(a.className),disabled:c,title:a.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:a.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Kn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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=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"===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 ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object};var or=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)}(a,r.Component);var e,t,n=ir(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=l.EditorState[e](r);a&&i(a)},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,o=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.undoDisabled,o=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:a,redoDisabled:o},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();or.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var lr={inline:le,blockType:we,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:St,link:Yt,embedded:fn,emoji:Ln,image:Bn,remove:Qn,history:or},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 Cr(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=pr(e);if(t){var i=pr(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 pr(e){return(pr=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 Ar(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)}(o,r.Component);var e,t,a=Cr(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,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=a.call.apply(a,[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=o,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,a=e.contentState.getEntity(r).getData(),o=a.url,l=a.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(o),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}),o}()).propTypes={entityKey:o.a.string.isRequired,children:o.a.array,contentState:o.a.object},t}function gr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var vr=gr(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,a=e.contentState.getEntity(n).getData(),o=a.url,l=a.value;return i.a.createElement("a",{href:o||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:o.a.number,children:o.a.array,contentState:o.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});vr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var yr=vr;function wr(e){return(wr="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 br(e,t){return(br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Er(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=Mr(e);if(t){var i=Mr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wr(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 Mr(e){return(Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Lr(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,n){return t&&Lr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Vr=Hr(function e(t){var n=this;xr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,a=r.trigger,o=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+a),d=i+a;if((void 0===c||c<0)&&s[0]===a&&(c=0,d=a),0<=c){var u=s.substr(c+d.length,s.length);o().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&&br(e,t)}(n,r.Component);var e=Er(n);function n(){var r;xr(this,n);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return(r=e.call.apply(e,[this].concat(a))).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,v()):"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,a=t.separator,o=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var a=i.value,o=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(a),value:a,url:o}).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 C=e.getSelection().merge({anchorOffset:f,focusOffset:u}),p=l.EditorState.acceptSelection(e,C),m=l.Modifier.replaceText(p.getCurrentContent(),C,"".concat(r).concat(a),p.getCurrentInlineStyle(),c);p=l.EditorState.push(p,m,"insert-characters"),h||(C=p.getSelection().merge({anchorOffset:f+a.length+r.length,focusOffset:f+a.length+r.length}),p=l.EditorState.acceptSelection(p,C),m=l.Modifier.insertText(p.getCurrentContent(),C," ",p.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(p,m,"insert-characters"))}(n,i,a,o,c)},r}return Hr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),a=this.suggestion.getBoundingClientRect(),o=this.dropdown.getBoundingClientRect();i.width<a.left-i.left+o.width?n=15:e=15,i.bottom<o.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),A.registerCallBack(this.onEditorKeyDown),g(),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(){A.deregisterCallBack(this.onEditorKeyDown),v(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,a=r.activeOption,o=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),o&&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===a})},t.text)})))}}]),n}()).propTypes={children:o.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var a=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,C=t.getWrapperRef,p=t.caseSensitive,m=t.dropdownClassName,y=t.optionClassName,w=t.modalHandler;this.config={separator:a,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:C,caseSensitive:p,dropdownClassName:m,optionClassName:y,modalHandler:w}}),kr=function(e){return[new yr(e.mentionClassName).getMentionDecorator(),new Vr(e).getSuggestionDecorator()]};function Sr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Zr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,a=n.height,o=n.width;return i.a.createElement("iframe",{height:a,width:o,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=Sr(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:o.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,a=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(a=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),a+=i+n.separator.length),0<=i){var o=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,o);l&&0<l.length&&(t(a,a+l.length+n.hashCharacter.length),a+=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()};Zr.propTypes={block:o.a.object,contentState:o.a.object};var Nr=Zr;function Ir(e){return(Ir="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 Tr(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 Fr(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=Rr(e);if(t){var i=Rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ir(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 Rr(e){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Pr=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)}(o,r.Component);var t,n,a=Fr(o);function o(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=a.call.apply(a,[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,a=r.contentState,o=i.getEntityAt(0);a.mergeEntityData(o,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),a,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=o,(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(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,a=this.state.hovered,o=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,C=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:C,style:{height:f,width:h}}),!o()&&a&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Tr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),o}()).propTypes={block:o.a.object,contentState:o.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:Pr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},jr={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}},_r={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 qr(e){return(qr="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 Ur(){return(Ur=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 Xr(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){Qr(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 Qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){return function(e){if(Array.isArray(e))return Kr(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 Kr(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)?Kr(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 Kr(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 Yr(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"===qr(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)}(a,r.Component);var e,t,n=$r(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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||y()&&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),E(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(Gr(t.props.customDecorators),[{strategy:mr,component:Ar({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Gr(kr(Xr(Xr({},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(E(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(E(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(E(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(E(t.props,"defaultContentState")||E(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 Xr(Xr({},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 a=l.RichUtils.handleKeyCommand(r,e);if(a)return t.onChange(a),!0}return!1},t.handleReturn=function(e){if(y())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,a=i.handlePastedText,o=i.stripPastedStyles;return a?a(e,n,r,t.onChange):!o&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var a=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,a,"insert-characters")),!0}if(t){var o=V()(t),c=n.getCurrentContent();return o.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new k.List(o.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=H(jr,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 p,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 o=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(o),t.state={editorState:o,editorFocused:!1,toolbar:r},t}return e=a,(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 a=H(jr,a);t.toolbar=a}if(E(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(E(this.props,"contentState")&&i!==e.contentState)if(i){var o=this.changeEditorState(i);o&&(t.editorState=o)}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,a=this.props,o=a.locale,c=a.localization,u=c.locale,f=c.translations,h=a.toolbarCustomButtons,C=a.toolbarOnFocus,p=a.toolbarClassName,m=a.toolbarHidden,g=a.editorClassName,v=a.wrapperClassName,y=a.toolbarStyle,b=a.editorStyle,E=a.wrapperStyle,M=a.uploadCallback,L=a.ariaLabel,H={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Xr(Xr({},_r[o||u]),f)},x=n||this.focusHandler.isInputFocused()||!C;return i.a.createElement("div",{id:this.wrapperId,className:d()(v,"rdw-editor-wrapper"),style:E,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",p),style:Xr({visibility:x?"visible":"hidden"},y),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&C).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],a=r[e];return"image"===e&&M&&(a.uploadCallback=M),i.a.createElement(n,Ur({key:t},H,{config:a}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Xr({key:t},H))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(g,"rdw-editor-main"),style:b,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:A.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,Ur({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:w,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:L||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Yr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();ti.propTypes={onChange:o.a.func,onEditorStateChange:o.a.func,onContentStateChange:o.a.func,initialContentState:o.a.object,defaultContentState:o.a.object,contentState:o.a.object,editorState:o.a.object,defaultEditorState:o.a.object,toolbarOnFocus:o.a.bool,spellCheck:o.a.bool,stripPastedStyles:o.a.bool,toolbar:o.a.object,toolbarCustomButtons:o.a.array,toolbarClassName:o.a.string,toolbarHidden:o.a.bool,locale:o.a.string,localization:o.a.object,editorClassName:o.a.string,wrapperClassName:o.a.string,toolbarStyle:o.a.object,editorStyle:o.a.object,wrapperStyle:o.a.object,uploadCallback:o.a.func,onFocus:o.a.func,onBlur:o.a.func,onTab:o.a.func,mention:o.a.object,hashtag:o.a.object,textAlignment:o.a.string,readOnly:o.a.bool,tabIndex:o.a.number,placeholder:o.a.string,ariaLabel:o.a.string,ariaOwneeID:o.a.string,ariaActiveDescendantID:o.a.string,ariaAutoComplete:o.a.string,ariaDescribedBy:o.a.string,ariaExpanded:o.a.string,ariaHasPopup:o.a.string,customBlockRenderFunc:o.a.func,wrapperId:o.a.number,customDecorators:o.a.array,editorRef:o.a.func,handlePastedText:o.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=a,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(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a}(i,X_(),gQ)),G_.exports);const yQ=t=>{const{contentState:n,entityKey:r,children:i}=t,a=n.getEntity(r),{url:o,target:l}=a.getData();return e("a",{href:o,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),o&&("_blank"!==l&&l?window.open(o,l):window.open(o,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},wQ=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:a,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:C,analyticsClasses:p=!1,error:m,editableTextEditor:A=!1,onSubmit:g,onFocus:v})=>{const[y,w]=c(null),[b,E]=c(!1),[M,L]=c(!1),[H,x]=c(!1),[V,k]=c(t),S=o(null),Z=o(null),O=new Q_.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:yQ}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:Q_.convertToRaw(Q_.ContentState.createFromText(e))}catch(t){return Q_.convertToRaw(Q_.ContentState.createFromText(e))}};l(()=>{let e;try{if(K(t))e="view"===h||A&&!H?Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O):Q_.EditorState.createEmpty(O);else{const n=z(t);e=n?Q_.EditorState.createWithContent(Q_.convertFromRaw(n),O):Q_.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=Q_.EditorState.createWithContent(Q_.ContentState.createFromText(t||"Invalid content"),O)}w(e),k(t)},[t,h,H,A]),l(()=>{if(0===t?.length){let e;if("view"===h||A&&!H){const t=Q_.ContentState.createFromText("---");e=Q_.EditorState.createWithContent(t,O)}else e=Q_.EditorState.createEmpty(O);w(e)}},[t,h,H,A]),l(()=>{if(!S.current)return;const e=e=>{const t=e.target.closest("a");if(t&&S.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=S.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);J(S,()=>{if(A&&H&&!M){x(!1),r(V||"");const e=z(V),t=e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O);w(t)}},[Z]);const N=vQ.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(U,{className:"required-asterisk",children:"* "}),d&&e(U,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),A&&H&&n("div",{ref:Z,className:"ff-textEditor-buttons",children:[e(Y,{title:"Update",placement:"bottom",children:e(q,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(M||!y)return;const e=Q_.convertToRaw(y.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(Q_.convertToRaw(Q_.ContentState.createFromText("---")))),r(t),g&&g(t),k(t),x(!1)}})}),e(Y,{title:"Cancel",placement:"bottom",children:e(q,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{x(!1),r(V||"");const e=z(V),t=e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O);w(t),L(!1)},hoverEffect:!0})})]})]}),e("div",{onDoubleClick:()=>{if(A&&!H){x(!0),k(t);const e=z(t),n="---"===e?.blocks[0]?.text?Q_.EditorState.createEmpty(O):e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createEmpty(O);w(n)}},children:y&&e(N,{editorState:y,onEditorStateChange:e=>{w(e);const t=Q_.convertToRaw(e.getCurrentContent());H&&""===t?.blocks[0]?.text&&u?L(!0):""!==t?.blocks[0]?.text&&L(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(p?"fontSm":"fontMd"),editorStyle:"view"===h||A&&!H?{border:"none"}:b?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px",padding:"0px 8px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px",padding:"0px 8px"},onFocus:()=>{E(!0),v&&v()},onBlur:e=>{if(!A&&y){const e=Q_.convertToRaw(y.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&L(!0)}f&&f(e)},readOnly:A?!H:i,toolbarHidden:A?!H:a,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:!0}}})}),u&&M||C&&m?e(U,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:C}):null]})},bQ=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:a,textFontSize:o="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("section",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},"aria-live":"polite","aria-label":"No data content",children:[e(q,{name:t,width:r,height:i,"aria-label":"No data illustration"}),e(U,{fontSize:o,lineHeight:"36px",fontWeight:"semi-bold",children:a})]}),EQ=({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:a})=>{const{width:o,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:C="",style:p={}}=t,m="function"==typeof t.onClick,A=C?`Card ${C}`:"Card";return n("section",{className:`ff-card ${C}`,style:{width:o,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...p},onClick:t.onClick,role:m?"button":"region","aria-label":A,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),a?.isFooter&&e("div",{className:"ff-card-footer",children:a.content})]})},MQ=e=>Qr.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),LQ=(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()}},HQ=(e,t,n,r,i=void 0,a=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const o=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&&!K(n)&&(c=[n,...e]),c.forEach(e=>{o.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=o.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!a),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=o.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return K(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function xQ(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 VQ(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,a=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),o=a?.offsetHeight||32,l=Math.floor(i/o),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const kQ=e=>new Promise(t=>setTimeout(t,e)),SQ=(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),a=r(t,e?.searchKey),o=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const a="/"+n.slice(0,i+1).join("/"),o=e.find(e=>e.searchKey===a);if(o){r[i]={key:o.key,name:o.name??"",type:o.entityType??"",searchKey:o.searchKey??"",hierarchy:o.hierarchy,isContainer:o.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(a+"/")&&e?.searchKey?.split("/").length===a?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(o).find(t=>t.key===e.key);if(a.length>0){const e=a.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:a[a.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}},ZQ=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){dc.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&dc.error(r)}catch(e){dc.error(n),console.error("Permission query error:",e)}},OQ=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:a={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=o({}),[f,h]=c(0),[p,m]=c(null);l(()=>{if(p&&u.current[p]){const e=u.current[p],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;h(r)}},[p]);const A=C(()=>p?[{id:p,label:p,icon:a?.[p]}]:[],[p,a]);return n("section",{className:"ff-debug-buttons-container","aria-label":"Debug tools panel",children:[e("div",{className:"ff-debug_buttons",role:"toolbar","aria-label":"Debug tools",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(W,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(p===t?"active":""),children:t})},t))}),p&&n("div",{className:"ff-debug-panel",role:"region","aria-label":`${p} details`,style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",role:"banner",children:[e("div",{className:"ff-debug-panel__title",role:"group","aria-label":"Active debug panel",children:e(gu,{tabsData:A,activeTabId:p,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",role:"group","aria-label":"Panel actions",children:i?.[p]??e(q,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",role:"contentinfo",children:e(U,{children:r?.[p]})})]})]})};OQ.displayName="DebugToolsPanel";const zQ=a(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:a={},icons:o=["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),[C,p]=c(null),m=()=>{h(null),p(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:o.map((o,l)=>{const c=s.includes(o);return e(Y,{title:a?.[o]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===o?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&p(t))})(l,o),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&p(C===t?null:t))})(l,o),id:o,children:[e(q,{className:"ff-session-manager-container__icon",name:o,width:24,height:24,color:f===l||d===o?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(o)&&C===o&&e("div",{className:"ff-session-manager-container__modal"})]})},o)})})});zQ.displayName="SessionManager";const NQ=({gap:t=8,fontSize:r=12,entityType:i,statusValues:a})=>e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:a.map((t,a)=>{return n("div",{className:"ff-statusbadge-item","data-tooltip":`${pA(t?.status)}${i?` ${i}`:""} :\n ${Number(t?.tooltipValue).toLocaleString("fullwide",{useGrouping:!1,maximumSignificantDigits:21})} %`,children:[e(q,{name:(o=t?.status?.toLowerCase(),"passed"===o?"pass_result_icon":"failed"===o?"fail_result_icon":"warning"===o?"warning_result_icon":"skipped_result_icon")}),e(U,{fontSize:r,children:t?.value})]},`${a}-${t}`);var o})}),IQ=({options:t,selected:r,onChange:i,className:a="",width:o=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${a}`,style:{width:o,height:l},children:t.map(t=>{const a=r===t.value;return n("button",{className:"toggle_item "+(a?"active":""),onClick:()=>i(t.value),type:"button",children:[e(U,{children:t.label}),a&&s&&e(q,{name:s})]},t.value)})}),TQ=({value:t,min:r=10,max:i=200,step:a=10,onChange:o,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:a,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));o(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(q,{onClick:()=>{const e=Math.max(t-a,r);o(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(U,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(q,{onClick:()=>{const e=Math.min(t+a,i);o(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]}),DQ=new Set(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]),FQ=e=>{const t=document.createElement("div"),n=e.getAttribute("data-tooltip-id");if(n){const e=document.getElementById(n);if(e){let n=e.innerHTML.replace(/<!--[\s\S]*?-->/g,"").trim();return'""'!==n&&"''"!==n&&"&quot;&quot;"!==n||(n=""),""===n||/^<([a-zA-Z0-9-]+)[^>]*>\s*<\/\1>$/i.test(n)?"":(t.innerHTML=e.innerHTML,t)}}const r=e.getAttribute("data-tooltip")||"";if(!r.trim())return"";const i=r.replace(/\\n/g," ").replace(/\n/g," ").replace(/\s+/g," ").trim();if(!i)return"";const a=i.trim().startsWith("<")&&i.trim().endsWith(">"),o=/<(?:[a-z][\s\S]*>|\/[a-z0-9]+>)|&[#a-zA-Z0-9]+;/i.test(i);return e.hasAttribute("data-tooltip-allowhtml")?a?t.innerHTML=i:(t.style.wordBreak="break-word",o?t.innerHTML=i:t.textContent=i):(t.style.wordBreak="break-word",t.textContent=i),t},RQ=()=>(l(()=>{const e=e=>{const t=e.target;t instanceof Element&&t.closest("[data-tippy-root]")||pn({duration:0})};window.addEventListener("scroll",e,!0);const t=An(document.body,{target:"[data-tooltip], [data-tooltip-id]",arrow:!1,placement:"bottom",theme:"ff-global-tooltip",appendTo:document.body,allowHTML:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0,padding:8}},{name:"flip",options:{padding:8,fallbackPlacements:["top","right","left"]}}]},content:e=>FQ(e),onShow(e){const{reference:t}=e;if(!document.body.contains(t))return!1;const n=FQ(t);if(""===n)return!1;const r=e.reference.hasAttribute("data-tooltip-interactive"),i=e.reference.getAttribute("data-tooltip-placement"),a=i?.trim().toLowerCase(),o=a&&DQ.has(a)?a:"bottom";e.setProps({interactive:r,placement:o,content:n})},onCreate(e){const t=new MutationObserver(()=>{if(e.state.isVisible){const t=FQ(e.reference);""===t?e.hide():e.setContent(t)}});t.observe(e.reference,{attributes:!0,attributeFilter:["data-tooltip","data-tooltip-id"]}),e._attrObserver=t;const n=e.reference.parentElement;if(n){const t=new MutationObserver(()=>{document.body.contains(e.reference)||(e.hide(),e.destroy())});t.observe(n,{childList:!0}),e._domObserver=t}},onDestroy(e){e._attrObserver?.disconnect(),e._domObserver?.disconnect()},onMount(e){if(!e.reference.hasAttribute("data-tooltip-interactive")){const t=e.popper.querySelector(".tippy-box");t&&t.scrollHeight>t.clientHeight&&e.setProps({interactive:!0})}}});return()=>{window.removeEventListener("scroll",e,!0),Array.isArray(t)?t.forEach(e=>e.destroy()):t.destroy()}},[]),null),PQ=[{min:0,max:70,label:"High Risk",color:"var(--ff-high-risk-color)"},{min:71,max:89,label:"Medium Risk",color:"var(--ff-warning-risk-color)"},{min:90,max:100,label:"Low Risk",color:"var(--ff-low-risk-color)"}],BQ=3*Math.PI/4,jQ=3*Math.PI/2,_Q=BQ+jQ,qQ=(e,t,n,r)=>({x:e+n*Math.cos(r),y:t+n*Math.sin(r)}),UQ=(e,t,n,r,i)=>{const a=qQ(e,t,n,r),o=qQ(e,t,n,i),l=i-r>Math.PI?1:0;return[`M ${a.x} ${a.y}`,`A ${n} ${n} 0 ${l} 1 ${o.x} ${o.y}`].join(" ")},WQ={min:0,max:100,label:"Unknown",color:"var(--chart-text-color)"},XQ=({score:r,radius:i=90,strokeWidth:a=10,riskZones:o=PQ,showLegend:l=!0,gapAngle:s=0,className:c="",style:d,trackColor:u="var(--base-bg-color)",centerCircleColor:f="var(--ff-score-chart-center-color)",centerCircleRadiusOffset:h=15,pointerHeight:p=16,pointerBaseHalfWidth:m=10,centerOpacity:A=.6,showCenterText:g=!0})=>{const v=Math.min(100,Math.max(0,r)),y=C(()=>((e,t)=>{const n=Math.min(100,Math.max(0,e));return t.find(e=>n>=e.min&&n<=e.max)??t[t.length-1]??WQ})(v,o),[v,o]),w=i+10,b=i+10,E=2*(i+10),M=a/(2*i),L=C(()=>{const e=s/2+M;return o.map((t,n)=>{const r=BQ+t.min/100*jQ,a=BQ+t.max/100*jQ,l=0===n?r:r+e,s=n===o.length-1?a:a-e;return{...t,path:UQ(w,b,i,l,s),visualStart:l,visualEnd:s}})},[o,w,b,i,s,M]),H=UQ(w,b,i,BQ,_Q),x={min:0,max:100,visualStart:BQ,visualEnd:_Q},V=L.find(e=>v>=e.min&&v<=e.max)??L[L.length-1]??x,k=V.max===V.min?.5:(v-V.min)/(V.max-V.min),S=V.visualStart+k*(V.visualEnd-V.visualStart),Z=i-a-h,O=m/Z,z=qQ(w,b,Z,S-O),N=qQ(w,b,Z,S+O),I=qQ(w,b,Z+p,S),T=`Score gauge showing ${v} out of 100 with ${y.label}`;return n("section",{className:`ff-score-gauge-chart-container ${c}`.trim(),style:d,"aria-label":T,children:[n("svg",{className:"ff-score-gauge-svg",viewBox:`0 0 ${E} ${E}`,role:"img","aria-label":`Score gauge: ${v} out of 100 — ${y.label}`,children:[e("path",{className:"ff-score-gauge-track",d:H,fill:"none",stroke:u,strokeWidth:a,strokeLinecap:"round"}),L.map((t,n)=>e("path",{className:"ff-score-gauge-arc",d:t.path,fill:"none",stroke:t.color,strokeWidth:a,strokeLinecap:"round"},n)),e("circle",{cx:w,cy:b,r:Z,fill:f,opacity:A}),e("g",{className:"ff-score-gauge-pointer",children:e("polygon",{points:`${I.x},${I.y} ${z.x},${z.y} ${N.x},${N.y}`,fill:f,opacity:A})}),g&&n(t,{children:[e("text",{className:"ff-score-gauge-center-label",x:w,y:b-.2*i,textAnchor:"middle",dominantBaseline:"central",children:"Score"}),e("text",{className:"ff-score-gauge-center-score",x:w,y:b+.06*i,textAnchor:"middle",dominantBaseline:"central",children:v}),e("text",{className:"ff-score-gauge-center-risk",x:w,y:b+.28*i,textAnchor:"middle",dominantBaseline:"central",fill:y.color,children:y.label})]})]}),l&&e("div",{className:"ff-score-gauge-legend",role:"list","aria-label":"Risk legend",children:n("div",{className:"ff-score-gauge-legend-item",role:"listitem",children:[e("span",{className:"ff-score-gauge-legend-dot",style:{backgroundColor:y.color}}),e("span",{className:"ff-score-gauge-legend-text",children:y.label})]})})]})},QQ=({headerLabel:t,children:r,className:i="",style:a,contentStyle:o,headerActions:l,headerHeight:s="32px"})=>{const c=t?`Card panel ${t}`:"Card panel";return n("section",{className:I("ff-card-panel",i),style:a,"aria-label":c,children:[n("div",{className:"ff-card-panel-header",style:{height:s},children:[e(U,{as:"div",fontWeight:"semi-bold",color:"var(--brand-color)",children:t}),l&&e("div",{className:"ff-card-panel-header-actions",children:l})]}),e("div",{className:"ff-card-panel-body",style:o,children:r})]})},GQ=(e,t="Asia/Kolkata")=>{const n=new Map,r=new Map,i=e.map(e=>({...e}));for(const e of i){const t=String(e.key);if(n.set(t,e),e.parentId){const n=String(e.parentId);r.has(n)||r.set(n,[]),r.get(n).push(t)}}const a=new Set,o=e=>{const t=n.get(e);if(!t)return{res:0,sub:0};if(a.has(e))return{res:t.totalResourceCount??0,sub:t.totalSubContainerCount??0};let i=0,l=0;const s=r.get(e)||[];for(const e of s){const t=n.get(e);if(!t)continue;t.container?l+=1:i+=1;const r=o(e);i+=r.res,l+=r.sub}return t.totalResourceCount=i,t.totalSubContainerCount=l,a.add(e),{res:i,sub:l}},l=e=>{const t=n.get(e);return t?void 0!==t.hierarchy?t.hierarchy:t.parentId&&n.has(String(t.parentId))?(t.hierarchy=l(String(t.parentId))+1,t.hierarchy):(t.hierarchy=0,0):0};for(const e of i){const t=String(e.key);o(t),l(t)}const s=new Intl.DateTimeFormat("en-GB",{timeZone:t,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),c=e=>{if(!e)return e;try{return s.format(new Date(e))}catch(t){return e}};return i.map(e=>{const t=!!e.container&&((e.totalResourceCount??0)>0||(e.totalSubContainerCount??0)>0),n=e.expandable,r=e=>!!t&&(!1===n||(!!K(e)||e));return{...e,expandable:t,expanded:r(e.expanded),expandedAll:r(e.expandedAll),createdOn:c(e.createdOn),modifiedOn:c(e.modifiedOn),hierarchy:e.hierarchy}})},KQ=(e,t,n,r,i,a,o,l,s,c)=>{const d=Bp("current-project");if(e?.text||a&&a.length>0){const u=(e?.text||"").toLowerCase(),f=(t?.slice(1)||[]).map(e=>({...e})),h=e=>{if(!e)return!1;let t=!0;u&&(t=!!e.name?.toLowerCase().includes(u));let n=!0;return a&&a.length>0&&(n=a.every(t=>{const n=Object.entries(t)[0];if(!n)return!0;const[r,i]=n;return Array.isArray(i)?i.includes(e[r]):e[r]===i})),t&&n},C=(Array.isArray(c)?c:[]).filter(e=>e?.key&&!f.some(t=>t.key===e.key)),p=o||C[0];if(p)if(s){const e=p.container,n=f.findIndex(e=>e.key===s);if(-1!==n){const r=f[n],i="clone"===l?p.parentId||r.parentId:e||"add"===l?r.key:r.parentId;let a=h(p)||C.some(h);if(!a){let e=i;for(;e;){const n=f.find(t=>t.key===e)||(t[0]?.key===e?t[0]:null);if(n&&h(n)){a=!0;break}e=n?.parentId}}if(a){let t=n;const r=e=>{let t=0;const n=e=>{const r=f.filter(t=>t.parentId===e);t+=r.length,r.forEach(e=>n(e.key))};return n(e),t};"clone"===l||e||"add"===l?t=n+1+r(s):"above"===l?t=n:"below"===l&&(t=n+1+r(s)),C.length?f.splice(t,0,...C):f.splice(t,0,p)}}}else if(!K(p)){const e=f.findIndex(e=>e.key===p.key||e.key===p.id);-1!==e&&(f[e]={...f[e],...p})}if(!f?.length)return n(r([])),void n(i({}));const m=new Map,A=new Map,g=new Set,v=[];for(const e of f)m.set(e.key,e.parentId),A.has(e.parentId)||A.set(e.parentId,[]),A.get(e.parentId).push(e.key),h(e)&&v.push(e.key);for(const e of v){let t=e;for(;t&&!g.has(t);)g.add(t),t=m.get(t)}const y=e=>{const t=A.get(e)||[];for(const e of t)g.has(e)||(g.add(e),y(e))};for(const e of v)y(e);const w=f.filter(e=>g.has(e.key)),b=[t[0],...w],E=GQ(b,d?.timeZone);n(r(E.slice(1))),n(i(E[0]??{}))}},YQ=(e,t)=>{if(!e)return NaN;const[n,r,i]=e.split("/").map(Number);if(void 0===n||void 0===r||void 0===i||isNaN(n)||isNaN(r)||isNaN(i))return NaN;const a=new Date(i,r-1,n);return t&&a.setHours(23,59,59,999),a.getTime()},JQ=(e,t)=>{if(!e?.length)return!0;const n=t?.responseObject;return!!n&&e.every(e=>{if(!e.values||0===e.values.length)return!0;switch(e.name){case"createdBy":case"modifiedBy":{const t="createdBy"===e.name?"createdByUname":"modifiedByUname";return e.values.includes(n[t])}case"methodType":try{if(!n.fatRequest)return!1;const t=JSON.parse(n.fatRequest),r=JSON.parse(t.request);return e.values.includes(r.method)}catch{return!1}case"createdOn":case"modifiedOn":{const t=new Date(n[e.name]).getTime();if(isNaN(t))return!1;const r=YQ(e.values[0],!1),i=YQ(e.values[1]||e.values[0],!0);return t>=r&&t<=i}default:return e.values.includes(n[e.name])}})},$Q=(e,t,n,r,i)=>{const a=[],o={modifiedFrom:void 0,modifiedTo:void 0};e.forEach(e=>{"modifiedOn"===e.name?(o.modifiedFrom=e.values[0]?new Date(e.values[0]):void 0,o.modifiedTo=e.values[1]?new Date(e.values[1]):void 0):e.values.forEach(t=>{a.push(`${e.name}-${t}`)})}),t(a),n(o),r(a),i(o)},eG=e=>{const t=[];return e.forEach((e,n)=>{if(n.startsWith("f_")){const r=n.replace("f_","");t.push({name:r,values:e.split(",")})}}),t};var tG=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={},a=null,o=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,o=e.server,t.debug(o)):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 C=null;void 0!==e.token&&null!==e.token&&(C=e.token);let p=null;void 0!==e.apisecret&&null!==e.apisecret&&(p=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 A=6e4;function g(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&&(A=e.longPollTimeout),isNaN(A)&&(A=6e4);let v=!1,y=null,w=new Map,b=this,E=0,M=new Map;function L(){if(null==y)return;if(t.debug("Long poll..."),!v)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+y+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),C&&(n=n+"&token="+encodeURIComponent(C)),p&&(n=n+"&apisecret="+encodeURIComponent(p)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:H,timeout:A,error:function(n,r){if(t.error(n+":",r),E++,E>3)return v=!1,void e.error("Lost connection to the server (is it down?)");L()}})}function H(e,i){if(E=0,n||null==y||!0===i||L(),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=M.get(n);t&&t(e),M.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+y),t.debug(e);const n=e.transaction;if(n){const t=M.get(n);t&&t(e),M.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+y),t.debug(e);const n=e.transaction;if(n){const t=M.get(n);t&&t(e),M.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(i);let a=r.webrtcStuff;a.pc&&a.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?a.pc.addIceCandidate(i):a.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(i),t.debug(a.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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=M.get(n);t&&t(e),M.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+y),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 a=w.get(n);if(!a)return void t.warn("This handle is not attached to this session");let o=e.jsep;o&&(t.debug("Handling SDP as well..."),t.debug(o));let l=a.onmessage;l?(t.debug("Notifying application..."),l(i,o)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+y),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+y),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+y);else for(let t=0;t<e.length;t++)H(e[t],!0)}function x(){if(!s||!n||!v)return;a=setTimeout(x,m);let e={janus:"keepalive",session_id:y,transaction:t.randomString(12)};C&&(e.token=C),p&&(e.apisecret=p),r.send(JSON.stringify(e))}function V(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(v=!1,u.janus="claim",u.session_id=y,r&&(r.onopen=null,r.onerror=null,r.onclose=null,a&&(clearTimeout(a),a=null))),C&&(u.token=C),p&&(u.apisecret=p),!s&&t.isArray(o)&&(s=o[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(o)&&!c.reconnect)return l++,l===o.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){V(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){M.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);a=setTimeout(x,m),v=!0,y=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+y):t.log("Created session: "+y),t.sessions.set(y,b),c.success()}),r.send(JSON.stringify(u))},message:function(e){H(JSON.parse(e.data))},close:function(){s&&v&&(v=!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);v=!0,y=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+y):t.log("Created session: "+y),t.sessions.set(y,b),L(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(o)&&!c.reconnect)return l++,l===o.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){V(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function k(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!v)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let o=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:o,transaction:c};if(a.token&&(d.token=a.token),p&&(d.apisecret=p),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=a.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=y,d.handle_id=e,M.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+"/"+y+"/"+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 S(e,i){if(!v)return void t.warn("Is the server down? (connected=false)");let a=w.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let o={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(a.token&&(o.token=a.token),p&&(o.apisecret=p),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(o),n)return o.session_id=y,o.handle_id=e,void r.send(JSON.stringify(o));t.httpAPICall(s+"/"+y+"/"+e,{verb:"POST",withCredentials:f,body:o,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 Z(e,n,r,i,a){let o=w.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let l=o.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=[]}o.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;o.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=[],a&&l.dataChannel[n].pending.push(a)}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=w.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,a=n.text||n.data;if(!a)return t.warn("Invalid data"),void n.error("Invalid data");let o=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[o]?"open"!==i.dataChannel[o].readyState?(i.dataChannel[o].pending.push(a),void n.success()):(t.log("Sending data on data channel <"+o+">"),t.debug(a),i.dataChannel[o].send(a),void n.success()):(Z(e,o,n.protocol,!1,a,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=w.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 a=n.dtmf;if(!a)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let o=a.tones;if(!o)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof a.duration?a.duration:500,s="number"==typeof a.gap?a.gap:50;t.debug("Sending DTMF string "+o+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(o,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 a=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+a+")"),Q(e);let o=w.get(e);if(!o||o.detached)return w.delete(e),void i.success();if(o.detached=!0,a)return w.delete(e),void i.success();if(!v)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(o.token&&(l.token=o.token),p&&(l.apisecret=p),n)return l.session_id=y,l.handle_id=e,r.send(JSON.stringify(l)),w.delete(e),void i.success();t.httpAPICall(s+"/"+y+"/"+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),w.delete(e),i.success()},error:function(n,r){t.error(n+":",r),w.delete(e),i.success()}})}function I(e,n){let r=w.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let a={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},o=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){o=!0;break}n.externalEncryption&&(o=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&o&&(i.insertableStreams=!0,a.forceEncodedAudioInsertableStreams=!0,a.forceEncodedVideoInsertableStreams=!0,a.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(a),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?S(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=w.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&&S(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 a=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(a);let o=i.pc?i.pc.getTransceivers():null,l=o?o.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),a||(a=setTimeout(function(){t.log("Removing remote track");let o=i.pc?i.pc.getTransceivers():null,l=o?o.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)}a=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=a)clearTimeout(a),a=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,a=n?n.mid:e.target.id;r.onremotetrack(e.target,a,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function T(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:X;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 a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let o=a.webrtcStuff;var l;o.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(I(e,r),n&&await R(e,r),i){if(await o.pc.setRemoteDescription(i),t.log("Remote description accepted!"),o.remoteSdp=i.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=[]}await R(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=w.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 a=await i.pc.createAnswer();t.debug(a);let o={type:"answer",sdp:a.sdp};if(n.customizeSdp(o),a.sdp=o.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:a.sdp},await i.pc.setLocalDescription(a),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(a.e2ee=!0);return a}(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=w.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 a={},o=!0===n.iceRestart;o&&(a.iceRestart=!0);t.debug(a);let l=await i.pc.createOffer(a);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=a,!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:X,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=w.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let a=i.webrtcStuff;if(r){if(!a.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),a.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),a.remoteSdp=r.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=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function F(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 R(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function R(e,n){let r=w.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 a=n.tracks;if(!a||!Array.isArray(a)||0===a.length)return;let o=!1,l={};for(let e of a){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 a){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"),Z(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),Z(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 a=n.type;"screen"===n.type&&(a="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===a):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===a)),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===a),!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"===a&&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"===a&&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{o||(o=!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],a=t.trackConstraints(i);e[r]=a[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"===a||!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=g(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=a+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(a).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 "+a+" 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"===a&&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"===a?e=d.createEncodedAudioStreams():"video"===a&&(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"===a?e=s.receiver.createEncodedAudioStreams():"video"===a&&(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(a)),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=a+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(a).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 "+a+" 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"===a?e=s.receiver.createEncodedAudioStreams():"video"===a&&(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,a=!1!==n.recv&&s.receiver.track;i&&a?r="sendrecv":i&&!a?r="sendonly":!i&&a?r="recvonly":i||a||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}o&&r.consentDialog(!1)}function P(e){let n=w.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=[],a=r.pc.getTransceivers();for(let e of a){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=w.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=[],a=r.pc.getTransceivers();for(let e of a){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 j(e,n,r,i){i="function"==typeof i?i:t.noop;let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void i(0);let o=r?"remote":"local",l=a.webrtcStuff;if(l.volume[o]||(l.volume[o]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let a=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!a)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!a.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!a.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?a.receiver:a.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[o].value}return t.warn("Getting the "+o+" volume unsupported by browser"),void i(0)}function _(e,n,r){let i=w.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let a=i.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!0;if(!a.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=a.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!a.myStream.getVideoTracks()[0].enabled}if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=a.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!a.myStream.getAudioTracks()[0].enabled}function q(e,n,r,i){let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),!1;let o=a.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!1;if(!o.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=o.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 o.myStream.getVideoTracks())e.enabled=!i}else{if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=o.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 o.myStream.getAudioTracks())e.enabled=!i}return!0}function U(e,n){let r=w.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=w.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let a=i.webrtcStuff;if(!a.pc)return void t.warn("Invalid PeerConnection");let o=a.pc.getTransceivers().find(e=>e.mid===n);if(!o)return void t.warn("No transceiver with mid",n);if(!o.sender)return void t.warn("No sender for transceiver with mid",n);let l=o.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,o.sender.setParameters(l)):t.warn("No parameters encodings")}function X(e){t.error("WebRTC error:",e)}function Q(e,i){t.log("Cleaning WebRTC stuff");let a=w.get(e);if(!a)return;let o=a.webrtcStuff;if(o){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};a.token&&(i.token=a.token),p&&(i.apisecret=p),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=y,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+y+"/"+e,{verb:"POST",withCredentials:f,body:i})}o.volume&&(o.volume.local&&o.volume.local.timer&&clearInterval(o.volume.local.timer),o.volume.remote&&o.volume.remote.timer&&clearInterval(o.volume.remote.timer));for(let e in o.bitrate)o.bitrate[e].timer&&clearInterval(o.bitrate[e].timer);o.bitrate={},!o.streamExternal&&o.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(o.myStream)),o.streamExternal=!1,o.myStream=null;try{o.pc.close()}catch(e){}o.pc=null,o.candidates=null,o.mySdp=null,o.remoteSdp=null,o.iceDone=!1,o.dataChannel={},o.dtmfSender=null,o.insertableStreams=!1,o.externalEncryption=!1}a.oncleanup()}V(e),this.getServer=function(){return s},this.isConnected=function(){return v},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,V(e)},this.getSessionId=function(){return y},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"),!v)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),a={janus:"info",transaction:i};C&&(a.token=C);p&&(a.apisecret=p);if(n)return M.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(a));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:a,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(o){!function(o){o=o||{},o.success="function"==typeof o.success?o.success:t.noop,o.error="function"==typeof o.error?o.error:t.noop;let l=!0===o.unload,c=!0;void 0!==o.notifyDestroyed&&null!==o.notifyDestroyed&&(c=!0===o.notifyDestroyed);let d=!0===o.cleanupHandles;if(t.log("Destroying session "+y+" (unload="+l+")"),!y)return t.warn("No session to destroy"),o.success(),void(c&&e.destroyed());if(d)for(const e of w.keys())N(e,{noRequest:!0});if(!v)return t.warn("Is the server down? (connected=false)"),y=null,void o.success();let u={janus:"destroy",transaction:t.randomString(12)};C&&(u.token=C);p&&(u.apisecret=p);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+y,JSON.stringify(u)),t.log("Destroyed session:"),y=null,v=!1,o.success(),void(c&&e.destroyed());if(n){u.session_id=y;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),a&&clearTimeout(a),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),o.success(),c&&e.destroyed())},l=function(){t(),o.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+"/"+y,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),y=null,v=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),o.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),y=null,v=!1,o.success(),c&&e.destroyed()}})}(o)},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,!v)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 a=e.opaqueId,o=e.loopIndex,l=e.token?e.token:C,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:a,loop_index:o,transaction:c};l&&(d.token=l);p&&(d.apisecret=p);if(n)return M.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 a={session:b,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 j(r,e,!0,t)},getRemoteVolume:function(e,t){return j(r,e,!0,t)},getLocalVolume:function(e,t){return j(r,e,!1,t)},isAudioMuted:function(e){return _(r,e,!1)},muteAudio:function(e){return q(r,e,!1,!0)},unmuteAudio:function(e){return q(r,e,!1,!1)},isVideoMuted:function(e){return _(r,e,!0)},muteVideo:function(e){return q(r,e,!0,!0)},unmuteVideo:function(e){return q(r,e,!0,!1)},getBitrate:function(e){return U(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){k(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){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){F(r,e)},getLocalTracks:function(){return P(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){Q(r,!0===e)},detach:function(e){N(r,e)}};w.set(r,a),e.success(a)}),d.session_id=y,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+y,{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 a={session:b,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 j(r,e,!0,t)},getRemoteVolume:function(e,t){return j(r,e,!0,t)},getLocalVolume:function(e,t){return j(r,e,!1,t)},isAudioMuted:function(e){return _(r,e,!1)},muteAudio:function(e){return q(r,e,!1,!0)},unmuteAudio:function(e){return q(r,e,!1,!1)},isVideoMuted:function(e){return _(r,e,!0)},muteVideo:function(e){return q(r,e,!0,!0)},unmuteVideo:function(e){return q(r,e,!0,!1)},getBitrate:function(e){return U(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){k(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){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){F(r,e)},getLocalTracks:function(){return P(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){Q(r,!0===e)},detach:function(e){N(r,e)}};w.set(r,a),e.success(a)},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,a=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new a(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let a={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(a.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(a.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(a.body=JSON.stringify(n.body));let o=r(e,a).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)});o=i.race([o,e])}return o.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)}),o}}},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)}:{},a=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,a,{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 nG=!0,rG=!0;function iG(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function aG(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,"addEventListener").writable)return void sG("Unable to polyfill events");const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const a=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,a),i.apply(this,[e,a])};const a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(n))return a.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,a.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 oG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(nG=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function lG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(rG=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function sG(){if("object"==typeof window){if(nG)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function cG(e,t){rG&&console.warn(e+" is deprecated, please use "+t+" instead.")}function dG(e){return"[object Object]"===Object.prototype.toString.call(e)}function uG(e){return dG(e)?Object.keys(e).reduce(function(t,n){const r=dG(e[n]),i=r?uG(e[n]):e[n],a=r&&!Object.keys(i).length;return void 0===i||a?t:Object.assign(t,{[n]:i})},{}):e}function fG(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?fG(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{fG(e,e.get(t),n)})}))}function hG(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const a=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&fG(e,n,i)})}),i}const CG=sG;function pG(e,t){if(t.version>=64)return;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 a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});const o=t.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||o)){let t;if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?t=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let o=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes("back")&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),CG("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return CG("chrome: "+JSON.stringify(e)),i(e)},a=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(a(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(a(e))))}}}function mG(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function AG(e,t){if(!(t.version>102))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 aG(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function gG(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 vG(e,t){if(t.version>=67)return;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=>hG(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}),aG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>hG(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const n=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 n.apply(this,arguments)}}function yG(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 wG(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return yG(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 a(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=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const o=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]),o.apply(this,arguments)):o.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:a(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 bG(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 EG(e,t){t.version>102||aG(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var MG=Object.freeze({__proto__:null,fixNegotiationNeeded:EG,shimAddTrackRemoveTrack:wG,shimAddTrackRemoveTrackWithNative:yG,shimGetSendersWithDtmf:gG,shimGetUserMedia:pG,shimMediaStream:mG,shimOnTrack:AG,shimPeerConnection:bG,shimSenderReceiverGetStats:vG});function LG(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){cG("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 HG(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 xG(e,t){"object"==typeof e&&(e.RTCPeerConnection||e.mozRTCPeerConnection)&&(!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]}))}function VG(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;if(t.version>=151)return;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,a]=arguments;return"closed"===this.signalingState?Promise.resolve(new Map):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,a)}}function kG(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 SG(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}),aG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function ZG(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){cG("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function OG(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function zG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const t=e.length>0;t&&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=n.apply(this,arguments);if(t){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 NG(e,t){if("object"!=typeof e||!e.RTCRtpSender)return;if(t.version>=110)return;const n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){const e=n.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function IG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function TG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}var DG=Object.freeze({__proto__:null,shimAddTransceiver:zG,shimCreateAnswer:TG,shimCreateOffer:IG,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in 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:NG,shimGetStats:VG,shimGetUserMedia:LG,shimOnTrack:HG,shimPeerConnection:xG,shimRTCDataChannel:OG,shimReceiverGetStats:SG,shimRemoveStream:ZG,shimSenderGetStats:kG});function FG(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 RG(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 PG(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=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=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function BG(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(jG(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function jG(e){return e&&void 0!==e.video?Object.assign({},e,{video:uG(e.video)}):e}function _G(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?(cG("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 qG(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 UG(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 WG(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var XG,QG=Object.freeze({__proto__:null,shimAudioContext:WG,shimCallbacksAPI:PG,shimConstraints:jG,shimCreateOfferLegacy:UG,shimGetUserMedia:BG,shimLocalStreamsAPI:FG,shimRTCIceServerUrls:_G,shimRemoteStreamsAPI:RG,shimTrackEventTransceiver:qG}),GG={exports:{}};var KG=(XG||(XG=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&&void 0!==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 a=r[i],o=t.matchPrefix(e,"a=rtpmap:"+a+" ")[0];if(o){const r=t.parseRtpMap(o),i=t.matchPrefix(e,"a=fmtp:"+a+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+a+" ").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"),a=-1!==r.fecMechanisms.indexOf("ULPFEC"),o=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=o.length>0&&o[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:a?"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 a=t.matchPrefix(e,"a=rtcp-mux");return n.mux=a.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 a=t.matchPrefix(e,"a=sctp-port:");if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const o=t.matchPrefix(e,"a=sctpmap:");if(o.length>0){const e=o[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 a=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+a+" 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}(GG)),GG.exports),YG=S(KG),JG=V({__proto__:null,default:YG},[KG]);function $G(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=YG.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,aG(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function eK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||aG(e,"icecandidate",e=>{if(e.candidate){const t=YG.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function tK(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>102)return;if("firefox"===t.browser&&t.version>=113)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=YG.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=YG.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=YG.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 a={};Object.defineProperty(a,"maxMessageSize",{get:()=>i}),this._sctp=a}return n.apply(this,arguments)}}function nK(e,t){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;if("chrome"===t.browser&&t.version>=149)return;if("firefox"===t.browser&&t.version>60)return;function n(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 r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=r.apply(this,arguments);return n(e,this),e},aG(e,"datachannel",e=>(n(e.channel,e.target),e))}function rK(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 iK(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 aK(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 oK(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 lK=Object.freeze({__proto__:null,removeExtmapAllowMixed:iK,shimAddIceCandidateNullOrEmpty:aK,shimConnectionState:rK,shimMaxMessageSize:tK,shimParameterlessSetLocalDescription:oK,shimRTCIceCandidate:$G,shimRTCIceCandidateRelayProtocol:eK,shimSendThrowTypeError:nK});const sK=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=sG,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){const t=parseInt(e.version,10);if(t>=90)return{browser:"chrome",version:t}}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(iG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(iG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(iG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=iG(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:lK,extractVersion:iG,disableLog:oG,disableWarnings:lG,sdp:JG};switch(r.browser){case"chrome":if(!MG||!bG||!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=MG,aK(e,r),oK(e),pG(e,r),mG(e),bG(e,r),AG(e,r),wG(e,r),gG(e),vG(e,r),EG(e,r),$G(e),eK(e),rK(e),tK(e,r),nK(e,r),iK(e,r);break;case"firefox":if(!DG||!xG||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=DG,aK(e,r),oK(e),LG(e,r),xG(e,r),VG(e,r),HG(e),ZG(e),kG(e),SG(e),OG(e),zG(e,r),NG(e,r),IG(e,r),TG(e,r),$G(e),rK(e),tK(e,r),nK(e,r);break;case"safari":if(!QG||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=QG,aK(e,r),oK(e),_G(e),UG(e),PG(e),FG(e),RG(e),qG(e),BG(e),WG(e),$G(e),eK(e),tK(e,r),nK(e,r),iK(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),cK=({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:a,DynamicHeight:o=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:""+(o+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(U,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:a})]})]})},dK=()=>{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},uK=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},fK=e=>{if("number"==typeof e)return e;const t=e.match(/([\d.]+)\s*(KB|MB|GB)/i);if(!t)return 0;const n=parseFloat(t[1]??"0");switch(t[2]?.toUpperCase()||""){case"GB":return 1024*n*1024*1024;case"MB":return 1024*n*1024;case"KB":return 1024*n;default:return n}},hK=({used:t,total:n,showValue:r=!0,width:i="216px"})=>{const a=fK(t),o=((e,t)=>t>0?Math.min(e/t*100,100):0)(a,fK(n));return e("div",{className:"ff-storage-bar",style:{width:i},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${o}%`},children:r&&e("span",{className:"ff-storage-bar__value",children:(l=a,l>=1073741824?`${(l/1073741824).toFixed(2)} GB`:l>=1048576?`${(l/1048576).toFixed(2)} MB`:l>=1024?`${(l/1024).toFixed(2)} KB`:`${l} B`)})})})});var l},CK={jpeg:"jpg",m4v:"mp4",pdfx:"pdf",tiff:"tif",word:"doc"},pK={aac:["fff1","fff9","494433"],bmp:["424d"],crx:["43723234"],doc:["d0cf11e0"],gif:["47494638"],jpg:["ffd8ff"],mp3:["494433","fffb","fff3","fff2"],pdf:["25504446"],pfx:["3082","3081"],png:["89504e47"],ppt:["d0cf11e0"],tif:["49492a00","4d4d002a"],wav:["52494646"],xls:["d0cf11e0"],zip:["504b0304","504b0506","504b0708"],"7z":["377abcaf271c"],gz:["1f8b"],exe:["4d5a"],dll:["4d5a"]},mK=Object.values(pK).flat(),AK=["apk","docx","ipa","pptx","xlsx"],gK=["avsc","csv","bin","dat","edi","html","js","json","key","md","pem","properties","py","svg","txt","trg","xml","yaml","yml"],vK=["exe","bat","cmd","sh","php","phtml","jsp","asp","aspx","lnk","vbs"],yK=[/<\?php/i,/<\?=/i,/__typeof__/i,/Runtime\.getRuntime/i,/base64_decode\s*\(/i,/eval\s*\(/i],wK=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{r.result?n(new Uint8Array(r.result)):n(null)},r.onerror=()=>n(null),void 0!==t?r.readAsArrayBuffer(e.slice(0,t)):r.readAsArrayBuffer(e)}),bK=e=>[...e].map(e=>e.toString(16).padStart(2,"0")).join(""),EK=(e,t)=>t.some(t=>e.startsWith(t)),MK=e=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{return null}},LK=async(e,t,n)=>{const r=bK(t),i=(e=>{const t=MK(e);if(null!==t)return t;try{return new TextDecoder("windows-1252",{fatal:!0}).decode(e)}catch{return null}})(t);if(EK(r,mK)||null===i||/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/.test(i))return!1;const a=i.trim();if(!a&&e.size>0)return!1;if(/^This corrupted \.[a-z0-9]+ file contains invalid content\.$/i.test(a.trim()))return!1;if("json"===n||"avsc"===n){if(e.size>20971520)return!t.includes(0);const n=await wK(e),r=n?MK(n):null;if(null===r)return!1;try{return JSON.parse(r),!0}catch{return!1}}return"xml"===n||"svg"===n?a.startsWith("<")&&a.includes(">"):"html"===n?/^<!doctype html|<html|<\w+/i.test(a):"yaml"===n||"yml"===n?(e=>e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")).some(e=>"---"===e||"..."===e||e.startsWith("- ")||e.startsWith("{")||e.startsWith("[")||/^[^:#]+:\s*.+?$/.test(e)||/^[^:#]+:\s*$/.test(e)))(a):!t.includes(0)},HK=async e=>{if(0===e.size)return!1;const t=e.name;if(t.includes("\0")||t.includes("%00"))return console.warn("Security Alert: File name contains malicious null-byte characters."),!1;const n=t.toLowerCase().split(".");if(n.length>2){if(n.slice(1,-1).some(e=>vK.includes(e)))return console.warn("Security Alert: Double-extension masking detected."),!1}const r=(e=>e&&CK[e]||e)(n.pop());if(!r)return!0;const i=await wK(e,4096);if(!i)return!1;const a=bK(i);if(AK.includes(r))return EK(a,pK.jpg??[])||EK(a,pK.png??[])?(console.warn("Security Alert: Disguised Archive Polyglot detected."),!1):EK(a,pK.zip??[]);if("m4a"===r||"mp4"===r||"mov"===r){return new TextDecoder("ascii",{fatal:!1}).decode(i.slice(4,12)).startsWith("ftyp")}if("tar"===r){return"ustar"===new TextDecoder("ascii",{fatal:!1}).decode(i.slice(257,262))}if("wav"===r){const e=new TextDecoder("ascii",{fatal:!1}).decode(i.slice(8,12));return EK(a,pK.wav??[])&&"WAVE"===e}if("y4m"===r){return"YUV4MPEG2"===new TextDecoder("ascii",{fatal:!1}).decode(i.slice(0,9))}const o=pK[r];if(o){if(!EK(a,o))return!1;if(["jpg","jpeg","png","gif","bmp"].includes(r)){const t=await wK(e);if(!t)return!1;if((e=>{const t=new TextDecoder("latin1").decode(e);return yK.some(e=>e.test(t))})(t))return console.warn("Security Alert: Malicious embedded script tags found inside file binary."),!1}return!0}return!gK.includes(r)||LK(e,i,r)};export{lr as AADHAAR_REGEX,Bn as ALPHABET_ONLY_REGEX,ci as ALPHABET_WITH_SPACES_ONLY_REGEX,Ir as ALPHANUMERIC_PARENTHESIS_REGEX,_n as ALPHANUMERIC_REGEX,li as ALPHANUMERIC_WITH_DOT_REGEX,qn as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,oi as ALPHA_NUM_EXTENDED_REGEX,ei as ALPHA_NUM_REGEX,wn as Accordion,OL as AddContentButton,tc as AddResourceButton,HL as AiToggle,Dp as AllProjectsDropdown,xL as AnimatedSetting,qp as AppHeader,fw as AttachMedia,rA as AttachmentButton,nH as AudioPlayer,Qs as AutoTruncateText,aA as Avatar,gr as BASE64_REGEX,tr as BIG_END_WHITESPACE,vr as BINARY_NUMBER_REGEX,Ur as BODY_TAG_TYPE_VALIDATION,kx as BarChart,EQ as Box,vu as BrowserTabs,W as Button,Dr as CAMEL_CASE_REGEX,_r as CERTIFICATES_NAME_REGEX,Qr as CHECK_CAMEL_CASE,Gn as CREDIT_CARD_REGEX,br as CURRENCY_GENERIC_REGEX,QQ as CardPanel,EL as ChatModal,ML as ChatModalAi,En as Checkbox,xi as Chip,SL as ChipWithCount,mL as ChooseFile,Li as Col,ok as Comments,fk as ConditionalDropdown,ek as ConnectingBranch,Ei as Container,lA as ContentCard,fL as CreateVariableSlider,Un as DATE_REGEX,Cr as DECIMAL_NUMBER_REGEX,fr as DRIVING_LICENSE_REGEX,Pr as DYNAMIC_VALUE_PATTERN_REGEX,Br as DYNAMIC_VALUE_TYPE_REGEX,jr as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,Rr as DYNAMIC_VALUE__PLACEHOLDER_REGEX,Yp as DashboardDonutChart,kp as DatePicker,OQ as DebugToolsPanel,ac as DonutChart,sL as DownloadClient,Ip as DragAndDrop,vn as Drawer,pc as Dropzone,Or as ELEMENTS_TRAILING_SPACE_REGEX,zr as ELEMENTS_WHITE_SPACE_REGEX,Ci as EMAIL_FORMAT_REGEX,On as EMAIL_REGEX,ii as EMAIL_VALIDATION_REGEX,si as EXCEL_SPACING_REGEX,mi as EXECUTION_ID_VALIDATION,uu as EditLabel,mA as EditTextField,XV as Editor,ZL as ErrorBoundary,sw as Excel,Zi as ExpandableMenu,di as FILENAME_VALIDATION_REGEX,Xn as FILE_EXTENSION_REGEX,Zr as FILE_NAME_REGEX,cL as FieldSet,Ac as FileDropzone,mc as FilePreview,nu as Form,dk as FormatString,ar as GSTIN_REGEX,yr as HEXADECIMAL_NUMBER_REGEX,Fn as HEX_COLOR_REGEX,Ar as HSL_COLOR_REGEX,pr as HTML_ATTRIBUTE_REGEX,qr as HTML_FILE_TYPE_VALIDATION,Jn as HTML_TAG_REGEX,yn as HighlightText,LL as HistoryCard,cr as INDIAN_CURRENCY_REGEX,ur as INDIAN_PASSPORT_REGEX,rr as INDIAN_PHONE_REGEX,ir as INDIAN_PIN_CODE_REGEX,dr as INTERNATIONAL_PHONE_REGEX,pi as INVALID_EMAIL_REGEX,Tn as IPV4_REGEX,Dn as IPV6_REGEX,q as Icon,Zp as IconButton,uw as IconRadialChart,Gm as IconRadioGroup,Vi as Input,ru as InputWithDropdown,Xr as JAVASCRIPT_FILE_TYPE_VALIDATION,tG as Janus,Er as LINKEDIN_PROFILE_REGEX,ai as LINK_VALIDATION_REGEX,CA as LabelEditTextField,JL as LayoutWithDrawer,Ha as LazyLoad,lL as LineChart,oA as LineLoader,kL as Link,GL as Loader,Qn as MAC_ADDRESS_REGEX,Vr as MEMORY_VALIDATION_REGEX,Km as MachineInputField,vL as MediaPreview,DL as MediaViewerModel,Da as MenuOption,bL as MessageBox,iu as MiniModal,yL as MobileSkin,Op as Modal,cw as ModuleChip,Ox as MultiRadialChart,wi as MultiSelect,Qm as NLPInput,Sr as NLP_DESCRIPTION_REGEX,fi as NO_LEADING_TRAILING_SPACE_REGEX,jn as NUMBERS_ONLY_REGEX,Lr as NUMBER_REGEX,$L as NetworkErrorBoundary,KL as NoDataAvailable,bQ as NoDataContent,YL as NoResultFound,IL as OsTree,TL as OtpVerification,au as OverviewModal,or as PAN_CARD_REGEX,Nr as PARAMETER_ALPHANUMERIC_REGEX,Pn as PASSWORD_COMPLEX_REGEX,Rn as PASSWORD_SIMPLE_REGEX,Nn as PHONE_REGEX,In as POSTAL_CODE_REGEX,Up as Paper,SN as PhoneInputField,Rp as PieChart,sk as PopUpModal,GN as PrePostTable,hA as ProcessedSourceSelector,pL as ProgressBar,wL as Prompt,VL as PromptContainer,mr as RGB_COLOR_REGEX,wr as ROMAN_NUMERALS_REGEX,Si as RadialChart,fc as RadioButton,hc as RadioGroup,_m as Recaptcha,Mi as Row,xr as SCRIPT_REGEX,hi as SERVER_HOST_REGEX,Kn as SSN_REGEX,$r as START_END_WHITESPACE_REGEX,kr as STEP_GROUP_NAME_REGEX,XQ as ScoreGaugeChart,cK as ScriptGenerationLoader,AL as ScriptSwitchButton,yu as Search,Za as Select,IQ as SelectionSwitcher,nA as SequentialConnectingBranch,FL as SessionDropdown,zQ as SessionManager,Sx as StackedBarChart,Sp as StateDropdown,NQ as StatusBadge,Na as StatusButton,hw as StatusCard,NL as StatusIndicator,mI as StepLandingTable,CI as StepResultStats,hK as StorageUsageBar,gL as SwitchButton,Wn as TIME_REGEX,Mr as TWITTER_HANDLE_REGEX,$s as Table,Au as TableTree,QL as TableTreeFn,CL as TableWithAccordion,gu as Tabs,zL as TabsWithSilder,za as TextArea,wQ as TextEditor,G as ThemeProvider,bi as Toaster,cc as Toastify,Hi as Toggle,iA as ToggleSwitch,Y as Tooltip,RQ as TooltipService,zi as TruncatedTooltip,U as Typography,Hr as UNIT_REGEX,zn as URL_REGEX,nr as USERNAME_REGEX,hr as USERNAME_SPECIAL_REGEX,er as US_ZIP_CODE_REGEX,Yn as UUID_REGEX,ui as VALID_NAME_PATTERN,sr as VEHICLE_REGISTRATION_REGEX,oL as VariableDropdown,Tp as VariableInput,uL as VariableSuggestionInputDropDown,$n as WHITESPACE_REGEX,fA as WeightageTable,Wr as XML_FILE_TYPE_VALIDATION,TQ as ZoomControl,sK as adapter,BN as addPrePostStepGroup,jN as addStepGroup,LQ as autoScrollToTableLastRow,pA as capitalize,K as checkEmpty,ZQ as checkMicrophoneAccess,gn as cleanAllTooltips,_p as clearStore,aH as compareArrays,iH as compareObjects,GQ as computeTreeCountsAndFormatNodes,zN as convertFormDataToObject,xx as convertToBytes,Vx as convertToGB,_N as convertToISO,uK as copyToClipboard,Js as debounce,jp as deleteStoreValue,Ai as ffid,rH as findAndInsert,PN as formatDate,ON as formatResponseDate,Hx as getEncryptedData,oc as getExtension,lc as getExtensionWithPeriod,eG as getFiltersFromUrl,SQ as getNavigateToKey,QV as getSequentialPayload,Bp as getStoreValue,VQ as getTopVisibleNodeKey,NN as getTreeDetails,qN as handleTimeZoneChange,HQ as handleTreeExpandAllCollapseAll,RN as handleTreeNodeExpandCollapse,DN as handleTreeNodeSect,FN as handleUnCheckAllTreeNodesWithUpdates,hk as hasDuplicateFile,Jm as isEmptyObject,xn as isTextTruncated,kQ as nlpInputDelay,JQ as passesFilters,ZN as rearrangeDragItem,$Q as restoreSelectedFilters,tk as saveFileFromBlob,QN as scrollToView,Pp as setStoreValue,aw as throttle,MQ as toCamelCase,dc as toast,xQ as toggleShowHideEntity,Hn as truncateText,KQ as updateSearchTree,IN as updateTreeState,TN as useBeforeUnload,J as useClickOutside,dK as useDeviceType,uc as useFileDropzone,Zn as useKeyboardActions,gc as useTheme,lk as useTriggerControl,HK as validateFileContent};
48
+ */!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"==a||"number"==a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"==a)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 o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a,o,l;e.exports=(i=n(3),a=n(5),l={},r.m=o=[function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function a(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),a=n.getBlockMap();return a.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,a.get(i)]])}function o(e){return a(e).toList()}function l(e){if(e)return o(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=o(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(),a=o(e);if(0<a.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<a.size;s+=1){var c=0===s?r:0,d=s===a.size-1?i:a.get(s).getText().length;t+=a.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"),a=i.getSelectionAfter(),o=i.getBlockForKey(a.getStartKey());return i=r.Modifier.insertText(i,a,"\n",o.getInlineStyleAt(a.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function C(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function p(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 A(e){var t=new i.Map({}),n=o(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"},a=0;a<n.size&&"break"!==r(a);a+=1);return t}var g=Object(i.Map)({code:{element:"pre"}}),v=r.DefaultDraftBlockRenderMap.merge(g);function y(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function w(e,t,n){var i,o=e.getSelection();i=o.getIsBackward()?o.getFocusKey():o.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,C,p,m,A,g,v=Math.min(d.getDepth()+1,n),y=(h=t,C=v,p=(f=e).getSelection(),A=(m=f.getCurrentContent()).getBlockMap(),g=a(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,C)),e.set("depth",t)}),A=A.merge(g),m.merge({blockMap:A,selectionBefore:p,selectionAfter:p}));return r.EditorState.push(e,y,"adjust-depth")}function b(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(!y(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return C(e);if(y(i)&&0===i.getLength()){var a=i.getDepth();if(0===a)return u(e);if(0<a)return w(e,-1,a)}}}(e)}function E(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 M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){return(L="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 H(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(),a=t.getEndOffset(),l=o(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?a:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var o=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)o(s)}return{v:e}}();if("object"===L(s))return s.v}return{}}function x(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var a=l(e),o=r;o<i;o+=1){var s=a.getEntityAt(o);if(!s){t=void 0;break}if(o===r)t=s;else if(t!==s){t=void 0;break}}return t}function V(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 k(e,t,n){Z[e]["".concat(e.toLowerCase(),"-").concat(n)]=M({},"".concat(t),n)}function S(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){M(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},Z.color,{},Z.bgcolor,{},Z.fontSize,{},Z.fontFamily,{CODE:Z.CODE,SUPERSCRIPT:Z.SUPERSCRIPT,SUBSCRIPT:Z.SUBSCRIPT})}var Z={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(),a=Object.keys(Z[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),o=r.EditorState.push(e,a,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(o=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(o=r.RichUtils.toggleInlineStyle(o,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(o=r.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),k(t,s,n))}return o}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?k("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?k("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?k("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&k("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 I(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(),a=n.getEndOffset(),l=o(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,o=e===l.size-1?a:l.get(e).getText().length;n===o&&0===n?(n=1,o=2):n===o&&--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<o;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===L(n))return n.v}return{}}function T(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 y}),n.d(t,"changeDepth",function(){return w}),n.d(t,"handleNewLine",function(){return b}),n.d(t,"getEntityRange",function(){return V}),n.d(t,"getCustomStyleMap",function(){return S}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return x}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return T}),n.d(t,"getSelectionInlineStyle",function(){return H}),n.d(t,"getSelectionCustomInlineStyle",function(){return I}),n.d(t,"getSelectedBlocksMap",function(){return a}),n.d(t,"getSelectedBlocksList",function(){return o}),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 C}),n.d(t,"clearEditorContent",function(){return p}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return A}),n.d(t,"blockRenderMap",function(){return v})}],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 o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a,o,l;e.exports=(i=n(5),a=n(3),l={},r.m=o=[function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),a=function(e,t,n){var r,a=e.textContent;return""===a.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:a,inlines:Array(a.length).fill(t),entities:Array(a.length).fill(n),blocks:[]}}},o=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 C(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 p=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 v});var m=" ",A=new RegExp("&nbsp;","g"),g=!0;function v(e,t){var n,v,y=(n=t,(v=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(A,m)))?(g=!0,{chunk:function e(t,n,i,m,A,v){var y=t.nodeName.toLowerCase();if(v){var w=v(y,t);if(w){var b=r.Entity.__create(w.type,w.mutability,w.data||{});return{chunk:d(b)}}}if("#text"===y&&"\n"!==t.textContent)return a(t,n,A);if("br"===y)return{chunk:o()};if("img"===y&&t instanceof HTMLImageElement){var E={};E.src=t.getAttribute&&t.getAttribute("src")||t.src,E.alt=t.alt,E.height=t.style.height,E.width=t.style.width,t.style.float&&(E.alignment=t.style.float);var M=r.Entity.__create("IMAGE","MUTABLE",E);return{chunk:d(M)}}if("video"===y&&t instanceof HTMLVideoElement){var L={};L.src=t.getAttribute&&t.getAttribute("src")||t.src,L.alt=t.alt,L.height=t.style.height,L.width=t.style.width,t.style.float&&(L.alignment=t.style.float);var H=r.Entity.__create("VIDEO","MUTABLE",L);return{chunk:d(H)}}if("iframe"===y&&t instanceof HTMLIFrameElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.height=t.height,x.width=t.width;var V=r.Entity.__create("EMBEDDED_LINK","MUTABLE",x);return{chunk:d(V)}}var k,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]}(y,m);S&&("ul"===y||"ol"===y?(m=y,i+=1):("unordered-list-item"!==S&&"ordered-list-item"!==S&&(m="",i=-1),g?(k=s(S,C(t)),g=!1):k=c(S,i,C(t)))),k=k||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var a=t;r=(r=n).withMutations(function(e){var t=a.style.color,n=a.style.backgroundColor,r=a.style.fontSize,i=a.style.fontFamily.replace(/^"|"$/g,""),o=a.style.fontWeight,l=a.style.textDecoration,s=a.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"===o&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(y,t,n);for(var Z=t.firstChild;Z;){var O=e(Z,n,i,m,p(Z)||A,v).chunk;k=u(k,O),Z=Z.nextSibling}return{chunk:k}}(v,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(y){var w=y.chunk,b=new i.OrderedMap({});w.entities&&w.entities.forEach(function(e){e&&(b=b.set(e,r.Entity.__get(e)))});var E=0;return{contentBlocks:w.text.split("\r").map(function(e,t){var n=E+e.length,a=w&&w.inlines.slice(E,n),o=w&&w.entities.slice(E,n),l=new i.List(a.map(function(e,t){var n={style:e,entity:null};return o[t]&&(n.entity=o[t]),r.CharacterMetadata.create(n)}));return E=n,new r.ContentBlock({key:Object(r.genKey)(),type:w&&w.blocks[t]&&w.blocks[t].type||"unstyled",depth:w&&w.blocks[t]&&w.blocks[t].depth,data:w&&w.blocks[t]&&w.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:b}}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 a(e){return"[object Function]"===i(e)}function o(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,o={validate:null,link:null};if(e.__compiled__[t]=o,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?o.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):a(n.validate)?o.validate=n.validate:d(t,n),void(a(n.normalize)?o.normalize=n.normalize:n.normalize?d(t,n):o.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(o).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 C(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function p(e,t){if(!(this instanceof p))return new p(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)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},p.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,a,o,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))&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,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))&&(a=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=o)),0<=this.__index__},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},p.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(C(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(C(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},p.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},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==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:a,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),a=n(0),o=n.n(a),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 C,p=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=[],A={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})}},g=function(){C=!0},v=function(){C=!1},y=function(){return C};function w(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function b(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function E(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 M(e){e.stopPropagation()}function L(e){return e[e.options[0]].icon}function H(e,t){if(e&&void 0===t)return e;var n={};return b(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=H(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var x=n(6),V=n.n(x),k=n(5);function S(e){return(S="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,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=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===S(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 I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var 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&&z(e,t)}(a,r.Component);var e,t,n=N(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,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=a,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,a=t.activeClassName,o=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(Z(e={},"rdw-option-active ".concat(a),o),Z(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":o,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 F(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 R(e,t){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P(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)}T.propTypes={onClick:o.a.func.isRequired,children:o.a.any,value:o.a.string,className:o.a.string,activeClassName:o.a.string,active:o.a.bool,disabled:o.a.bool,title:o.a.string},T.defaultProps={activeClassName:""},n(12);var j=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&&R(e,t)}(a,r.Component);var e,t,n=P(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,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=a,(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,a=t.className,o=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",a),"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",o),onClick:M},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)}}])&&F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(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 X(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=Q(e);if(t){var i=Q(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 Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}j.propTypes={children:o.a.any,onChange:o.a.func,className:o.a.string,expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,optionWrapperClassName:o.a.string,ariaLabel:o.a.string,title:o.a.string},n(13);var G=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)}(a,r.Component);var e,t,n=X(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,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,a=n.value;n.disabled||(r&&r(a),i&&(t.stopPropagation(),i(a)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=a,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,a=t.disabled,o=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,(q(e={},"rdw-dropdownoption-active ".concat(s),r),q(e,"rdw-dropdownoption-highlighted ".concat(u),o),q(e,"rdw-dropdownoption-disabled ".concat(c),a),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function K(e){return(K="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 Y(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"===K(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)}G.propTypes={children:o.a.any,value:o.a.any,onClick:o.a.func,onSelect:o.a.func,setHighlighted:o.a.func,index:o.a.number,disabled:o.a.bool,active:o.a.bool,highlighted:o.a.bool,className:o.a.string,activeClassName:o.a.string,disabledClassName:o.a.string,highlightedClassName:o.a.string,title:o.a.string},G.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)}(a,r.Component);var e,t,n=$(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n.apply(this,arguments)}return e=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,a=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,o){return i.a.createElement(T,{key:o,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||a["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,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(j,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:L(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(G,{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()}}])&&Y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 ae(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"===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 oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=ae(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(o.getCurrentContent(),o.getSelection(),s);o=l.EditorState.push(o,c,"change-inline-style")}o&&a(o)},t.changeKeys=function(e){if(e){var t={};return b(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,o=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.expanded,o=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:o,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=ue(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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=a,(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,a=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(T,{key:t,value:e.label,active:a===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,a=n.dropdownClassName,o=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,C=t.translations,p=this.state.blockTypes.filter(function(e){return e.label===l}),m=p&&p[0]&&p[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(j,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(a),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:o||C["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||C["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(G,{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}),a}();he.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Ce=he;function pe(e){return(pe="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 ge(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=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===pe(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 ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ye=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)}(a,r.Component);var e,t,n=ge(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=l.RichUtils.toggleBlockType(i,n);o&&a(o)};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=a,(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,a=r.expanded,o=r.currentBlockType,l=t.component||Ce,s=this.blocksTypes.find(function(e){return e.style===o});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();ye.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var we=ye;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 Ee(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 Me(e,t){return(Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Le(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=He(e);if(t){var i=He(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 He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var xe=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&&Me(e,t)}(a,r.Component);var e,t,n=Le(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,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=a,(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,a=t.dropdownClassName,o=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,C=e.translations,p=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),p=p||o&&0<=o.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(j,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(a),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||C["components.controls.fontsize.fontsize"]},p?i.a.createElement("span",null,p):i.a.createElement("img",{src:n,alt:""}),o.map(function(e,t){return i.a.createElement(G,{className:"rdw-fontsize-option",active:p===e,value:e,key:t},e)})))}}])&&Ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Ve(e){return(Ve="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 ke(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 Se(e,t){return(Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ze(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"===Ve(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)}xe.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.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&&Se(e,t)}(a,r.Component);var e,t,n=Ze(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);a&&i(a)};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=a,(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,a=r.expanded,o=r.currentFontSize,l=t.component||xe,s=o&&Number(o.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 Ie(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 Te(e,t){return(Te=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=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"===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 Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object},n(17);var Re=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&&Te(e,t)}(a,r.Component);var e,t,n=De(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,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=a,(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,a=n.dropdownClassName,o=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,C=t.doExpand,p=this.props.currentState.fontFamily;return p=p||o&&e&&o.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(j,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",a),onChange:c,expanded:u,doExpand:C,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||s["components.controls.fontfamily.fontfamily"]),o.map(function(e,t){return i.a.createElement(G,{active:p===e,value:e,key:t},e)})))}}])&&Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();Re.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doExpand:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Pe=Re;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 je(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 qe(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=Ue(e);if(t){var i=Ue(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 Ue(e){return(Ue=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&&_e(e,t)}(a,r.Component);var e,t,n=qe(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);a&&i(a)};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=a,(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,a=r.expanded,o=r.currentFontFamily,l=t.component||Pe,s=o&&o.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Xe(e){return(Xe="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 Qe(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 Ke(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"===Xe(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)}We.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.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&&Ge(e,t)}(a,r.Component);var e,t,n=Ke(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,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=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,a=e.indentDisabled,o=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(T,{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(T,{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(T,{onClick:this.indent,disabled:a,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(T,{onClick:this.outdent,disabled:o,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,a=t.doCollapse,o=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,C=n.dropdownClassName,p=n.title;return i.a.createElement(j,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(C),onChange:s,expanded:r,doExpand:o,doCollapse:a,onExpandEvent:l,"aria-label":"rdw-list-control",title:p||u["components.controls.list.list"]},i.a.createElement("img",{src:L(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(G,{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()}}])&&Qe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object,indentDisabled:o.a.bool,outdentDisabled:o.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)}(a,r.Component);var e,t,n=nt(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=l.RichUtils.toggleBlockType(i,e);a&&r(a)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,a=Object(s.changeDepth)(i,e,4);a&&r(a)},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,o=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=this.state,o=a.expanded,l=a.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:o,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}),a}();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 ot(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"===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 ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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&&lt(e,t)}(a,r.Component);var e,t,n=st(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n.apply(this,arguments)}return e=a,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,a=t.center,o=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(T,{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(T,{value:"center",className:d()(a.className),active:"center"===u,onClick:c,title:a.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(T,{value:"right",className:d()(o.className),active:"right"===u,onClick:c,title:o.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(T,{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,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,C=t.right,p=t.justify,m=t.className,A=t.dropdownClassName,g=t.title;return i.a.createElement(j,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(A),onChange:s,expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-textalign-control",title:g||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||L(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(G,{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(G,{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(G,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:C.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(G,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&ot(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 Ct(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=pt(e);if(t){var i=pt(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 pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.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)}(a,r.Component);var e,t,n=Ct(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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=a,(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,a=r.expanded,o=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:o},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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 gt(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 vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(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=wt(e);if(t){var i=wt(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 wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object},n(20);var bt=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&&vt(e,t)}(a,r.Component);var e,t,n=yt(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,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];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,a=n.colors,o=t.currentState,l=o.color,s=o.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:M},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"},a.map(function(t,n){return i.a.createElement(T,{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=a,(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,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-color-picker",title:a||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(T,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),o?this.renderModal():void 0)}}])&&gt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();bt.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,currentState:o.a.object,translations:o.a.object};var Et=bt;function Mt(e){return(Mt="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 Lt(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 xt(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=Vt(e);if(t){var i=Vt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Mt(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 Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kt=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)}(a,r.Component);var e,t,n=xt(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=r.onChange,o=Object(s.toggleCustomInlineStyle)(i,e,n);o&&a(o),t.doCollapse()};var r=e.editorState,i=e.modalHandler,o={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(o.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,o.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=o,i.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.currentColor,o=r.currentBgColor,l=r.expanded,s=t.component||Et,c=a&&a.substring(6),d=o&&o.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}})}}])&&Lt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();kt.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var St=kt,Zt=n(7),Ot=n.n(Zt);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 It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tt(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 Ft=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&&It(e,t)}(a,r.Component);var e,t,n=Tt(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,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,a=r.selectionText,o=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||o,linkTitle:i&&i.title||a})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,a=r.selectionText,o=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||o,linkTitle:i&&i.title||a})},e}return e=a,(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,a=this.state,o=a.linkTitle,l=a.linkTarget,s=a.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:M},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:o}),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||!o},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,a=t.unlink,o=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",o),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(T,{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(T,{disabled:!l.link,value:"ordered-list-item",className:d()(a.className),onClick:this.removeLink,title:a.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:a.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,a=e.doExpand,o=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,C=l.className,p=l.dropdownClassName,m=l.title,A=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(j,{className:d()("rdw-link-dropdown",C),optionWrapperClassName:d()(p),onChange:o,expanded:t&&!A,doExpand:a,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:L(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(G,{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(G,{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&&A?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}),a}();Ft.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object};var Rt=Ft;function Pt(e){return(Pt="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 jt(e,t){return(jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _t(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=qt(e);if(t){var i=qt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Pt(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 qt(e){return(qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ut(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?Ut(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){var t=Gt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Gt=Ot()(),Kt=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&&jt(e,t)}(a,r.Component);var e,t,n=_t(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var a=t.props.config.linkCallback;if("link"===e){var o=(a||Qt)({title:n,target:r,targetOption:i});t.addLink(o.title,o.target,o.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 a=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=a&&a.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,a=n.getSelection();if(i){var o=Object(s.getEntityRange)(n,i);a=a.getIsBackward()?a.merge({anchorOffset:o.end,focusOffset:o.start}):a.merge({anchorOffset:o.start,focusOffset:o.end}),r(l.RichUtils.toggleLink(n,a,null))}},t.addLink=function(e,n,r){var i=t.props,a=i.editorState,o=i.onChange,c=t.state.currentEntity,d=a.getSelection();if(c){var u=Object(s.getEntityRange)(a,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=a.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(a.getCurrentContent(),d,"".concat(e),a.getCurrentInlineStyle(),f),C=l.EditorState.push(a,h,"insert-characters");d=C.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),C=l.EditorState.acceptSelection(C,d),h=l.Modifier.insertText(C.getCurrentContent(),d," ",C.getCurrentInlineStyle(),void 0),o(l.EditorState.push(C,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,o=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=this.getCurrentValues(),o=a.link,l=a.selectionText,s=t.component||Rt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();Kt.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var Yt=Kt;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)}(a,r.Component);var e,t,n=tn(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,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=a,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,a=i.height,o=i.width;this.setState({embeddedLink:"",height:a,width:o})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,a=this.props,o=a.config.popupClassName,l=a.doCollapse,s=a.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",o),onClick:M},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,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:a||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();rn.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.a.object,doCollapse:o.a.func};var an=rn;function on(e){return(on="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"===on(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)}(a,r.Component);var e,t,n=cn(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,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,a=i.editorState,o=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=a.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();o(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),e.doCollapse()},e}return e=a,(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,a=t.component||an;return i.a.createElement(a,{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}),a}();un.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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 Cn(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 pn(e,t){return(pn=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"===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 An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);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&&pn(e,t)}(a,r.Component);var e,t,n=mn(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,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=a,(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:M},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,a=t.title,o=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":o,title:a||s["components.controls.emoji.emoji"]},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();gn.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.a.object};var vn=gn;function yn(e){return(yn="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 wn(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 bn(e,t){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function En(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=Mn(e);if(t){var i=Mn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===yn(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 Mn(e){return(Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ln=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&&bn(e,t)}(a,r.Component);var e,t,n=En(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,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,a=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,a,"insert-characters")),e.doCollapse()},e}return e=a,(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,a=t.component||vn;return i.a.createElement(a,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&wn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Hn(){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 xn(e){return(xn="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 Vn(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 kn(e,t){return(kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sn(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"===xn(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)}Ln.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.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&&kn(e,t)}(a,r.Component);var e,t,n=Sn(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,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 a=r?n[i].getAsFile():n[i];e.uploadImage(a)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,a=i.height,o=i.width,l=e.props.onChange;isNaN(a)||(a+="px"),isNaN(o)||(o+="px"),l(n,a,o,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=a,(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,a=e.dragEnter,o=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,C=u.uploadEnabled,p=u.urlEnabled,m=u.previewImage,A=u.inputAccept,g=u.alt,v=c.doCollapse,y=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"},C&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},y["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),p&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},y["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":a})},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||y["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:A,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:y["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.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"},g.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:o,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||!o||!l||g.mandatory&&!s},y["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:v},y["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Hn,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,a=t.title,o=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-image-control"},i.a.createElement(T,{className:d()(r),value:"unordered-list-item",onClick:l,title:a||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),o?this.renderAddImageModal():void 0)}}])&&Vn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();On.propTypes={expanded:o.a.bool,onExpandEvent:o.a.func,doCollapse:o.a.func,onChange:o.a.func,config:o.a.object,translations:o.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 In(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 Tn(e,t){return(Tn=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=Fn(e);if(t){var i=Fn(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 Fn(e){return(Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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&&Tn(e,t)}(a,r.Component);var e,t,n=Dn(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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 a=t.props,o=a.editorState,s=a.onChange,c={src:e,height:n,width:r};a.config.alt.present&&(c.alt=i);var d=o.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=a,(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,a=t.component||zn;return i.a.createElement(a,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&In(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Pn(e){var t=e.config,n=e.onChange,r=e.translations,a=t.icon,o=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(T,{className:d()(o),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:a,alt:""})))}Rn.propTypes={editorState:o.a.object.isRequired,onChange:o.a.func.isRequired,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var Bn=Rn;n(31),Pn.propTypes={onChange:o.a.func,config:o.a.object,translations:o.a.object};var jn=Pn;function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qn(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 Un(e,t){return(Un=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=Xn(e);if(t){var i=Xn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_n(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 Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qn=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&&Un(e,t)}(a,r.Component);var e,t,n=Wn(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,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)}),b(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=a,(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,a=t.component||jn;return i.a.createElement(a,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&qn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Gn(e){return(Gn="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 Kn(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 Yn(e,t){return(Yn=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"===Gn(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)}Qn.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object.isRequired,config:o.a.object,translations:o.a.object,modalHandler:o.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&&Yn(e,t)}(a,r.Component);var e,t,n=Jn(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,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=a,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,a=e.onExpandEvent,o=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,C=t.redo,p=t.className,m=t.dropdownClassName,A=t.title;return i.a.createElement(j,{className:d()("rdw-history-dropdown",p),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:o,onExpandEvent:a,"aria-label":"rdw-history-control",title:A||u["components.controls.history.history"]},i.a.createElement("img",{src:L(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(G,{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(G,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",C.className),title:C.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,a=t.redo,o=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",o),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(T,{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(T,{value:"redo",onClick:this.onChange,className:d()(a.className),disabled:c,title:a.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:a.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Kn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();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=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"===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 ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:o.a.bool,doExpand:o.a.func,doCollapse:o.a.func,onExpandEvent:o.a.func,config:o.a.object,onChange:o.a.func,currentState:o.a.object,translations:o.a.object};var or=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)}(a,r.Component);var e,t,n=ir(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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,a=l.EditorState[e](r);a&&i(a)},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,o=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,o.registerCallBack(t.expandCollapse),t}return e=a,(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,a=r.undoDisabled,o=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:a,redoDisabled:o},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();or.propTypes={onChange:o.a.func.isRequired,editorState:o.a.object,modalHandler:o.a.object,config:o.a.object,translations:o.a.object};var lr={inline:le,blockType:we,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:St,link:Yt,embedded:fn,emoji:Ln,image:Bn,remove:Qn,history:or},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 Cr(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=pr(e);if(t){var i=pr(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 pr(e){return(pr=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 Ar(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)}(o,r.Component);var e,t,a=Cr(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,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=a.call.apply(a,[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=o,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,a=e.contentState.getEntity(r).getData(),o=a.url,l=a.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(o),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}),o}()).propTypes={entityKey:o.a.string.isRequired,children:o.a.array,contentState:o.a.object},t}function gr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var vr=gr(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,a=e.contentState.getEntity(n).getData(),o=a.url,l=a.value;return i.a.createElement("a",{href:o||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:o.a.number,children:o.a.array,contentState:o.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});vr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var yr=vr;function wr(e){return(wr="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 br(e,t){return(br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Er(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=Mr(e);if(t){var i=Mr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wr(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 Mr(e){return(Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Lr(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,n){return t&&Lr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Vr=Hr(function e(t){var n=this;xr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,a=r.trigger,o=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+a),d=i+a;if((void 0===c||c<0)&&s[0]===a&&(c=0,d=a),0<=c){var u=s.substr(c+d.length,s.length);o().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&&br(e,t)}(n,r.Component);var e=Er(n);function n(){var r;xr(this,n);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return(r=e.call.apply(e,[this].concat(a))).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,v()):"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,a=t.separator,o=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var a=i.value,o=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(a),value:a,url:o}).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 C=e.getSelection().merge({anchorOffset:f,focusOffset:u}),p=l.EditorState.acceptSelection(e,C),m=l.Modifier.replaceText(p.getCurrentContent(),C,"".concat(r).concat(a),p.getCurrentInlineStyle(),c);p=l.EditorState.push(p,m,"insert-characters"),h||(C=p.getSelection().merge({anchorOffset:f+a.length+r.length,focusOffset:f+a.length+r.length}),p=l.EditorState.acceptSelection(p,C),m=l.Modifier.insertText(p.getCurrentContent(),C," ",p.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(p,m,"insert-characters"))}(n,i,a,o,c)},r}return Hr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),a=this.suggestion.getBoundingClientRect(),o=this.dropdown.getBoundingClientRect();i.width<a.left-i.left+o.width?n=15:e=15,i.bottom<o.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),A.registerCallBack(this.onEditorKeyDown),g(),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(){A.deregisterCallBack(this.onEditorKeyDown),v(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,a=r.activeOption,o=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),o&&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===a})},t.text)})))}}]),n}()).propTypes={children:o.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var a=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,C=t.getWrapperRef,p=t.caseSensitive,m=t.dropdownClassName,y=t.optionClassName,w=t.modalHandler;this.config={separator:a,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:C,caseSensitive:p,dropdownClassName:m,optionClassName:y,modalHandler:w}}),kr=function(e){return[new yr(e.mentionClassName).getMentionDecorator(),new Vr(e).getSuggestionDecorator()]};function Sr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Zr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,a=n.height,o=n.width;return i.a.createElement("iframe",{height:a,width:o,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=Sr(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:o.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,a=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(a=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),a+=i+n.separator.length),0<=i){var o=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,o);l&&0<l.length&&(t(a,a+l.length+n.hashCharacter.length),a+=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()};Zr.propTypes={block:o.a.object,contentState:o.a.object};var Nr=Zr;function Ir(e){return(Ir="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 Tr(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 Fr(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=Rr(e);if(t){var i=Rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ir(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 Rr(e){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Pr=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)}(o,r.Component);var t,n,a=Fr(o);function o(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=a.call.apply(a,[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,a=r.contentState,o=i.getEntityAt(0);a.mergeEntityData(o,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),a,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=o,(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(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,a=this.state.hovered,o=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,C=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:C,style:{height:f,width:h}}),!o()&&a&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Tr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),o}()).propTypes={block:o.a.object,contentState:o.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:Pr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},jr={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}},_r={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 qr(e){return(qr="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 Ur(){return(Ur=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 Xr(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){Qr(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 Qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){return function(e){if(Array.isArray(e))return Kr(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 Kr(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)?Kr(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 Kr(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 Yr(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"===qr(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)}(a,r.Component);var e,t,n=$r(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(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||y()&&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),E(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(Gr(t.props.customDecorators),[{strategy:mr,component:Ar({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Gr(kr(Xr(Xr({},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(E(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(E(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(E(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(E(t.props,"defaultContentState")||E(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 Xr(Xr({},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 a=l.RichUtils.handleKeyCommand(r,e);if(a)return t.onChange(a),!0}return!1},t.handleReturn=function(e){if(y())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,a=i.handlePastedText,o=i.stripPastedStyles;return a?a(e,n,r,t.onChange):!o&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var a=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,a,"insert-characters")),!0}if(t){var o=V()(t),c=n.getCurrentContent();return o.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new k.List(o.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=H(jr,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 p,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 o=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(o),t.state={editorState:o,editorFocused:!1,toolbar:r},t}return e=a,(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 a=H(jr,a);t.toolbar=a}if(E(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(E(this.props,"contentState")&&i!==e.contentState)if(i){var o=this.changeEditorState(i);o&&(t.editorState=o)}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,a=this.props,o=a.locale,c=a.localization,u=c.locale,f=c.translations,h=a.toolbarCustomButtons,C=a.toolbarOnFocus,p=a.toolbarClassName,m=a.toolbarHidden,g=a.editorClassName,v=a.wrapperClassName,y=a.toolbarStyle,b=a.editorStyle,E=a.wrapperStyle,M=a.uploadCallback,L=a.ariaLabel,H={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Xr(Xr({},_r[o||u]),f)},x=n||this.focusHandler.isInputFocused()||!C;return i.a.createElement("div",{id:this.wrapperId,className:d()(v,"rdw-editor-wrapper"),style:E,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",p),style:Xr({visibility:x?"visible":"hidden"},y),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&C).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],a=r[e];return"image"===e&&M&&(a.uploadCallback=M),i.a.createElement(n,Ur({key:t},H,{config:a}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Xr({key:t},H))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(g,"rdw-editor-main"),style:b,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:A.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,Ur({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:w,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:L||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Yr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}();ti.propTypes={onChange:o.a.func,onEditorStateChange:o.a.func,onContentStateChange:o.a.func,initialContentState:o.a.object,defaultContentState:o.a.object,contentState:o.a.object,editorState:o.a.object,defaultEditorState:o.a.object,toolbarOnFocus:o.a.bool,spellCheck:o.a.bool,stripPastedStyles:o.a.bool,toolbar:o.a.object,toolbarCustomButtons:o.a.array,toolbarClassName:o.a.string,toolbarHidden:o.a.bool,locale:o.a.string,localization:o.a.object,editorClassName:o.a.string,wrapperClassName:o.a.string,toolbarStyle:o.a.object,editorStyle:o.a.object,wrapperStyle:o.a.object,uploadCallback:o.a.func,onFocus:o.a.func,onBlur:o.a.func,onTab:o.a.func,mention:o.a.object,hashtag:o.a.object,textAlignment:o.a.string,readOnly:o.a.bool,tabIndex:o.a.number,placeholder:o.a.string,ariaLabel:o.a.string,ariaOwneeID:o.a.string,ariaActiveDescendantID:o.a.string,ariaAutoComplete:o.a.string,ariaDescribedBy:o.a.string,ariaExpanded:o.a.string,ariaHasPopup:o.a.string,customBlockRenderFunc:o.a.func,wrapperId:o.a.number,customDecorators:o.a.array,editorRef:o.a.func,handlePastedText:o.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=a,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(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,a}(i,X_(),gQ)),G_.exports);const yQ=t=>{const{contentState:n,entityKey:r,children:i}=t,a=n.getEntity(r),{url:o,target:l}=a.getData();return e("a",{href:o,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),o&&("_blank"!==l&&l?window.open(o,l):window.open(o,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},wQ=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:a,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:C,analyticsClasses:p=!1,error:m,editableTextEditor:A=!1,onSubmit:g,onFocus:v})=>{const[y,w]=c(null),[b,E]=c(!1),[M,L]=c(!1),[H,x]=c(!1),[V,k]=c(t),S=o(null),Z=o(null),O=new Q_.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:yQ}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:Q_.convertToRaw(Q_.ContentState.createFromText(e))}catch(t){return Q_.convertToRaw(Q_.ContentState.createFromText(e))}};l(()=>{let e;try{if(K(t))e="view"===h||A&&!H?Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O):Q_.EditorState.createEmpty(O);else{const n=z(t);e=n?Q_.EditorState.createWithContent(Q_.convertFromRaw(n),O):Q_.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=Q_.EditorState.createWithContent(Q_.ContentState.createFromText(t||"Invalid content"),O)}w(e),k(t)},[t,h,H,A]),l(()=>{if(0===t?.length){let e;if("view"===h||A&&!H){const t=Q_.ContentState.createFromText("---");e=Q_.EditorState.createWithContent(t,O)}else e=Q_.EditorState.createEmpty(O);w(e)}},[t,h,H,A]),l(()=>{if(!S.current)return;const e=e=>{const t=e.target.closest("a");if(t&&S.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=S.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);J(S,()=>{if(A&&H&&!M){x(!1),r(V||"");const e=z(V),t=e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O);w(t)}},[Z]);const N=vQ.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(U,{className:"required-asterisk",children:"* "}),d&&e(U,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),A&&H&&n("div",{ref:Z,className:"ff-textEditor-buttons",children:[e(Y,{title:"Update",placement:"bottom",children:e(q,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(M||!y)return;const e=Q_.convertToRaw(y.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(Q_.convertToRaw(Q_.ContentState.createFromText("---")))),r(t),g&&g(t),k(t),x(!1)}})}),e(Y,{title:"Cancel",placement:"bottom",children:e(q,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{x(!1),r(V||"");const e=z(V),t=e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createWithContent(Q_.ContentState.createFromText("---"),O);w(t),L(!1)},hoverEffect:!0})})]})]}),e("div",{onDoubleClick:()=>{if(A&&!H){x(!0),k(t);const e=z(t),n="---"===e?.blocks[0]?.text?Q_.EditorState.createEmpty(O):e?Q_.EditorState.createWithContent(Q_.convertFromRaw(e),O):Q_.EditorState.createEmpty(O);w(n)}},children:y&&e(N,{editorState:y,onEditorStateChange:e=>{w(e);const t=Q_.convertToRaw(e.getCurrentContent());H&&""===t?.blocks[0]?.text&&u?L(!0):""!==t?.blocks[0]?.text&&L(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(p?"fontSm":"fontMd"),editorStyle:"view"===h||A&&!H?{border:"none"}:b?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px",padding:"0px 8px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px",padding:"0px 8px"},onFocus:()=>{E(!0),v&&v()},onBlur:e=>{if(!A&&y){const e=Q_.convertToRaw(y.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&L(!0)}f&&f(e)},readOnly:A?!H:i,toolbarHidden:A?!H:a,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:!0}}})}),u&&M||C&&m?e(U,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:C}):null]})},bQ=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:a,textFontSize:o="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("section",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},"aria-live":"polite","aria-label":"No data content",children:[e(q,{name:t,width:r,height:i,"aria-label":"No data illustration"}),e(U,{fontSize:o,lineHeight:"36px",fontWeight:"semi-bold",children:a})]}),EQ=({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:a})=>{const{width:o,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:C="",style:p={}}=t,m="function"==typeof t.onClick,A=C?`Card ${C}`:"Card";return n("section",{className:`ff-card ${C}`,style:{width:o,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...p},onClick:t.onClick,role:m?"button":"region","aria-label":A,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),a?.isFooter&&e("div",{className:"ff-card-footer",children:a.content})]})},MQ=e=>Qr.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),LQ=(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()}},HQ=(e,t,n,r,i=void 0,a=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const o=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&&!K(n)&&(c=[n,...e]),c.forEach(e=>{o.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=o.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!a),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=o.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return K(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function xQ(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 VQ(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,a=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),o=a?.offsetHeight||32,l=Math.floor(i/o),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const kQ=e=>new Promise(t=>setTimeout(t,e)),SQ=(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),a=r(t,e?.searchKey),o=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const a="/"+n.slice(0,i+1).join("/"),o=e.find(e=>e.searchKey===a);if(o){r[i]={key:o.key,name:o.name??"",type:o.entityType??"",searchKey:o.searchKey??"",hierarchy:o.hierarchy,isContainer:o.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(a+"/")&&e?.searchKey?.split("/").length===a?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(o).find(t=>t.key===e.key);if(a.length>0){const e=a.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:a[a.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}},ZQ=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){dc.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&dc.error(r)}catch(e){dc.error(n),console.error("Permission query error:",e)}},OQ=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:a={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=o({}),[f,h]=c(0),[p,m]=c(null);l(()=>{if(p&&u.current[p]){const e=u.current[p],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;h(r)}},[p]);const A=C(()=>p?[{id:p,label:p,icon:a?.[p]}]:[],[p,a]);return n("section",{className:"ff-debug-buttons-container","aria-label":"Debug tools panel",children:[e("div",{className:"ff-debug_buttons",role:"toolbar","aria-label":"Debug tools",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(W,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(p===t?"active":""),children:t})},t))}),p&&n("div",{className:"ff-debug-panel",role:"region","aria-label":`${p} details`,style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",role:"banner",children:[e("div",{className:"ff-debug-panel__title",role:"group","aria-label":"Active debug panel",children:e(gu,{tabsData:A,activeTabId:p,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",role:"group","aria-label":"Panel actions",children:i?.[p]??e(q,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",role:"contentinfo",children:e(U,{children:r?.[p]})})]})]})};OQ.displayName="DebugToolsPanel";const zQ=a(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:a={},icons:o=["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),[C,p]=c(null),m=()=>{h(null),p(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:o.map((o,l)=>{const c=s.includes(o);return e(Y,{title:a?.[o]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===o?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&p(t))})(l,o),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&p(C===t?null:t))})(l,o),id:o,children:[e(q,{className:"ff-session-manager-container__icon",name:o,width:24,height:24,color:f===l||d===o?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(o)&&C===o&&e("div",{className:"ff-session-manager-container__modal"})]})},o)})})});zQ.displayName="SessionManager";const NQ=({gap:t=8,fontSize:r=12,entityType:i,statusValues:a})=>e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:a.map((t,a)=>{return n("div",{className:"ff-statusbadge-item","data-tooltip":`${pA(t?.status)}${i?` ${i}`:""} :\n ${Number(t?.tooltipValue).toLocaleString("fullwide",{useGrouping:!1,maximumSignificantDigits:21})} %`,children:[e(q,{name:(o=t?.status?.toLowerCase(),"passed"===o?"pass_result_icon":"failed"===o?"fail_result_icon":"warning"===o?"warning_result_icon":"skipped_result_icon")}),e(U,{fontSize:r,children:t?.value})]},`${a}-${t}`);var o})}),IQ=({options:t,selected:r,onChange:i,className:a="",width:o=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${a}`,style:{width:o,height:l},children:t.map(t=>{const a=r===t.value;return n("button",{className:"toggle_item "+(a?"active":""),onClick:()=>i(t.value),type:"button",children:[e(U,{children:t.label}),a&&s&&e(q,{name:s})]},t.value)})}),TQ=({value:t,min:r=10,max:i=200,step:a=10,onChange:o,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:a,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));o(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(q,{onClick:()=>{const e=Math.max(t-a,r);o(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(U,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(q,{onClick:()=>{const e=Math.min(t+a,i);o(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]}),DQ=new Set(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]),FQ=e=>{const t=document.createElement("div"),n=e.getAttribute("data-tooltip-id");if(n){const e=document.getElementById(n);if(e){let n=e.innerHTML.replace(/<!--[\s\S]*?-->/g,"").trim();return'""'!==n&&"''"!==n&&"&quot;&quot;"!==n||(n=""),""===n||/^<([a-zA-Z0-9-]+)[^>]*>\s*<\/\1>$/i.test(n)?"":(t.innerHTML=e.innerHTML,t)}}const r=e.getAttribute("data-tooltip")||"";if(!r.trim())return"";const i=r.replace(/\\n/g," ").replace(/\n/g," ").replace(/\s+/g," ").trim();if(!i)return"";const a=i.trim().startsWith("<")&&i.trim().endsWith(">"),o=/<(?:[a-z][\s\S]*>|\/[a-z0-9]+>)|&[#a-zA-Z0-9]+;/i.test(i);return e.hasAttribute("data-tooltip-allowhtml")?a?t.innerHTML=i:(t.style.wordBreak="break-word",o?t.innerHTML=i:t.textContent=i):(t.style.wordBreak="break-word",t.textContent=i),t},RQ=()=>(l(()=>{const e=e=>{const t=e.target;t instanceof Element&&t.closest("[data-tippy-root]")||pn({duration:0})};window.addEventListener("scroll",e,!0);const t=An(document.body,{target:"[data-tooltip], [data-tooltip-id]",arrow:!1,placement:"bottom",theme:"ff-global-tooltip",appendTo:document.body,allowHTML:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0,padding:8}},{name:"flip",options:{padding:8,fallbackPlacements:["top","right","left"]}}]},content:e=>FQ(e),onShow(e){const{reference:t}=e;if(!document.body.contains(t))return!1;const n=FQ(t);if(""===n)return!1;const r=e.reference.hasAttribute("data-tooltip-interactive"),i=e.reference.getAttribute("data-tooltip-placement"),a=i?.trim().toLowerCase(),o=a&&DQ.has(a)?a:"bottom";e.setProps({interactive:r,placement:o,content:n})},onCreate(e){const t=new MutationObserver(()=>{if(e.state.isVisible){const t=FQ(e.reference);""===t?e.hide():e.setContent(t)}});t.observe(e.reference,{attributes:!0,attributeFilter:["data-tooltip","data-tooltip-id"]}),e._attrObserver=t;const n=e.reference.parentElement;if(n){const t=new MutationObserver(()=>{document.body.contains(e.reference)||(e.hide(),e.destroy())});t.observe(n,{childList:!0}),e._domObserver=t}},onDestroy(e){e._attrObserver?.disconnect(),e._domObserver?.disconnect()},onMount(e){if(!e.reference.hasAttribute("data-tooltip-interactive")){const t=e.popper.querySelector(".tippy-box");t&&t.scrollHeight>t.clientHeight&&e.setProps({interactive:!0})}}});return()=>{window.removeEventListener("scroll",e,!0),Array.isArray(t)?t.forEach(e=>e.destroy()):t.destroy()}},[]),null),PQ=[{min:0,max:70,label:"High Risk",color:"var(--ff-high-risk-color)"},{min:71,max:89,label:"Medium Risk",color:"var(--ff-warning-risk-color)"},{min:90,max:100,label:"Low Risk",color:"var(--ff-low-risk-color)"}],BQ=3*Math.PI/4,jQ=3*Math.PI/2,_Q=BQ+jQ,qQ=(e,t,n,r)=>({x:e+n*Math.cos(r),y:t+n*Math.sin(r)}),UQ=(e,t,n,r,i)=>{const a=qQ(e,t,n,r),o=qQ(e,t,n,i),l=i-r>Math.PI?1:0;return[`M ${a.x} ${a.y}`,`A ${n} ${n} 0 ${l} 1 ${o.x} ${o.y}`].join(" ")},WQ={min:0,max:100,label:"Unknown",color:"var(--chart-text-color)"},XQ=({score:r,radius:i=90,strokeWidth:a=10,riskZones:o=PQ,showLegend:l=!0,gapAngle:s=0,className:c="",style:d,trackColor:u="var(--base-bg-color)",centerCircleColor:f="var(--ff-score-chart-center-color)",centerCircleRadiusOffset:h=15,pointerHeight:p=16,pointerBaseHalfWidth:m=10,centerOpacity:A=.6,showCenterText:g=!0,showCenterRisk:v=!1})=>{const y=Math.min(100,Math.max(0,r)),w=C(()=>((e,t)=>{const n=Math.min(100,Math.max(0,e));return t.find(e=>n>=e.min&&n<=e.max)??t[t.length-1]??WQ})(y,o),[y,o]),b=i+10,E=i+10,M=2*(i+10),L=a/(2*i),H=C(()=>{const e=s/2+L;return o.map((t,n)=>{const r=BQ+t.min/100*jQ,a=BQ+t.max/100*jQ,l=0===n?r:r+e,s=n===o.length-1?a:a-e;return{...t,path:UQ(b,E,i,l,s),visualStart:l,visualEnd:s}})},[o,b,E,i,s,L]),x=UQ(b,E,i,BQ,_Q),V={min:0,max:100,visualStart:BQ,visualEnd:_Q},k=H.find(e=>y>=e.min&&y<=e.max)??H[H.length-1]??V,S=k.max===k.min?.5:(y-k.min)/(k.max-k.min),Z=k.visualStart+S*(k.visualEnd-k.visualStart),O=i-a-h,z=m/O,N=qQ(b,E,O,Z-z),I=qQ(b,E,O,Z+z),T=qQ(b,E,O+p,Z),D=`Score gauge showing ${y} out of 100 with ${w.label}`;return n("section",{className:`ff-score-gauge-chart-container ${c}`.trim(),style:d,"aria-label":D,children:[n("svg",{className:"ff-score-gauge-svg",viewBox:`0 0 ${M} ${M}`,role:"img","aria-label":`Score gauge: ${y} out of 100 — ${w.label}`,children:[e("path",{className:"ff-score-gauge-track",d:x,fill:"none",stroke:u,strokeWidth:a,strokeLinecap:"round"}),H.map((t,n)=>e("path",{className:"ff-score-gauge-arc",d:t.path,fill:"none",stroke:t.color,strokeWidth:a,strokeLinecap:"round"},n)),e("circle",{cx:b,cy:E,r:O,fill:f,opacity:A}),e("g",{className:"ff-score-gauge-pointer",children:e("polygon",{points:`${T.x},${T.y} ${N.x},${N.y} ${I.x},${I.y}`,fill:f,opacity:A})}),g&&n(t,{children:[e("text",{className:"ff-score-gauge-center-label",x:b,y:E-.2*i,textAnchor:"middle",dominantBaseline:"central",children:"Score"}),e("text",{className:"ff-score-gauge-center-score",x:b,y:E+.06*i,textAnchor:"middle",dominantBaseline:"central",children:y}),v&&e("text",{className:"ff-score-gauge-center-risk",x:b,y:E+.28*i,textAnchor:"middle",dominantBaseline:"central",fill:w.color,children:w.label})]})]}),l&&e("div",{className:"ff-score-gauge-legend",role:"list","aria-label":"Risk legend",children:n("div",{className:"ff-score-gauge-legend-item",role:"listitem",children:[e("span",{className:"ff-score-gauge-legend-dot",style:{backgroundColor:w.color}}),e("span",{className:"ff-score-gauge-legend-text",children:w.label})]})})]})},QQ=({headerLabel:t,children:r,className:i="",style:a,contentStyle:o,headerActions:l,headerHeight:s="32px"})=>{const c=t?`Card panel ${t}`:"Card panel";return n("section",{className:I("ff-card-panel",i),style:a,"aria-label":c,children:[n("div",{className:"ff-card-panel-header",style:{height:s},children:[e(U,{as:"div",fontWeight:"semi-bold",color:"var(--brand-color)",children:t}),l&&e("div",{className:"ff-card-panel-header-actions",children:l})]}),e("div",{className:"ff-card-panel-body",style:o,children:r})]})},GQ=(e,t="Asia/Kolkata")=>{const n=new Map,r=new Map,i=e.map(e=>({...e}));for(const e of i){const t=String(e.key);if(n.set(t,e),e.parentId){const n=String(e.parentId);r.has(n)||r.set(n,[]),r.get(n).push(t)}}const a=new Set,o=e=>{const t=n.get(e);if(!t)return{res:0,sub:0};if(a.has(e))return{res:t.totalResourceCount??0,sub:t.totalSubContainerCount??0};let i=0,l=0;const s=r.get(e)||[];for(const e of s){const t=n.get(e);if(!t)continue;t.container?l+=1:i+=1;const r=o(e);i+=r.res,l+=r.sub}return t.totalResourceCount=i,t.totalSubContainerCount=l,a.add(e),{res:i,sub:l}},l=e=>{const t=n.get(e);return t?void 0!==t.hierarchy?t.hierarchy:t.parentId&&n.has(String(t.parentId))?(t.hierarchy=l(String(t.parentId))+1,t.hierarchy):(t.hierarchy=0,0):0};for(const e of i){const t=String(e.key);o(t),l(t)}const s=new Intl.DateTimeFormat("en-GB",{timeZone:t,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),c=e=>{if(!e)return e;try{return s.format(new Date(e))}catch(t){return e}};return i.map(e=>{const t=!!e.container&&((e.totalResourceCount??0)>0||(e.totalSubContainerCount??0)>0),n=e.expandable,r=e=>!!t&&(!1===n||(!!K(e)||e));return{...e,expandable:t,expanded:r(e.expanded),expandedAll:r(e.expandedAll),createdOn:c(e.createdOn),modifiedOn:c(e.modifiedOn),hierarchy:e.hierarchy}})},KQ=(e,t,n,r,i,a,o,l,s,c)=>{const d=Bp("current-project");if(e?.text||a&&a.length>0){const u=(e?.text||"").toLowerCase(),f=(t?.slice(1)||[]).map(e=>({...e})),h=e=>{if(!e)return!1;let t=!0;u&&(t=!!e.name?.toLowerCase().includes(u));let n=!0;return a&&a.length>0&&(n=a.every(t=>{const n=Object.entries(t)[0];if(!n)return!0;const[r,i]=n;return Array.isArray(i)?i.includes(e[r]):e[r]===i})),t&&n},C=(Array.isArray(c)?c:[]).filter(e=>e?.key&&!f.some(t=>t.key===e.key)),p=o||C[0];if(p)if(s){const e=p.container,n=f.findIndex(e=>e.key===s);if(-1!==n){const r=f[n],i="clone"===l?p.parentId||r.parentId:e||"add"===l?r.key:r.parentId;let a=h(p)||C.some(h);if(!a){let e=i;for(;e;){const n=f.find(t=>t.key===e)||(t[0]?.key===e?t[0]:null);if(n&&h(n)){a=!0;break}e=n?.parentId}}if(a){let t=n;const r=e=>{let t=0;const n=e=>{const r=f.filter(t=>t.parentId===e);t+=r.length,r.forEach(e=>n(e.key))};return n(e),t};"clone"===l||e||"add"===l?t=n+1+r(s):"above"===l?t=n:"below"===l&&(t=n+1+r(s)),C.length?f.splice(t,0,...C):f.splice(t,0,p)}}}else if(!K(p)){const e=f.findIndex(e=>e.key===p.key||e.key===p.id);-1!==e&&(f[e]={...f[e],...p})}if(!f?.length)return n(r([])),void n(i({}));const m=new Map,A=new Map,g=new Set,v=[];for(const e of f)m.set(e.key,e.parentId),A.has(e.parentId)||A.set(e.parentId,[]),A.get(e.parentId).push(e.key),h(e)&&v.push(e.key);for(const e of v){let t=e;for(;t&&!g.has(t);)g.add(t),t=m.get(t)}const y=e=>{const t=A.get(e)||[];for(const e of t)g.has(e)||(g.add(e),y(e))};for(const e of v)y(e);const w=f.filter(e=>g.has(e.key)),b=[t[0],...w],E=GQ(b,d?.timeZone);n(r(E.slice(1))),n(i(E[0]??{}))}},YQ=(e,t)=>{if(!e)return NaN;const[n,r,i]=e.split("/").map(Number);if(void 0===n||void 0===r||void 0===i||isNaN(n)||isNaN(r)||isNaN(i))return NaN;const a=new Date(i,r-1,n);return t&&a.setHours(23,59,59,999),a.getTime()},JQ=(e,t)=>{if(!e?.length)return!0;const n=t?.responseObject;return!!n&&e.every(e=>{if(!e.values||0===e.values.length)return!0;switch(e.name){case"createdBy":case"modifiedBy":{const t="createdBy"===e.name?"createdByUname":"modifiedByUname";return e.values.includes(n[t])}case"methodType":try{if(!n.fatRequest)return!1;const t=JSON.parse(n.fatRequest),r=JSON.parse(t.request);return e.values.includes(r.method)}catch{return!1}case"createdOn":case"modifiedOn":{const t=new Date(n[e.name]).getTime();if(isNaN(t))return!1;const r=YQ(e.values[0],!1),i=YQ(e.values[1]||e.values[0],!0);return t>=r&&t<=i}default:return e.values.includes(n[e.name])}})},$Q=(e,t,n,r,i)=>{const a=[],o={modifiedFrom:void 0,modifiedTo:void 0};e.forEach(e=>{"modifiedOn"===e.name?(o.modifiedFrom=e.values[0]?new Date(e.values[0]):void 0,o.modifiedTo=e.values[1]?new Date(e.values[1]):void 0):e.values.forEach(t=>{a.push(`${e.name}-${t}`)})}),t(a),n(o),r(a),i(o)},eG=e=>{const t=[];return e.forEach((e,n)=>{if(n.startsWith("f_")){const r=n.replace("f_","");t.push({name:r,values:e.split(",")})}}),t};var tG=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={},a=null,o=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,o=e.server,t.debug(o)):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 C=null;void 0!==e.token&&null!==e.token&&(C=e.token);let p=null;void 0!==e.apisecret&&null!==e.apisecret&&(p=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 A=6e4;function g(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&&(A=e.longPollTimeout),isNaN(A)&&(A=6e4);let v=!1,y=null,w=new Map,b=this,E=0,M=new Map;function L(){if(null==y)return;if(t.debug("Long poll..."),!v)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+y+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),C&&(n=n+"&token="+encodeURIComponent(C)),p&&(n=n+"&apisecret="+encodeURIComponent(p)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:H,timeout:A,error:function(n,r){if(t.error(n+":",r),E++,E>3)return v=!1,void e.error("Lost connection to the server (is it down?)");L()}})}function H(e,i){if(E=0,n||null==y||!0===i||L(),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=M.get(n);t&&t(e),M.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+y),t.debug(e);const n=e.transaction;if(n){const t=M.get(n);t&&t(e),M.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+y),t.debug(e);const n=e.transaction;if(n){const t=M.get(n);t&&t(e),M.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(i);let a=r.webrtcStuff;a.pc&&a.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?a.pc.addIceCandidate(i):a.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(i),t.debug(a.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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 "+y),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=w.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=M.get(n);t&&t(e),M.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+y),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 a=w.get(n);if(!a)return void t.warn("This handle is not attached to this session");let o=e.jsep;o&&(t.debug("Handling SDP as well..."),t.debug(o));let l=a.onmessage;l?(t.debug("Notifying application..."),l(i,o)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+y),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+y),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+y);else for(let t=0;t<e.length;t++)H(e[t],!0)}function x(){if(!s||!n||!v)return;a=setTimeout(x,m);let e={janus:"keepalive",session_id:y,transaction:t.randomString(12)};C&&(e.token=C),p&&(e.apisecret=p),r.send(JSON.stringify(e))}function V(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(v=!1,u.janus="claim",u.session_id=y,r&&(r.onopen=null,r.onerror=null,r.onclose=null,a&&(clearTimeout(a),a=null))),C&&(u.token=C),p&&(u.apisecret=p),!s&&t.isArray(o)&&(s=o[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(o)&&!c.reconnect)return l++,l===o.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){V(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){M.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);a=setTimeout(x,m),v=!0,y=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+y):t.log("Created session: "+y),t.sessions.set(y,b),c.success()}),r.send(JSON.stringify(u))},message:function(e){H(JSON.parse(e.data))},close:function(){s&&v&&(v=!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);v=!0,y=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+y):t.log("Created session: "+y),t.sessions.set(y,b),L(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(o)&&!c.reconnect)return l++,l===o.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){V(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function k(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!v)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let o=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:o,transaction:c};if(a.token&&(d.token=a.token),p&&(d.apisecret=p),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=a.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=y,d.handle_id=e,M.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+"/"+y+"/"+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 S(e,i){if(!v)return void t.warn("Is the server down? (connected=false)");let a=w.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let o={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(a.token&&(o.token=a.token),p&&(o.apisecret=p),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(o),n)return o.session_id=y,o.handle_id=e,void r.send(JSON.stringify(o));t.httpAPICall(s+"/"+y+"/"+e,{verb:"POST",withCredentials:f,body:o,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 Z(e,n,r,i,a){let o=w.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let l=o.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=[]}o.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;o.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=[],a&&l.dataChannel[n].pending.push(a)}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=w.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,a=n.text||n.data;if(!a)return t.warn("Invalid data"),void n.error("Invalid data");let o=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[o]?"open"!==i.dataChannel[o].readyState?(i.dataChannel[o].pending.push(a),void n.success()):(t.log("Sending data on data channel <"+o+">"),t.debug(a),i.dataChannel[o].send(a),void n.success()):(Z(e,o,n.protocol,!1,a,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=w.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 a=n.dtmf;if(!a)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let o=a.tones;if(!o)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof a.duration?a.duration:500,s="number"==typeof a.gap?a.gap:50;t.debug("Sending DTMF string "+o+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(o,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 a=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+a+")"),Q(e);let o=w.get(e);if(!o||o.detached)return w.delete(e),void i.success();if(o.detached=!0,a)return w.delete(e),void i.success();if(!v)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(o.token&&(l.token=o.token),p&&(l.apisecret=p),n)return l.session_id=y,l.handle_id=e,r.send(JSON.stringify(l)),w.delete(e),void i.success();t.httpAPICall(s+"/"+y+"/"+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),w.delete(e),i.success()},error:function(n,r){t.error(n+":",r),w.delete(e),i.success()}})}function I(e,n){let r=w.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let a={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},o=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){o=!0;break}n.externalEncryption&&(o=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&o&&(i.insertableStreams=!0,a.forceEncodedAudioInsertableStreams=!0,a.forceEncodedVideoInsertableStreams=!0,a.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(a),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?S(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=w.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&&S(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 a=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(a);let o=i.pc?i.pc.getTransceivers():null,l=o?o.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),a||(a=setTimeout(function(){t.log("Removing remote track");let o=i.pc?i.pc.getTransceivers():null,l=o?o.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)}a=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=a)clearTimeout(a),a=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,a=n?n.mid:e.target.id;r.onremotetrack(e.target,a,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function T(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:X;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 a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let o=a.webrtcStuff;var l;o.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(I(e,r),n&&await R(e,r),i){if(await o.pc.setRemoteDescription(i),t.log("Remote description accepted!"),o.remoteSdp=i.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=[]}await R(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=w.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 a=await i.pc.createAnswer();t.debug(a);let o={type:"answer",sdp:a.sdp};if(n.customizeSdp(o),a.sdp=o.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:a.sdp},await i.pc.setLocalDescription(a),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(a.e2ee=!0);return a}(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=w.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 a={},o=!0===n.iceRestart;o&&(a.iceRestart=!0);t.debug(a);let l=await i.pc.createOffer(a);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=a,!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:X,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=w.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let a=i.webrtcStuff;if(r){if(!a.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),a.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),a.remoteSdp=r.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=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function F(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 R(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function R(e,n){let r=w.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 a=n.tracks;if(!a||!Array.isArray(a)||0===a.length)return;let o=!1,l={};for(let e of a){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 a){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"),Z(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),Z(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 a=n.type;"screen"===n.type&&(a="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===a):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===a)),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===a),!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"===a&&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"===a&&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{o||(o=!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],a=t.trackConstraints(i);e[r]=a[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"===a||!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=g(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=a+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(a).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 "+a+" 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"===a&&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"===a?e=d.createEncodedAudioStreams():"video"===a&&(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"===a?e=s.receiver.createEncodedAudioStreams():"video"===a&&(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(a)),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=a+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(a).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 "+a+" 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"===a?e=s.receiver.createEncodedAudioStreams():"video"===a&&(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,a=!1!==n.recv&&s.receiver.track;i&&a?r="sendrecv":i&&!a?r="sendonly":!i&&a?r="recvonly":i||a||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}o&&r.consentDialog(!1)}function P(e){let n=w.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=[],a=r.pc.getTransceivers();for(let e of a){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=w.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=[],a=r.pc.getTransceivers();for(let e of a){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 j(e,n,r,i){i="function"==typeof i?i:t.noop;let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),void i(0);let o=r?"remote":"local",l=a.webrtcStuff;if(l.volume[o]||(l.volume[o]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let a=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!a)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!a.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!a.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?a.receiver:a.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[o].value}return t.warn("Getting the "+o+" volume unsupported by browser"),void i(0)}function _(e,n,r){let i=w.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let a=i.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!0;if(!a.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=a.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!a.myStream.getVideoTracks()[0].enabled}if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=a.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!a.myStream.getAudioTracks()[0].enabled}function q(e,n,r,i){let a=w.get(e);if(!a||!a.webrtcStuff)return t.warn("Invalid handle"),!1;let o=a.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!1;if(!o.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=o.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 o.myStream.getVideoTracks())e.enabled=!i}else{if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=o.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 o.myStream.getAudioTracks())e.enabled=!i}return!0}function U(e,n){let r=w.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=w.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let a=i.webrtcStuff;if(!a.pc)return void t.warn("Invalid PeerConnection");let o=a.pc.getTransceivers().find(e=>e.mid===n);if(!o)return void t.warn("No transceiver with mid",n);if(!o.sender)return void t.warn("No sender for transceiver with mid",n);let l=o.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,o.sender.setParameters(l)):t.warn("No parameters encodings")}function X(e){t.error("WebRTC error:",e)}function Q(e,i){t.log("Cleaning WebRTC stuff");let a=w.get(e);if(!a)return;let o=a.webrtcStuff;if(o){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};a.token&&(i.token=a.token),p&&(i.apisecret=p),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=y,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+y+"/"+e,{verb:"POST",withCredentials:f,body:i})}o.volume&&(o.volume.local&&o.volume.local.timer&&clearInterval(o.volume.local.timer),o.volume.remote&&o.volume.remote.timer&&clearInterval(o.volume.remote.timer));for(let e in o.bitrate)o.bitrate[e].timer&&clearInterval(o.bitrate[e].timer);o.bitrate={},!o.streamExternal&&o.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(o.myStream)),o.streamExternal=!1,o.myStream=null;try{o.pc.close()}catch(e){}o.pc=null,o.candidates=null,o.mySdp=null,o.remoteSdp=null,o.iceDone=!1,o.dataChannel={},o.dtmfSender=null,o.insertableStreams=!1,o.externalEncryption=!1}a.oncleanup()}V(e),this.getServer=function(){return s},this.isConnected=function(){return v},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,V(e)},this.getSessionId=function(){return y},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"),!v)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),a={janus:"info",transaction:i};C&&(a.token=C);p&&(a.apisecret=p);if(n)return M.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(a));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:a,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(o){!function(o){o=o||{},o.success="function"==typeof o.success?o.success:t.noop,o.error="function"==typeof o.error?o.error:t.noop;let l=!0===o.unload,c=!0;void 0!==o.notifyDestroyed&&null!==o.notifyDestroyed&&(c=!0===o.notifyDestroyed);let d=!0===o.cleanupHandles;if(t.log("Destroying session "+y+" (unload="+l+")"),!y)return t.warn("No session to destroy"),o.success(),void(c&&e.destroyed());if(d)for(const e of w.keys())N(e,{noRequest:!0});if(!v)return t.warn("Is the server down? (connected=false)"),y=null,void o.success();let u={janus:"destroy",transaction:t.randomString(12)};C&&(u.token=C);p&&(u.apisecret=p);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+y,JSON.stringify(u)),t.log("Destroyed session:"),y=null,v=!1,o.success(),void(c&&e.destroyed());if(n){u.session_id=y;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),a&&clearTimeout(a),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),o.success(),c&&e.destroyed())},l=function(){t(),o.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+"/"+y,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),y=null,v=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),o.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),y=null,v=!1,o.success(),c&&e.destroyed()}})}(o)},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,!v)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 a=e.opaqueId,o=e.loopIndex,l=e.token?e.token:C,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:a,loop_index:o,transaction:c};l&&(d.token=l);p&&(d.apisecret=p);if(n)return M.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 a={session:b,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 j(r,e,!0,t)},getRemoteVolume:function(e,t){return j(r,e,!0,t)},getLocalVolume:function(e,t){return j(r,e,!1,t)},isAudioMuted:function(e){return _(r,e,!1)},muteAudio:function(e){return q(r,e,!1,!0)},unmuteAudio:function(e){return q(r,e,!1,!1)},isVideoMuted:function(e){return _(r,e,!0)},muteVideo:function(e){return q(r,e,!0,!0)},unmuteVideo:function(e){return q(r,e,!0,!1)},getBitrate:function(e){return U(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){k(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){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){F(r,e)},getLocalTracks:function(){return P(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){Q(r,!0===e)},detach:function(e){N(r,e)}};w.set(r,a),e.success(a)}),d.session_id=y,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+y,{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 a={session:b,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 j(r,e,!0,t)},getRemoteVolume:function(e,t){return j(r,e,!0,t)},getLocalVolume:function(e,t){return j(r,e,!1,t)},isAudioMuted:function(e){return _(r,e,!1)},muteAudio:function(e){return q(r,e,!1,!0)},unmuteAudio:function(e){return q(r,e,!1,!1)},isVideoMuted:function(e){return _(r,e,!0)},muteVideo:function(e){return q(r,e,!0,!0)},unmuteVideo:function(e){return q(r,e,!0,!1)},getBitrate:function(e){return U(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){k(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){T(r,!0,e)},createAnswer:function(e){T(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){F(r,e)},getLocalTracks:function(){return P(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){Q(r,!0===e)},detach:function(e){N(r,e)}};w.set(r,a),e.success(a)},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,a=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new a(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let a={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(a.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(a.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(a.body=JSON.stringify(n.body));let o=r(e,a).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)});o=i.race([o,e])}return o.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)}),o}}},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)}:{},a=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,a,{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 nG=!0,rG=!0;function iG(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function aG(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,"addEventListener").writable)return void sG("Unable to polyfill events");const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const a=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,a),i.apply(this,[e,a])};const a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(n))return a.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,a.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 oG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(nG=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function lG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(rG=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function sG(){if("object"==typeof window){if(nG)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function cG(e,t){rG&&console.warn(e+" is deprecated, please use "+t+" instead.")}function dG(e){return"[object Object]"===Object.prototype.toString.call(e)}function uG(e){return dG(e)?Object.keys(e).reduce(function(t,n){const r=dG(e[n]),i=r?uG(e[n]):e[n],a=r&&!Object.keys(i).length;return void 0===i||a?t:Object.assign(t,{[n]:i})},{}):e}function fG(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?fG(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{fG(e,e.get(t),n)})}))}function hG(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const a=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&fG(e,n,i)})}),i}const CG=sG;function pG(e,t){if(t.version>=64)return;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 a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});const o=t.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||o)){let t;if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?t=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let o=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes("back")&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),CG("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return CG("chrome: "+JSON.stringify(e)),i(e)},a=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(a(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(a(e))))}}}function mG(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function AG(e,t){if(!(t.version>102))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 aG(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function gG(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 vG(e,t){if(t.version>=67)return;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=>hG(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}),aG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>hG(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const n=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 n.apply(this,arguments)}}function yG(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 wG(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return yG(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 a(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=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const o=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]),o.apply(this,arguments)):o.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:a(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 bG(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 EG(e,t){t.version>102||aG(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var MG=Object.freeze({__proto__:null,fixNegotiationNeeded:EG,shimAddTrackRemoveTrack:wG,shimAddTrackRemoveTrackWithNative:yG,shimGetSendersWithDtmf:gG,shimGetUserMedia:pG,shimMediaStream:mG,shimOnTrack:AG,shimPeerConnection:bG,shimSenderReceiverGetStats:vG});function LG(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){cG("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 HG(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 xG(e,t){"object"==typeof e&&(e.RTCPeerConnection||e.mozRTCPeerConnection)&&(!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]}))}function VG(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;if(t.version>=151)return;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,a]=arguments;return"closed"===this.signalingState?Promise.resolve(new Map):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,a)}}function kG(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 SG(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}),aG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function ZG(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){cG("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function OG(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function zG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const t=e.length>0;t&&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=n.apply(this,arguments);if(t){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 NG(e,t){if("object"!=typeof e||!e.RTCRtpSender)return;if(t.version>=110)return;const n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){const e=n.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function IG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function TG(e,t){if("object"!=typeof e||!e.RTCPeerConnection)return;if(t.version>=110)return;const n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}var DG=Object.freeze({__proto__:null,shimAddTransceiver:zG,shimCreateAnswer:TG,shimCreateOffer:IG,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in 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:NG,shimGetStats:VG,shimGetUserMedia:LG,shimOnTrack:HG,shimPeerConnection:xG,shimRTCDataChannel:OG,shimReceiverGetStats:SG,shimRemoveStream:ZG,shimSenderGetStats:kG});function FG(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 RG(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 PG(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=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=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function BG(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(jG(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function jG(e){return e&&void 0!==e.video?Object.assign({},e,{video:uG(e.video)}):e}function _G(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?(cG("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 qG(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 UG(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 WG(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var XG,QG=Object.freeze({__proto__:null,shimAudioContext:WG,shimCallbacksAPI:PG,shimConstraints:jG,shimCreateOfferLegacy:UG,shimGetUserMedia:BG,shimLocalStreamsAPI:FG,shimRTCIceServerUrls:_G,shimRemoteStreamsAPI:RG,shimTrackEventTransceiver:qG}),GG={exports:{}};var KG=(XG||(XG=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&&void 0!==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 a=r[i],o=t.matchPrefix(e,"a=rtpmap:"+a+" ")[0];if(o){const r=t.parseRtpMap(o),i=t.matchPrefix(e,"a=fmtp:"+a+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+a+" ").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"),a=-1!==r.fecMechanisms.indexOf("ULPFEC"),o=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=o.length>0&&o[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:a?"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 a=t.matchPrefix(e,"a=rtcp-mux");return n.mux=a.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 a=t.matchPrefix(e,"a=sctp-port:");if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const o=t.matchPrefix(e,"a=sctpmap:");if(o.length>0){const e=o[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 a=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+a+" 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}(GG)),GG.exports),YG=S(KG),JG=V({__proto__:null,default:YG},[KG]);function $G(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=YG.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,aG(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function eK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||aG(e,"icecandidate",e=>{if(e.candidate){const t=YG.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function tK(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>102)return;if("firefox"===t.browser&&t.version>=113)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=YG.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=YG.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=YG.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 a={};Object.defineProperty(a,"maxMessageSize",{get:()=>i}),this._sctp=a}return n.apply(this,arguments)}}function nK(e,t){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;if("chrome"===t.browser&&t.version>=149)return;if("firefox"===t.browser&&t.version>60)return;function n(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 r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=r.apply(this,arguments);return n(e,this),e},aG(e,"datachannel",e=>(n(e.channel,e.target),e))}function rK(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 iK(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 aK(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 oK(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 lK=Object.freeze({__proto__:null,removeExtmapAllowMixed:iK,shimAddIceCandidateNullOrEmpty:aK,shimConnectionState:rK,shimMaxMessageSize:tK,shimParameterlessSetLocalDescription:oK,shimRTCIceCandidate:$G,shimRTCIceCandidateRelayProtocol:eK,shimSendThrowTypeError:nK});const sK=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=sG,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){const t=parseInt(e.version,10);if(t>=90)return{browser:"chrome",version:t}}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(iG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(iG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(iG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=iG(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:lK,extractVersion:iG,disableLog:oG,disableWarnings:lG,sdp:JG};switch(r.browser){case"chrome":if(!MG||!bG||!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=MG,aK(e,r),oK(e),pG(e,r),mG(e),bG(e,r),AG(e,r),wG(e,r),gG(e),vG(e,r),EG(e,r),$G(e),eK(e),rK(e),tK(e,r),nK(e,r),iK(e,r);break;case"firefox":if(!DG||!xG||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=DG,aK(e,r),oK(e),LG(e,r),xG(e,r),VG(e,r),HG(e),ZG(e),kG(e),SG(e),OG(e),zG(e,r),NG(e,r),IG(e,r),TG(e,r),$G(e),rK(e),tK(e,r),nK(e,r);break;case"safari":if(!QG||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=QG,aK(e,r),oK(e),_G(e),UG(e),PG(e),FG(e),RG(e),qG(e),BG(e),WG(e),$G(e),eK(e),tK(e,r),nK(e,r),iK(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),cK=({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:a,DynamicHeight:o=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:""+(o+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(U,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:a})]})]})},dK=()=>{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},uK=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},fK=e=>{if("number"==typeof e)return e;const t=e.match(/([\d.]+)\s*(KB|MB|GB)/i);if(!t)return 0;const n=parseFloat(t[1]??"0");switch(t[2]?.toUpperCase()||""){case"GB":return 1024*n*1024*1024;case"MB":return 1024*n*1024;case"KB":return 1024*n;default:return n}},hK=({used:t,total:n,showValue:r=!0,width:i="216px"})=>{const a=fK(t),o=((e,t)=>t>0?Math.min(e/t*100,100):0)(a,fK(n));return e("div",{className:"ff-storage-bar",style:{width:i},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${o}%`},children:r&&e("span",{className:"ff-storage-bar__value",children:(l=a,l>=1073741824?`${(l/1073741824).toFixed(2)} GB`:l>=1048576?`${(l/1048576).toFixed(2)} MB`:l>=1024?`${(l/1024).toFixed(2)} KB`:`${l} B`)})})})});var l},CK={jpeg:"jpg",m4v:"mp4",pdfx:"pdf",tiff:"tif",word:"doc"},pK={aac:["fff1","fff9","494433"],bmp:["424d"],crx:["43723234"],doc:["d0cf11e0"],gif:["47494638"],jpg:["ffd8ff"],mp3:["494433","fffb","fff3","fff2"],pdf:["25504446"],pfx:["3082","3081"],png:["89504e47"],ppt:["d0cf11e0"],tif:["49492a00","4d4d002a"],wav:["52494646"],xls:["d0cf11e0"],zip:["504b0304","504b0506","504b0708"],"7z":["377abcaf271c"],gz:["1f8b"],exe:["4d5a"],dll:["4d5a"]},mK=Object.values(pK).flat(),AK=["apk","docx","ipa","pptx","xlsx"],gK=["avsc","csv","bin","dat","edi","html","js","json","key","md","pem","properties","py","svg","txt","trg","xml","yaml","yml"],vK=["exe","bat","cmd","sh","php","phtml","jsp","asp","aspx","lnk","vbs"],yK=[/<\?php/i,/<\?=/i,/__typeof__/i,/Runtime\.getRuntime/i,/base64_decode\s*\(/i,/eval\s*\(/i],wK=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{r.result?n(new Uint8Array(r.result)):n(null)},r.onerror=()=>n(null),void 0!==t?r.readAsArrayBuffer(e.slice(0,t)):r.readAsArrayBuffer(e)}),bK=e=>[...e].map(e=>e.toString(16).padStart(2,"0")).join(""),EK=(e,t)=>t.some(t=>e.startsWith(t)),MK=e=>{try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{return null}},LK=async(e,t,n)=>{const r=bK(t),i=(e=>{const t=MK(e);if(null!==t)return t;try{return new TextDecoder("windows-1252",{fatal:!0}).decode(e)}catch{return null}})(t);if(EK(r,mK)||null===i||/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/.test(i))return!1;const a=i.trim();if(!a&&e.size>0)return!1;if(/^This corrupted \.[a-z0-9]+ file contains invalid content\.$/i.test(a.trim()))return!1;if("json"===n||"avsc"===n){if(e.size>20971520)return!t.includes(0);const n=await wK(e),r=n?MK(n):null;if(null===r)return!1;try{return JSON.parse(r),!0}catch{return!1}}return"xml"===n||"svg"===n?a.startsWith("<")&&a.includes(">"):"html"===n?/^<!doctype html|<html|<\w+/i.test(a):"yaml"===n||"yml"===n?(e=>e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")).some(e=>"---"===e||"..."===e||e.startsWith("- ")||e.startsWith("{")||e.startsWith("[")||/^[^:#]+:\s*.+?$/.test(e)||/^[^:#]+:\s*$/.test(e)))(a):!t.includes(0)},HK=async e=>{if(0===e.size)return!1;const t=e.name;if(t.includes("\0")||t.includes("%00"))return console.warn("Security Alert: File name contains malicious null-byte characters."),!1;const n=t.toLowerCase().split(".");if(n.length>2){if(n.slice(1,-1).some(e=>vK.includes(e)))return console.warn("Security Alert: Double-extension masking detected."),!1}const r=(e=>e&&CK[e]||e)(n.pop());if(!r)return!0;const i=await wK(e,4096);if(!i)return!1;const a=bK(i);if(AK.includes(r))return EK(a,pK.jpg??[])||EK(a,pK.png??[])?(console.warn("Security Alert: Disguised Archive Polyglot detected."),!1):EK(a,pK.zip??[]);if("m4a"===r||"mp4"===r||"mov"===r){return new TextDecoder("ascii",{fatal:!1}).decode(i.slice(4,12)).startsWith("ftyp")}if("tar"===r){return"ustar"===new TextDecoder("ascii",{fatal:!1}).decode(i.slice(257,262))}if("wav"===r){const e=new TextDecoder("ascii",{fatal:!1}).decode(i.slice(8,12));return EK(a,pK.wav??[])&&"WAVE"===e}if("y4m"===r){return"YUV4MPEG2"===new TextDecoder("ascii",{fatal:!1}).decode(i.slice(0,9))}const o=pK[r];if(o){if(!EK(a,o))return!1;if(["jpg","jpeg","png","gif","bmp"].includes(r)){const t=await wK(e);if(!t)return!1;if((e=>{const t=new TextDecoder("latin1").decode(e);return yK.some(e=>e.test(t))})(t))return console.warn("Security Alert: Malicious embedded script tags found inside file binary."),!1}return!0}return!gK.includes(r)||LK(e,i,r)};export{lr as AADHAAR_REGEX,Bn as ALPHABET_ONLY_REGEX,ci as ALPHABET_WITH_SPACES_ONLY_REGEX,Ir as ALPHANUMERIC_PARENTHESIS_REGEX,_n as ALPHANUMERIC_REGEX,li as ALPHANUMERIC_WITH_DOT_REGEX,qn as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,oi as ALPHA_NUM_EXTENDED_REGEX,ei as ALPHA_NUM_REGEX,wn as Accordion,OL as AddContentButton,tc as AddResourceButton,HL as AiToggle,Dp as AllProjectsDropdown,xL as AnimatedSetting,qp as AppHeader,fw as AttachMedia,rA as AttachmentButton,nH as AudioPlayer,Qs as AutoTruncateText,aA as Avatar,gr as BASE64_REGEX,tr as BIG_END_WHITESPACE,vr as BINARY_NUMBER_REGEX,Ur as BODY_TAG_TYPE_VALIDATION,kx as BarChart,EQ as Box,vu as BrowserTabs,W as Button,Dr as CAMEL_CASE_REGEX,_r as CERTIFICATES_NAME_REGEX,Qr as CHECK_CAMEL_CASE,Gn as CREDIT_CARD_REGEX,br as CURRENCY_GENERIC_REGEX,QQ as CardPanel,EL as ChatModal,ML as ChatModalAi,En as Checkbox,xi as Chip,SL as ChipWithCount,mL as ChooseFile,Li as Col,ok as Comments,fk as ConditionalDropdown,ek as ConnectingBranch,Ei as Container,lA as ContentCard,fL as CreateVariableSlider,Un as DATE_REGEX,Cr as DECIMAL_NUMBER_REGEX,fr as DRIVING_LICENSE_REGEX,Pr as DYNAMIC_VALUE_PATTERN_REGEX,Br as DYNAMIC_VALUE_TYPE_REGEX,jr as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,Rr as DYNAMIC_VALUE__PLACEHOLDER_REGEX,Yp as DashboardDonutChart,kp as DatePicker,OQ as DebugToolsPanel,ac as DonutChart,sL as DownloadClient,Ip as DragAndDrop,vn as Drawer,pc as Dropzone,Or as ELEMENTS_TRAILING_SPACE_REGEX,zr as ELEMENTS_WHITE_SPACE_REGEX,Ci as EMAIL_FORMAT_REGEX,On as EMAIL_REGEX,ii as EMAIL_VALIDATION_REGEX,si as EXCEL_SPACING_REGEX,mi as EXECUTION_ID_VALIDATION,uu as EditLabel,mA as EditTextField,XV as Editor,ZL as ErrorBoundary,sw as Excel,Zi as ExpandableMenu,di as FILENAME_VALIDATION_REGEX,Xn as FILE_EXTENSION_REGEX,Zr as FILE_NAME_REGEX,cL as FieldSet,Ac as FileDropzone,mc as FilePreview,nu as Form,dk as FormatString,ar as GSTIN_REGEX,yr as HEXADECIMAL_NUMBER_REGEX,Fn as HEX_COLOR_REGEX,Ar as HSL_COLOR_REGEX,pr as HTML_ATTRIBUTE_REGEX,qr as HTML_FILE_TYPE_VALIDATION,Jn as HTML_TAG_REGEX,yn as HighlightText,LL as HistoryCard,cr as INDIAN_CURRENCY_REGEX,ur as INDIAN_PASSPORT_REGEX,rr as INDIAN_PHONE_REGEX,ir as INDIAN_PIN_CODE_REGEX,dr as INTERNATIONAL_PHONE_REGEX,pi as INVALID_EMAIL_REGEX,Tn as IPV4_REGEX,Dn as IPV6_REGEX,q as Icon,Zp as IconButton,uw as IconRadialChart,Gm as IconRadioGroup,Vi as Input,ru as InputWithDropdown,Xr as JAVASCRIPT_FILE_TYPE_VALIDATION,tG as Janus,Er as LINKEDIN_PROFILE_REGEX,ai as LINK_VALIDATION_REGEX,CA as LabelEditTextField,JL as LayoutWithDrawer,Ha as LazyLoad,lL as LineChart,oA as LineLoader,kL as Link,GL as Loader,Qn as MAC_ADDRESS_REGEX,Vr as MEMORY_VALIDATION_REGEX,Km as MachineInputField,vL as MediaPreview,DL as MediaViewerModel,Da as MenuOption,bL as MessageBox,iu as MiniModal,yL as MobileSkin,Op as Modal,cw as ModuleChip,Ox as MultiRadialChart,wi as MultiSelect,Qm as NLPInput,Sr as NLP_DESCRIPTION_REGEX,fi as NO_LEADING_TRAILING_SPACE_REGEX,jn as NUMBERS_ONLY_REGEX,Lr as NUMBER_REGEX,$L as NetworkErrorBoundary,KL as NoDataAvailable,bQ as NoDataContent,YL as NoResultFound,IL as OsTree,TL as OtpVerification,au as OverviewModal,or as PAN_CARD_REGEX,Nr as PARAMETER_ALPHANUMERIC_REGEX,Pn as PASSWORD_COMPLEX_REGEX,Rn as PASSWORD_SIMPLE_REGEX,Nn as PHONE_REGEX,In as POSTAL_CODE_REGEX,Up as Paper,SN as PhoneInputField,Rp as PieChart,sk as PopUpModal,GN as PrePostTable,hA as ProcessedSourceSelector,pL as ProgressBar,wL as Prompt,VL as PromptContainer,mr as RGB_COLOR_REGEX,wr as ROMAN_NUMERALS_REGEX,Si as RadialChart,fc as RadioButton,hc as RadioGroup,_m as Recaptcha,Mi as Row,xr as SCRIPT_REGEX,hi as SERVER_HOST_REGEX,Kn as SSN_REGEX,$r as START_END_WHITESPACE_REGEX,kr as STEP_GROUP_NAME_REGEX,XQ as ScoreGaugeChart,cK as ScriptGenerationLoader,AL as ScriptSwitchButton,yu as Search,Za as Select,IQ as SelectionSwitcher,nA as SequentialConnectingBranch,FL as SessionDropdown,zQ as SessionManager,Sx as StackedBarChart,Sp as StateDropdown,NQ as StatusBadge,Na as StatusButton,hw as StatusCard,NL as StatusIndicator,mI as StepLandingTable,CI as StepResultStats,hK as StorageUsageBar,gL as SwitchButton,Wn as TIME_REGEX,Mr as TWITTER_HANDLE_REGEX,$s as Table,Au as TableTree,QL as TableTreeFn,CL as TableWithAccordion,gu as Tabs,zL as TabsWithSilder,za as TextArea,wQ as TextEditor,G as ThemeProvider,bi as Toaster,cc as Toastify,Hi as Toggle,iA as ToggleSwitch,Y as Tooltip,RQ as TooltipService,zi as TruncatedTooltip,U as Typography,Hr as UNIT_REGEX,zn as URL_REGEX,nr as USERNAME_REGEX,hr as USERNAME_SPECIAL_REGEX,er as US_ZIP_CODE_REGEX,Yn as UUID_REGEX,ui as VALID_NAME_PATTERN,sr as VEHICLE_REGISTRATION_REGEX,oL as VariableDropdown,Tp as VariableInput,uL as VariableSuggestionInputDropDown,$n as WHITESPACE_REGEX,fA as WeightageTable,Wr as XML_FILE_TYPE_VALIDATION,TQ as ZoomControl,sK as adapter,BN as addPrePostStepGroup,jN as addStepGroup,LQ as autoScrollToTableLastRow,pA as capitalize,K as checkEmpty,ZQ as checkMicrophoneAccess,gn as cleanAllTooltips,_p as clearStore,aH as compareArrays,iH as compareObjects,GQ as computeTreeCountsAndFormatNodes,zN as convertFormDataToObject,xx as convertToBytes,Vx as convertToGB,_N as convertToISO,uK as copyToClipboard,Js as debounce,jp as deleteStoreValue,Ai as ffid,rH as findAndInsert,PN as formatDate,ON as formatResponseDate,Hx as getEncryptedData,oc as getExtension,lc as getExtensionWithPeriod,eG as getFiltersFromUrl,SQ as getNavigateToKey,QV as getSequentialPayload,Bp as getStoreValue,VQ as getTopVisibleNodeKey,NN as getTreeDetails,qN as handleTimeZoneChange,HQ as handleTreeExpandAllCollapseAll,RN as handleTreeNodeExpandCollapse,DN as handleTreeNodeSect,FN as handleUnCheckAllTreeNodesWithUpdates,hk as hasDuplicateFile,Jm as isEmptyObject,xn as isTextTruncated,kQ as nlpInputDelay,JQ as passesFilters,ZN as rearrangeDragItem,$Q as restoreSelectedFilters,tk as saveFileFromBlob,QN as scrollToView,Pp as setStoreValue,aw as throttle,MQ as toCamelCase,dc as toast,xQ as toggleShowHideEntity,Hn as truncateText,KQ as updateSearchTree,IN as updateTreeState,TN as useBeforeUnload,J as useClickOutside,dK as useDeviceType,uc as useFileDropzone,Zn as useKeyboardActions,gc as useTheme,lk as useTriggerControl,HK as validateFileContent};