@deepdesk/deepdesk-sdk 11.5.5-beta.2 → 11.6.0

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.
@@ -1,32 +1,32 @@
1
- "use strict";var Deepdesk=(()=>{var Ik=Object.create;var Dl=Object.defineProperty;var Ok=Object.getOwnPropertyDescriptor;var Nk=Object.getOwnPropertyNames;var Mk=Object.getPrototypeOf,_k=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),je=(e,t)=>{for(var n in t)Dl(e,n,{get:t[n],enumerable:!0})},Yy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Nk(t))!_k.call(e,o)&&o!==n&&Dl(e,o,{get:()=>t[o],enumerable:!(r=Ok(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?Ik(Mk(e)):{},Yy(t||!e||!e.__esModule?Dl(n,"default",{value:e,enumerable:!0}):n,e)),Dk=e=>Yy(Dl({},"__esModule",{value:!0}),e);var te=Ce((JM,Fl)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Fl<"u"&&Fl.exports?(n.default=n,Fl.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Hl=Ce((e2,Zy)=>{"use strict";var Qy=Object.getOwnPropertySymbols,Fk=Object.prototype.hasOwnProperty,Hk=Object.prototype.propertyIsEnumerable;function Uk(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function zk(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Zy.exports=zk()?Object.assign:function(e,t){for(var n,r=Uk(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)Fk.call(n,s)&&(r[s]=n[s]);if(Qy){o=Qy(n);for(var a=0;a<o.length;a++)Hk.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var mv=Ce(Z=>{"use strict";var Nf=Hl(),ti=60103,tv=60106;Z.Fragment=60107;Z.StrictMode=60108;Z.Profiler=60114;var nv=60109,rv=60110,ov=60112;Z.Suspense=60113;var iv=60115,sv=60116;typeof Symbol=="function"&&Symbol.for&&(Lt=Symbol.for,ti=Lt("react.element"),tv=Lt("react.portal"),Z.Fragment=Lt("react.fragment"),Z.StrictMode=Lt("react.strict_mode"),Z.Profiler=Lt("react.profiler"),nv=Lt("react.provider"),rv=Lt("react.context"),ov=Lt("react.forward_ref"),Z.Suspense=Lt("react.suspense"),iv=Lt("react.memo"),sv=Lt("react.lazy"));var Lt,Jy=typeof Symbol=="function"&&Symbol.iterator;function Bk(e){return e===null||typeof e!="object"?null:(e=Jy&&e[Jy]||e["@@iterator"],typeof e=="function"?e:null)}function ws(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var av={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lv={};function ni(e,t,n){this.props=e,this.context=t,this.refs=lv,this.updater=n||av}ni.prototype.isReactComponent={};ni.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(ws(85));this.updater.enqueueSetState(this,e,t,"setState")};ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uv(){}uv.prototype=ni.prototype;function Mf(e,t,n){this.props=e,this.context=t,this.refs=lv,this.updater=n||av}var _f=Mf.prototype=new uv;_f.constructor=Mf;Nf(_f,ni.prototype);_f.isPureReactComponent=!0;var Df={current:null},cv=Object.prototype.hasOwnProperty,dv={key:!0,ref:!0,__self:!0,__source:!0};function fv(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)cv.call(t,r)&&!dv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:ti,type:e,key:i,ref:s,props:o,_owner:Df.current}}function jk(e,t){return{$$typeof:ti,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ff(e){return typeof e=="object"&&e!==null&&e.$$typeof===ti}function Vk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ev=/\/+/g;function Of(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Vk(""+e.key):t.toString(36)}function zl(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ti:case tv:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Of(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(ev,"$&/")+"/"),zl(o,t,n,"",function(u){return u})):o!=null&&(Ff(o)&&(o=jk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(ev,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Of(i,a);s+=zl(i,t,n,l,o)}else if(l=Bk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Of(i,a++),s+=zl(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(ws(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ul(e,t,n){if(e==null)return e;var r=[],o=0;return zl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Kk(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var pv={current:null};function On(){var e=pv.current;if(e===null)throw Error(ws(321));return e}var Wk={ReactCurrentDispatcher:pv,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Df,IsSomeRendererActing:{current:!1},assign:Nf};Z.Children={map:Ul,forEach:function(e,t,n){Ul(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ul(e,function(){t++}),t},toArray:function(e){return Ul(e,function(t){return t})||[]},only:function(e){if(!Ff(e))throw Error(ws(143));return e}};Z.Component=ni;Z.PureComponent=Mf;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wk;Z.cloneElement=function(e,t,n){if(e==null)throw Error(ws(267,e));var r=Nf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Df.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)cv.call(t,l)&&!dv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ti,type:e.type,key:o,ref:i,props:r,_owner:s}};Z.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:rv,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:nv,_context:e},e.Consumer=e};Z.createElement=fv;Z.createFactory=function(e){var t=fv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:ov,render:e}};Z.isValidElement=Ff;Z.lazy=function(e){return{$$typeof:sv,_payload:{_status:-1,_result:e},_init:Kk}};Z.memo=function(e,t){return{$$typeof:iv,type:e,compare:t===void 0?null:t}};Z.useCallback=function(e,t){return On().useCallback(e,t)};Z.useContext=function(e,t){return On().useContext(e,t)};Z.useDebugValue=function(){};Z.useEffect=function(e,t){return On().useEffect(e,t)};Z.useImperativeHandle=function(e,t,n){return On().useImperativeHandle(e,t,n)};Z.useLayoutEffect=function(e,t){return On().useLayoutEffect(e,t)};Z.useMemo=function(e,t){return On().useMemo(e,t)};Z.useReducer=function(e,t,n){return On().useReducer(e,t,n)};Z.useRef=function(e){return On().useRef(e)};Z.useState=function(e){return On().useState(e)};Z.version="17.0.2"});var _=Ce((n2,gv)=>{"use strict";gv.exports=mv()});var xv=Ce(Cs=>{"use strict";Hl();var $k=_(),vv=60103;Cs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Hf=Symbol.for,vv=Hf("react.element"),Cs.Fragment=Hf("react.fragment"));var Hf,qk=$k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Gk=Object.prototype.hasOwnProperty,Xk={key:!0,ref:!0,__self:!0,__source:!0};function Sv(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Gk.call(t,r)&&!Xk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:vv,type:e,key:i,ref:s,props:o,_owner:qk.current}}Cs.jsx=Sv;Cs.jsxs=Sv});var C=Ce((u2,wv)=>{"use strict";wv.exports=xv()});var Wv=Ce(re=>{"use strict";var si,ks,eu,Gf;typeof performance=="object"&&typeof performance.now=="function"?(zv=performance,re.unstable_now=function(){return zv.now()}):(jf=Date,Bv=jf.now(),re.unstable_now=function(){return jf.now()-Bv});var zv,jf,Bv;typeof window>"u"||typeof MessageChannel!="function"?(ii=null,Vf=null,Kf=function(){if(ii!==null)try{var e=re.unstable_now();ii(!0,e),ii=null}catch(t){throw setTimeout(Kf,0),t}},si=function(e){ii!==null?setTimeout(si,0,e):(ii=e,setTimeout(Kf,0))},ks=function(e,t){Vf=setTimeout(e,t)},eu=function(){clearTimeout(Vf)},re.unstable_shouldYield=function(){return!1},Gf=re.unstable_forceFrameRate=function(){}):(jv=window.setTimeout,Vv=window.clearTimeout,typeof console<"u"&&(Kv=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof Kv!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),bs=!1,Ts=null,Ql=-1,Wf=5,$f=0,re.unstable_shouldYield=function(){return re.unstable_now()>=$f},Gf=function(){},re.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"):Wf=0<e?Math.floor(1e3/e):5},qf=new MessageChannel,Zl=qf.port2,qf.port1.onmessage=function(){if(Ts!==null){var e=re.unstable_now();$f=e+Wf;try{Ts(!0,e)?Zl.postMessage(null):(bs=!1,Ts=null)}catch(t){throw Zl.postMessage(null),t}}else bs=!1},si=function(e){Ts=e,bs||(bs=!0,Zl.postMessage(null))},ks=function(e,t){Ql=jv(function(){e(re.unstable_now())},t)},eu=function(){Vv(Ql),Ql=-1});var ii,Vf,Kf,jv,Vv,Kv,bs,Ts,Ql,Wf,$f,qf,Zl;function Xf(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Jl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Xt(e){return e=e[0],e===void 0?null:e}function tu(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>Jl(s,n))l!==void 0&&0>Jl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Jl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Jl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var mn=[],hr=[],pP=1,Ot=null,Ve=3,nu=!1,co=!1,Ps=!1;function Yf(e){for(var t=Xt(hr);t!==null;){if(t.callback===null)tu(hr);else if(t.startTime<=e)tu(hr),t.sortIndex=t.expirationTime,Xf(mn,t);else break;t=Xt(hr)}}function Qf(e){if(Ps=!1,Yf(e),!co)if(Xt(mn)!==null)co=!0,si(Zf);else{var t=Xt(hr);t!==null&&ks(Qf,t.startTime-e)}}function Zf(e,t){co=!1,Ps&&(Ps=!1,eu()),nu=!0;var n=Ve;try{for(Yf(t),Ot=Xt(mn);Ot!==null&&(!(Ot.expirationTime>t)||e&&!re.unstable_shouldYield());){var r=Ot.callback;if(typeof r=="function"){Ot.callback=null,Ve=Ot.priorityLevel;var o=r(Ot.expirationTime<=t);t=re.unstable_now(),typeof o=="function"?Ot.callback=o:Ot===Xt(mn)&&tu(mn),Yf(t)}else tu(mn);Ot=Xt(mn)}if(Ot!==null)var i=!0;else{var s=Xt(hr);s!==null&&ks(Qf,s.startTime-t),i=!1}return i}finally{Ot=null,Ve=n,nu=!1}}var mP=Gf;re.unstable_IdlePriority=5;re.unstable_ImmediatePriority=1;re.unstable_LowPriority=4;re.unstable_NormalPriority=3;re.unstable_Profiling=null;re.unstable_UserBlockingPriority=2;re.unstable_cancelCallback=function(e){e.callback=null};re.unstable_continueExecution=function(){co||nu||(co=!0,si(Zf))};re.unstable_getCurrentPriorityLevel=function(){return Ve};re.unstable_getFirstCallbackNode=function(){return Xt(mn)};re.unstable_next=function(e){switch(Ve){case 1:case 2:case 3:var t=3;break;default:t=Ve}var n=Ve;Ve=t;try{return e()}finally{Ve=n}};re.unstable_pauseExecution=function(){};re.unstable_requestPaint=mP;re.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ve;Ve=e;try{return t()}finally{Ve=n}};re.unstable_scheduleCallback=function(e,t,n){var r=re.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:pP++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Xf(hr,e),Xt(mn)===null&&e===Xt(hr)&&(Ps?eu():Ps=!0,ks(Qf,n-r))):(e.sortIndex=o,Xf(mn,e),co||nu||(co=!0,si(Zf))),e};re.unstable_wrapCallback=function(e){var t=Ve;return function(){var n=Ve;Ve=t;try{return e.apply(this,arguments)}finally{Ve=n}}}});var qv=Ce((b_,$v)=>{"use strict";$v.exports=Wv()});var Nx=Ce(Ht=>{"use strict";var Xu=_(),ye=Hl(),Ne=qv();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Xu)throw Error(R(227));var sS=new Set,ra={};function Eo(e,t){Pi(e,t),Pi(e+"Capture",t)}function Pi(e,t){for(ra[e]=t,e=0;e<t.length;e++)sS.add(t[e])}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gv=Object.prototype.hasOwnProperty,Xv={},Yv={};function hP(e){return Gv.call(Yv,e)?!0:Gv.call(Xv,e)?!1:gP.test(e)?Yv[e]=!0:(Xv[e]=!0,!1)}function yP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function vP(e,t,n,r){if(t===null||typeof t>"u"||yP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ze(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fe[e]=new Ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Fe[t]=new Ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fe[e]=new Ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fe[e]=new Ze(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Fe[e]=new Ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fe[e]=new Ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fe[e]=new Ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fe[e]=new Ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fe[e]=new Ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var am=/[\-:]([a-z])/g;function lm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fe[e]=new Ze(e,1,!1,e.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fe[e]=new Ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function um(e,t,n,r){var o=Fe.hasOwnProperty(t)?Fe[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(vP(t,n,o,r)&&(n=null),r||o===null?hP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Co=Xu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,zs=60103,po=60106,vr=60107,cm=60108,Ws=60114,dm=60109,fm=60110,Yu=60112,$s=60113,ku=60120,Qu=60115,pm=60116,mm=60121,gm=60128,aS=60129,hm=60130,wp=60131;typeof Symbol=="function"&&Symbol.for&&(ke=Symbol.for,zs=ke("react.element"),po=ke("react.portal"),vr=ke("react.fragment"),cm=ke("react.strict_mode"),Ws=ke("react.profiler"),dm=ke("react.provider"),fm=ke("react.context"),Yu=ke("react.forward_ref"),$s=ke("react.suspense"),ku=ke("react.suspense_list"),Qu=ke("react.memo"),pm=ke("react.lazy"),mm=ke("react.block"),ke("react.scope"),gm=ke("react.opaque.id"),aS=ke("react.debug_trace_mode"),hm=ke("react.offscreen"),wp=ke("react.legacy_hidden"));var ke,Qv=typeof Symbol=="function"&&Symbol.iterator;function Rs(e){return e===null||typeof e!="object"?null:(e=Qv&&e[Qv]||e["@@iterator"],typeof e=="function"?e:null)}var Jf;function Bs(e){if(Jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jf=t&&t[1]||""}return`
1
+ "use strict";var Deepdesk=(()=>{var Ok=Object.create;var Dl=Object.defineProperty;var Mk=Object.getOwnPropertyDescriptor;var Nk=Object.getOwnPropertyNames;var _k=Object.getPrototypeOf,Dk=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),je=(e,t)=>{for(var n in t)Dl(e,n,{get:t[n],enumerable:!0})},Yy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Nk(t))!Dk.call(e,o)&&o!==n&&Dl(e,o,{get:()=>t[o],enumerable:!(r=Mk(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?Ok(_k(e)):{},Yy(t||!e||!e.__esModule?Dl(n,"default",{value:e,enumerable:!0}):n,e)),Fk=e=>Yy(Dl({},"__esModule",{value:!0}),e);var te=Ce((t2,Fl)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Fl<"u"&&Fl.exports?(n.default=n,Fl.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Hl=Ce((n2,Zy)=>{"use strict";var Qy=Object.getOwnPropertySymbols,Hk=Object.prototype.hasOwnProperty,Uk=Object.prototype.propertyIsEnumerable;function zk(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Bk(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Zy.exports=Bk()?Object.assign:function(e,t){for(var n,r=zk(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)Hk.call(n,s)&&(r[s]=n[s]);if(Qy){o=Qy(n);for(var a=0;a<o.length;a++)Uk.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var mv=Ce(Z=>{"use strict";var Mf=Hl(),ti=60103,tv=60106;Z.Fragment=60107;Z.StrictMode=60108;Z.Profiler=60114;var nv=60109,rv=60110,ov=60112;Z.Suspense=60113;var iv=60115,sv=60116;typeof Symbol=="function"&&Symbol.for&&(Lt=Symbol.for,ti=Lt("react.element"),tv=Lt("react.portal"),Z.Fragment=Lt("react.fragment"),Z.StrictMode=Lt("react.strict_mode"),Z.Profiler=Lt("react.profiler"),nv=Lt("react.provider"),rv=Lt("react.context"),ov=Lt("react.forward_ref"),Z.Suspense=Lt("react.suspense"),iv=Lt("react.memo"),sv=Lt("react.lazy"));var Lt,Jy=typeof Symbol=="function"&&Symbol.iterator;function jk(e){return e===null||typeof e!="object"?null:(e=Jy&&e[Jy]||e["@@iterator"],typeof e=="function"?e:null)}function Es(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var av={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lv={};function ni(e,t,n){this.props=e,this.context=t,this.refs=lv,this.updater=n||av}ni.prototype.isReactComponent={};ni.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Es(85));this.updater.enqueueSetState(this,e,t,"setState")};ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uv(){}uv.prototype=ni.prototype;function Nf(e,t,n){this.props=e,this.context=t,this.refs=lv,this.updater=n||av}var _f=Nf.prototype=new uv;_f.constructor=Nf;Mf(_f,ni.prototype);_f.isPureReactComponent=!0;var Df={current:null},cv=Object.prototype.hasOwnProperty,dv={key:!0,ref:!0,__self:!0,__source:!0};function fv(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)cv.call(t,r)&&!dv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:ti,type:e,key:i,ref:s,props:o,_owner:Df.current}}function Vk(e,t){return{$$typeof:ti,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ff(e){return typeof e=="object"&&e!==null&&e.$$typeof===ti}function Kk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ev=/\/+/g;function Of(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Kk(""+e.key):t.toString(36)}function zl(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ti:case tv:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Of(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(ev,"$&/")+"/"),zl(o,t,n,"",function(u){return u})):o!=null&&(Ff(o)&&(o=Vk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(ev,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Of(i,a);s+=zl(i,t,n,l,o)}else if(l=jk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Of(i,a++),s+=zl(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Es(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ul(e,t,n){if(e==null)return e;var r=[],o=0;return zl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Wk(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var pv={current:null};function On(){var e=pv.current;if(e===null)throw Error(Es(321));return e}var $k={ReactCurrentDispatcher:pv,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Df,IsSomeRendererActing:{current:!1},assign:Mf};Z.Children={map:Ul,forEach:function(e,t,n){Ul(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ul(e,function(){t++}),t},toArray:function(e){return Ul(e,function(t){return t})||[]},only:function(e){if(!Ff(e))throw Error(Es(143));return e}};Z.Component=ni;Z.PureComponent=Nf;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$k;Z.cloneElement=function(e,t,n){if(e==null)throw Error(Es(267,e));var r=Mf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Df.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)cv.call(t,l)&&!dv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ti,type:e.type,key:o,ref:i,props:r,_owner:s}};Z.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:rv,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:nv,_context:e},e.Consumer=e};Z.createElement=fv;Z.createFactory=function(e){var t=fv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:ov,render:e}};Z.isValidElement=Ff;Z.lazy=function(e){return{$$typeof:sv,_payload:{_status:-1,_result:e},_init:Wk}};Z.memo=function(e,t){return{$$typeof:iv,type:e,compare:t===void 0?null:t}};Z.useCallback=function(e,t){return On().useCallback(e,t)};Z.useContext=function(e,t){return On().useContext(e,t)};Z.useDebugValue=function(){};Z.useEffect=function(e,t){return On().useEffect(e,t)};Z.useImperativeHandle=function(e,t,n){return On().useImperativeHandle(e,t,n)};Z.useLayoutEffect=function(e,t){return On().useLayoutEffect(e,t)};Z.useMemo=function(e,t){return On().useMemo(e,t)};Z.useReducer=function(e,t,n){return On().useReducer(e,t,n)};Z.useRef=function(e){return On().useRef(e)};Z.useState=function(e){return On().useState(e)};Z.version="17.0.2"});var _=Ce((o2,gv)=>{"use strict";gv.exports=mv()});var xv=Ce(bs=>{"use strict";Hl();var qk=_(),vv=60103;bs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Hf=Symbol.for,vv=Hf("react.element"),bs.Fragment=Hf("react.fragment"));var Hf,Gk=qk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xk=Object.prototype.hasOwnProperty,Yk={key:!0,ref:!0,__self:!0,__source:!0};function Sv(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Xk.call(t,r)&&!Yk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:vv,type:e,key:i,ref:s,props:o,_owner:Gk.current}}bs.jsx=Sv;bs.jsxs=Sv});var C=Ce((d2,wv)=>{"use strict";wv.exports=xv()});var Wv=Ce(re=>{"use strict";var si,Ps,eu,Gf;typeof performance=="object"&&typeof performance.now=="function"?(zv=performance,re.unstable_now=function(){return zv.now()}):(jf=Date,Bv=jf.now(),re.unstable_now=function(){return jf.now()-Bv});var zv,jf,Bv;typeof window>"u"||typeof MessageChannel!="function"?(ii=null,Vf=null,Kf=function(){if(ii!==null)try{var e=re.unstable_now();ii(!0,e),ii=null}catch(t){throw setTimeout(Kf,0),t}},si=function(e){ii!==null?setTimeout(si,0,e):(ii=e,setTimeout(Kf,0))},Ps=function(e,t){Vf=setTimeout(e,t)},eu=function(){clearTimeout(Vf)},re.unstable_shouldYield=function(){return!1},Gf=re.unstable_forceFrameRate=function(){}):(jv=window.setTimeout,Vv=window.clearTimeout,typeof console<"u"&&(Kv=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof Kv!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),Ts=!1,ks=null,Ql=-1,Wf=5,$f=0,re.unstable_shouldYield=function(){return re.unstable_now()>=$f},Gf=function(){},re.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"):Wf=0<e?Math.floor(1e3/e):5},qf=new MessageChannel,Zl=qf.port2,qf.port1.onmessage=function(){if(ks!==null){var e=re.unstable_now();$f=e+Wf;try{ks(!0,e)?Zl.postMessage(null):(Ts=!1,ks=null)}catch(t){throw Zl.postMessage(null),t}}else Ts=!1},si=function(e){ks=e,Ts||(Ts=!0,Zl.postMessage(null))},Ps=function(e,t){Ql=jv(function(){e(re.unstable_now())},t)},eu=function(){Vv(Ql),Ql=-1});var ii,Vf,Kf,jv,Vv,Kv,Ts,ks,Ql,Wf,$f,qf,Zl;function Xf(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Jl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Xt(e){return e=e[0],e===void 0?null:e}function tu(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>Jl(s,n))l!==void 0&&0>Jl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Jl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Jl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var mn=[],yr=[],mP=1,Ot=null,Ve=3,nu=!1,fo=!1,Rs=!1;function Yf(e){for(var t=Xt(yr);t!==null;){if(t.callback===null)tu(yr);else if(t.startTime<=e)tu(yr),t.sortIndex=t.expirationTime,Xf(mn,t);else break;t=Xt(yr)}}function Qf(e){if(Rs=!1,Yf(e),!fo)if(Xt(mn)!==null)fo=!0,si(Zf);else{var t=Xt(yr);t!==null&&Ps(Qf,t.startTime-e)}}function Zf(e,t){fo=!1,Rs&&(Rs=!1,eu()),nu=!0;var n=Ve;try{for(Yf(t),Ot=Xt(mn);Ot!==null&&(!(Ot.expirationTime>t)||e&&!re.unstable_shouldYield());){var r=Ot.callback;if(typeof r=="function"){Ot.callback=null,Ve=Ot.priorityLevel;var o=r(Ot.expirationTime<=t);t=re.unstable_now(),typeof o=="function"?Ot.callback=o:Ot===Xt(mn)&&tu(mn),Yf(t)}else tu(mn);Ot=Xt(mn)}if(Ot!==null)var i=!0;else{var s=Xt(yr);s!==null&&Ps(Qf,s.startTime-t),i=!1}return i}finally{Ot=null,Ve=n,nu=!1}}var gP=Gf;re.unstable_IdlePriority=5;re.unstable_ImmediatePriority=1;re.unstable_LowPriority=4;re.unstable_NormalPriority=3;re.unstable_Profiling=null;re.unstable_UserBlockingPriority=2;re.unstable_cancelCallback=function(e){e.callback=null};re.unstable_continueExecution=function(){fo||nu||(fo=!0,si(Zf))};re.unstable_getCurrentPriorityLevel=function(){return Ve};re.unstable_getFirstCallbackNode=function(){return Xt(mn)};re.unstable_next=function(e){switch(Ve){case 1:case 2:case 3:var t=3;break;default:t=Ve}var n=Ve;Ve=t;try{return e()}finally{Ve=n}};re.unstable_pauseExecution=function(){};re.unstable_requestPaint=gP;re.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ve;Ve=e;try{return t()}finally{Ve=n}};re.unstable_scheduleCallback=function(e,t,n){var r=re.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:mP++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Xf(yr,e),Xt(mn)===null&&e===Xt(yr)&&(Rs?eu():Rs=!0,Ps(Qf,n-r))):(e.sortIndex=o,Xf(mn,e),fo||nu||(fo=!0,si(Zf))),e};re.unstable_wrapCallback=function(e){var t=Ve;return function(){var n=Ve;Ve=t;try{return e.apply(this,arguments)}finally{Ve=n}}}});var qv=Ce((k_,$v)=>{"use strict";$v.exports=Wv()});var Mx=Ce(Ht=>{"use strict";var Xu=_(),ye=Hl(),Me=qv();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Xu)throw Error(R(227));var sS=new Set,oa={};function Co(e,t){Pi(e,t),Pi(e+"Capture",t)}function Pi(e,t){for(oa[e]=t,e=0;e<t.length;e++)sS.add(t[e])}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gv=Object.prototype.hasOwnProperty,Xv={},Yv={};function yP(e){return Gv.call(Yv,e)?!0:Gv.call(Xv,e)?!1:hP.test(e)?Yv[e]=!0:(Xv[e]=!0,!1)}function vP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function SP(e,t,n,r){if(t===null||typeof t>"u"||vP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ze(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fe[e]=new Ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Fe[t]=new Ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fe[e]=new Ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fe[e]=new Ze(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Fe[e]=new Ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fe[e]=new Ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fe[e]=new Ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fe[e]=new Ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fe[e]=new Ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var am=/[\-:]([a-z])/g;function lm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(am,lm);Fe[t]=new Ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fe[e]=new Ze(e,1,!1,e.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fe[e]=new Ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function um(e,t,n,r){var o=Fe.hasOwnProperty(t)?Fe[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(SP(t,n,o,r)&&(n=null),r||o===null?yP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var bo=Xu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bs=60103,mo=60106,Sr=60107,cm=60108,$s=60114,dm=60109,fm=60110,Yu=60112,qs=60113,ku=60120,Qu=60115,pm=60116,mm=60121,gm=60128,aS=60129,hm=60130,wp=60131;typeof Symbol=="function"&&Symbol.for&&(ke=Symbol.for,Bs=ke("react.element"),mo=ke("react.portal"),Sr=ke("react.fragment"),cm=ke("react.strict_mode"),$s=ke("react.profiler"),dm=ke("react.provider"),fm=ke("react.context"),Yu=ke("react.forward_ref"),qs=ke("react.suspense"),ku=ke("react.suspense_list"),Qu=ke("react.memo"),pm=ke("react.lazy"),mm=ke("react.block"),ke("react.scope"),gm=ke("react.opaque.id"),aS=ke("react.debug_trace_mode"),hm=ke("react.offscreen"),wp=ke("react.legacy_hidden"));var ke,Qv=typeof Symbol=="function"&&Symbol.iterator;function As(e){return e===null||typeof e!="object"?null:(e=Qv&&e[Qv]||e["@@iterator"],typeof e=="function"?e:null)}var Jf;function js(e){if(Jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jf=t&&t[1]||""}return`
2
2
  `+Jf+e}var ep=!1;function ru(e,t){if(!e||ep)return"";ep=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
3
3
  `),i=r.stack.split(`
4
4
  `),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a])return`
5
- `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{ep=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bs(e):""}function SP(e){switch(e.tag){case 5:return Bs(e.type);case 16:return Bs("Lazy");case 13:return Bs("Suspense");case 19:return Bs("SuspenseList");case 0:case 2:case 15:return e=ru(e.type,!1),e;case 11:return e=ru(e.type.render,!1),e;case 22:return e=ru(e.type._render,!1),e;case 1:return e=ru(e.type,!0),e;default:return""}}function yi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vr:return"Fragment";case po:return"Portal";case Ws:return"Profiler";case cm:return"StrictMode";case $s:return"Suspense";case ku:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fm:return(e.displayName||"Context")+".Consumer";case dm:return(e._context.displayName||"Context")+".Provider";case Yu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Qu:return yi(e.type);case mm:return yi(e._render);case pm:t=e._payload,e=e._init;try{return yi(e(t))}catch{}}return null}function Lr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function lS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xP(e){var t=lS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ou(e){e._valueTracker||(e._valueTracker=xP(e))}function uS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ep(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Lr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cS(e,t){t=t.checked,t!=null&&um(e,"checked",t,!1)}function Cp(e,t){cS(e,t);var n=Lr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bp(e,t.type,n):t.hasOwnProperty("defaultValue")&&bp(e,t.type,Lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bp(e,t,n){(t!=="number"||Pu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function wP(e){var t="";return Xu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Tp(e,t){return e=ye({children:void 0},t),(t=wP(t.children))&&(e.children=t),e}function vi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Lr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function kp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function e0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Lr(n)}}function dS(e,t){var n=Lr(t.value),r=Lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function t0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Pp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function fS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var iu,pS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==Pp.svg||"innerHTML"in e)e.innerHTML=t;else{for(iu=iu||document.createElement("div"),iu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=iu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},EP=["Webkit","ms","Moz","O"];Object.keys(qs).forEach(function(e){EP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qs[t]=qs[e]})});function mS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qs.hasOwnProperty(e)&&qs[e]?(""+t).trim():t+"px"}function gS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var CP=ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ap(e,t){if(t){if(CP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Lp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ym(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Si=null,xi=null;function n0(e){if(e=va(e)){if(typeof Ip!="function")throw Error(R(280));var t=e.stateNode;t&&(t=rc(t),Ip(e.stateNode,e.type,t))}}function hS(e){Si?xi?xi.push(e):xi=[e]:Si=e}function yS(){if(Si){var e=Si,t=xi;if(xi=Si=null,n0(e),t)for(e=0;e<t.length;e++)n0(t[e])}}function vm(e,t){return e(t)}function vS(e,t,n,r,o){return e(t,n,r,o)}function Sm(){}var SS=vm,mo=!1,tp=!1;function xm(){(Si!==null||xi!==null)&&(Sm(),yS())}function bP(e,t,n){if(tp)return e(t,n);tp=!0;try{return SS(e,t,n)}finally{tp=!1,xm()}}function ia(e,t){var n=e.stateNode;if(n===null)return null;var r=rc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(R(231,t,typeof n));return n}var Op=!1;if(Un)try{ai={},Object.defineProperty(ai,"passive",{get:function(){Op=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{Op=!1}var ai;function TP(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Gs=!1,Ru=null,Au=!1,Np=null,kP={onError:function(e){Gs=!0,Ru=e}};function PP(e,t,n,r,o,i,s,a,l){Gs=!1,Ru=null,TP.apply(kP,arguments)}function RP(e,t,n,r,o,i,s,a,l){if(PP.apply(this,arguments),Gs){if(Gs){var u=Ru;Gs=!1,Ru=null}else throw Error(R(198));Au||(Au=!0,Np=u)}}function bo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function r0(e){if(bo(e)!==e)throw Error(R(188))}function AP(e){var t=e.alternate;if(!t){if(t=bo(e),t===null)throw Error(R(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return r0(o),e;if(i===r)return r0(o),t;i=i.sibling}throw Error(R(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function wS(e){if(e=AP(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function o0(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var ES,wm,CS,bS,Mp=!1,gn=[],Er=null,Cr=null,br=null,sa=new Map,aa=new Map,As=[],i0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _p(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function s0(e,t){switch(e){case"focusin":case"focusout":Er=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":br=null;break;case"pointerover":case"pointerout":sa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":aa.delete(t.pointerId)}}function Ls(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=_p(t,n,r,o,i),t!==null&&(t=va(t),t!==null&&wm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function LP(e,t,n,r,o){switch(t){case"focusin":return Er=Ls(Er,e,t,n,r,o),!0;case"dragenter":return Cr=Ls(Cr,e,t,n,r,o),!0;case"mouseover":return br=Ls(br,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return sa.set(i,Ls(sa.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,aa.set(i,Ls(aa.get(i)||null,e,t,n,r,o)),!0}return!1}function IP(e){var t=go(e.target);if(t!==null){var n=bo(t);if(n!==null){if(t=n.tag,t===13){if(t=xS(n),t!==null){e.blockedOn=t,bS(e.lanePriority,function(){Ne.unstable_runWithPriority(e.priority,function(){CS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=va(n),t!==null&&wm(t),e.blockedOn=n,!1;t.shift()}return!0}function a0(e,t,n){hu(e)&&n.delete(t)}function OP(){for(Mp=!1;0<gn.length;){var e=gn[0];if(e.blockedOn!==null){e=va(e.blockedOn),e!==null&&ES(e);break}for(var t=e.targetContainers;0<t.length;){var n=Tm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&gn.shift()}Er!==null&&hu(Er)&&(Er=null),Cr!==null&&hu(Cr)&&(Cr=null),br!==null&&hu(br)&&(br=null),sa.forEach(a0),aa.forEach(a0)}function Is(e,t){e.blockedOn===t&&(e.blockedOn=null,Mp||(Mp=!0,Ne.unstable_scheduleCallback(Ne.unstable_NormalPriority,OP)))}function TS(e){function t(o){return Is(o,e)}if(0<gn.length){Is(gn[0],e);for(var n=1;n<gn.length;n++){var r=gn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Er!==null&&Is(Er,e),Cr!==null&&Is(Cr,e),br!==null&&Is(br,e),sa.forEach(t),aa.forEach(t),n=0;n<As.length;n++)r=As[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<As.length&&(n=As[0],n.blockedOn===null);)IP(n),n.blockedOn===null&&As.shift()}function su(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var di={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},np={},kS={};Un&&(kS=document.createElement("div").style,"AnimationEvent"in window||(delete di.animationend.animation,delete di.animationiteration.animation,delete di.animationstart.animation),"TransitionEvent"in window||delete di.transitionend.transition);function Zu(e){if(np[e])return np[e];if(!di[e])return e;var t=di[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kS)return np[e]=t[n];return e}var PS=Zu("animationend"),RS=Zu("animationiteration"),AS=Zu("animationstart"),LS=Zu("transitionend"),IS=new Map,Em=new Map,NP=["abort","abort",PS,"animationEnd",RS,"animationIteration",AS,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",LS,"transitionEnd","waiting","waiting"];function Cm(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Em.set(r,t),IS.set(r,o),Eo(o,[r])}}var MP=Ne.unstable_now;MP();var de=8;function ui(e){if(1&e)return de=15,1;if(2&e)return de=14,2;if(4&e)return de=13,4;var t=24&e;return t!==0?(de=12,t):e&32?(de=11,32):(t=192&e,t!==0?(de=10,t):e&256?(de=9,256):(t=3584&e,t!==0?(de=8,t):e&4096?(de=7,4096):(t=4186112&e,t!==0?(de=6,t):(t=62914560&e,t!==0?(de=5,t):e&67108864?(de=4,67108864):e&134217728?(de=3,134217728):(t=805306368&e,t!==0?(de=2,t):1073741824&e?(de=1,1073741824):(de=8,e))))))}function _P(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function DP(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(R(358,e))}}function la(e,t){var n=e.pendingLanes;if(n===0)return de=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=de=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ui(l),o=de):(a&=i,a!==0&&(r=ui(a),o=de))}else i=n&~s,i!==0?(r=ui(i),o=de):a!==0&&(r=ui(a),o=de);if(r===0)return 0;if(r=31-Ir(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(ui(t),o<=de)return t;de=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ir(t),o=1<<n,r|=e[n],t&=~o;return r}function OS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Lu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ci(24&~t),e===0?Lu(10,t):e;case 10:return e=ci(192&~t),e===0?Lu(8,t):e;case 8:return e=ci(3584&~t),e===0&&(e=ci(4186112&~t),e===0&&(e=512)),e;case 2:return t=ci(805306368&~t),t===0&&(t=268435456),t}throw Error(R(358,e))}function ci(e){return e&-e}function rp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ju(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Ir(t),e[t]=n}var Ir=Math.clz32?Math.clz32:UP,FP=Math.log,HP=Math.LN2;function UP(e){return e===0?32:31-(FP(e)/HP|0)|0}var zP=Ne.unstable_UserBlockingPriority,BP=Ne.unstable_runWithPriority,yu=!0;function jP(e,t,n,r){mo||Sm();var o=bm,i=mo;mo=!0;try{vS(o,e,t,n,r)}finally{(mo=i)||xm()}}function VP(e,t,n,r){BP(zP,bm.bind(null,e,t,n,r))}function bm(e,t,n,r){if(yu){var o;if((o=(t&4)===0)&&0<gn.length&&-1<i0.indexOf(e))e=_p(null,e,t,n,r),gn.push(e);else{var i=Tm(e,t,n,r);if(i===null)o&&s0(e,r);else{if(o){if(-1<i0.indexOf(e)){e=_p(i,e,t,n,r),gn.push(e);return}if(LP(i,e,t,n,r))return;s0(e,r)}WS(e,t,r,null,n)}}}}function Tm(e,t,n,r){var o=ym(r);if(o=go(o),o!==null){var i=bo(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=xS(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return WS(e,t,r,o,n),null}var Sr=null,km=null,vu=null;function NS(){if(vu)return vu;var e,t=km,n=t.length,r,o="value"in Sr?Sr.value:Sr.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return vu=o.slice(e,1<r?1-r:void 0)}function Su(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function au(){return!0}function l0(){return!1}function yt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?au:l0,this.isPropagationStopped=l0,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=au)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=au)},persist:function(){},isPersistent:au}),t}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pm=yt(Ii),ya=ye({},Ii,{view:0,detail:0}),KP=yt(ya),op,ip,Os,ec=ye({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Os&&(Os&&e.type==="mousemove"?(op=e.screenX-Os.screenX,ip=e.screenY-Os.screenY):ip=op=0,Os=e),op)},movementY:function(e){return"movementY"in e?e.movementY:ip}}),u0=yt(ec),WP=ye({},ec,{dataTransfer:0}),$P=yt(WP),qP=ye({},ya,{relatedTarget:0}),sp=yt(qP),GP=ye({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),XP=yt(GP),YP=ye({},Ii,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QP=yt(YP),ZP=ye({},Ii,{data:0}),c0=yt(ZP),JP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tR[e])?!!t[e]:!1}function Rm(){return nR}var rR=ye({},ya,{key:function(e){if(e.key){var t=JP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rm,charCode:function(e){return e.type==="keypress"?Su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oR=yt(rR),iR=ye({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=yt(iR),sR=ye({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rm}),aR=yt(sR),lR=ye({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=yt(lR),cR=ye({},ec,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),dR=yt(cR),fR=[9,13,27,32],Am=Un&&"CompositionEvent"in window,Xs=null;Un&&"documentMode"in document&&(Xs=document.documentMode);var pR=Un&&"TextEvent"in window&&!Xs,MS=Un&&(!Am||Xs&&8<Xs&&11>=Xs),f0=String.fromCharCode(32),p0=!1;function _S(e,t){switch(e){case"keyup":return fR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function mR(e,t){switch(e){case"compositionend":return DS(t);case"keypress":return t.which!==32?null:(p0=!0,f0);case"textInput":return e=t.data,e===f0&&p0?null:e;default:return null}}function gR(e,t){if(fi)return e==="compositionend"||!Am&&_S(e,t)?(e=NS(),vu=km=Sr=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return MS&&t.locale!=="ko"?null:t.data;default:return null}}var hR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function m0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hR[e.type]:t==="textarea"}function FS(e,t,n,r){hS(r),t=Iu(t,"onChange"),0<t.length&&(n=new Pm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ys=null,ua=null;function yR(e){jS(e,0)}function tc(e){var t=mi(e);if(uS(t))return e}function vR(e,t){if(e==="change")return t}var HS=!1;Un&&(Un?(uu="oninput"in document,uu||(ap=document.createElement("div"),ap.setAttribute("oninput","return;"),uu=typeof ap.oninput=="function"),lu=uu):lu=!1,HS=lu&&(!document.documentMode||9<document.documentMode));var lu,uu,ap;function g0(){Ys&&(Ys.detachEvent("onpropertychange",US),ua=Ys=null)}function US(e){if(e.propertyName==="value"&&tc(ua)){var t=[];if(FS(t,ua,e,ym(e)),e=yR,mo)e(t);else{mo=!0;try{vm(e,t)}finally{mo=!1,xm()}}}}function SR(e,t,n){e==="focusin"?(g0(),Ys=t,ua=n,Ys.attachEvent("onpropertychange",US)):e==="focusout"&&g0()}function xR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tc(ua)}function wR(e,t){if(e==="click")return tc(t)}function ER(e,t){if(e==="input"||e==="change")return tc(t)}function CR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:CR,bR=Object.prototype.hasOwnProperty;function ca(e,t){if(Nt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!bR.call(t,n[r])||!Nt(e[n[r]],t[n[r]]))return!1;return!0}function h0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function y0(e,t){var n=h0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=h0(n)}}function zS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v0(){for(var e=window,t=Pu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pu(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var TR=Un&&"documentMode"in document&&11>=document.documentMode,pi=null,Fp=null,Qs=null,Hp=!1;function S0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hp||pi==null||pi!==Pu(r)||(r=pi,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qs&&ca(Qs,r)||(Qs=r,r=Iu(Fp,"onSelect"),0<r.length&&(t=new Pm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pi)))}Cm("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);Cm("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Cm(NP,2);for(lp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cu=0;cu<lp.length;cu++)Em.set(lp[cu],0);var lp,cu;Pi("onMouseEnter",["mouseout","mouseover"]);Pi("onMouseLeave",["mouseout","mouseover"]);Pi("onPointerEnter",["pointerout","pointerover"]);Pi("onPointerLeave",["pointerout","pointerover"]);Eo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Eo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Eo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Eo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Eo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Eo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var js="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BS=new Set("cancel close invalid load scroll toggle".split(" ").concat(js));function x0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,RP(r,t,void 0,e),e.currentTarget=null}function jS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;x0(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;x0(o,a,u),i=l}}}if(Au)throw e=Np,Au=!1,Np=null,e}function me(e,t){var n=qS(t),r=e+"__bubble";n.has(r)||(KS(t,e,2,!1),n.add(r))}var w0="_reactListening"+Math.random().toString(36).slice(2);function VS(e){e[w0]||(e[w0]=!0,sS.forEach(function(t){BS.has(t)||E0(t,!1,e,null),E0(t,!0,e,null)}))}function E0(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&BS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=qS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),KS(i,e,o,t),s.add(a))}function KS(e,t,n,r){var o=Em.get(t);switch(o===void 0?2:o){case 0:o=jP;break;case 1:o=VP;break;default:o=bm}n=o.bind(null,t,n,e),o=void 0,!Op||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function WS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=go(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}bP(function(){var u=i,c=ym(n),p=[];e:{var d=IS.get(e);if(d!==void 0){var f=Pm,v=e;switch(e){case"keypress":if(Su(n)===0)break e;case"keydown":case"keyup":f=oR;break;case"focusin":v="focus",f=sp;break;case"focusout":v="blur",f=sp;break;case"beforeblur":case"afterblur":f=sp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=u0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=$P;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=aR;break;case PS:case RS:case AS:f=XP;break;case LS:f=uR;break;case"scroll":f=KP;break;case"wheel":f=dR;break;case"copy":case"cut":case"paste":f=QP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=d0}var y=(t&4)!==0,g=!y&&e==="scroll",m=y?d!==null?d+"Capture":null:d;y=[];for(var h=u,x;h!==null;){x=h;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,m!==null&&(w=ia(h,m),w!=null&&y.push(da(h,w,x)))),g)break;h=h.return}0<y.length&&(d=new f(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(go(v)||v[Oi]))break e;if((f||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=u,v=v?go(v):null,v!==null&&(g=bo(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(f=null,v=u),f!==v)){if(y=u0,w="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=d0,w="onPointerLeave",m="onPointerEnter",h="pointer"),g=f==null?d:mi(f),x=v==null?d:mi(v),d=new y(w,h+"leave",f,n,c),d.target=g,d.relatedTarget=x,w=null,go(c)===u&&(y=new y(m,h+"enter",v,n,c),y.target=x,y.relatedTarget=g,w=y),g=w,f&&v)t:{for(y=f,m=v,h=0,x=y;x;x=li(x))h++;for(x=0,w=m;w;w=li(w))x++;for(;0<h-x;)y=li(y),h--;for(;0<x-h;)m=li(m),x--;for(;h--;){if(y===m||m!==null&&y===m.alternate)break t;y=li(y),m=li(m)}y=null}else y=null;f!==null&&C0(p,d,f,y,!1),v!==null&&g!==null&&C0(p,g,v,y,!0)}}e:{if(d=u?mi(u):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var T=vR;else if(m0(d))if(HS)T=ER;else{T=xR;var b=SR}else(f=d.nodeName)&&f.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=wR);if(T&&(T=T(e,u))){FS(p,T,n,c);break e}b&&b(e,d,u),e==="focusout"&&(b=d._wrapperState)&&b.controlled&&d.type==="number"&&bp(d,"number",d.value)}switch(b=u?mi(u):window,e){case"focusin":(m0(b)||b.contentEditable==="true")&&(pi=b,Fp=u,Qs=null);break;case"focusout":Qs=Fp=pi=null;break;case"mousedown":Hp=!0;break;case"contextmenu":case"mouseup":case"dragend":Hp=!1,S0(p,n,c);break;case"selectionchange":if(TR)break;case"keydown":case"keyup":S0(p,n,c)}var k;if(Am)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else fi?_S(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(MS&&n.locale!=="ko"&&(fi||I!=="onCompositionStart"?I==="onCompositionEnd"&&fi&&(k=NS()):(Sr=c,km="value"in Sr?Sr.value:Sr.textContent,fi=!0)),b=Iu(u,I),0<b.length&&(I=new c0(I,e,null,n,c),p.push({event:I,listeners:b}),k?I.data=k:(k=DS(n),k!==null&&(I.data=k)))),(k=pR?mR(e,n):gR(e,n))&&(u=Iu(u,"onBeforeInput"),0<u.length&&(c=new c0("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=k))}jS(p,t)})}function da(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ia(e,n),i!=null&&r.unshift(da(e,i,o)),i=ia(e,t),i!=null&&r.push(da(e,i,o))),e=e.return}return r}function li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function C0(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=ia(n,i),l!=null&&s.unshift(da(n,l,a))):o||(l=ia(n,i),l!=null&&s.push(da(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Ou(){}var up=null,cp=null;function $S(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Up(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var b0=typeof setTimeout=="function"?setTimeout:void 0,kR=typeof clearTimeout=="function"?clearTimeout:void 0;function Lm(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function T0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dp=0;function PR(e){return{$$typeof:gm,toString:e,valueOf:e}}var nc=Math.random().toString(36).slice(2),xr="__reactFiber$"+nc,Nu="__reactProps$"+nc,Oi="__reactContainer$"+nc,k0="__reactEvents$"+nc;function go(e){var t=e[xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Oi]||n[xr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=T0(e);e!==null;){if(n=e[xr])return n;e=T0(e)}return t}e=n,n=e.parentNode}return null}function va(e){return e=e[xr]||e[Oi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function rc(e){return e[Nu]||null}function qS(e){var t=e[k0];return t===void 0&&(t=e[k0]=new Set),t}var zp=[],gi=-1;function _r(e){return{current:e}}function ge(e){0>gi||(e.current=zp[gi],zp[gi]=null,gi--)}function Ee(e,t){gi++,zp[gi]=e.current,e.current=t}var Or={},qe=_r(Or),pt=_r(!1),So=Or;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mt(e){return e=e.childContextTypes,e!=null}function Mu(){ge(pt),ge(qe)}function P0(e,t,n){if(qe.current!==Or)throw Error(R(168));Ee(qe,t),Ee(pt,n)}function GS(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(R(108,yi(t)||"Unknown",o));return ye({},n,r)}function xu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Or,So=qe.current,Ee(qe,e),Ee(pt,pt.current),!0}function R0(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=GS(e,t,So),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(qe),Ee(qe,e)):ge(pt),Ee(pt,n)}var Im=null,vo=null,RR=Ne.unstable_runWithPriority,Om=Ne.unstable_scheduleCallback,Bp=Ne.unstable_cancelCallback,AR=Ne.unstable_shouldYield,A0=Ne.unstable_requestPaint,jp=Ne.unstable_now,LR=Ne.unstable_getCurrentPriorityLevel,oc=Ne.unstable_ImmediatePriority,XS=Ne.unstable_UserBlockingPriority,YS=Ne.unstable_NormalPriority,QS=Ne.unstable_LowPriority,ZS=Ne.unstable_IdlePriority,fp={},IR=A0!==void 0?A0:function(){},Mn=null,wu=null,pp=!1,L0=jp(),We=1e4>L0?jp:function(){return jp()-L0};function Ai(){switch(LR()){case oc:return 99;case XS:return 98;case YS:return 97;case QS:return 96;case ZS:return 95;default:throw Error(R(332))}}function JS(e){switch(e){case 99:return oc;case 98:return XS;case 97:return YS;case 96:return QS;case 95:return ZS;default:throw Error(R(332))}}function xo(e,t){return e=JS(e),RR(e,t)}function fa(e,t,n){return e=JS(e),Om(e,t,n)}function xn(){if(wu!==null){var e=wu;wu=null,Bp(e)}ex()}function ex(){if(!pp&&Mn!==null){pp=!0;var e=0;try{var t=Mn;xo(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Mn=null}catch(n){throw Mn!==null&&(Mn=Mn.slice(e+1)),Om(oc,xn),n}finally{pp=!1}}}var OR=Co.ReactCurrentBatchConfig;function Yt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var _u=_r(null),Du=null,hi=null,Fu=null;function Nm(){Fu=hi=Du=null}function Mm(e){var t=_u.current;ge(_u),e.type._context._currentValue=t}function tx(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function Ei(e,t){Du=e,Fu=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qt=!0),e.firstContext=null)}function Dt(e,t){if(Fu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Fu=e,t=1073741823),t={context:e,observedBits:t,next:null},hi===null){if(Du===null)throw Error(R(308));hi=t,Du.dependencies={lanes:0,firstContext:t,responders:null}}else hi=hi.next=t;return e._currentValue}var yr=!1;function _m(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function nx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kr(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function I0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function pa(e,t,n,r){var o=e.updateQueue;yr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var f=e,v=i;switch(a=t,d=n,v.tag){case 1:if(f=v.payload,typeof f=="function"){p=f.call(d,p,a);break e}p=f;break e;case 3:f.flags=f.flags&-4097|64;case 0:if(f=v.payload,a=typeof f=="function"?f.call(d,p,a):f,a==null)break e;p=ye({},p,a);break e;case 2:yr=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,xa|=s,e.lanes=s,e.memoizedState=p}}function O0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(R(191,o));o.call(r)}}}var rx=new Xu.Component().refs;function Hu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={isMounted:function(e){return(e=e._reactInternals)?bo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ht(),o=Pr(e),i=Tr(r,o);i.payload=t,n!=null&&(i.callback=n),kr(e,i),Rr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ht(),o=Pr(e),i=Tr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),kr(e,i),Rr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ht(),r=Pr(e),o=Tr(n,r);o.tag=2,t!=null&&(o.callback=t),kr(e,o),Rr(e,r,n)}};function N0(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!ca(n,r)||!ca(o,i):!0}function ox(e,t,n){var r=!1,o=Or,i=t.contextType;return typeof i=="object"&&i!==null?i=Dt(i):(o=mt(t)?So:qe.current,r=t.contextTypes,i=(r=r!=null)?Ri(e,o):Or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ic,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function M0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ic.enqueueReplaceState(t,t.state,null)}function Vp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=rx,_m(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Dt(i):(i=mt(t)?So:qe.current,o.context=Ri(e,i)),pa(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Hu(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&ic.enqueueReplaceState(o,o.state,null),pa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var du=Array.isArray;function Ns(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(R(309));var r=n.stateNode}if(!r)throw Error(R(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===rx&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function fu(e,t){if(e.type!=="textarea")throw Error(R(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ix(e){function t(g,m){if(e){var h=g.lastEffect;h!==null?(h.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=Mr(g,m),g.index=0,g.sibling=null,g}function i(g,m,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<m?(g.flags=2,m):h):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,h,x){return m===null||m.tag!==6?(m=vp(h,g.mode,x),m.return=g,m):(m=o(m,h),m.return=g,m)}function l(g,m,h,x){return m!==null&&m.elementType===h.type?(x=o(m,h.props),x.ref=Ns(g,m,h),x.return=g,x):(x=Tu(h.type,h.key,h.props,null,g.mode,x),x.ref=Ns(g,m,h),x.return=g,x)}function u(g,m,h,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=Sp(h,g.mode,x),m.return=g,m):(m=o(m,h.children||[]),m.return=g,m)}function c(g,m,h,x,w){return m===null||m.tag!==7?(m=ki(h,g.mode,x,w),m.return=g,m):(m=o(m,h),m.return=g,m)}function p(g,m,h){if(typeof m=="string"||typeof m=="number")return m=vp(""+m,g.mode,h),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case zs:return h=Tu(m.type,m.key,m.props,null,g.mode,h),h.ref=Ns(g,null,m),h.return=g,h;case po:return m=Sp(m,g.mode,h),m.return=g,m}if(du(m)||Rs(m))return m=ki(m,g.mode,h,null),m.return=g,m;fu(g,m)}return null}function d(g,m,h,x){var w=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return w!==null?null:a(g,m,""+h,x);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case zs:return h.key===w?h.type===vr?c(g,m,h.props.children,x,w):l(g,m,h,x):null;case po:return h.key===w?u(g,m,h,x):null}if(du(h)||Rs(h))return w!==null?null:c(g,m,h,x,null);fu(g,h)}return null}function f(g,m,h,x,w){if(typeof x=="string"||typeof x=="number")return g=g.get(h)||null,a(m,g,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case zs:return g=g.get(x.key===null?h:x.key)||null,x.type===vr?c(m,g,x.props.children,w,x.key):l(m,g,x,w);case po:return g=g.get(x.key===null?h:x.key)||null,u(m,g,x,w)}if(du(x)||Rs(x))return g=g.get(h)||null,c(m,g,x,w,null);fu(m,x)}return null}function v(g,m,h,x){for(var w=null,T=null,b=m,k=m=0,I=null;b!==null&&k<h.length;k++){b.index>k?(I=b,b=null):I=b.sibling;var O=d(g,b,h[k],x);if(O===null){b===null&&(b=I);break}e&&b&&O.alternate===null&&t(g,b),m=i(O,m,k),T===null?w=O:T.sibling=O,T=O,b=I}if(k===h.length)return n(g,b),w;if(b===null){for(;k<h.length;k++)b=p(g,h[k],x),b!==null&&(m=i(b,m,k),T===null?w=b:T.sibling=b,T=b);return w}for(b=r(g,b);k<h.length;k++)I=f(b,g,k,h[k],x),I!==null&&(e&&I.alternate!==null&&b.delete(I.key===null?k:I.key),m=i(I,m,k),T===null?w=I:T.sibling=I,T=I);return e&&b.forEach(function(N){return t(g,N)}),w}function y(g,m,h,x){var w=Rs(h);if(typeof w!="function")throw Error(R(150));if(h=w.call(h),h==null)throw Error(R(151));for(var T=w=null,b=m,k=m=0,I=null,O=h.next();b!==null&&!O.done;k++,O=h.next()){b.index>k?(I=b,b=null):I=b.sibling;var N=d(g,b,O.value,x);if(N===null){b===null&&(b=I);break}e&&b&&N.alternate===null&&t(g,b),m=i(N,m,k),T===null?w=N:T.sibling=N,T=N,b=I}if(O.done)return n(g,b),w;if(b===null){for(;!O.done;k++,O=h.next())O=p(g,O.value,x),O!==null&&(m=i(O,m,k),T===null?w=O:T.sibling=O,T=O);return w}for(b=r(g,b);!O.done;k++,O=h.next())O=f(b,g,k,O.value,x),O!==null&&(e&&O.alternate!==null&&b.delete(O.key===null?k:O.key),m=i(O,m,k),T===null?w=O:T.sibling=O,T=O);return e&&b.forEach(function(K){return t(g,K)}),w}return function(g,m,h,x){var w=typeof h=="object"&&h!==null&&h.type===vr&&h.key===null;w&&(h=h.props.children);var T=typeof h=="object"&&h!==null;if(T)switch(h.$$typeof){case zs:e:{for(T=h.key,w=m;w!==null;){if(w.key===T){switch(w.tag){case 7:if(h.type===vr){n(g,w.sibling),m=o(w,h.props.children),m.return=g,g=m;break e}break;default:if(w.elementType===h.type){n(g,w.sibling),m=o(w,h.props),m.ref=Ns(g,w,h),m.return=g,g=m;break e}}n(g,w);break}else t(g,w);w=w.sibling}h.type===vr?(m=ki(h.props.children,g.mode,x,h.key),m.return=g,g=m):(x=Tu(h.type,h.key,h.props,null,g.mode,x),x.ref=Ns(g,m,h),x.return=g,g=x)}return s(g);case po:e:{for(w=h.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=o(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Sp(h,g.mode,x),m.return=g,g=m}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,h),m.return=g,g=m):(n(g,m),m=vp(h,g.mode,x),m.return=g,g=m),s(g);if(du(h))return v(g,m,h,x);if(Rs(h))return y(g,m,h,x);if(T&&fu(g,h),typeof h>"u"&&!w)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(R(152,yi(g.type)||"Component"))}return n(g,m)}}var Uu=ix(!0),sx=ix(!1),Sa={},vn=_r(Sa),ma=_r(Sa),ga=_r(Sa);function ho(e){if(e===Sa)throw Error(R(174));return e}function Kp(e,t){switch(Ee(ga,t),Ee(ma,e),Ee(vn,Sa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rp(t,e)}ge(vn),Ee(vn,t)}function Li(){ge(vn),ge(ma),ge(ga)}function _0(e){ho(ga.current);var t=ho(vn.current),n=Rp(t,e.type);t!==n&&(Ee(ma,e),Ee(vn,n))}function Dm(e){ma.current===e&&(ge(vn),ge(ma))}var we=_r(0);function zu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dn=null,wr=null,Sn=!1;function ax(e,t){var n=Mt(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function D0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Wp(e){if(Sn){var t=wr;if(t){var n=t;if(!D0(e,t)){if(t=wi(n.nextSibling),!t||!D0(e,t)){e.flags=e.flags&-1025|2,Sn=!1,Dn=e;return}ax(Dn,n)}Dn=e,wr=wi(t.firstChild)}else e.flags=e.flags&-1025|2,Sn=!1,Dn=e}}function F0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dn=e}function pu(e){if(e!==Dn)return!1;if(!Sn)return F0(e),Sn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Up(t,e.memoizedProps))for(t=wr;t;)ax(e,t),t=wi(t.nextSibling);if(F0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){wr=wi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}wr=null}}else wr=Dn?wi(e.stateNode.nextSibling):null;return!0}function mp(){wr=Dn=null,Sn=!1}var Ci=[];function Fm(){for(var e=0;e<Ci.length;e++)Ci[e]._workInProgressVersionPrimary=null;Ci.length=0}var Zs=Co.ReactCurrentDispatcher,_t=Co.ReactCurrentBatchConfig,ha=0,be=null,Ke=null,_e=null,Bu=!1,Js=!1;function dt(){throw Error(R(321))}function Hm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function Um(e,t,n,r,o,i){if(ha=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zs.current=e===null||e.memoizedState===null?MR:_R,e=n(r,o),Js){i=0;do{if(Js=!1,!(25>i))throw Error(R(301));i+=1,_e=Ke=null,t.updateQueue=null,Zs.current=DR,e=n(r,o)}while(Js)}if(Zs.current=Wu,t=Ke!==null&&Ke.next!==null,ha=0,_e=Ke=be=null,Bu=!1,t)throw Error(R(300));return e}function yo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?be.memoizedState=_e=e:_e=_e.next=e,_e}function To(){if(Ke===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=_e===null?be.memoizedState:_e.next;if(t!==null)_e=t,Ke=e;else{if(e===null)throw Error(R(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},_e===null?be.memoizedState=_e=e:_e=_e.next=e}return _e}function hn(e,t){return typeof t=="function"?t(e):t}function Ms(e){var t=To(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=Ke,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((ha&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,be.lanes|=u,xa|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Nt(r,t.memoizedState)||(Qt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function _s(e){var t=To(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Nt(i,t.memoizedState)||(Qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function H0(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(ha&e)===e)&&(t._workInProgressVersionPrimary=r,Ci.push(t))),e)return n(t._source);throw Ci.push(t),Error(R(350))}function lx(e,t,n,r){var o=Qe;if(o===null)throw Error(R(349));var i=t._getVersion,s=i(t._source),a=Zs.current,l=a.useState(function(){return H0(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,f=d.getSnapshot,v=p.source;p=p.subscribe;var y=be;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Nt(s,g)){g=n(t._source),Nt(c,g)||(u(g),g=Pr(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,h=g;0<h;){var x=31-Ir(h),w=1<<x;m[x]|=g,h&=~w}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var h=Pr(y);o.mutableReadLanes|=h&o.pendingLanes}catch(x){m(function(){throw x})}})},[t,r]),Nt(f,n)&&Nt(v,t)&&Nt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:c},e.dispatch=u=jm.bind(null,be,e),l.queue=e,l.baseQueue=null,c=H0(o,t,n),l.memoizedState=l.baseState=c),c}function ux(e,t,n){var r=To();return lx(r,e,t,n)}function Ds(e){var t=yo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},e=e.dispatch=jm.bind(null,be,e),[t.memoizedState,e]}function ju(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function U0(e){var t=yo();return e={current:e},t.memoizedState=e}function Vu(){return To().memoizedState}function $p(e,t,n,r){var o=yo();be.flags|=e,o.memoizedState=ju(1|t,n,void 0,r===void 0?null:r)}function zm(e,t,n,r){var o=To();r=r===void 0?null:r;var i=void 0;if(Ke!==null){var s=Ke.memoizedState;if(i=s.destroy,r!==null&&Hm(r,s.deps)){ju(t,n,i,r);return}}be.flags|=e,o.memoizedState=ju(1|t,n,i,r)}function z0(e,t){return $p(516,4,e,t)}function Ku(e,t){return zm(516,4,e,t)}function cx(e,t){return zm(4,2,e,t)}function dx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fx(e,t,n){return n=n!=null?n.concat([e]):null,zm(4,2,dx.bind(null,t,e),n)}function Bm(){}function px(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function mx(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function NR(e,t){var n=Ai();xo(98>n?98:n,function(){e(!0)}),xo(97<n?97:n,function(){var r=_t.transition;_t.transition=1;try{e(!1),t()}finally{_t.transition=r}})}function jm(e,t,n){var r=ht(),o=Pr(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===be||s!==null&&s===be)Js=Bu=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,Nt(l,a))return}catch{}finally{}Rr(e,o,r)}}var Wu={readContext:Dt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useOpaqueIdentifier:dt,unstable_isNewReconciler:!1},MR={readContext:Dt,useCallback:function(e,t){return yo().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:z0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$p(4,2,dx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $p(4,2,e,t)},useMemo:function(e,t){var n=yo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=jm.bind(null,be,e),[r.memoizedState,e]},useRef:U0,useState:Ds,useDebugValue:Bm,useDeferredValue:function(e){var t=Ds(e),n=t[0],r=t[1];return z0(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=Ds(!1),t=e[0];return e=NR.bind(null,e[1]),U0(e),[e,t]},useMutableSource:function(e,t,n){var r=yo();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},lx(r,e,t,n)},useOpaqueIdentifier:function(){if(Sn){var e=!1,t=PR(function(){throw e||(e=!0,n("r:"+(dp++).toString(36))),Error(R(355))}),n=Ds(t)[1];return!(be.mode&2)&&(be.flags|=516,ju(5,function(){n("r:"+(dp++).toString(36))},void 0,null)),t}return t="r:"+(dp++).toString(36),Ds(t),t},unstable_isNewReconciler:!1},_R={readContext:Dt,useCallback:px,useContext:Dt,useEffect:Ku,useImperativeHandle:fx,useLayoutEffect:cx,useMemo:mx,useReducer:Ms,useRef:Vu,useState:function(){return Ms(hn)},useDebugValue:Bm,useDeferredValue:function(e){var t=Ms(hn),n=t[0],r=t[1];return Ku(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=Ms(hn)[0];return[Vu().current,e]},useMutableSource:ux,useOpaqueIdentifier:function(){return Ms(hn)[0]},unstable_isNewReconciler:!1},DR={readContext:Dt,useCallback:px,useContext:Dt,useEffect:Ku,useImperativeHandle:fx,useLayoutEffect:cx,useMemo:mx,useReducer:_s,useRef:Vu,useState:function(){return _s(hn)},useDebugValue:Bm,useDeferredValue:function(e){var t=_s(hn),n=t[0],r=t[1];return Ku(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=_s(hn)[0];return[Vu().current,e]},useMutableSource:ux,useOpaqueIdentifier:function(){return _s(hn)[0]},unstable_isNewReconciler:!1},FR=Co.ReactCurrentOwner,Qt=!1;function ft(e,t,n,r){t.child=e===null?sx(t,null,n,r):Uu(t,e.child,n,r)}function B0(e,t,n,r,o){n=n.render;var i=t.ref;return Ei(t,o),r=Um(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Fn(e,t,o)):(t.flags|=1,ft(e,t,r,o),t.child)}function j0(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Gm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gx(e,t,s,r,o,i)):(e=Tu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:ca,n(o,r)&&e.ref===t.ref)?Fn(e,t,i):(t.flags|=1,e=Mr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function gx(e,t,n,r,o,i){if(e!==null&&ca(e.memoizedProps,r)&&e.ref===t.ref)if(Qt=!1,(i&o)!==0)e.flags&16384&&(Qt=!0);else return t.lanes=e.lanes,Fn(e,t,i);return qp(e,t,n,r,i)}function gp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},gu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},gu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,gu(t,r);return ft(e,t,o,n),t.child}function hx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function qp(e,t,n,r,o){var i=mt(n)?So:qe.current;return i=Ri(t,i),Ei(t,o),n=Um(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Fn(e,t,o)):(t.flags|=1,ft(e,t,n,o),t.child)}function V0(e,t,n,r,o){if(mt(n)){var i=!0;xu(t)}else i=!1;if(Ei(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),ox(t,n,r),Vp(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Dt(u):(u=mt(n)?So:qe.current,u=Ri(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&M0(t,s,r,u),yr=!1;var d=t.memoizedState;s.state=d,pa(t,r,s,o),l=t.memoizedState,a!==r||d!==l||pt.current||yr?(typeof c=="function"&&(Hu(t,n,c,r),l=t.memoizedState),(a=yr||N0(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,nx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Yt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Dt(l):(l=mt(n)?So:qe.current,l=Ri(t,l));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&M0(t,s,r,l),yr=!1,d=t.memoizedState,s.state=d,pa(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||pt.current||yr?(typeof f=="function"&&(Hu(t,n,f,r),v=t.memoizedState),(u=yr||N0(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Gp(e,t,n,r,i,o)}function Gp(e,t,n,r,o,i){hx(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&R0(t,n,!1),Fn(e,t,i);r=t.stateNode,FR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Uu(t,e.child,null,i),t.child=Uu(t,null,a,i)):ft(e,t,a,i),t.memoizedState=r.state,o&&R0(t,n,!0),t.child}function K0(e){var t=e.stateNode;t.pendingContext?P0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&P0(e,t.context,!1),Kp(e,t.containerInfo)}var mu={dehydrated:null,retryLane:0};function W0(e,t,n){var r=t.pendingProps,o=we.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),Ee(we,o&1),e===null?(r.fallback!==void 0&&Wp(t),e=r.children,o=r.fallback,i?(e=$0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=mu,e):typeof r.unstable_expectedLoadTime=="number"?(e=$0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=mu,t.lanes=33554432,e):(n=Xm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=G0(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=mu,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n):i?(r=G0(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=mu,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n)}function $0(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=Xm(t,o,0,null),n=ki(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function q0(e,t,n,r){var o=e.child;return e=o.sibling,n=Mr(o,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function G0(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Mr(s,a),e!==null?r=Mr(e,r):(r=ki(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function X0(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),tx(e.return,t)}function hp(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function Y0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ft(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&X0(e,n);else if(e.tag===19)X0(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ee(we,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&zu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hp(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&zu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hp(t,!0,n,null,i,t.lastEffect);break;case"together":hp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xa|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Mr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var yx,Xp,vx,Sx;yx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xp=function(){};vx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ho(vn.current);var i=null;switch(n){case"input":o=Ep(e,o),r=Ep(e,r),i=[];break;case"option":o=Tp(e,o),r=Tp(e,r),i=[];break;case"select":o=ye({},o,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":o=kp(e,o),r=kp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ou)}Ap(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ra.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ra.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===gm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Sx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fs(e,t){if(!Sn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function HR(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return mt(t.type)&&Mu(),null;case 3:return Li(),ge(pt),ge(qe),Fm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pu(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Xp(t),null;case 5:Dm(t);var o=ho(ga.current);if(n=t.type,e!==null&&t.stateNode!=null)vx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(R(166));return null}if(e=ho(vn.current),pu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[xr]=t,r[Nu]=i,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(e=0;e<js.length;e++)me(js[e],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Zv(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":e0(r,i),me("invalid",r)}Ap(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):ra.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r));switch(n){case"input":ou(r),Jv(r,i,!0);break;case"textarea":ou(r),t0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ou)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Pp.html&&(e=fS(n)),e===Pp.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[xr]=t,e[Nu]=r,yx(e,t,!1,!1),t.stateNode=e,s=Lp(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;o<js.length;o++)me(js[o],e);o=r;break;case"source":me("error",e),o=r;break;case"img":case"image":case"link":me("error",e),me("load",e),o=r;break;case"details":me("toggle",e),o=r;break;case"input":Zv(e,r),o=Ep(e,r),me("invalid",e);break;case"option":o=Tp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ye({},r,{value:void 0}),me("invalid",e);break;case"textarea":e0(e,r),o=kp(e,r),me("invalid",e);break;default:o=r}Ap(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?gS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&oa(e,l):typeof l=="number"&&oa(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ra.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&um(e,i,l,s))}switch(n){case"input":ou(e),Jv(e,r,!1);break;case"textarea":ou(e),t0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Lr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?vi(e,!!r.multiple,i,!1):r.defaultValue!=null&&vi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ou)}$S(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)Sx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));n=ho(ga.current),ho(vn.current),pu(t)?(r=t.stateNode,n=t.memoizedProps,r[xr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[xr]=t,t.stateNode=r)}return null;case 13:return ge(we),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&pu(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||we.current&1?De===0&&(De=3):((De===0||De===3)&&(De=4),Qe===null||!(xa&134217727)&&!(Mi&134217727)||bi(Qe,$e))),(r||n)&&(t.flags|=4),null);case 4:return Li(),Xp(t),e===null&&VS(t.stateNode.containerInfo),null;case 10:return Mm(t),null;case 17:return mt(t.type)&&Mu(),null;case 19:if(ge(we),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Fs(r,!1);else{if(De!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=zu(e),s!==null){for(t.flags|=64,Fs(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ee(we,we.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>tm&&(t.flags|=64,i=!0,Fs(r,!1),t.lanes=33554432)}else{if(!i)if(e=zu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Sn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>tm&&n!==1073741824&&(t.flags|=64,i=!0,Fs(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=We(),n.sibling=null,t=we.current,Ee(we,i?t&1|2:t&1),n):null;case 23:case 24:return qm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(R(156,t.tag))}function UR(e){switch(e.tag){case 1:mt(e.type)&&Mu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Li(),ge(pt),ge(qe),Fm(),t=e.flags,t&64)throw Error(R(285));return e.flags=t&-4097|64,e;case 5:return Dm(e),null;case 13:return ge(we),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ge(we),null;case 4:return Li(),null;case 10:return Mm(e),null;case 23:case 24:return qm(),null;default:return null}}function Vm(e,t){try{var n="",r=t;do n+=SP(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{ep=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?js(e):""}function xP(e){switch(e.tag){case 5:return js(e.type);case 16:return js("Lazy");case 13:return js("Suspense");case 19:return js("SuspenseList");case 0:case 2:case 15:return e=ru(e.type,!1),e;case 11:return e=ru(e.type.render,!1),e;case 22:return e=ru(e.type._render,!1),e;case 1:return e=ru(e.type,!0),e;default:return""}}function yi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sr:return"Fragment";case mo:return"Portal";case $s:return"Profiler";case cm:return"StrictMode";case qs:return"Suspense";case ku:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fm:return(e.displayName||"Context")+".Consumer";case dm:return(e._context.displayName||"Context")+".Provider";case Yu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Qu:return yi(e.type);case mm:return yi(e._render);case pm:t=e._payload,e=e._init;try{return yi(e(t))}catch{}}return null}function Ir(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function lS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wP(e){var t=lS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ou(e){e._valueTracker||(e._valueTracker=wP(e))}function uS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ep(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ir(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cS(e,t){t=t.checked,t!=null&&um(e,"checked",t,!1)}function Cp(e,t){cS(e,t);var n=Ir(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bp(e,t.type,n):t.hasOwnProperty("defaultValue")&&bp(e,t.type,Ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bp(e,t,n){(t!=="number"||Pu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function EP(e){var t="";return Xu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Tp(e,t){return e=ye({children:void 0},t),(t=EP(t.children))&&(e.children=t),e}function vi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ir(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function kp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function e0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ir(n)}}function dS(e,t){var n=Ir(t.value),r=Ir(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function t0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Pp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function fS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var iu,pS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==Pp.svg||"innerHTML"in e)e.innerHTML=t;else{for(iu=iu||document.createElement("div"),iu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=iu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CP=["Webkit","ms","Moz","O"];Object.keys(Gs).forEach(function(e){CP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gs[t]=Gs[e]})});function mS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gs.hasOwnProperty(e)&&Gs[e]?(""+t).trim():t+"px"}function gS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var bP=ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ap(e,t){if(t){if(bP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Lp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ym(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Si=null,xi=null;function n0(e){if(e=Sa(e)){if(typeof Ip!="function")throw Error(R(280));var t=e.stateNode;t&&(t=rc(t),Ip(e.stateNode,e.type,t))}}function hS(e){Si?xi?xi.push(e):xi=[e]:Si=e}function yS(){if(Si){var e=Si,t=xi;if(xi=Si=null,n0(e),t)for(e=0;e<t.length;e++)n0(t[e])}}function vm(e,t){return e(t)}function vS(e,t,n,r,o){return e(t,n,r,o)}function Sm(){}var SS=vm,go=!1,tp=!1;function xm(){(Si!==null||xi!==null)&&(Sm(),yS())}function TP(e,t,n){if(tp)return e(t,n);tp=!0;try{return SS(e,t,n)}finally{tp=!1,xm()}}function sa(e,t){var n=e.stateNode;if(n===null)return null;var r=rc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(R(231,t,typeof n));return n}var Op=!1;if(Un)try{ai={},Object.defineProperty(ai,"passive",{get:function(){Op=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{Op=!1}var ai;function kP(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Xs=!1,Ru=null,Au=!1,Mp=null,PP={onError:function(e){Xs=!0,Ru=e}};function RP(e,t,n,r,o,i,s,a,l){Xs=!1,Ru=null,kP.apply(PP,arguments)}function AP(e,t,n,r,o,i,s,a,l){if(RP.apply(this,arguments),Xs){if(Xs){var u=Ru;Xs=!1,Ru=null}else throw Error(R(198));Au||(Au=!0,Mp=u)}}function To(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function r0(e){if(To(e)!==e)throw Error(R(188))}function LP(e){var t=e.alternate;if(!t){if(t=To(e),t===null)throw Error(R(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return r0(o),e;if(i===r)return r0(o),t;i=i.sibling}throw Error(R(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function wS(e){if(e=LP(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function o0(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var ES,wm,CS,bS,Np=!1,gn=[],Cr=null,br=null,Tr=null,aa=new Map,la=new Map,Ls=[],i0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _p(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function s0(e,t){switch(e){case"focusin":case"focusout":Cr=null;break;case"dragenter":case"dragleave":br=null;break;case"mouseover":case"mouseout":Tr=null;break;case"pointerover":case"pointerout":aa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":la.delete(t.pointerId)}}function Is(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=_p(t,n,r,o,i),t!==null&&(t=Sa(t),t!==null&&wm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function IP(e,t,n,r,o){switch(t){case"focusin":return Cr=Is(Cr,e,t,n,r,o),!0;case"dragenter":return br=Is(br,e,t,n,r,o),!0;case"mouseover":return Tr=Is(Tr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return aa.set(i,Is(aa.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,la.set(i,Is(la.get(i)||null,e,t,n,r,o)),!0}return!1}function OP(e){var t=ho(e.target);if(t!==null){var n=To(t);if(n!==null){if(t=n.tag,t===13){if(t=xS(n),t!==null){e.blockedOn=t,bS(e.lanePriority,function(){Me.unstable_runWithPriority(e.priority,function(){CS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Sa(n),t!==null&&wm(t),e.blockedOn=n,!1;t.shift()}return!0}function a0(e,t,n){hu(e)&&n.delete(t)}function MP(){for(Np=!1;0<gn.length;){var e=gn[0];if(e.blockedOn!==null){e=Sa(e.blockedOn),e!==null&&ES(e);break}for(var t=e.targetContainers;0<t.length;){var n=Tm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&gn.shift()}Cr!==null&&hu(Cr)&&(Cr=null),br!==null&&hu(br)&&(br=null),Tr!==null&&hu(Tr)&&(Tr=null),aa.forEach(a0),la.forEach(a0)}function Os(e,t){e.blockedOn===t&&(e.blockedOn=null,Np||(Np=!0,Me.unstable_scheduleCallback(Me.unstable_NormalPriority,MP)))}function TS(e){function t(o){return Os(o,e)}if(0<gn.length){Os(gn[0],e);for(var n=1;n<gn.length;n++){var r=gn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Cr!==null&&Os(Cr,e),br!==null&&Os(br,e),Tr!==null&&Os(Tr,e),aa.forEach(t),la.forEach(t),n=0;n<Ls.length;n++)r=Ls[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ls.length&&(n=Ls[0],n.blockedOn===null);)OP(n),n.blockedOn===null&&Ls.shift()}function su(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var di={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},np={},kS={};Un&&(kS=document.createElement("div").style,"AnimationEvent"in window||(delete di.animationend.animation,delete di.animationiteration.animation,delete di.animationstart.animation),"TransitionEvent"in window||delete di.transitionend.transition);function Zu(e){if(np[e])return np[e];if(!di[e])return e;var t=di[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kS)return np[e]=t[n];return e}var PS=Zu("animationend"),RS=Zu("animationiteration"),AS=Zu("animationstart"),LS=Zu("transitionend"),IS=new Map,Em=new Map,NP=["abort","abort",PS,"animationEnd",RS,"animationIteration",AS,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",LS,"transitionEnd","waiting","waiting"];function Cm(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Em.set(r,t),IS.set(r,o),Co(o,[r])}}var _P=Me.unstable_now;_P();var de=8;function ui(e){if(1&e)return de=15,1;if(2&e)return de=14,2;if(4&e)return de=13,4;var t=24&e;return t!==0?(de=12,t):e&32?(de=11,32):(t=192&e,t!==0?(de=10,t):e&256?(de=9,256):(t=3584&e,t!==0?(de=8,t):e&4096?(de=7,4096):(t=4186112&e,t!==0?(de=6,t):(t=62914560&e,t!==0?(de=5,t):e&67108864?(de=4,67108864):e&134217728?(de=3,134217728):(t=805306368&e,t!==0?(de=2,t):1073741824&e?(de=1,1073741824):(de=8,e))))))}function DP(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function FP(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(R(358,e))}}function ua(e,t){var n=e.pendingLanes;if(n===0)return de=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=de=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ui(l),o=de):(a&=i,a!==0&&(r=ui(a),o=de))}else i=n&~s,i!==0?(r=ui(i),o=de):a!==0&&(r=ui(a),o=de);if(r===0)return 0;if(r=31-Or(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(ui(t),o<=de)return t;de=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Or(t),o=1<<n,r|=e[n],t&=~o;return r}function OS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Lu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ci(24&~t),e===0?Lu(10,t):e;case 10:return e=ci(192&~t),e===0?Lu(8,t):e;case 8:return e=ci(3584&~t),e===0&&(e=ci(4186112&~t),e===0&&(e=512)),e;case 2:return t=ci(805306368&~t),t===0&&(t=268435456),t}throw Error(R(358,e))}function ci(e){return e&-e}function rp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ju(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Or(t),e[t]=n}var Or=Math.clz32?Math.clz32:zP,HP=Math.log,UP=Math.LN2;function zP(e){return e===0?32:31-(HP(e)/UP|0)|0}var BP=Me.unstable_UserBlockingPriority,jP=Me.unstable_runWithPriority,yu=!0;function VP(e,t,n,r){go||Sm();var o=bm,i=go;go=!0;try{vS(o,e,t,n,r)}finally{(go=i)||xm()}}function KP(e,t,n,r){jP(BP,bm.bind(null,e,t,n,r))}function bm(e,t,n,r){if(yu){var o;if((o=(t&4)===0)&&0<gn.length&&-1<i0.indexOf(e))e=_p(null,e,t,n,r),gn.push(e);else{var i=Tm(e,t,n,r);if(i===null)o&&s0(e,r);else{if(o){if(-1<i0.indexOf(e)){e=_p(i,e,t,n,r),gn.push(e);return}if(IP(i,e,t,n,r))return;s0(e,r)}WS(e,t,r,null,n)}}}}function Tm(e,t,n,r){var o=ym(r);if(o=ho(o),o!==null){var i=To(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=xS(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return WS(e,t,r,o,n),null}var xr=null,km=null,vu=null;function MS(){if(vu)return vu;var e,t=km,n=t.length,r,o="value"in xr?xr.value:xr.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return vu=o.slice(e,1<r?1-r:void 0)}function Su(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function au(){return!0}function l0(){return!1}function yt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?au:l0,this.isPropagationStopped=l0,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=au)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=au)},persist:function(){},isPersistent:au}),t}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pm=yt(Ii),va=ye({},Ii,{view:0,detail:0}),WP=yt(va),op,ip,Ms,ec=ye({},va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ms&&(Ms&&e.type==="mousemove"?(op=e.screenX-Ms.screenX,ip=e.screenY-Ms.screenY):ip=op=0,Ms=e),op)},movementY:function(e){return"movementY"in e?e.movementY:ip}}),u0=yt(ec),$P=ye({},ec,{dataTransfer:0}),qP=yt($P),GP=ye({},va,{relatedTarget:0}),sp=yt(GP),XP=ye({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),YP=yt(XP),QP=ye({},Ii,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ZP=yt(QP),JP=ye({},Ii,{data:0}),c0=yt(JP),eR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nR[e])?!!t[e]:!1}function Rm(){return rR}var oR=ye({},va,{key:function(e){if(e.key){var t=eR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rm,charCode:function(e){return e.type==="keypress"?Su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iR=yt(oR),sR=ye({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=yt(sR),aR=ye({},va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rm}),lR=yt(aR),uR=ye({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),cR=yt(uR),dR=ye({},ec,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fR=yt(dR),pR=[9,13,27,32],Am=Un&&"CompositionEvent"in window,Ys=null;Un&&"documentMode"in document&&(Ys=document.documentMode);var mR=Un&&"TextEvent"in window&&!Ys,NS=Un&&(!Am||Ys&&8<Ys&&11>=Ys),f0=String.fromCharCode(32),p0=!1;function _S(e,t){switch(e){case"keyup":return pR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function gR(e,t){switch(e){case"compositionend":return DS(t);case"keypress":return t.which!==32?null:(p0=!0,f0);case"textInput":return e=t.data,e===f0&&p0?null:e;default:return null}}function hR(e,t){if(fi)return e==="compositionend"||!Am&&_S(e,t)?(e=MS(),vu=km=xr=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return NS&&t.locale!=="ko"?null:t.data;default:return null}}var yR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function m0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yR[e.type]:t==="textarea"}function FS(e,t,n,r){hS(r),t=Iu(t,"onChange"),0<t.length&&(n=new Pm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qs=null,ca=null;function vR(e){jS(e,0)}function tc(e){var t=mi(e);if(uS(t))return e}function SR(e,t){if(e==="change")return t}var HS=!1;Un&&(Un?(uu="oninput"in document,uu||(ap=document.createElement("div"),ap.setAttribute("oninput","return;"),uu=typeof ap.oninput=="function"),lu=uu):lu=!1,HS=lu&&(!document.documentMode||9<document.documentMode));var lu,uu,ap;function g0(){Qs&&(Qs.detachEvent("onpropertychange",US),ca=Qs=null)}function US(e){if(e.propertyName==="value"&&tc(ca)){var t=[];if(FS(t,ca,e,ym(e)),e=vR,go)e(t);else{go=!0;try{vm(e,t)}finally{go=!1,xm()}}}}function xR(e,t,n){e==="focusin"?(g0(),Qs=t,ca=n,Qs.attachEvent("onpropertychange",US)):e==="focusout"&&g0()}function wR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tc(ca)}function ER(e,t){if(e==="click")return tc(t)}function CR(e,t){if(e==="input"||e==="change")return tc(t)}function bR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:bR,TR=Object.prototype.hasOwnProperty;function da(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!TR.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function h0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function y0(e,t){var n=h0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=h0(n)}}function zS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v0(){for(var e=window,t=Pu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pu(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var kR=Un&&"documentMode"in document&&11>=document.documentMode,pi=null,Fp=null,Zs=null,Hp=!1;function S0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hp||pi==null||pi!==Pu(r)||(r=pi,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zs&&da(Zs,r)||(Zs=r,r=Iu(Fp,"onSelect"),0<r.length&&(t=new Pm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pi)))}Cm("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);Cm("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Cm(NP,2);for(lp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cu=0;cu<lp.length;cu++)Em.set(lp[cu],0);var lp,cu;Pi("onMouseEnter",["mouseout","mouseover"]);Pi("onMouseLeave",["mouseout","mouseover"]);Pi("onPointerEnter",["pointerout","pointerover"]);Pi("onPointerLeave",["pointerout","pointerover"]);Co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Co("onBeforeInput",["compositionend","keypress","textInput","paste"]);Co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vs));function x0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,AP(r,t,void 0,e),e.currentTarget=null}function jS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;x0(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;x0(o,a,u),i=l}}}if(Au)throw e=Mp,Au=!1,Mp=null,e}function me(e,t){var n=qS(t),r=e+"__bubble";n.has(r)||(KS(t,e,2,!1),n.add(r))}var w0="_reactListening"+Math.random().toString(36).slice(2);function VS(e){e[w0]||(e[w0]=!0,sS.forEach(function(t){BS.has(t)||E0(t,!1,e,null),E0(t,!0,e,null)}))}function E0(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&BS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=qS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),KS(i,e,o,t),s.add(a))}function KS(e,t,n,r){var o=Em.get(t);switch(o===void 0?2:o){case 0:o=VP;break;case 1:o=KP;break;default:o=bm}n=o.bind(null,t,n,e),o=void 0,!Op||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function WS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=ho(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}TP(function(){var u=i,c=ym(n),p=[];e:{var d=IS.get(e);if(d!==void 0){var m=Pm,v=e;switch(e){case"keypress":if(Su(n)===0)break e;case"keydown":case"keyup":m=iR;break;case"focusin":v="focus",m=sp;break;case"focusout":v="blur",m=sp;break;case"beforeblur":case"afterblur":m=sp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=u0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=qP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=lR;break;case PS:case RS:case AS:m=YP;break;case LS:m=cR;break;case"scroll":m=WP;break;case"wheel":m=fR;break;case"copy":case"cut":case"paste":m=ZP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=d0}var y=(t&4)!==0,g=!y&&e==="scroll",f=y?d!==null?d+"Capture":null:d;y=[];for(var h=u,S;h!==null;){S=h;var w=S.stateNode;if(S.tag===5&&w!==null&&(S=w,f!==null&&(w=sa(h,f),w!=null&&y.push(fa(h,w,S)))),g)break;h=h.return}0<y.length&&(d=new m(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(ho(v)||v[Oi]))break e;if((m||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=u,v=v?ho(v):null,v!==null&&(g=To(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(y=u0,w="onMouseLeave",f="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=d0,w="onPointerLeave",f="onPointerEnter",h="pointer"),g=m==null?d:mi(m),S=v==null?d:mi(v),d=new y(w,h+"leave",m,n,c),d.target=g,d.relatedTarget=S,w=null,ho(c)===u&&(y=new y(f,h+"enter",v,n,c),y.target=S,y.relatedTarget=g,w=y),g=w,m&&v)t:{for(y=m,f=v,h=0,S=y;S;S=li(S))h++;for(S=0,w=f;w;w=li(w))S++;for(;0<h-S;)y=li(y),h--;for(;0<S-h;)f=li(f),S--;for(;h--;){if(y===f||f!==null&&y===f.alternate)break t;y=li(y),f=li(f)}y=null}else y=null;m!==null&&C0(p,d,m,y,!1),v!==null&&g!==null&&C0(p,g,v,y,!0)}}e:{if(d=u?mi(u):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var T=SR;else if(m0(d))if(HS)T=CR;else{T=wR;var b=xR}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=ER);if(T&&(T=T(e,u))){FS(p,T,n,c);break e}b&&b(e,d,u),e==="focusout"&&(b=d._wrapperState)&&b.controlled&&d.type==="number"&&bp(d,"number",d.value)}switch(b=u?mi(u):window,e){case"focusin":(m0(b)||b.contentEditable==="true")&&(pi=b,Fp=u,Zs=null);break;case"focusout":Zs=Fp=pi=null;break;case"mousedown":Hp=!0;break;case"contextmenu":case"mouseup":case"dragend":Hp=!1,S0(p,n,c);break;case"selectionchange":if(kR)break;case"keydown":case"keyup":S0(p,n,c)}var k;if(Am)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else fi?_S(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(NS&&n.locale!=="ko"&&(fi||I!=="onCompositionStart"?I==="onCompositionEnd"&&fi&&(k=MS()):(xr=c,km="value"in xr?xr.value:xr.textContent,fi=!0)),b=Iu(u,I),0<b.length&&(I=new c0(I,e,null,n,c),p.push({event:I,listeners:b}),k?I.data=k:(k=DS(n),k!==null&&(I.data=k)))),(k=mR?gR(e,n):hR(e,n))&&(u=Iu(u,"onBeforeInput"),0<u.length&&(c=new c0("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=k))}jS(p,t)})}function fa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=sa(e,n),i!=null&&r.unshift(fa(e,i,o)),i=sa(e,t),i!=null&&r.push(fa(e,i,o))),e=e.return}return r}function li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function C0(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=sa(n,i),l!=null&&s.unshift(fa(n,l,a))):o||(l=sa(n,i),l!=null&&s.push(fa(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Ou(){}var up=null,cp=null;function $S(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Up(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var b0=typeof setTimeout=="function"?setTimeout:void 0,PR=typeof clearTimeout=="function"?clearTimeout:void 0;function Lm(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function T0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dp=0;function RR(e){return{$$typeof:gm,toString:e,valueOf:e}}var nc=Math.random().toString(36).slice(2),wr="__reactFiber$"+nc,Mu="__reactProps$"+nc,Oi="__reactContainer$"+nc,k0="__reactEvents$"+nc;function ho(e){var t=e[wr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Oi]||n[wr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=T0(e);e!==null;){if(n=e[wr])return n;e=T0(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[wr]||e[Oi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function rc(e){return e[Mu]||null}function qS(e){var t=e[k0];return t===void 0&&(t=e[k0]=new Set),t}var zp=[],gi=-1;function Dr(e){return{current:e}}function ge(e){0>gi||(e.current=zp[gi],zp[gi]=null,gi--)}function Ee(e,t){gi++,zp[gi]=e.current,e.current=t}var Mr={},qe=Dr(Mr),pt=Dr(!1),xo=Mr;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Mr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mt(e){return e=e.childContextTypes,e!=null}function Nu(){ge(pt),ge(qe)}function P0(e,t,n){if(qe.current!==Mr)throw Error(R(168));Ee(qe,t),Ee(pt,n)}function GS(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(R(108,yi(t)||"Unknown",o));return ye({},n,r)}function xu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mr,xo=qe.current,Ee(qe,e),Ee(pt,pt.current),!0}function R0(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=GS(e,t,xo),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(qe),Ee(qe,e)):ge(pt),Ee(pt,n)}var Im=null,So=null,AR=Me.unstable_runWithPriority,Om=Me.unstable_scheduleCallback,Bp=Me.unstable_cancelCallback,LR=Me.unstable_shouldYield,A0=Me.unstable_requestPaint,jp=Me.unstable_now,IR=Me.unstable_getCurrentPriorityLevel,oc=Me.unstable_ImmediatePriority,XS=Me.unstable_UserBlockingPriority,YS=Me.unstable_NormalPriority,QS=Me.unstable_LowPriority,ZS=Me.unstable_IdlePriority,fp={},OR=A0!==void 0?A0:function(){},Nn=null,wu=null,pp=!1,L0=jp(),We=1e4>L0?jp:function(){return jp()-L0};function Ai(){switch(IR()){case oc:return 99;case XS:return 98;case YS:return 97;case QS:return 96;case ZS:return 95;default:throw Error(R(332))}}function JS(e){switch(e){case 99:return oc;case 98:return XS;case 97:return YS;case 96:return QS;case 95:return ZS;default:throw Error(R(332))}}function wo(e,t){return e=JS(e),AR(e,t)}function pa(e,t,n){return e=JS(e),Om(e,t,n)}function xn(){if(wu!==null){var e=wu;wu=null,Bp(e)}ex()}function ex(){if(!pp&&Nn!==null){pp=!0;var e=0;try{var t=Nn;wo(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Nn=null}catch(n){throw Nn!==null&&(Nn=Nn.slice(e+1)),Om(oc,xn),n}finally{pp=!1}}}var MR=bo.ReactCurrentBatchConfig;function Yt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var _u=Dr(null),Du=null,hi=null,Fu=null;function Mm(){Fu=hi=Du=null}function Nm(e){var t=_u.current;ge(_u),e.type._context._currentValue=t}function tx(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function Ei(e,t){Du=e,Fu=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qt=!0),e.firstContext=null)}function Dt(e,t){if(Fu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Fu=e,t=1073741823),t={context:e,observedBits:t,next:null},hi===null){if(Du===null)throw Error(R(308));hi=t,Du.dependencies={lanes:0,firstContext:t,responders:null}}else hi=hi.next=t;return e._currentValue}var vr=!1;function _m(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function nx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pr(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function I0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ma(e,t,n,r){var o=e.updateQueue;vr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var m=e,v=i;switch(a=t,d=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){p=m.call(d,p,a);break e}p=m;break e;case 3:m.flags=m.flags&-4097|64;case 0:if(m=v.payload,a=typeof m=="function"?m.call(d,p,a):m,a==null)break e;p=ye({},p,a);break e;case 2:vr=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,wa|=s,e.lanes=s,e.memoizedState=p}}function O0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(R(191,o));o.call(r)}}}var rx=new Xu.Component().refs;function Hu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={isMounted:function(e){return(e=e._reactInternals)?To(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ht(),o=Rr(e),i=kr(r,o);i.payload=t,n!=null&&(i.callback=n),Pr(e,i),Ar(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ht(),o=Rr(e),i=kr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Pr(e,i),Ar(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ht(),r=Rr(e),o=kr(n,r);o.tag=2,t!=null&&(o.callback=t),Pr(e,o),Ar(e,r,n)}};function M0(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!da(n,r)||!da(o,i):!0}function ox(e,t,n){var r=!1,o=Mr,i=t.contextType;return typeof i=="object"&&i!==null?i=Dt(i):(o=mt(t)?xo:qe.current,r=t.contextTypes,i=(r=r!=null)?Ri(e,o):Mr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ic,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function N0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ic.enqueueReplaceState(t,t.state,null)}function Vp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=rx,_m(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Dt(i):(i=mt(t)?xo:qe.current,o.context=Ri(e,i)),ma(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Hu(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&ic.enqueueReplaceState(o,o.state,null),ma(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var du=Array.isArray;function Ns(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(R(309));var r=n.stateNode}if(!r)throw Error(R(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===rx&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function fu(e,t){if(e.type!=="textarea")throw Error(R(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ix(e){function t(g,f){if(e){var h=g.lastEffect;h!==null?(h.nextEffect=f,g.lastEffect=f):g.firstEffect=g.lastEffect=f,f.nextEffect=null,f.flags=8}}function n(g,f){if(!e)return null;for(;f!==null;)t(g,f),f=f.sibling;return null}function r(g,f){for(g=new Map;f!==null;)f.key!==null?g.set(f.key,f):g.set(f.index,f),f=f.sibling;return g}function o(g,f){return g=_r(g,f),g.index=0,g.sibling=null,g}function i(g,f,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<f?(g.flags=2,f):h):(g.flags=2,f)):f}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,f,h,S){return f===null||f.tag!==6?(f=vp(h,g.mode,S),f.return=g,f):(f=o(f,h),f.return=g,f)}function l(g,f,h,S){return f!==null&&f.elementType===h.type?(S=o(f,h.props),S.ref=Ns(g,f,h),S.return=g,S):(S=Tu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ns(g,f,h),S.return=g,S)}function u(g,f,h,S){return f===null||f.tag!==4||f.stateNode.containerInfo!==h.containerInfo||f.stateNode.implementation!==h.implementation?(f=Sp(h,g.mode,S),f.return=g,f):(f=o(f,h.children||[]),f.return=g,f)}function c(g,f,h,S,w){return f===null||f.tag!==7?(f=ki(h,g.mode,S,w),f.return=g,f):(f=o(f,h),f.return=g,f)}function p(g,f,h){if(typeof f=="string"||typeof f=="number")return f=vp(""+f,g.mode,h),f.return=g,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Bs:return h=Tu(f.type,f.key,f.props,null,g.mode,h),h.ref=Ns(g,null,f),h.return=g,h;case mo:return f=Sp(f,g.mode,h),f.return=g,f}if(du(f)||As(f))return f=ki(f,g.mode,h,null),f.return=g,f;fu(g,f)}return null}function d(g,f,h,S){var w=f!==null?f.key:null;if(typeof h=="string"||typeof h=="number")return w!==null?null:a(g,f,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Bs:return h.key===w?h.type===Sr?c(g,f,h.props.children,S,w):l(g,f,h,S):null;case mo:return h.key===w?u(g,f,h,S):null}if(du(h)||As(h))return w!==null?null:c(g,f,h,S,null);fu(g,h)}return null}function m(g,f,h,S,w){if(typeof S=="string"||typeof S=="number")return g=g.get(h)||null,a(f,g,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Bs:return g=g.get(S.key===null?h:S.key)||null,S.type===Sr?c(f,g,S.props.children,w,S.key):l(f,g,S,w);case mo:return g=g.get(S.key===null?h:S.key)||null,u(f,g,S,w)}if(du(S)||As(S))return g=g.get(h)||null,c(f,g,S,w,null);fu(f,S)}return null}function v(g,f,h,S){for(var w=null,T=null,b=f,k=f=0,I=null;b!==null&&k<h.length;k++){b.index>k?(I=b,b=null):I=b.sibling;var O=d(g,b,h[k],S);if(O===null){b===null&&(b=I);break}e&&b&&O.alternate===null&&t(g,b),f=i(O,f,k),T===null?w=O:T.sibling=O,T=O,b=I}if(k===h.length)return n(g,b),w;if(b===null){for(;k<h.length;k++)b=p(g,h[k],S),b!==null&&(f=i(b,f,k),T===null?w=b:T.sibling=b,T=b);return w}for(b=r(g,b);k<h.length;k++)I=m(b,g,k,h[k],S),I!==null&&(e&&I.alternate!==null&&b.delete(I.key===null?k:I.key),f=i(I,f,k),T===null?w=I:T.sibling=I,T=I);return e&&b.forEach(function(M){return t(g,M)}),w}function y(g,f,h,S){var w=As(h);if(typeof w!="function")throw Error(R(150));if(h=w.call(h),h==null)throw Error(R(151));for(var T=w=null,b=f,k=f=0,I=null,O=h.next();b!==null&&!O.done;k++,O=h.next()){b.index>k?(I=b,b=null):I=b.sibling;var M=d(g,b,O.value,S);if(M===null){b===null&&(b=I);break}e&&b&&M.alternate===null&&t(g,b),f=i(M,f,k),T===null?w=M:T.sibling=M,T=M,b=I}if(O.done)return n(g,b),w;if(b===null){for(;!O.done;k++,O=h.next())O=p(g,O.value,S),O!==null&&(f=i(O,f,k),T===null?w=O:T.sibling=O,T=O);return w}for(b=r(g,b);!O.done;k++,O=h.next())O=m(b,g,k,O.value,S),O!==null&&(e&&O.alternate!==null&&b.delete(O.key===null?k:O.key),f=i(O,f,k),T===null?w=O:T.sibling=O,T=O);return e&&b.forEach(function(W){return t(g,W)}),w}return function(g,f,h,S){var w=typeof h=="object"&&h!==null&&h.type===Sr&&h.key===null;w&&(h=h.props.children);var T=typeof h=="object"&&h!==null;if(T)switch(h.$$typeof){case Bs:e:{for(T=h.key,w=f;w!==null;){if(w.key===T){switch(w.tag){case 7:if(h.type===Sr){n(g,w.sibling),f=o(w,h.props.children),f.return=g,g=f;break e}break;default:if(w.elementType===h.type){n(g,w.sibling),f=o(w,h.props),f.ref=Ns(g,w,h),f.return=g,g=f;break e}}n(g,w);break}else t(g,w);w=w.sibling}h.type===Sr?(f=ki(h.props.children,g.mode,S,h.key),f.return=g,g=f):(S=Tu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ns(g,f,h),S.return=g,g=S)}return s(g);case mo:e:{for(w=h.key;f!==null;){if(f.key===w)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(g,f.sibling),f=o(f,h.children||[]),f.return=g,g=f;break e}else{n(g,f);break}else t(g,f);f=f.sibling}f=Sp(h,g.mode,S),f.return=g,g=f}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,f!==null&&f.tag===6?(n(g,f.sibling),f=o(f,h),f.return=g,g=f):(n(g,f),f=vp(h,g.mode,S),f.return=g,g=f),s(g);if(du(h))return v(g,f,h,S);if(As(h))return y(g,f,h,S);if(T&&fu(g,h),typeof h>"u"&&!w)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(R(152,yi(g.type)||"Component"))}return n(g,f)}}var Uu=ix(!0),sx=ix(!1),xa={},vn=Dr(xa),ga=Dr(xa),ha=Dr(xa);function yo(e){if(e===xa)throw Error(R(174));return e}function Kp(e,t){switch(Ee(ha,t),Ee(ga,e),Ee(vn,xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rp(t,e)}ge(vn),Ee(vn,t)}function Li(){ge(vn),ge(ga),ge(ha)}function _0(e){yo(ha.current);var t=yo(vn.current),n=Rp(t,e.type);t!==n&&(Ee(ga,e),Ee(vn,n))}function Dm(e){ga.current===e&&(ge(vn),ge(ga))}var we=Dr(0);function zu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dn=null,Er=null,Sn=!1;function ax(e,t){var n=Nt(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function D0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Wp(e){if(Sn){var t=Er;if(t){var n=t;if(!D0(e,t)){if(t=wi(n.nextSibling),!t||!D0(e,t)){e.flags=e.flags&-1025|2,Sn=!1,Dn=e;return}ax(Dn,n)}Dn=e,Er=wi(t.firstChild)}else e.flags=e.flags&-1025|2,Sn=!1,Dn=e}}function F0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dn=e}function pu(e){if(e!==Dn)return!1;if(!Sn)return F0(e),Sn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Up(t,e.memoizedProps))for(t=Er;t;)ax(e,t),t=wi(t.nextSibling);if(F0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Er=wi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Er=null}}else Er=Dn?wi(e.stateNode.nextSibling):null;return!0}function mp(){Er=Dn=null,Sn=!1}var Ci=[];function Fm(){for(var e=0;e<Ci.length;e++)Ci[e]._workInProgressVersionPrimary=null;Ci.length=0}var Js=bo.ReactCurrentDispatcher,_t=bo.ReactCurrentBatchConfig,ya=0,be=null,Ke=null,_e=null,Bu=!1,ea=!1;function dt(){throw Error(R(321))}function Hm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function Um(e,t,n,r,o,i){if(ya=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Js.current=e===null||e.memoizedState===null?_R:DR,e=n(r,o),ea){i=0;do{if(ea=!1,!(25>i))throw Error(R(301));i+=1,_e=Ke=null,t.updateQueue=null,Js.current=FR,e=n(r,o)}while(ea)}if(Js.current=Wu,t=Ke!==null&&Ke.next!==null,ya=0,_e=Ke=be=null,Bu=!1,t)throw Error(R(300));return e}function vo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?be.memoizedState=_e=e:_e=_e.next=e,_e}function ko(){if(Ke===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=_e===null?be.memoizedState:_e.next;if(t!==null)_e=t,Ke=e;else{if(e===null)throw Error(R(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},_e===null?be.memoizedState=_e=e:_e=_e.next=e}return _e}function hn(e,t){return typeof t=="function"?t(e):t}function _s(e){var t=ko(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=Ke,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((ya&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,be.lanes|=u,wa|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Qt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ds(e){var t=ko(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Mt(i,t.memoizedState)||(Qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function H0(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(ya&e)===e)&&(t._workInProgressVersionPrimary=r,Ci.push(t))),e)return n(t._source);throw Ci.push(t),Error(R(350))}function lx(e,t,n,r){var o=Qe;if(o===null)throw Error(R(349));var i=t._getVersion,s=i(t._source),a=Js.current,l=a.useState(function(){return H0(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,m=d.getSnapshot,v=p.source;p=p.subscribe;var y=be;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Mt(s,g)){g=n(t._source),Mt(c,g)||(u(g),g=Rr(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var f=o.entanglements,h=g;0<h;){var S=31-Or(h),w=1<<S;f[S]|=g,h&=~w}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,f=d.setSnapshot;try{f(g(t._source));var h=Rr(y);o.mutableReadLanes|=h&o.pendingLanes}catch(S){f(function(){throw S})}})},[t,r]),Mt(m,n)&&Mt(v,t)&&Mt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:c},e.dispatch=u=jm.bind(null,be,e),l.queue=e,l.baseQueue=null,c=H0(o,t,n),l.memoizedState=l.baseState=c),c}function ux(e,t,n){var r=ko();return lx(r,e,t,n)}function Fs(e){var t=vo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},e=e.dispatch=jm.bind(null,be,e),[t.memoizedState,e]}function ju(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function U0(e){var t=vo();return e={current:e},t.memoizedState=e}function Vu(){return ko().memoizedState}function $p(e,t,n,r){var o=vo();be.flags|=e,o.memoizedState=ju(1|t,n,void 0,r===void 0?null:r)}function zm(e,t,n,r){var o=ko();r=r===void 0?null:r;var i=void 0;if(Ke!==null){var s=Ke.memoizedState;if(i=s.destroy,r!==null&&Hm(r,s.deps)){ju(t,n,i,r);return}}be.flags|=e,o.memoizedState=ju(1|t,n,i,r)}function z0(e,t){return $p(516,4,e,t)}function Ku(e,t){return zm(516,4,e,t)}function cx(e,t){return zm(4,2,e,t)}function dx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fx(e,t,n){return n=n!=null?n.concat([e]):null,zm(4,2,dx.bind(null,t,e),n)}function Bm(){}function px(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function mx(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function NR(e,t){var n=Ai();wo(98>n?98:n,function(){e(!0)}),wo(97<n?97:n,function(){var r=_t.transition;_t.transition=1;try{e(!1),t()}finally{_t.transition=r}})}function jm(e,t,n){var r=ht(),o=Rr(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===be||s!==null&&s===be)ea=Bu=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,Mt(l,a))return}catch{}finally{}Ar(e,o,r)}}var Wu={readContext:Dt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useOpaqueIdentifier:dt,unstable_isNewReconciler:!1},_R={readContext:Dt,useCallback:function(e,t){return vo().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:z0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$p(4,2,dx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $p(4,2,e,t)},useMemo:function(e,t){var n=vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=jm.bind(null,be,e),[r.memoizedState,e]},useRef:U0,useState:Fs,useDebugValue:Bm,useDeferredValue:function(e){var t=Fs(e),n=t[0],r=t[1];return z0(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=Fs(!1),t=e[0];return e=NR.bind(null,e[1]),U0(e),[e,t]},useMutableSource:function(e,t,n){var r=vo();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},lx(r,e,t,n)},useOpaqueIdentifier:function(){if(Sn){var e=!1,t=RR(function(){throw e||(e=!0,n("r:"+(dp++).toString(36))),Error(R(355))}),n=Fs(t)[1];return!(be.mode&2)&&(be.flags|=516,ju(5,function(){n("r:"+(dp++).toString(36))},void 0,null)),t}return t="r:"+(dp++).toString(36),Fs(t),t},unstable_isNewReconciler:!1},DR={readContext:Dt,useCallback:px,useContext:Dt,useEffect:Ku,useImperativeHandle:fx,useLayoutEffect:cx,useMemo:mx,useReducer:_s,useRef:Vu,useState:function(){return _s(hn)},useDebugValue:Bm,useDeferredValue:function(e){var t=_s(hn),n=t[0],r=t[1];return Ku(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=_s(hn)[0];return[Vu().current,e]},useMutableSource:ux,useOpaqueIdentifier:function(){return _s(hn)[0]},unstable_isNewReconciler:!1},FR={readContext:Dt,useCallback:px,useContext:Dt,useEffect:Ku,useImperativeHandle:fx,useLayoutEffect:cx,useMemo:mx,useReducer:Ds,useRef:Vu,useState:function(){return Ds(hn)},useDebugValue:Bm,useDeferredValue:function(e){var t=Ds(hn),n=t[0],r=t[1];return Ku(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=Ds(hn)[0];return[Vu().current,e]},useMutableSource:ux,useOpaqueIdentifier:function(){return Ds(hn)[0]},unstable_isNewReconciler:!1},HR=bo.ReactCurrentOwner,Qt=!1;function ft(e,t,n,r){t.child=e===null?sx(t,null,n,r):Uu(t,e.child,n,r)}function B0(e,t,n,r,o){n=n.render;var i=t.ref;return Ei(t,o),r=Um(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Fn(e,t,o)):(t.flags|=1,ft(e,t,r,o),t.child)}function j0(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Gm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gx(e,t,s,r,o,i)):(e=Tu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:da,n(o,r)&&e.ref===t.ref)?Fn(e,t,i):(t.flags|=1,e=_r(s,r),e.ref=t.ref,e.return=t,t.child=e)}function gx(e,t,n,r,o,i){if(e!==null&&da(e.memoizedProps,r)&&e.ref===t.ref)if(Qt=!1,(i&o)!==0)e.flags&16384&&(Qt=!0);else return t.lanes=e.lanes,Fn(e,t,i);return qp(e,t,n,r,i)}function gp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},gu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},gu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,gu(t,r);return ft(e,t,o,n),t.child}function hx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function qp(e,t,n,r,o){var i=mt(n)?xo:qe.current;return i=Ri(t,i),Ei(t,o),n=Um(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Fn(e,t,o)):(t.flags|=1,ft(e,t,n,o),t.child)}function V0(e,t,n,r,o){if(mt(n)){var i=!0;xu(t)}else i=!1;if(Ei(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),ox(t,n,r),Vp(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Dt(u):(u=mt(n)?xo:qe.current,u=Ri(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&N0(t,s,r,u),vr=!1;var d=t.memoizedState;s.state=d,ma(t,r,s,o),l=t.memoizedState,a!==r||d!==l||pt.current||vr?(typeof c=="function"&&(Hu(t,n,c,r),l=t.memoizedState),(a=vr||M0(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,nx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Yt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Dt(l):(l=mt(n)?xo:qe.current,l=Ri(t,l));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&N0(t,s,r,l),vr=!1,d=t.memoizedState,s.state=d,ma(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||pt.current||vr?(typeof m=="function"&&(Hu(t,n,m,r),v=t.memoizedState),(u=vr||M0(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Gp(e,t,n,r,i,o)}function Gp(e,t,n,r,o,i){hx(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&R0(t,n,!1),Fn(e,t,i);r=t.stateNode,HR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Uu(t,e.child,null,i),t.child=Uu(t,null,a,i)):ft(e,t,a,i),t.memoizedState=r.state,o&&R0(t,n,!0),t.child}function K0(e){var t=e.stateNode;t.pendingContext?P0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&P0(e,t.context,!1),Kp(e,t.containerInfo)}var mu={dehydrated:null,retryLane:0};function W0(e,t,n){var r=t.pendingProps,o=we.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),Ee(we,o&1),e===null?(r.fallback!==void 0&&Wp(t),e=r.children,o=r.fallback,i?(e=$0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=mu,e):typeof r.unstable_expectedLoadTime=="number"?(e=$0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=mu,t.lanes=33554432,e):(n=Xm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=G0(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=mu,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n):i?(r=G0(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=mu,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n)}function $0(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=Xm(t,o,0,null),n=ki(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function q0(e,t,n,r){var o=e.child;return e=o.sibling,n=_r(o,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function G0(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=_r(s,a),e!==null?r=_r(e,r):(r=ki(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function X0(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),tx(e.return,t)}function hp(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function Y0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ft(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&X0(e,n);else if(e.tag===19)X0(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ee(we,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&zu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hp(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&zu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hp(t,!0,n,null,i,t.lastEffect);break;case"together":hp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=_r(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_r(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var yx,Xp,vx,Sx;yx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xp=function(){};vx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,yo(vn.current);var i=null;switch(n){case"input":o=Ep(e,o),r=Ep(e,r),i=[];break;case"option":o=Tp(e,o),r=Tp(e,r),i=[];break;case"select":o=ye({},o,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":o=kp(e,o),r=kp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ou)}Ap(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(oa.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(oa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===gm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Sx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hs(e,t){if(!Sn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function UR(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return mt(t.type)&&Nu(),null;case 3:return Li(),ge(pt),ge(qe),Fm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pu(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Xp(t),null;case 5:Dm(t);var o=yo(ha.current);if(n=t.type,e!==null&&t.stateNode!=null)vx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(R(166));return null}if(e=yo(vn.current),pu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[wr]=t,r[Mu]=i,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(e=0;e<Vs.length;e++)me(Vs[e],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Zv(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":e0(r,i),me("invalid",r)}Ap(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):oa.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r));switch(n){case"input":ou(r),Jv(r,i,!0);break;case"textarea":ou(r),t0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ou)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Pp.html&&(e=fS(n)),e===Pp.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[wr]=t,e[Mu]=r,yx(e,t,!1,!1),t.stateNode=e,s=Lp(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vs.length;o++)me(Vs[o],e);o=r;break;case"source":me("error",e),o=r;break;case"img":case"image":case"link":me("error",e),me("load",e),o=r;break;case"details":me("toggle",e),o=r;break;case"input":Zv(e,r),o=Ep(e,r),me("invalid",e);break;case"option":o=Tp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ye({},r,{value:void 0}),me("invalid",e);break;case"textarea":e0(e,r),o=kp(e,r),me("invalid",e);break;default:o=r}Ap(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?gS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ia(e,l):typeof l=="number"&&ia(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(oa.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&um(e,i,l,s))}switch(n){case"input":ou(e),Jv(e,r,!1);break;case"textarea":ou(e),t0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ir(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?vi(e,!!r.multiple,i,!1):r.defaultValue!=null&&vi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ou)}$S(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)Sx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));n=yo(ha.current),yo(vn.current),pu(t)?(r=t.stateNode,n=t.memoizedProps,r[wr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wr]=t,t.stateNode=r)}return null;case 13:return ge(we),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&pu(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||we.current&1?De===0&&(De=3):((De===0||De===3)&&(De=4),Qe===null||!(wa&134217727)&&!(Ni&134217727)||bi(Qe,$e))),(r||n)&&(t.flags|=4),null);case 4:return Li(),Xp(t),e===null&&VS(t.stateNode.containerInfo),null;case 10:return Nm(t),null;case 17:return mt(t.type)&&Nu(),null;case 19:if(ge(we),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Hs(r,!1);else{if(De!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=zu(e),s!==null){for(t.flags|=64,Hs(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ee(we,we.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>tm&&(t.flags|=64,i=!0,Hs(r,!1),t.lanes=33554432)}else{if(!i)if(e=zu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Sn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>tm&&n!==1073741824&&(t.flags|=64,i=!0,Hs(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=We(),n.sibling=null,t=we.current,Ee(we,i?t&1|2:t&1),n):null;case 23:case 24:return qm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(R(156,t.tag))}function zR(e){switch(e.tag){case 1:mt(e.type)&&Nu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Li(),ge(pt),ge(qe),Fm(),t=e.flags,t&64)throw Error(R(285));return e.flags=t&-4097|64,e;case 5:return Dm(e),null;case 13:return ge(we),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ge(we),null;case 4:return Li(),null;case 10:return Nm(e),null;case 23:case 24:return qm(),null;default:return null}}function Vm(e,t){try{var n="",r=t;do n+=xP(r),r=r.return;while(r);var o=n}catch(i){o=`
6
6
  Error generating stack: `+i.message+`
7
- `+i.stack}return{value:e,source:t,stack:o}}function Yp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zR=typeof WeakMap=="function"?WeakMap:Map;function xx(e,t,n){n=Tr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,nm=r),Yp(e,t)},n}function wx(e,t,n){n=Tr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Yp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this),Yp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var BR=typeof WeakSet=="function"?WeakSet:Set;function Q0(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Ar(e,n)}else t.current=null}function jR(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Yt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Lm(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(R(163))}function VR(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,o&4&&o&1&&(Lx(n,e),QR(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Yt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&O0(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}O0(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&$S(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&TS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(R(163))}function Z0(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=mS("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function J0(e,t){if(vo&&typeof vo.onCommitFiberUnmount=="function")try{vo.onCommitFiberUnmount(Im,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if(r&4)Lx(t,n);else{r=t;try{o()}catch(i){Ar(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Q0(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Ar(t,i)}break;case 5:Q0(t);break;case 4:Ex(e,t)}}function eS(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function tS(e){return e.tag===5||e.tag===3||e.tag===4}function nS(e){e:{for(var t=e.return;t!==null;){if(tS(t))break e;t=t.return}throw Error(R(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(R(161))}n.flags&16&&(oa(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||tS(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Qp(e,n,t):Zp(e,n,t)}function Qp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ou));else if(r!==4&&(e=e.child,e!==null))for(Qp(e,t,n),e=e.sibling;e!==null;)Qp(e,t,n),e=e.sibling}function Zp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zp(e,t,n),e=e.sibling;e!==null;)Zp(e,t,n),e=e.sibling}function Ex(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(R(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:o=o.containerInfo,i=!0;break e;case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,a=n,l=a;;)if(J0(s,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(s=o,a=n.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(J0(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function yp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Nu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&cS(n,r),Lp(e,o),t=Lp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?gS(n,a):s==="dangerouslySetInnerHTML"?pS(n,a):s==="children"?oa(n,a):um(n,s,a,t)}switch(e){case"input":Cp(n,r);break;case"textarea":dS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?vi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?vi(n,!!r.multiple,r.defaultValue,!0):vi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(R(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,TS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&($m=We(),Z0(t.child,!0)),rS(t);return;case 19:rS(t);return;case 17:return;case 23:case 24:Z0(t,t.memoizedState!==null);return}throw Error(R(163))}function rS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new BR),t.forEach(function(r){var o=eA.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function KR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var WR=Math.ceil,$u=Co.ReactCurrentDispatcher,Km=Co.ReactCurrentOwner,j=0,Qe=null,Pe=null,$e=0,wo=0,Jp=_r(0),De=0,sc=null,Ni=0,xa=0,Mi=0,Wm=0,em=null,$m=0,tm=1/0;function _i(){tm=We()+500}var M=null,qu=!1,nm=null,yn=null,Nr=!1,ea=null,Vs=90,rm=[],om=[],Hn=null,ta=0,im=null,Eu=-1,_n=0,Cu=0,na=null,bu=!1;function ht(){return j&48?We():Eu!==-1?Eu:Eu=We()}function Pr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ai()===99?1:2;if(_n===0&&(_n=Ni),OR.transition!==0){Cu!==0&&(Cu=em!==null?em.pendingLanes:0),e=_n;var t=4186112&~Cu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ai(),j&4&&e===98?e=Lu(12,_n):(e=_P(e),e=Lu(e,_n)),e}function Rr(e,t,n){if(50<ta)throw ta=0,im=null,Error(R(185));if(e=ac(e,t),e===null)return null;Ju(e,t,n),e===Qe&&(Mi|=t,De===4&&bi(e,$e));var r=Ai();t===1?j&8&&!(j&48)?sm(e):(Ft(e,n),j===0&&(_i(),xn())):(!(j&4)||r!==98&&r!==99||(Hn===null?Hn=new Set([e]):Hn.add(e)),Ft(e,n)),em=e}function ac(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function Ft(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Ir(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,ui(l);var c=de;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=la(e,e===Qe?$e:0),t=de,r===0)n!==null&&(n!==fp&&Bp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==fp&&Bp(n)}t===15?(n=sm.bind(null,e),Mn===null?(Mn=[n],wu=Om(oc,ex)):Mn.push(n),n=fp):t===14?n=fa(99,sm.bind(null,e)):(n=DP(t),n=fa(n,Cx.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function Cx(e){if(Eu=-1,Cu=_n=0,j&48)throw Error(R(327));var t=e.callbackNode;if(Dr()&&e.callbackNode!==t)return null;var n=la(e,e===Qe?$e:0);if(n===0)return null;var r=n,o=j;j|=16;var i=Px();(Qe!==e||$e!==r)&&(_i(),Ti(e,r));do try{GR();break}catch(a){kx(e,a)}while(1);if(Nm(),$u.current=i,j=o,Pe!==null?r=0:(Qe=null,$e=0,r=De),Ni&Mi)Ti(e,0);else if(r!==0){if(r===2&&(j|=64,e.hydrate&&(e.hydrate=!1,Lm(e.containerInfo)),n=OS(e),n!==0&&(r=Ks(e,n))),r===1)throw t=sc,Ti(e,0),bi(e,n),Ft(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(R(345));case 2:fo(e);break;case 3:if(bi(e,n),(n&62914560)===n&&(r=$m+500-We(),10<r)){if(la(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ht(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=b0(fo.bind(null,e),r);break}fo(e);break;case 4:if(bi(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Ir(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*WR(n/1960))-n,10<n){e.timeoutHandle=b0(fo.bind(null,e),n);break}fo(e);break;case 5:fo(e);break;default:throw Error(R(329))}}return Ft(e,We()),e.callbackNode===t?Cx.bind(null,e):null}function bi(e,t){for(t&=~Wm,t&=~Mi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ir(t),r=1<<n;e[n]=-1,t&=~r}}function sm(e){if(j&48)throw Error(R(327));if(Dr(),e===Qe&&e.expiredLanes&$e){var t=$e,n=Ks(e,t);Ni&Mi&&(t=la(e,t),n=Ks(e,t))}else t=la(e,0),n=Ks(e,t);if(e.tag!==0&&n===2&&(j|=64,e.hydrate&&(e.hydrate=!1,Lm(e.containerInfo)),t=OS(e),t!==0&&(n=Ks(e,t))),n===1)throw n=sc,Ti(e,0),bi(e,t),Ft(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,fo(e),Ft(e,We()),null}function $R(){if(Hn!==null){var e=Hn;Hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ft(t,We())})}xn()}function bx(e,t){var n=j;j|=1;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}}function Tx(e,t){var n=j;j&=-2,j|=8;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}}function gu(e,t){Ee(Jp,wo),wo|=t,Ni|=t}function qm(){wo=Jp.current,ge(Jp)}function Ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kR(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Mu();break;case 3:Li(),ge(pt),ge(qe),Fm();break;case 5:Dm(r);break;case 4:Li();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Mm(r);break;case 23:case 24:qm()}n=n.return}Qe=e,Pe=Mr(e.current,null),$e=wo=Ni=t,De=0,sc=null,Wm=Mi=xa=0}function kx(e,t){do{var n=Pe;try{if(Nm(),Zs.current=Wu,Bu){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Bu=!1}if(ha=0,_e=Ke=be=null,Js=!1,Km.current=null,n===null||n.return===null){De=1,sc=t,Pe=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=$e,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(we.current&1)!==0,d=s;do{var f;if(f=d.tag===13){var v=d.memoizedState;if(v!==null)f=v.dehydrated!==null;else{var y=d.memoizedProps;f=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(f){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var h=Tr(-1,1);h.tag=2,kr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new zR,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var w=JR.bind(null,i,u,a);u.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((yi(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
7
+ `+i.stack}return{value:e,source:t,stack:o}}function Yp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BR=typeof WeakMap=="function"?WeakMap:Map;function xx(e,t,n){n=kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,nm=r),Yp(e,t)},n}function wx(e,t,n){n=kr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Yp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this),Yp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var jR=typeof WeakSet=="function"?WeakSet:Set;function Q0(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Lr(e,n)}else t.current=null}function VR(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Yt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Lm(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(R(163))}function KR(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,o&4&&o&1&&(Lx(n,e),ZR(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Yt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&O0(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}O0(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&$S(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&TS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(R(163))}function Z0(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=mS("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function J0(e,t){if(So&&typeof So.onCommitFiberUnmount=="function")try{So.onCommitFiberUnmount(Im,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if(r&4)Lx(t,n);else{r=t;try{o()}catch(i){Lr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Q0(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Lr(t,i)}break;case 5:Q0(t);break;case 4:Ex(e,t)}}function eS(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function tS(e){return e.tag===5||e.tag===3||e.tag===4}function nS(e){e:{for(var t=e.return;t!==null;){if(tS(t))break e;t=t.return}throw Error(R(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(R(161))}n.flags&16&&(ia(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||tS(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Qp(e,n,t):Zp(e,n,t)}function Qp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ou));else if(r!==4&&(e=e.child,e!==null))for(Qp(e,t,n),e=e.sibling;e!==null;)Qp(e,t,n),e=e.sibling}function Zp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zp(e,t,n),e=e.sibling;e!==null;)Zp(e,t,n),e=e.sibling}function Ex(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(R(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:o=o.containerInfo,i=!0;break e;case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,a=n,l=a;;)if(J0(s,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(s=o,a=n.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(J0(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function yp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Mu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&cS(n,r),Lp(e,o),t=Lp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?gS(n,a):s==="dangerouslySetInnerHTML"?pS(n,a):s==="children"?ia(n,a):um(n,s,a,t)}switch(e){case"input":Cp(n,r);break;case"textarea":dS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?vi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?vi(n,!!r.multiple,r.defaultValue,!0):vi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(R(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,TS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&($m=We(),Z0(t.child,!0)),rS(t);return;case 19:rS(t);return;case 17:return;case 23:case 24:Z0(t,t.memoizedState!==null);return}throw Error(R(163))}function rS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jR),t.forEach(function(r){var o=tA.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function WR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var $R=Math.ceil,$u=bo.ReactCurrentDispatcher,Km=bo.ReactCurrentOwner,j=0,Qe=null,Pe=null,$e=0,Eo=0,Jp=Dr(0),De=0,sc=null,Mi=0,wa=0,Ni=0,Wm=0,em=null,$m=0,tm=1/0;function _i(){tm=We()+500}var N=null,qu=!1,nm=null,yn=null,Nr=!1,ta=null,Ks=90,rm=[],om=[],Hn=null,na=0,im=null,Eu=-1,_n=0,Cu=0,ra=null,bu=!1;function ht(){return j&48?We():Eu!==-1?Eu:Eu=We()}function Rr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ai()===99?1:2;if(_n===0&&(_n=Mi),MR.transition!==0){Cu!==0&&(Cu=em!==null?em.pendingLanes:0),e=_n;var t=4186112&~Cu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ai(),j&4&&e===98?e=Lu(12,_n):(e=DP(e),e=Lu(e,_n)),e}function Ar(e,t,n){if(50<na)throw na=0,im=null,Error(R(185));if(e=ac(e,t),e===null)return null;Ju(e,t,n),e===Qe&&(Ni|=t,De===4&&bi(e,$e));var r=Ai();t===1?j&8&&!(j&48)?sm(e):(Ft(e,n),j===0&&(_i(),xn())):(!(j&4)||r!==98&&r!==99||(Hn===null?Hn=new Set([e]):Hn.add(e)),Ft(e,n)),em=e}function ac(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function Ft(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Or(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,ui(l);var c=de;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=ua(e,e===Qe?$e:0),t=de,r===0)n!==null&&(n!==fp&&Bp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==fp&&Bp(n)}t===15?(n=sm.bind(null,e),Nn===null?(Nn=[n],wu=Om(oc,ex)):Nn.push(n),n=fp):t===14?n=pa(99,sm.bind(null,e)):(n=FP(t),n=pa(n,Cx.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function Cx(e){if(Eu=-1,Cu=_n=0,j&48)throw Error(R(327));var t=e.callbackNode;if(Fr()&&e.callbackNode!==t)return null;var n=ua(e,e===Qe?$e:0);if(n===0)return null;var r=n,o=j;j|=16;var i=Px();(Qe!==e||$e!==r)&&(_i(),Ti(e,r));do try{XR();break}catch(a){kx(e,a)}while(1);if(Mm(),$u.current=i,j=o,Pe!==null?r=0:(Qe=null,$e=0,r=De),Mi&Ni)Ti(e,0);else if(r!==0){if(r===2&&(j|=64,e.hydrate&&(e.hydrate=!1,Lm(e.containerInfo)),n=OS(e),n!==0&&(r=Ws(e,n))),r===1)throw t=sc,Ti(e,0),bi(e,n),Ft(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(R(345));case 2:po(e);break;case 3:if(bi(e,n),(n&62914560)===n&&(r=$m+500-We(),10<r)){if(ua(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ht(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=b0(po.bind(null,e),r);break}po(e);break;case 4:if(bi(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Or(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*$R(n/1960))-n,10<n){e.timeoutHandle=b0(po.bind(null,e),n);break}po(e);break;case 5:po(e);break;default:throw Error(R(329))}}return Ft(e,We()),e.callbackNode===t?Cx.bind(null,e):null}function bi(e,t){for(t&=~Wm,t&=~Ni,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Or(t),r=1<<n;e[n]=-1,t&=~r}}function sm(e){if(j&48)throw Error(R(327));if(Fr(),e===Qe&&e.expiredLanes&$e){var t=$e,n=Ws(e,t);Mi&Ni&&(t=ua(e,t),n=Ws(e,t))}else t=ua(e,0),n=Ws(e,t);if(e.tag!==0&&n===2&&(j|=64,e.hydrate&&(e.hydrate=!1,Lm(e.containerInfo)),t=OS(e),t!==0&&(n=Ws(e,t))),n===1)throw n=sc,Ti(e,0),bi(e,t),Ft(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,po(e),Ft(e,We()),null}function qR(){if(Hn!==null){var e=Hn;Hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ft(t,We())})}xn()}function bx(e,t){var n=j;j|=1;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}}function Tx(e,t){var n=j;j&=-2,j|=8;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}}function gu(e,t){Ee(Jp,Eo),Eo|=t,Mi|=t}function qm(){Eo=Jp.current,ge(Jp)}function Ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,PR(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Nu();break;case 3:Li(),ge(pt),ge(qe),Fm();break;case 5:Dm(r);break;case 4:Li();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Nm(r);break;case 23:case 24:qm()}n=n.return}Qe=e,Pe=_r(e.current,null),$e=Eo=Mi=t,De=0,sc=null,Wm=Ni=wa=0}function kx(e,t){do{var n=Pe;try{if(Mm(),Js.current=Wu,Bu){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Bu=!1}if(ya=0,_e=Ke=be=null,ea=!1,Km.current=null,n===null||n.return===null){De=1,sc=t,Pe=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=$e,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(we.current&1)!==0,d=s;do{var m;if(m=d.tag===13){var v=d.memoizedState;if(v!==null)m=v.dehydrated!==null;else{var y=d.memoizedProps;m=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(m){var g=d.updateQueue;if(g===null){var f=new Set;f.add(u),d.updateQueue=f}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var h=kr(-1,1);h.tag=2,Pr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new BR,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var w=eA.bind(null,i,u,a);u.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((yi(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
8
8
 
9
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}De!==5&&(De=2),l=Vm(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=xx(d,i,t);I0(d,T);break e;case 1:i=l;var b=d.type,k=d.stateNode;if(!(d.flags&64)&&(typeof b.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=wx(d,i,t);I0(d,I);break e}}d=d.return}while(d!==null)}Ax(n)}catch(O){t=O,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(1)}function Px(){var e=$u.current;return $u.current=Wu,e===null?Wu:e}function Ks(e,t){var n=j;j|=16;var r=Px();Qe===e&&$e===t||Ti(e,t);do try{qR();break}catch(o){kx(e,o)}while(1);if(Nm(),j=n,$u.current=r,Pe!==null)throw Error(R(261));return Qe=null,$e=0,De}function qR(){for(;Pe!==null;)Rx(Pe)}function GR(){for(;Pe!==null&&!AR();)Rx(Pe)}function Rx(e){var t=Ix(e.alternate,e,wo);e.memoizedProps=e.pendingProps,t===null?Ax(e):Pe=t,Km.current=null}function Ax(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=UR(t),n!==null){n.flags&=2047,Pe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=HR(n,t,wo),n!==null){Pe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||wo&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);De===0&&(De=5)}function fo(e){var t=Ai();return xo(99,XR.bind(null,e,t)),null}function XR(e,t){do Dr();while(ea!==null);if(j&48)throw Error(R(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-Ir(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(Hn!==null&&!(r&24)&&Hn.has(e)&&Hn.delete(e),e===Qe&&(Pe=Qe=null,$e=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=j,j|=32,Km.current=null,up=yu,s=v0(),Dp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,f=0,v=0,y=s,g=null;t:for(;;){for(var m;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(m=y.firstChild)!==null;)g=y,y=m;for(;;){if(y===s)break t;if(g===a&&++f===i&&(p=c),g===l&&++v===u&&(d=c),(m=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;cp={focusedElem:s,selectionRange:a},yu=!1,na=null,bu=!1,M=r;do try{YR()}catch(O){if(M===null)throw Error(R(330));Ar(M,O),M=M.nextEffect}while(M!==null);na=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&oa(M.stateNode,""),h&128){var x=M.alternate;if(x!==null){var w=x.ref;w!==null&&(typeof w=="function"?w(null):w.current=null)}}switch(h&1038){case 2:nS(M),M.flags&=-3;break;case 6:nS(M),M.flags&=-3,yp(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,yp(M.alternate,M);break;case 4:yp(M.alternate,M);break;case 8:a=M,Ex(s,a);var T=a.alternate;eS(a),T!==null&&eS(T)}M=M.nextEffect}}catch(O){if(M===null)throw Error(R(330));Ar(M,O),M=M.nextEffect}while(M!==null);if(w=cp,x=v0(),h=w.focusedElem,s=w.selectionRange,x!==h&&h&&h.ownerDocument&&zS(h.ownerDocument.documentElement,h)){for(s!==null&&Dp(h)&&(x=s.start,w=s.end,w===void 0&&(w=x),"selectionStart"in h?(h.selectionStart=x,h.selectionEnd=Math.min(w,h.value.length)):(w=(x=h.ownerDocument||document)&&x.defaultView||window,w.getSelection&&(w=w.getSelection(),a=h.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!w.extend&&T>s&&(a=s,s=T,T=a),a=y0(h,T),i=y0(h,s),a&&i&&(w.rangeCount!==1||w.anchorNode!==a.node||w.anchorOffset!==a.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),w.removeAllRanges(),T>s?(w.addRange(x),w.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),w.addRange(x)))))),x=[],w=h;w=w.parentNode;)w.nodeType===1&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<x.length;h++)w=x[h],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}yu=!!up,cp=up=null,e.current=n,M=r;do try{for(h=e;M!==null;){var b=M.flags;if(b&36&&VR(h,M.alternate,M),b&128){x=void 0;var k=M.ref;if(k!==null){var I=M.stateNode;switch(M.tag){case 5:x=I;break;default:x=I}typeof k=="function"?k(x):k.current=x}}M=M.nextEffect}}catch(O){if(M===null)throw Error(R(330));Ar(M,O),M=M.nextEffect}while(M!==null);M=null,IR(),j=o}else e.current=n;if(Nr)Nr=!1,ea=e,Vs=t;else for(M=r;M!==null;)t=M.nextEffect,M.nextEffect=null,M.flags&8&&(b=M,b.sibling=null,b.stateNode=null),M=t;if(r=e.pendingLanes,r===0&&(yn=null),r===1?e===im?ta++:(ta=0,im=e):ta=0,n=n.stateNode,vo&&typeof vo.onCommitFiberRoot=="function")try{vo.onCommitFiberRoot(Im,n,void 0,(n.current.flags&64)===64)}catch{}if(Ft(e,We()),qu)throw qu=!1,e=nm,nm=null,e;return j&8||xn(),null}function YR(){for(;M!==null;){var e=M.alternate;bu||na===null||(M.flags&8?o0(M,na)&&(bu=!0):M.tag===13&&KR(e,M)&&o0(M,na)&&(bu=!0));var t=M.flags;t&256&&jR(e,M),!(t&512)||Nr||(Nr=!0,fa(97,function(){return Dr(),null})),M=M.nextEffect}}function Dr(){if(Vs!==90){var e=97<Vs?97:Vs;return Vs=90,xo(e,ZR)}return!1}function QR(e,t){rm.push(t,e),Nr||(Nr=!0,fa(97,function(){return Dr(),null}))}function Lx(e,t){om.push(t,e),Nr||(Nr=!0,fa(97,function(){return Dr(),null}))}function ZR(){if(ea===null)return!1;var e=ea;if(ea=null,j&48)throw Error(R(331));var t=j;j|=32;var n=om;om=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(l){if(i===null)throw Error(R(330));Ar(i,l)}}for(n=rm,rm=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(R(330));Ar(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return j=t,xn(),!0}function oS(e,t,n){t=Vm(n,t),t=xx(e,t,1),kr(e,t),t=ht(),e=ac(e,1),e!==null&&(Ju(e,1,t),Ft(e,t))}function Ar(e,t){if(e.tag===3)oS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){oS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Vm(t,e);var o=wx(n,e,1);if(kr(n,o),o=ht(),n=ac(n,1),n!==null)Ju(n,1,o),Ft(n,o);else if(typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function JR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&n,Qe===e&&($e&n)===n&&(De===4||De===3&&($e&62914560)===$e&&500>We()-$m?Ti(e,0):Wm|=n),Ft(e,t)}function eA(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(_n===0&&(_n=Ni),t=ci(62914560&~_n),t===0&&(t=4194304)):t=Ai()===99?1:2:t=1),n=ht(),e=ac(e,t),e!==null&&(Ju(e,t,n),Ft(e,n))}var Ix;Ix=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Qt=!0;else if(n&r)Qt=!!(e.flags&16384);else{switch(Qt=!1,t.tag){case 3:K0(t),mp();break;case 5:_0(t);break;case 1:mt(t.type)&&xu(t);break;case 4:Kp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ee(_u,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?W0(e,t,n):(Ee(we,we.current&1),t=Fn(e,t,n),t!==null?t.sibling:null);Ee(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Y0(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ee(we,we.current),r)break;return null;case 23:case 24:return t.lanes=0,gp(e,t,n)}return Fn(e,t,n)}else Qt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Ri(t,qe.current),Ei(t,n),o=Um(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(r)){var i=!0;xu(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,_m(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Hu(t,r,s,e),o.updater=ic,t.stateNode=o,o._reactInternals=t,Vp(t,r,e,n),t=Gp(null,t,r,!0,i,n)}else t.tag=0,ft(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=nA(o),e=Yt(o,e),i){case 0:t=qp(null,t,o,e,n);break e;case 1:t=V0(null,t,o,e,n);break e;case 11:t=B0(null,t,o,e,n);break e;case 14:t=j0(null,t,o,Yt(o.type,e),r,n);break e}throw Error(R(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),qp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),V0(e,t,r,o,n);case 3:if(K0(t),r=t.updateQueue,e===null||r===null)throw Error(R(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,nx(e,t),pa(t,r,null,n),r=t.memoizedState.element,r===o)mp(),t=Fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(wr=wi(t.stateNode.containerInfo.firstChild),Dn=t,i=Sn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ci.push(i);for(n=sx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ft(e,t,r,n),mp();t=t.child}return t;case 5:return _0(t),e===null&&Wp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Up(r,o)?s=null:i!==null&&Up(r,i)&&(t.flags|=16),hx(e,t),ft(e,t,s,n),t.child;case 6:return e===null&&Wp(t),null;case 13:return W0(e,t,n);case 4:return Kp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Uu(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),B0(e,t,r,o,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(Ee(_u,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Nt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!pt.current){t=Fn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=Tr(-1,n&-n),u.tag=2,kr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),tx(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ei(t,n),o=Dt(o,i.unstable_observedBits),r=r(o),t.flags|=1,ft(e,t,r,n),t.child;case 14:return o=t.type,i=Yt(o,t.pendingProps),i=Yt(o.type,i),j0(e,t,o,i,r,n);case 15:return gx(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mt(r)?(e=!0,xu(t)):e=!1,Ei(t,n),ox(t,r,o),Vp(t,r,o,n),Gp(null,t,r,!0,e,n);case 19:return Y0(e,t,n);case 23:return gp(e,t,n);case 24:return gp(e,t,n)}throw Error(R(156,t.tag))};function tA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Mt(e,t,n,r){return new tA(e,t,n,r)}function Gm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nA(e){if(typeof e=="function")return Gm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yu)return 11;if(e===Qu)return 14}return 2}function Mr(e,t){var n=e.alternate;return n===null?(n=Mt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Gm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case vr:return ki(n.children,o,i,t);case aS:s=8,o|=16;break;case cm:s=8,o|=1;break;case Ws:return e=Mt(12,n,t,o|8),e.elementType=Ws,e.type=Ws,e.lanes=i,e;case $s:return e=Mt(13,n,t,o),e.type=$s,e.elementType=$s,e.lanes=i,e;case ku:return e=Mt(19,n,t,o),e.elementType=ku,e.lanes=i,e;case hm:return Xm(n,o,i,t);case wp:return e=Mt(24,n,t,o),e.elementType=wp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dm:s=10;break e;case fm:s=9;break e;case Yu:s=11;break e;case Qu:s=14;break e;case pm:s=16,r=null;break e;case mm:s=22;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Mt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ki(e,t,n,r){return e=Mt(7,e,r,t),e.lanes=n,e}function Xm(e,t,n,r){return e=Mt(23,e,r,t),e.elementType=hm,e.lanes=n,e}function vp(e,t,n){return e=Mt(6,e,null,t),e.lanes=n,e}function Sp(e,t,n){return t=Mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rA(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=rp(0),this.expirationTimes=rp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rp(0),this.mutableSourceEagerHydrationData=null}function oA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:po,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t,n,r){var o=t.current,i=ht(),s=Pr(o);e:if(n){n=n._reactInternals;t:{if(bo(n)!==n||n.tag!==1)throw Error(R(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(R(171))}if(n.tag===1){var l=n.type;if(mt(l)){n=GS(n,l,a);break e}}n=a}else n=Or;return t.context===null?t.context=n:t.pendingContext=n,t=Tr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),kr(o,t),Rr(o,s,i),s}function xp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function iS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ym(e,t){iS(e,t),(e=e.alternate)&&iS(e,t)}function iA(){return null}function Qm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new rA(e,t,n!=null&&n.hydrate===!0),t=Mt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,_m(t),e[Oi]=n.current,VS(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}Qm.prototype.render=function(e){Gu(e,this._internalRoot,null,null)};Qm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Gu(null,e,null,function(){t[Oi]=null})};function wa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sA(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Qm(e,0,t?{hydrate:!0}:void 0)}function lc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=xp(s);a.call(u)}}Gu(t,s,e,o)}else{if(i=n._reactRootContainer=sA(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=xp(s);l.call(u)}}Tx(function(){Gu(t,s,e,o)})}return xp(s)}ES=function(e){if(e.tag===13){var t=ht();Rr(e,4,t),Ym(e,4)}};wm=function(e){if(e.tag===13){var t=ht();Rr(e,67108864,t),Ym(e,67108864)}};CS=function(e){if(e.tag===13){var t=ht(),n=Pr(e);Rr(e,n,t),Ym(e,n)}};bS=function(e,t){return t()};Ip=function(e,t,n){switch(t){case"input":if(Cp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=rc(r);if(!o)throw Error(R(90));uS(r),Cp(r,o)}}}break;case"textarea":dS(e,n);break;case"select":t=n.value,t!=null&&vi(e,!!n.multiple,t,!1)}};vm=bx;vS=function(e,t,n,r,o){var i=j;j|=4;try{return xo(98,e.bind(null,t,n,r,o))}finally{j=i,j===0&&(_i(),xn())}};Sm=function(){!(j&49)&&($R(),Dr())};SS=function(e,t){var n=j;j|=2;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}};function Ox(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wa(t))throw Error(R(200));return oA(e,t,null,n)}var aA={Events:[va,mi,rc,hS,yS,Dr,{current:!1}]},Hs={findFiberByHostInstance:go,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lA={bundleType:Hs.bundleType,version:Hs.version,rendererPackageName:Hs.rendererPackageName,rendererConfig:Hs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Co.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wS(e),e===null?null:e.stateNode},findFiberByHostInstance:Hs.findFiberByHostInstance||iA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Us=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Us.isDisabled&&Us.supportsFiber))try{Im=Us.inject(lA),vo=Us}catch{}var Us;Ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aA;Ht.createPortal=Ox;Ht.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):Error(R(268,Object.keys(e)));return e=wS(t),e=e===null?null:e.stateNode,e};Ht.flushSync=function(e,t){var n=j;if(n&48)return e(t);j|=1;try{if(e)return xo(99,e.bind(null,t))}finally{j=n,xn()}};Ht.hydrate=function(e,t,n){if(!wa(t))throw Error(R(200));return lc(null,e,t,!0,n)};Ht.render=function(e,t,n){if(!wa(t))throw Error(R(200));return lc(null,e,t,!1,n)};Ht.unmountComponentAtNode=function(e){if(!wa(e))throw Error(R(40));return e._reactRootContainer?(Tx(function(){lc(null,null,e,!1,function(){e._reactRootContainer=null,e[Oi]=null})}),!0):!1};Ht.unstable_batchedUpdates=bx;Ht.unstable_createPortal=function(e,t){return Ox(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ht.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!wa(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return lc(e,t,n,!1,r)};Ht.version="17.0.2"});var uc=Ce((k_,_x)=>{"use strict";function Mx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mx)}catch(e){console.error(e)}}Mx(),_x.exports=Nx()});var uw=Ce(lw=>{"use strict";var Bi=_();function $A(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qA=typeof Object.is=="function"?Object.is:$A,GA=Bi.useState,XA=Bi.useEffect,YA=Bi.useLayoutEffect,QA=Bi.useDebugValue;function ZA(e,t){var n=t(),r=GA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return YA(function(){o.value=n,o.getSnapshot=t,bg(o)&&i({inst:o})},[e,n,t]),XA(function(){return bg(o)&&i({inst:o}),e(function(){bg(o)&&i({inst:o})})},[e]),QA(n),n}function bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qA(e,n)}catch{return!0}}function JA(e,t){return t()}var eL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JA:ZA;lw.useSyncExternalStore=Bi.useSyncExternalStore!==void 0?Bi.useSyncExternalStore:eL});var Tg=Ce((pD,cw)=>{"use strict";cw.exports=uw()});var fw=Ce(dw=>{"use strict";var yc=_(),tL=Tg();function nL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rL=typeof Object.is=="function"?Object.is:nL,oL=tL.useSyncExternalStore,iL=yc.useRef,sL=yc.useEffect,aL=yc.useMemo,lL=yc.useDebugValue;dw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=iL(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=aL(function(){function l(f){if(!u){if(u=!0,c=f,f=r(f),o!==void 0&&s.hasValue){var v=s.value;if(o(v,f))return p=v}return p=f}if(v=p,rL(c,f))return v;var y=r(f);return o!==void 0&&o(v,y)?v:(c=f,p=y)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=oL(e,i[0],i[1]);return sL(function(){s.hasValue=!0,s.value=a},[a]),lL(a),a}});var mw=Ce((gD,pw)=>{"use strict";pw.exports=fw()});var Tw=Ce(ie=>{"use strict";var Me=typeof Symbol=="function"&&Symbol.for,Pg=Me?Symbol.for("react.element"):60103,Rg=Me?Symbol.for("react.portal"):60106,wc=Me?Symbol.for("react.fragment"):60107,Ec=Me?Symbol.for("react.strict_mode"):60108,Cc=Me?Symbol.for("react.profiler"):60114,bc=Me?Symbol.for("react.provider"):60109,Tc=Me?Symbol.for("react.context"):60110,Ag=Me?Symbol.for("react.async_mode"):60111,kc=Me?Symbol.for("react.concurrent_mode"):60111,Pc=Me?Symbol.for("react.forward_ref"):60112,Rc=Me?Symbol.for("react.suspense"):60113,fL=Me?Symbol.for("react.suspense_list"):60120,Ac=Me?Symbol.for("react.memo"):60115,Lc=Me?Symbol.for("react.lazy"):60116,pL=Me?Symbol.for("react.block"):60121,mL=Me?Symbol.for("react.fundamental"):60117,gL=Me?Symbol.for("react.responder"):60118,hL=Me?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Pg:switch(e=e.type,e){case Ag:case kc:case wc:case Cc:case Ec:case Rc:return e;default:switch(e=e&&e.$$typeof,e){case Tc:case Pc:case Lc:case Ac:case bc:return e;default:return t}}case Rg:return t}}}function bw(e){return St(e)===kc}ie.AsyncMode=Ag;ie.ConcurrentMode=kc;ie.ContextConsumer=Tc;ie.ContextProvider=bc;ie.Element=Pg;ie.ForwardRef=Pc;ie.Fragment=wc;ie.Lazy=Lc;ie.Memo=Ac;ie.Portal=Rg;ie.Profiler=Cc;ie.StrictMode=Ec;ie.Suspense=Rc;ie.isAsyncMode=function(e){return bw(e)||St(e)===Ag};ie.isConcurrentMode=bw;ie.isContextConsumer=function(e){return St(e)===Tc};ie.isContextProvider=function(e){return St(e)===bc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pg};ie.isForwardRef=function(e){return St(e)===Pc};ie.isFragment=function(e){return St(e)===wc};ie.isLazy=function(e){return St(e)===Lc};ie.isMemo=function(e){return St(e)===Ac};ie.isPortal=function(e){return St(e)===Rg};ie.isProfiler=function(e){return St(e)===Cc};ie.isStrictMode=function(e){return St(e)===Ec};ie.isSuspense=function(e){return St(e)===Rc};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wc||e===kc||e===Cc||e===Ec||e===Rc||e===fL||typeof e=="object"&&e!==null&&(e.$$typeof===Lc||e.$$typeof===Ac||e.$$typeof===bc||e.$$typeof===Tc||e.$$typeof===Pc||e.$$typeof===mL||e.$$typeof===gL||e.$$typeof===hL||e.$$typeof===pL)};ie.typeOf=St});var Pw=Ce((AD,kw)=>{"use strict";kw.exports=Tw()});var Mw=Ce((LD,Nw)=>{"use strict";var Lg=Pw(),yL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},SL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ig={};Ig[Lg.ForwardRef]=SL;Ig[Lg.Memo]=Iw;function Rw(e){return Lg.isMemo(e)?Iw:Ig[e.$$typeof]||yL}var xL=Object.defineProperty,wL=Object.getOwnPropertyNames,Aw=Object.getOwnPropertySymbols,EL=Object.getOwnPropertyDescriptor,CL=Object.getPrototypeOf,Lw=Object.prototype;function Ow(e,t,n){if(typeof t!="string"){if(Lw){var r=CL(t);r&&r!==Lw&&Ow(e,r,n)}var o=wL(t);Aw&&(o=o.concat(Aw(t)));for(var i=Rw(e),s=Rw(t),a=0;a<o.length;++a){var l=o[a];if(!vL[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=EL(t,l);try{xL(e,l,u)}catch{}}}}return e}Nw.exports=Ow});var Dw=Ce(se=>{"use strict";var Og=Symbol.for("react.element"),Ng=Symbol.for("react.portal"),Ic=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),Nc=Symbol.for("react.profiler"),Mc=Symbol.for("react.provider"),_c=Symbol.for("react.context"),bL=Symbol.for("react.server_context"),Dc=Symbol.for("react.forward_ref"),Fc=Symbol.for("react.suspense"),Hc=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),zc=Symbol.for("react.lazy"),TL=Symbol.for("react.offscreen"),_w;_w=Symbol.for("react.module.reference");function zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Og:switch(e=e.type,e){case Ic:case Nc:case Oc:case Fc:case Hc:return e;default:switch(e=e&&e.$$typeof,e){case bL:case _c:case Dc:case zc:case Uc:case Mc:return e;default:return t}}case Ng:return t}}}se.ContextConsumer=_c;se.ContextProvider=Mc;se.Element=Og;se.ForwardRef=Dc;se.Fragment=Ic;se.Lazy=zc;se.Memo=Uc;se.Portal=Ng;se.Profiler=Nc;se.StrictMode=Oc;se.Suspense=Fc;se.SuspenseList=Hc;se.isAsyncMode=function(){return!1};se.isConcurrentMode=function(){return!1};se.isContextConsumer=function(e){return zt(e)===_c};se.isContextProvider=function(e){return zt(e)===Mc};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Og};se.isForwardRef=function(e){return zt(e)===Dc};se.isFragment=function(e){return zt(e)===Ic};se.isLazy=function(e){return zt(e)===zc};se.isMemo=function(e){return zt(e)===Uc};se.isPortal=function(e){return zt(e)===Ng};se.isProfiler=function(e){return zt(e)===Nc};se.isStrictMode=function(e){return zt(e)===Oc};se.isSuspense=function(e){return zt(e)===Fc};se.isSuspenseList=function(e){return zt(e)===Hc};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ic||e===Nc||e===Oc||e===Fc||e===Hc||e===TL||typeof e=="object"&&e!==null&&(e.$$typeof===zc||e.$$typeof===Uc||e.$$typeof===Mc||e.$$typeof===_c||e.$$typeof===Dc||e.$$typeof===_w||e.getModuleId!==void 0)};se.typeOf=zt});var Hw=Ce((OD,Fw)=>{"use strict";Fw.exports=Dw()});var uh=Ce((i6,dE)=>{"use strict";var PI="Expected a function",uE=NaN,RI="[object Symbol]",AI=/^\s+|\s+$/g,LI=/^[-+]0x[0-9a-f]+$/i,II=/^0b[01]+$/i,OI=/^0o[0-7]+$/i,NI=parseInt,MI=typeof global=="object"&&global&&global.Object===Object&&global,_I=typeof self=="object"&&self&&self.Object===Object&&self,DI=MI||_I||Function("return this")(),FI=Object.prototype,HI=FI.toString,UI=Math.max,zI=Math.min,ah=function(){return DI.Date.now()};function BI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(PI);t=cE(t)||0,lh(n)&&(c=!!n.leading,p="maxWait"in n,i=p?UI(cE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function f(b){var k=r,I=o;return r=o=void 0,u=b,s=e.apply(I,k),s}function v(b){return u=b,a=setTimeout(m,t),c?f(b):s}function y(b){var k=b-l,I=b-u,O=t-k;return p?zI(O,i-I):O}function g(b){var k=b-l,I=b-u;return l===void 0||k>=t||k<0||p&&I>=i}function m(){var b=ah();if(g(b))return h(b);a=setTimeout(m,y(b))}function h(b){return a=void 0,d&&r?f(b):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function w(){return a===void 0?s:h(ah())}function T(){var b=ah(),k=g(b);if(r=arguments,o=this,l=b,k){if(a===void 0)return v(l);if(p)return a=setTimeout(m,t),f(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=x,T.flush=w,T}function lh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function jI(e){return!!e&&typeof e=="object"}function VI(e){return typeof e=="symbol"||jI(e)&&HI.call(e)==RI}function cE(e){if(typeof e=="number")return e;if(VI(e))return uE;if(lh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(AI,"");var n=II.test(e);return n||OI.test(e)?NI(e.slice(2),n?2:8):LI.test(e)?uE:+e}dE.exports=BI});var xE=Ce((P6,SE)=>{"use strict";var XI=/["'&<>]/;SE.exports=YI;function YI(e){var t=""+e,n=XI.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var QM={};je(QM,{Card:()=>pe,ContentEditableInput:()=>qo,DeepdeskAPI:()=>lr,DeepdeskSDK:()=>Rl,HTTPClient:()=>fn,InputMediator:()=>ar,InputType:()=>uo,KeyboardHint:()=>Wl,Label:()=>$l,Locale:()=>Aa,Section:()=>pn,SectionList:()=>ql,Sources:()=>Nn,Suggestion:()=>ee,SuggestionList:()=>ct,TextAreaInput:()=>Go,ToggleButton:()=>lo,attachFile:()=>wk,authenticateWithKey:()=>Sk,createFullRange:()=>ps,createOverlayContainer:()=>Pl,createRangeFromOffsets:()=>no,escapeHTML:()=>Zi,fetchPlatformConfig:()=>xk,formatTextMarkup:()=>vk,getRangeOffsets:()=>Cl,getRangeText:()=>bl,insertCKEditor:()=>yk,isHTML:()=>Ad,isSupportedInputElement:()=>Ef,updateContentEditable:()=>gk,updateTextArea:()=>mk,useClickOutsideRoot:()=>Xr,useStyles:()=>P,waitForElementVisibilityChange:()=>Tf});var zf=S(te()),It=S(_());var Bl=S(_()),hv=S(te()),Es=Bl.default.createContext({});function P(e,t){let{debug:n,...r}=(0,Bl.useContext)(Es),o=r[e];return Object.entries(t).reduce((i,[s,a])=>{let l=o==null?void 0:o[s];return{...i,[s]:(0,hv.default)(a,l,n?`${e}__${s}`:!1)}},{})}var yv={root:"dd-4s9wq"};var so=S(C()),jl=()=>(0,so.jsxs)("svg",{className:yv.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,so.jsx)("defs",{children:(0,so.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,so.jsx)("title",{children:"Failed loading image"}),(0,so.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Uf={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var ao=S(C()),Vl=(0,It.createContext)(Uf),Yk=({title:e,src:t})=>{let n=(0,It.useContext)(Vl),[r,o]=(0,It.useState)(!1);return(0,It.useEffect)(()=>{o(!1)},[t]),(0,ao.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,ao.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,ao.jsx)(jl,{})})},Qk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,It.useContext)(Vl);return(0,ao.jsx)("div",{className:(0,zf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Zk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,It.useContext)(Vl);return It.default.createElement(e,{className:(0,zf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Kl=({children:e})=>{let t=P("Card",Uf);return(0,ao.jsx)("div",{className:t.root,children:(0,ao.jsx)(Vl.Provider,{value:t,children:e})})};Kl.Image=Yk;Kl.Content=Qk;Kl.Title=Zk;var pe=Kl;var Cv=S(te());var Ev={root:"dd-llBx9"};var bv=S(C());var Jk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},eP=({className:e,keyCode:t,...n})=>{let r=P("KeyboardHint",Ev);return(0,bv.jsx)("span",{"data-key":Jk[t],className:(0,Cv.default)(e,r.root),...n})},Wl=eP;var kv=S(te());var Tv={root:"dd-e6HXZ"};var Pv=S(C()),tP=({className:e,children:t,...n})=>{let r=P("Label",Tv);return(0,Pv.jsx)("span",{...n,className:(0,kv.default)(e,r.root),children:t})},$l=tP;var Rv={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var ri=S(C()),nP=({title:e,children:t,type:n,...r})=>{let o=P("Section",Rv);return(0,ri.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ri.jsx)("div",{className:o.subTitleContainer,children:(0,ri.jsx)("span",{className:o.subtitle,children:e})}),(0,ri.jsx)("div",{className:o.suggestions,children:t})]})},pn=nP;var Lv=S(te()),Iv=S(_());var Av={root:"dd-uoTXh"};var Ov=S(C()),rP=Iv.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",Av);return(0,Ov.jsx)("div",{ref:n,className:(0,Lv.default)(r.root,e),children:t})}),ql=rP;var oi=S(te()),ut=S(_());var Bf={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",iconButtons:"dd-zEJFg",iconButton:"dd-MXcDi",iconButtonDisabled:"dd-Uk1yr"};var lt=S(C()),mr=(0,ut.createContext)(Bf),oP=({fixed:e,children:t,...n})=>{let r=(0,ut.useContext)(mr);return(0,lt.jsx)("div",{...n,className:(0,oi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})};function iP({as:e,className:t,icon:n,title:r,disabled:o,...i}){let s=(0,ut.useContext)(mr);return(0,lt.jsx)(e||"button",{type:"button",className:(0,oi.default)(s.iconButton,{[s.iconButtonDisabled]:o},t),title:r,"aria-label":r,...i,children:n})}var sP=({children:e})=>{let t=(0,ut.useContext)(mr);return(0,lt.jsx)("div",{className:t.iconButtons,children:e})},aP=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ut.useContext)(mr);return(0,lt.jsxs)("div",{className:(0,oi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,lt.jsx)("ul",{className:i.dropdownList,children:o})]})},lP=({index:e,label:t,onClick:n})=>{let r=(0,ut.useContext)(mr);return(0,lt.jsx)("li",{className:r.dropdownItem,children:(0,lt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},uP=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ut.useContext)(mr);return(0,lt.jsx)("button",{type:"button",className:(0,oi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},cP=({labels:e})=>{let t=(0,ut.useContext)(mr);return(0,lt.jsx)("div",{className:t.labels,children:e.map(n=>(0,lt.jsx)("span",{className:t.label,children:n},n))})},gr=ut.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",Bf),l=(0,ut.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,lt.jsx)(o,{...i,ref:s,className:(0,oi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,lt.jsx)(mr.Provider,{value:a,children:r})})});gr.Labels=cP;gr.Actions=oP;gr.ActionButton=uP;gr.DropdownButton=aP;gr.DropdownItem=lP;gr.IconButtonContainer=sP;gr.IconButton=iP;var ee=gr;var Mv=S(te());var Nv={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var _v=S(C()),dP=({withDivider:e,children:t})=>{let n=P("SuggestionList",Nv);return(0,_v.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Mv.default)(n.root,{[n.isWithDivider]:e}),children:t})},ct=dP;var Fv=S(te());var Dv={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Gl=S(C()),fP=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",Dv);return(0,Gl.jsx)("button",{type:"button",className:(0,Fv.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Gl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Gl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},lo=fP;var Hv=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Xl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Uv=/x-deepdesk-(([a-z0-9\-_])+-version)/,Yl=["cues","custom-data"],Nn=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(Nn||{}),uo=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(uo||{});var $t=S(uc());var bC=S(_());function Ut(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function zn(e){return!!e&&!!e[ve]}function Zt(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===hA}(e)||Array.isArray(e)||!!e[jx]||!!(!((t=e.constructor)===null||t===void 0)&&t[jx])||sg(e)||ag(e))}function ko(e,t,n){n===void 0&&(n=!1),Hi(e)===0?(n?Object.keys:Fi)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Hi(e){var t=e[ve];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:sg(e)?2:ag(e)?3:0}function Di(e,t){return Hi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uA(e,t){return Hi(e)===2?e.get(t):e[t]}function Vx(e,t,n){var r=Hi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Kx(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function sg(e){return mA&&e instanceof Map}function ag(e){return gA&&e instanceof Set}function Fr(e){return e.o||e.t}function lg(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qx(e);delete t[ve];for(var n=Fi(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function ug(e,t){return t===void 0&&(t=!1),cg(e)||zn(e)||!Zt(e)||(Hi(e)>1&&(e.set=e.add=e.clear=e.delete=cA),Object.freeze(e),t&&ko(e,function(n,r){return ug(r,!0)},!0)),e}function cA(){Ut(2)}function cg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wn(e){var t=ig[e];return t||Ut(18,e),t}function dA(e,t){ig[e]||(ig[e]=t)}function ng(){return Ca}function Zm(e,t){t&&(wn("Patches"),e.u=[],e.s=[],e.v=t)}function cc(e){rg(e),e.p.forEach(fA),e.p=null}function rg(e){e===Ca&&(Ca=e.l)}function Dx(e){return Ca={p:[],l:Ca,h:e,m:!0,_:0}}function fA(e){var t=e[ve];t.i===0||t.i===1?t.j():t.g=!0}function Jm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||wn("ES5").S(t,e,r),r?(n[ve].P&&(cc(t),Ut(4)),Zt(e)&&(e=dc(t,e),t.l||fc(t,e)),t.u&&wn("Patches").M(n[ve].t,e,t.u,t.s)):e=dc(t,n,[]),cc(t),t.u&&t.v(t.u,t.s),e!==$x?e:void 0}function dc(e,t,n){if(cg(t))return t;var r=t[ve];if(!r)return ko(t,function(a,l){return Fx(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return fc(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=lg(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),ko(i,function(a,l){return Fx(e,r,o,a,l,n,s)}),fc(e,o,!1),n&&e.u&&wn("Patches").N(r,n,e.u,e.s)}return r.o}function Fx(e,t,n,r,o,i,s){if(zn(o)){var a=dc(e,o,i&&t&&t.i!==3&&!Di(t.R,r)?i.concat(r):void 0);if(Vx(n,r,a),!zn(a))return;e.m=!1}else s&&n.add(o);if(Zt(o)&&!cg(o)){if(!e.h.D&&e._<1)return;dc(e,o),t&&t.A.l||fc(e,o)}}function fc(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&ug(t,n)}function eg(e,t){var n=e[ve];return(n?Fr(n):e)[t]}function Hx(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Hr(e){e.P||(e.P=!0,e.l&&Hr(e.l))}function tg(e){e.o||(e.o=lg(e.t))}function og(e,t,n){var r=sg(t)?wn("MapSet").F(t,n):ag(t)?wn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:ng(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=ba;s&&(l=[a],u=Ea);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):wn("ES5").J(t,n);return(n?n.A:ng()).p.push(r),r}function pA(e){return zn(e)||Ut(22,e),function t(n){if(!Zt(n))return n;var r,o=n[ve],i=Hi(n);if(o){if(!o.P&&(o.i<4||!wn("ES5").K(o)))return o.t;o.I=!0,r=Ux(n,i),o.I=!1}else r=Ux(n,i);return ko(r,function(s,a){o&&uA(o.t,s)===a||Vx(r,s,t(a))}),i===3?new Set(r):r}(e)}function Ux(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return lg(e)}function Wx(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[ve];return ba.get(u,s)},set:function(u){var c=this[ve];ba.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ve];if(!l.P)switch(l.i){case 5:r(l)&&Hr(l);break;case 4:n(l)&&Hr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Fi(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==ve){var d=a[p];if(d===void 0&&!Di(a,p))return!0;var f=l[p],v=f&&f[ve];if(v?v.t!==d:!Kx(f,d))return!0}}var y=!!a[ve];return u.length!==Fi(a).length+(y?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ut(3,JSON.stringify(Fr(s)))}var i={};dA("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var f=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(f,""+v,e(v,!0));return f}var y=qx(d);delete y[ve];for(var g=Fi(y),m=0;m<g.length;m++){var h=g[m];y[h]=e(h,p||!!y[h].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:ng(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ve,{value:c,writable:!0}),u},S:function(s,a,l){l?zn(a)&&a[ve].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[ve];if(p){var d=p.t,f=p.k,v=p.R,y=p.i;if(y===4)ko(f,function(w){w!==ve&&(d[w]!==void 0||Di(d,w)?v[w]||u(f[w]):(v[w]=!0,Hr(p)))}),ko(d,function(w){f[w]!==void 0||Di(f,w)||(v[w]=!1,Hr(p))});else if(y===5){if(r(p)&&(Hr(p),v.length=!0),f.length<d.length)for(var g=f.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<f.length;m++)v[m]=!0;for(var h=Math.min(f.length,d.length),x=0;x<h;x++)f.hasOwnProperty(x)||(v[x]=!0),v[x]===void 0&&u(f[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var zx,Ca,dg=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",mA=typeof Map<"u",gA=typeof Set<"u",Bx=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",$x=dg?Symbol.for("immer-nothing"):((zx={})["immer-nothing"]=!0,zx),jx=dg?Symbol.for("immer-draftable"):"__$immer_draftable",ve=dg?Symbol.for("immer-state"):"__$immer_state";var hA=""+Object.prototype.constructor,Fi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,qx=Object.getOwnPropertyDescriptors||function(e){var t={};return Fi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},ig={},ba={get:function(e,t){if(t===ve)return e;var n=Fr(e);if(!Di(n,t))return function(o,i,s){var a,l=Hx(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Zt(r)?r:r===eg(e.t,t)?(tg(e),e.o[t]=og(e.A.h,r,e)):r},has:function(e,t){return t in Fr(e)},ownKeys:function(e){return Reflect.ownKeys(Fr(e))},set:function(e,t,n){var r=Hx(Fr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=eg(Fr(e),t),i=o==null?void 0:o[ve];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Kx(n,o)&&(n!==void 0||Di(e.t,t)))return!0;tg(e),Hr(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return eg(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,tg(e),Hr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Fr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ut(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ut(12)}},Ea={};ko(ba,function(e,t){Ea[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ea.deleteProperty=function(e,t){return Ea.set.call(this,e,t,void 0)},Ea.set=function(e,t,n){return ba.set.call(this,e[0],t,n,e[0])};var yA=function(){function e(n){var r=this;this.O=Bx,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var g=this;y===void 0&&(y=a);for(var m=arguments.length,h=Array(m>1?m-1:0),x=1;x<m;x++)h[x-1]=arguments[x];return l.produce(y,function(w){var T;return(T=i).call.apply(T,[g,w].concat(h))})}}var u;if(typeof i!="function"&&Ut(6),s!==void 0&&typeof s!="function"&&Ut(7),Zt(o)){var c=Dx(r),p=og(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?cc(c):rg(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Zm(c,s),Jm(y,c)},function(y){throw cc(c),y}):(Zm(c,s),Jm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===$x&&(u=void 0),r.D&&ug(u,!0),s){var f=[],v=[];wn("Patches").M(o,u,f,v),s(f,v)}return u}Ut(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(f){return o.apply(void 0,[f].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Zt(n)||Ut(8),zn(n)&&(n=pA(n));var r=Dx(this),o=og(this,n,void 0);return o[ve].C=!0,rg(r),o},t.finishDraft=function(n,r){var o=n&&n[ve],i=o.A;return Zm(i,r),Jm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!Bx&&Ut(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=wn("Patches").$;return zn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),vt=new yA,vA=vt.produce,P_=vt.produceWithPatches.bind(vt),R_=vt.setAutoFreeze.bind(vt),A_=vt.setUseProxies.bind(vt),L_=vt.applyPatches.bind(vt),I_=vt.createDraft.bind(vt),O_=vt.finishDraft.bind(vt),pc=vA;function Ur(e){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(e)}function fg(e,t){if(Ur(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ur(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pg(e){var t=fg(e,"string");return Ur(t)==="symbol"?t:String(t)}function mg(e,t,n){return t=pg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gx(Object(n),!0).forEach(function(r){mg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ge(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Xx=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),gg=function(){return Math.random().toString(36).substring(7).split("").join(".")},gc={INIT:"@@redux/INIT"+gg(),REPLACE:"@@redux/REPLACE"+gg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gg()}};function SA(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function hg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ge(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ge(1));return n(hg)(e,t)}if(typeof e!="function")throw new Error(Ge(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Ge(3));return i}function p(y){if(typeof y!="function")throw new Error(Ge(4));if(l)throw new Error(Ge(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Ge(6));g=!1,u();var h=a.indexOf(y);a.splice(h,1),s=null}}}function d(y){if(!SA(y))throw new Error(Ge(7));if(typeof y.type>"u")throw new Error(Ge(8));if(l)throw new Error(Ge(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var h=g[m];h()}return y}function f(y){if(typeof y!="function")throw new Error(Ge(10));o=y,d({type:gc.REPLACE})}function v(){var y,g=p;return y={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ge(11));function x(){h.next&&h.next(c())}x();var w=g(x);return{unsubscribe:w}}},y[Xx]=function(){return this},y}return d({type:gc.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:f},r[Xx]=v,r}function xA(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:gc.INIT});if(typeof r>"u")throw new Error(Ge(12));if(typeof n(void 0,{type:gc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ge(13))})}function hc(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s,a;try{xA(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,f={},v=0;v<i.length;v++){var y=i[v],g=n[y],m=u[y],h=g(m,c);if(typeof h>"u"){var x=c&&c.type;throw new Error(Ge(14))}f[y]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?f:u}}function Ui(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function Yx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Ge(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Ui.apply(void 0,a)(o.dispatch),mc(mc({},o),{},{dispatch:i})}}}function Qx(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var Zx=Qx();Zx.withExtraArgument=Qx;var yg=Zx;var rw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wA=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},zi=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},EA=Object.defineProperty,CA=Object.defineProperties,bA=Object.getOwnPropertyDescriptors,Jx=Object.getOwnPropertySymbols,TA=Object.prototype.hasOwnProperty,kA=Object.prototype.propertyIsEnumerable,ew=function(e,t,n){return t in e?EA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},zr=function(e,t){for(var n in t||(t={}))TA.call(t,n)&&ew(e,n,t[n]);if(Jx)for(var r=0,o=Jx(t);r<o.length;r++){var n=o[r];kA.call(t,n)&&ew(e,n,t[n])}return e},vg=function(e,t){return CA(e,bA(t))},PA=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})};var RA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ui:Ui.apply(null,arguments)},Y_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function AA(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var LA=function(e){rw(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,zi([void 0],n[0].concat(this)))):new(t.bind.apply(t,zi([void 0],n.concat(this))))},t}(Array),IA=function(e){rw(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,zi([void 0],n[0].concat(this)))):new(t.bind.apply(t,zi([void 0],n.concat(this))))},t}(Array);function wg(e){return Zt(e)?pc(e,function(){}):e}function OA(e){return typeof e=="boolean"}function NA(){return function(t){return MA(t)}}function MA(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,r=e.immutableCheck,o=r===void 0?!0:r,i=e.serializableCheck,s=i===void 0?!0:i,a=new LA;if(n&&(OA(n)?a.push(yg):a.push(yg.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Sg=!0;function ow(e){var t=NA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,f;if(typeof o=="function")f=o;else if(AA(o))f=hc(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(t),!Sg&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sg&&v.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Yx.apply(void 0,v),g=Ui;l&&(g=RA(zr({trace:!Sg},typeof l=="object"&&l)));var m=new IA(y),h=m;Array.isArray(d)?h=zi([y],d):typeof d=="function"&&(h=d(m));var x=g.apply(void 0,h);return hg(f,c,x)}function xe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return zr(zr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function iw(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function _A(e){return typeof e=="function"}function DA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?iw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(_A(e))l=function(){return wg(e())};else{var u=wg(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var f=zi([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return f.filter(function(v){return!!v}).length===0&&(f=[a]),f.reduce(function(v,y){if(y)if(zn(v)){var g=v,m=y(g,d);return m===void 0?v:m}else{if(Zt(v))return pc(v,function(h){return y(h,d)});var m=y(v,d);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return v},p)}return c.getInitialState=l,c}function FA(e,t){return e+"/"+t}function G(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:wg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=FA(t,c),f,v;"reducer"in p?(f=p.reducer,v=p.prepare):f=p,i[c]=f,s[d]=f,a[c]=v?xe(d,v):xe(d)});function l(){var c=typeof e.extraReducers=="function"?iw(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,f=c[1],v=f===void 0?[]:f,y=c[2],g=y===void 0?void 0:y,m=zr(zr({},d),s);return DA(n,function(h){for(var x in m)h.addCase(x,m[x]);for(var w=0,T=v;w<T.length;w++){var b=T[w];h.addMatcher(b.matcher,b.reducer)}g&&h.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var HA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=HA[Math.random()*64|0];return t},zA=["name","message","stack","code"],xg=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),tw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),BA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=zA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},B=function(){function e(t,n,r){var o=xe(t+"/fulfilled",function(c,p,d,f){return{payload:c,meta:vg(zr({},f||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=xe(t+"/pending",function(c,p,d){return{payload:void 0,meta:vg(zr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=xe(t+"/rejected",function(c,p,d,f,v){return{payload:f,error:(r&&r.serializeError||BA)(c||"Rejected"),meta:vg(zr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,f){var v=r!=null&&r.idGenerator?r.idGenerator(c):UA(),y=new l,g,m=!1;function h(w){g=w,y.abort()}var x=function(){return PA(this,null,function(){var w,T,b,k,I,O,N;return wA(this,function(K){switch(K.label){case 0:return K.trys.push([0,4,,5]),k=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:d,extra:f}),VA(k)?[4,k]:[3,2];case 1:k=K.sent(),K.label=2;case 2:if(k===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(X,ne){return y.signal.addEventListener("abort",function(){return ne({name:"AbortError",message:g||"Aborted"})})}),p(i(v,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:v,arg:c},{getState:d,extra:f}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:p,getState:d,extra:f,requestId:v,signal:y.signal,abort:h,rejectWithValue:function(X,ne){return new xg(X,ne)},fulfillWithValue:function(X,ne){return new tw(X,ne)}})).then(function(X){if(X instanceof xg)throw X;return X instanceof tw?o(X.payload,v,c,X.meta):o(X,v,c)})])];case 3:return b=K.sent(),[3,5];case 4:return O=K.sent(),b=O instanceof xg?s(null,v,c,O.payload,O.meta):s(O,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(b)&&b.meta.condition,N||p(b),[2,b]}})})}();return Object.assign(x,{abort:h,requestId:v,arg:c,unwrap:function(){return x.then(jA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function jA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function VA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var KA="task",sw="listener",aw="completed",Eg="cancelled",eD="task-"+Eg,tD="task-"+aw,nD=sw+"-"+Eg,rD=sw+"-"+aw,oD=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=KA+" "+Eg+" (reason: "+t+")"}return e}();var Cg="listenerMiddleware";var iD=xe(Cg+"/add"),sD=xe(Cg+"/removeAll"),aD=xe(Cg+"/remove");var nw,lD=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(nw||(nw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},WA=function(e){return function(t){setTimeout(t,e)}},uD=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:WA(10);Wx();var Xw=S(Tg()),Yw=S(mw());var kg=S(uc());function uL(e){e()}var gw=uL,hw=e=>gw=e,yw=()=>gw;var ji=S(_());var xw=S(_());var vc=S(_()),vw=Symbol.for(`react-redux-context-${vc.version}`),Sw=globalThis;function cL(){let e=Sw[vw];return e||(e=(0,vc.createContext)(null),Sw[vw]=e),e}var Xe=new Proxy({},new Proxy({},{get(e,t){let n=cL();return(r,...o)=>Reflect[t](n,...o)}}));function Ta(e=Xe){return function(){return(0,xw.useContext)(e)}}var Sc=Ta();var xc=()=>{throw new Error("uSES not initialized!")};var ww=xc,Ew=e=>{ww=e},dL=(e,t)=>e===t;function Cw(e=Xe){let t=e===Xe?Sc:Ta(e);return function(r,o={}){let{equalityFn:i=dL,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),f=(0,ji.useRef)(!0),v=(0,ji.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=ww(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ji.useDebugValue)(y),y}}var L=Cw();function Bn(){return Bn=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},Bn.apply(this,arguments)}function ka(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Dg=S(Mw()),ae=S(_()),Ww=S(Hw());var PL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function RL(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function f(h,x){return l=h,u=x,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let h=e(l,u),x=!s(h,c);return c=h,x&&(d=n(c,p,u)),d}function m(h,x){let w=!i(x,u),T=!o(h,l,x,u);return l=h,u=x,w&&T?v():w?y():T?g():d}return function(x,w){return a?m(x,w):f(x,w)}}function Mg(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=ka(t,PL),s=n(e,i),a=r(e,i),l=o(e,i);return RL(s,a,l,e,i)}function _g(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Pa(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Uw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Bc(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=Uw(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Uw(u),u=i(a,l)),u},i}}function Vi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function zw(e){return e&&typeof e=="object"?Pa(t=>_g(e,t)):e?typeof e=="function"?Bc(e,"mapDispatchToProps"):Vi(e,"mapDispatchToProps"):Pa(t=>({dispatch:t}))}function Bw(e){return e?typeof e=="function"?Bc(e,"mapStateToProps"):Vi(e,"mapStateToProps"):Pa(()=>({}))}function AL(e,t,n){return Bn({},n,e,t)}function LL(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function jw(e){return e?typeof e=="function"?LL(e):Vi(e,"mergeProps"):()=>AL}function IL(){let e=yw(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Vw={notify(){},get:()=>[]};function jc(e,t){let n,r=Vw;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=IL())}function u(){n&&(n(),n=void 0,r.clear(),r=Vw)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Vc=S(_()),OL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ki=OL?Vc.useLayoutEffect:Vc.useEffect;function Kw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Wi(e,t){if(Kw(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Kw(e[n[o]],t[n[o]]))return!1;return!0}var NL=["reactReduxForwardedRef"],$w=xc,qw=e=>{$w=e};var ML=[null,null];function _L(e,t,n){Ki(()=>e(...t),n)}function DL(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function FL(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,f=()=>{if(p||!a.current)return;let y=t.getState(),g,m;try{g=r(y,o.current)}catch(h){m=h,d=h}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function HL(e,t){return e===t}function UL(e,t,n,{pure:r,areStatesEqual:o=HL,areOwnPropsEqual:i=Wi,areStatePropsEqual:s=Wi,areMergedPropsEqual:a=Wi,forwardRef:l=!1,context:u=Xe}={}){let c=u,p=Bw(e),d=zw(t),f=jw(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",h=`Connect(${m})`,x={shouldHandleStateChanges:v,displayName:h,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[I,O,N]=(0,ae.useMemo)(()=>{let{reactReduxForwardedRef:it}=k,At=ka(k,NL);return[k.context,it,At]},[k]),K=(0,ae.useMemo)(()=>I&&I.Consumer&&(0,Ww.isContextConsumer)(ae.default.createElement(I.Consumer,null))?I:c,[I,c]),X=(0,ae.useContext)(K),ne=!!k.store&&!!k.store.getState&&!!k.store.dispatch,ur=!!X&&!!X.store,Pt=ne?k.store:X.store,cr=ur?X.getServerState:Pt.getState,Rt=(0,ae.useMemo)(()=>Mg(Pt.dispatch,x),[Pt]),[H,Y]=(0,ae.useMemo)(()=>{if(!v)return ML;let it=jc(Pt,ne?void 0:X.subscription),At=it.notifyNestedSubs.bind(it);return[it,At]},[Pt,ne,X]),dr=(0,ae.useMemo)(()=>ne?X:Bn({},X,{subscription:H}),[ne,X,H]),he=(0,ae.useRef)(),fr=(0,ae.useRef)(N),q=(0,ae.useRef)(),pr=(0,ae.useRef)(!1),Al=(0,ae.useRef)(!1),Yo=(0,ae.useRef)(!1),ro=(0,ae.useRef)();Ki(()=>(Yo.current=!0,()=>{Yo.current=!1}),[]);let ys=(0,ae.useMemo)(()=>()=>q.current&&N===fr.current?q.current:Rt(Pt.getState(),N),[Pt,N]),Ll=(0,ae.useMemo)(()=>At=>H?FL(v,Pt,H,Rt,fr,he,pr,Yo,q,Y,At):()=>{},[H]);_L(DL,[fr,he,pr,N,q,Y]);let qt;try{qt=$w(Ll,ys,cr?()=>Rt(cr(),N):ys)}catch(it){throw ro.current&&(it.message+=`
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}De!==5&&(De=2),l=Vm(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=xx(d,i,t);I0(d,T);break e;case 1:i=l;var b=d.type,k=d.stateNode;if(!(d.flags&64)&&(typeof b.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=wx(d,i,t);I0(d,I);break e}}d=d.return}while(d!==null)}Ax(n)}catch(O){t=O,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(1)}function Px(){var e=$u.current;return $u.current=Wu,e===null?Wu:e}function Ws(e,t){var n=j;j|=16;var r=Px();Qe===e&&$e===t||Ti(e,t);do try{GR();break}catch(o){kx(e,o)}while(1);if(Mm(),j=n,$u.current=r,Pe!==null)throw Error(R(261));return Qe=null,$e=0,De}function GR(){for(;Pe!==null;)Rx(Pe)}function XR(){for(;Pe!==null&&!LR();)Rx(Pe)}function Rx(e){var t=Ix(e.alternate,e,Eo);e.memoizedProps=e.pendingProps,t===null?Ax(e):Pe=t,Km.current=null}function Ax(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=zR(t),n!==null){n.flags&=2047,Pe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=UR(n,t,Eo),n!==null){Pe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Eo&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);De===0&&(De=5)}function po(e){var t=Ai();return wo(99,YR.bind(null,e,t)),null}function YR(e,t){do Fr();while(ta!==null);if(j&48)throw Error(R(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-Or(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(Hn!==null&&!(r&24)&&Hn.has(e)&&Hn.delete(e),e===Qe&&(Pe=Qe=null,$e=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=j,j|=32,Km.current=null,up=yu,s=v0(),Dp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,m=0,v=0,y=s,g=null;t:for(;;){for(var f;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(f=y.firstChild)!==null;)g=y,y=f;for(;;){if(y===s)break t;if(g===a&&++m===i&&(p=c),g===l&&++v===u&&(d=c),(f=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=f}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;cp={focusedElem:s,selectionRange:a},yu=!1,ra=null,bu=!1,N=r;do try{QR()}catch(O){if(N===null)throw Error(R(330));Lr(N,O),N=N.nextEffect}while(N!==null);ra=null,N=r;do try{for(s=e;N!==null;){var h=N.flags;if(h&16&&ia(N.stateNode,""),h&128){var S=N.alternate;if(S!==null){var w=S.ref;w!==null&&(typeof w=="function"?w(null):w.current=null)}}switch(h&1038){case 2:nS(N),N.flags&=-3;break;case 6:nS(N),N.flags&=-3,yp(N.alternate,N);break;case 1024:N.flags&=-1025;break;case 1028:N.flags&=-1025,yp(N.alternate,N);break;case 4:yp(N.alternate,N);break;case 8:a=N,Ex(s,a);var T=a.alternate;eS(a),T!==null&&eS(T)}N=N.nextEffect}}catch(O){if(N===null)throw Error(R(330));Lr(N,O),N=N.nextEffect}while(N!==null);if(w=cp,S=v0(),h=w.focusedElem,s=w.selectionRange,S!==h&&h&&h.ownerDocument&&zS(h.ownerDocument.documentElement,h)){for(s!==null&&Dp(h)&&(S=s.start,w=s.end,w===void 0&&(w=S),"selectionStart"in h?(h.selectionStart=S,h.selectionEnd=Math.min(w,h.value.length)):(w=(S=h.ownerDocument||document)&&S.defaultView||window,w.getSelection&&(w=w.getSelection(),a=h.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!w.extend&&T>s&&(a=s,s=T,T=a),a=y0(h,T),i=y0(h,s),a&&i&&(w.rangeCount!==1||w.anchorNode!==a.node||w.anchorOffset!==a.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),w.removeAllRanges(),T>s?(w.addRange(S),w.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),w.addRange(S)))))),S=[],w=h;w=w.parentNode;)w.nodeType===1&&S.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<S.length;h++)w=S[h],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}yu=!!up,cp=up=null,e.current=n,N=r;do try{for(h=e;N!==null;){var b=N.flags;if(b&36&&KR(h,N.alternate,N),b&128){S=void 0;var k=N.ref;if(k!==null){var I=N.stateNode;switch(N.tag){case 5:S=I;break;default:S=I}typeof k=="function"?k(S):k.current=S}}N=N.nextEffect}}catch(O){if(N===null)throw Error(R(330));Lr(N,O),N=N.nextEffect}while(N!==null);N=null,OR(),j=o}else e.current=n;if(Nr)Nr=!1,ta=e,Ks=t;else for(N=r;N!==null;)t=N.nextEffect,N.nextEffect=null,N.flags&8&&(b=N,b.sibling=null,b.stateNode=null),N=t;if(r=e.pendingLanes,r===0&&(yn=null),r===1?e===im?na++:(na=0,im=e):na=0,n=n.stateNode,So&&typeof So.onCommitFiberRoot=="function")try{So.onCommitFiberRoot(Im,n,void 0,(n.current.flags&64)===64)}catch{}if(Ft(e,We()),qu)throw qu=!1,e=nm,nm=null,e;return j&8||xn(),null}function QR(){for(;N!==null;){var e=N.alternate;bu||ra===null||(N.flags&8?o0(N,ra)&&(bu=!0):N.tag===13&&WR(e,N)&&o0(N,ra)&&(bu=!0));var t=N.flags;t&256&&VR(e,N),!(t&512)||Nr||(Nr=!0,pa(97,function(){return Fr(),null})),N=N.nextEffect}}function Fr(){if(Ks!==90){var e=97<Ks?97:Ks;return Ks=90,wo(e,JR)}return!1}function ZR(e,t){rm.push(t,e),Nr||(Nr=!0,pa(97,function(){return Fr(),null}))}function Lx(e,t){om.push(t,e),Nr||(Nr=!0,pa(97,function(){return Fr(),null}))}function JR(){if(ta===null)return!1;var e=ta;if(ta=null,j&48)throw Error(R(331));var t=j;j|=32;var n=om;om=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(l){if(i===null)throw Error(R(330));Lr(i,l)}}for(n=rm,rm=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(R(330));Lr(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return j=t,xn(),!0}function oS(e,t,n){t=Vm(n,t),t=xx(e,t,1),Pr(e,t),t=ht(),e=ac(e,1),e!==null&&(Ju(e,1,t),Ft(e,t))}function Lr(e,t){if(e.tag===3)oS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){oS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Vm(t,e);var o=wx(n,e,1);if(Pr(n,o),o=ht(),n=ac(n,1),n!==null)Ju(n,1,o),Ft(n,o);else if(typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function eA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&n,Qe===e&&($e&n)===n&&(De===4||De===3&&($e&62914560)===$e&&500>We()-$m?Ti(e,0):Wm|=n),Ft(e,t)}function tA(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(_n===0&&(_n=Mi),t=ci(62914560&~_n),t===0&&(t=4194304)):t=Ai()===99?1:2:t=1),n=ht(),e=ac(e,t),e!==null&&(Ju(e,t,n),Ft(e,n))}var Ix;Ix=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Qt=!0;else if(n&r)Qt=!!(e.flags&16384);else{switch(Qt=!1,t.tag){case 3:K0(t),mp();break;case 5:_0(t);break;case 1:mt(t.type)&&xu(t);break;case 4:Kp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ee(_u,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?W0(e,t,n):(Ee(we,we.current&1),t=Fn(e,t,n),t!==null?t.sibling:null);Ee(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Y0(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ee(we,we.current),r)break;return null;case 23:case 24:return t.lanes=0,gp(e,t,n)}return Fn(e,t,n)}else Qt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Ri(t,qe.current),Ei(t,n),o=Um(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(r)){var i=!0;xu(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,_m(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Hu(t,r,s,e),o.updater=ic,t.stateNode=o,o._reactInternals=t,Vp(t,r,e,n),t=Gp(null,t,r,!0,i,n)}else t.tag=0,ft(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=rA(o),e=Yt(o,e),i){case 0:t=qp(null,t,o,e,n);break e;case 1:t=V0(null,t,o,e,n);break e;case 11:t=B0(null,t,o,e,n);break e;case 14:t=j0(null,t,o,Yt(o.type,e),r,n);break e}throw Error(R(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),qp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),V0(e,t,r,o,n);case 3:if(K0(t),r=t.updateQueue,e===null||r===null)throw Error(R(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,nx(e,t),ma(t,r,null,n),r=t.memoizedState.element,r===o)mp(),t=Fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Er=wi(t.stateNode.containerInfo.firstChild),Dn=t,i=Sn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ci.push(i);for(n=sx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ft(e,t,r,n),mp();t=t.child}return t;case 5:return _0(t),e===null&&Wp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Up(r,o)?s=null:i!==null&&Up(r,i)&&(t.flags|=16),hx(e,t),ft(e,t,s,n),t.child;case 6:return e===null&&Wp(t),null;case 13:return W0(e,t,n);case 4:return Kp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Uu(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),B0(e,t,r,o,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(Ee(_u,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Mt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!pt.current){t=Fn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=kr(-1,n&-n),u.tag=2,Pr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),tx(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ei(t,n),o=Dt(o,i.unstable_observedBits),r=r(o),t.flags|=1,ft(e,t,r,n),t.child;case 14:return o=t.type,i=Yt(o,t.pendingProps),i=Yt(o.type,i),j0(e,t,o,i,r,n);case 15:return gx(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mt(r)?(e=!0,xu(t)):e=!1,Ei(t,n),ox(t,r,o),Vp(t,r,o,n),Gp(null,t,r,!0,e,n);case 19:return Y0(e,t,n);case 23:return gp(e,t,n);case 24:return gp(e,t,n)}throw Error(R(156,t.tag))};function nA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,n,r){return new nA(e,t,n,r)}function Gm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rA(e){if(typeof e=="function")return Gm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yu)return 11;if(e===Qu)return 14}return 2}function _r(e,t){var n=e.alternate;return n===null?(n=Nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Gm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Sr:return ki(n.children,o,i,t);case aS:s=8,o|=16;break;case cm:s=8,o|=1;break;case $s:return e=Nt(12,n,t,o|8),e.elementType=$s,e.type=$s,e.lanes=i,e;case qs:return e=Nt(13,n,t,o),e.type=qs,e.elementType=qs,e.lanes=i,e;case ku:return e=Nt(19,n,t,o),e.elementType=ku,e.lanes=i,e;case hm:return Xm(n,o,i,t);case wp:return e=Nt(24,n,t,o),e.elementType=wp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dm:s=10;break e;case fm:s=9;break e;case Yu:s=11;break e;case Qu:s=14;break e;case pm:s=16,r=null;break e;case mm:s=22;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Nt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ki(e,t,n,r){return e=Nt(7,e,r,t),e.lanes=n,e}function Xm(e,t,n,r){return e=Nt(23,e,r,t),e.elementType=hm,e.lanes=n,e}function vp(e,t,n){return e=Nt(6,e,null,t),e.lanes=n,e}function Sp(e,t,n){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oA(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=rp(0),this.expirationTimes=rp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rp(0),this.mutableSourceEagerHydrationData=null}function iA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t,n,r){var o=t.current,i=ht(),s=Rr(o);e:if(n){n=n._reactInternals;t:{if(To(n)!==n||n.tag!==1)throw Error(R(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(R(171))}if(n.tag===1){var l=n.type;if(mt(l)){n=GS(n,l,a);break e}}n=a}else n=Mr;return t.context===null?t.context=n:t.pendingContext=n,t=kr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Pr(o,t),Ar(o,s,i),s}function xp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function iS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ym(e,t){iS(e,t),(e=e.alternate)&&iS(e,t)}function sA(){return null}function Qm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new oA(e,t,n!=null&&n.hydrate===!0),t=Nt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,_m(t),e[Oi]=n.current,VS(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}Qm.prototype.render=function(e){Gu(e,this._internalRoot,null,null)};Qm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Gu(null,e,null,function(){t[Oi]=null})};function Ea(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function aA(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Qm(e,0,t?{hydrate:!0}:void 0)}function lc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=xp(s);a.call(u)}}Gu(t,s,e,o)}else{if(i=n._reactRootContainer=aA(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=xp(s);l.call(u)}}Tx(function(){Gu(t,s,e,o)})}return xp(s)}ES=function(e){if(e.tag===13){var t=ht();Ar(e,4,t),Ym(e,4)}};wm=function(e){if(e.tag===13){var t=ht();Ar(e,67108864,t),Ym(e,67108864)}};CS=function(e){if(e.tag===13){var t=ht(),n=Rr(e);Ar(e,n,t),Ym(e,n)}};bS=function(e,t){return t()};Ip=function(e,t,n){switch(t){case"input":if(Cp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=rc(r);if(!o)throw Error(R(90));uS(r),Cp(r,o)}}}break;case"textarea":dS(e,n);break;case"select":t=n.value,t!=null&&vi(e,!!n.multiple,t,!1)}};vm=bx;vS=function(e,t,n,r,o){var i=j;j|=4;try{return wo(98,e.bind(null,t,n,r,o))}finally{j=i,j===0&&(_i(),xn())}};Sm=function(){!(j&49)&&(qR(),Fr())};SS=function(e,t){var n=j;j|=2;try{return e(t)}finally{j=n,j===0&&(_i(),xn())}};function Ox(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ea(t))throw Error(R(200));return iA(e,t,null,n)}var lA={Events:[Sa,mi,rc,hS,yS,Fr,{current:!1}]},Us={findFiberByHostInstance:ho,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},uA={bundleType:Us.bundleType,version:Us.version,rendererPackageName:Us.rendererPackageName,rendererConfig:Us.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wS(e),e===null?null:e.stateNode},findFiberByHostInstance:Us.findFiberByHostInstance||sA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(zs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!zs.isDisabled&&zs.supportsFiber))try{Im=zs.inject(uA),So=zs}catch{}var zs;Ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lA;Ht.createPortal=Ox;Ht.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):Error(R(268,Object.keys(e)));return e=wS(t),e=e===null?null:e.stateNode,e};Ht.flushSync=function(e,t){var n=j;if(n&48)return e(t);j|=1;try{if(e)return wo(99,e.bind(null,t))}finally{j=n,xn()}};Ht.hydrate=function(e,t,n){if(!Ea(t))throw Error(R(200));return lc(null,e,t,!0,n)};Ht.render=function(e,t,n){if(!Ea(t))throw Error(R(200));return lc(null,e,t,!1,n)};Ht.unmountComponentAtNode=function(e){if(!Ea(e))throw Error(R(40));return e._reactRootContainer?(Tx(function(){lc(null,null,e,!1,function(){e._reactRootContainer=null,e[Oi]=null})}),!0):!1};Ht.unstable_batchedUpdates=bx;Ht.unstable_createPortal=function(e,t){return Ox(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ht.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ea(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return lc(e,t,n,!1,r)};Ht.version="17.0.2"});var uc=Ce((R_,_x)=>{"use strict";function Nx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nx)}catch(e){console.error(e)}}Nx(),_x.exports=Mx()});var uw=Ce(lw=>{"use strict";var Bi=_();function qA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GA=typeof Object.is=="function"?Object.is:qA,XA=Bi.useState,YA=Bi.useEffect,QA=Bi.useLayoutEffect,ZA=Bi.useDebugValue;function JA(e,t){var n=t(),r=XA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return QA(function(){o.value=n,o.getSnapshot=t,bg(o)&&i({inst:o})},[e,n,t]),YA(function(){return bg(o)&&i({inst:o}),e(function(){bg(o)&&i({inst:o})})},[e]),ZA(n),n}function bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!GA(e,n)}catch{return!0}}function eL(e,t){return t()}var tL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eL:JA;lw.useSyncExternalStore=Bi.useSyncExternalStore!==void 0?Bi.useSyncExternalStore:tL});var Tg=Ce((gD,cw)=>{"use strict";cw.exports=uw()});var fw=Ce(dw=>{"use strict";var yc=_(),nL=Tg();function rL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oL=typeof Object.is=="function"?Object.is:rL,iL=nL.useSyncExternalStore,sL=yc.useRef,aL=yc.useEffect,lL=yc.useMemo,uL=yc.useDebugValue;dw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=sL(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=lL(function(){function l(m){if(!u){if(u=!0,c=m,m=r(m),o!==void 0&&s.hasValue){var v=s.value;if(o(v,m))return p=v}return p=m}if(v=p,oL(c,m))return v;var y=r(m);return o!==void 0&&o(v,y)?v:(c=m,p=y)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=iL(e,i[0],i[1]);return aL(function(){s.hasValue=!0,s.value=a},[a]),uL(a),a}});var mw=Ce((yD,pw)=>{"use strict";pw.exports=fw()});var Tw=Ce(ie=>{"use strict";var Ne=typeof Symbol=="function"&&Symbol.for,Pg=Ne?Symbol.for("react.element"):60103,Rg=Ne?Symbol.for("react.portal"):60106,wc=Ne?Symbol.for("react.fragment"):60107,Ec=Ne?Symbol.for("react.strict_mode"):60108,Cc=Ne?Symbol.for("react.profiler"):60114,bc=Ne?Symbol.for("react.provider"):60109,Tc=Ne?Symbol.for("react.context"):60110,Ag=Ne?Symbol.for("react.async_mode"):60111,kc=Ne?Symbol.for("react.concurrent_mode"):60111,Pc=Ne?Symbol.for("react.forward_ref"):60112,Rc=Ne?Symbol.for("react.suspense"):60113,pL=Ne?Symbol.for("react.suspense_list"):60120,Ac=Ne?Symbol.for("react.memo"):60115,Lc=Ne?Symbol.for("react.lazy"):60116,mL=Ne?Symbol.for("react.block"):60121,gL=Ne?Symbol.for("react.fundamental"):60117,hL=Ne?Symbol.for("react.responder"):60118,yL=Ne?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Pg:switch(e=e.type,e){case Ag:case kc:case wc:case Cc:case Ec:case Rc:return e;default:switch(e=e&&e.$$typeof,e){case Tc:case Pc:case Lc:case Ac:case bc:return e;default:return t}}case Rg:return t}}}function bw(e){return St(e)===kc}ie.AsyncMode=Ag;ie.ConcurrentMode=kc;ie.ContextConsumer=Tc;ie.ContextProvider=bc;ie.Element=Pg;ie.ForwardRef=Pc;ie.Fragment=wc;ie.Lazy=Lc;ie.Memo=Ac;ie.Portal=Rg;ie.Profiler=Cc;ie.StrictMode=Ec;ie.Suspense=Rc;ie.isAsyncMode=function(e){return bw(e)||St(e)===Ag};ie.isConcurrentMode=bw;ie.isContextConsumer=function(e){return St(e)===Tc};ie.isContextProvider=function(e){return St(e)===bc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pg};ie.isForwardRef=function(e){return St(e)===Pc};ie.isFragment=function(e){return St(e)===wc};ie.isLazy=function(e){return St(e)===Lc};ie.isMemo=function(e){return St(e)===Ac};ie.isPortal=function(e){return St(e)===Rg};ie.isProfiler=function(e){return St(e)===Cc};ie.isStrictMode=function(e){return St(e)===Ec};ie.isSuspense=function(e){return St(e)===Rc};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wc||e===kc||e===Cc||e===Ec||e===Rc||e===pL||typeof e=="object"&&e!==null&&(e.$$typeof===Lc||e.$$typeof===Ac||e.$$typeof===bc||e.$$typeof===Tc||e.$$typeof===Pc||e.$$typeof===gL||e.$$typeof===hL||e.$$typeof===yL||e.$$typeof===mL)};ie.typeOf=St});var Pw=Ce((ID,kw)=>{"use strict";kw.exports=Tw()});var Nw=Ce((OD,Mw)=>{"use strict";var Lg=Pw(),vL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},SL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ig={};Ig[Lg.ForwardRef]=xL;Ig[Lg.Memo]=Iw;function Rw(e){return Lg.isMemo(e)?Iw:Ig[e.$$typeof]||vL}var wL=Object.defineProperty,EL=Object.getOwnPropertyNames,Aw=Object.getOwnPropertySymbols,CL=Object.getOwnPropertyDescriptor,bL=Object.getPrototypeOf,Lw=Object.prototype;function Ow(e,t,n){if(typeof t!="string"){if(Lw){var r=bL(t);r&&r!==Lw&&Ow(e,r,n)}var o=EL(t);Aw&&(o=o.concat(Aw(t)));for(var i=Rw(e),s=Rw(t),a=0;a<o.length;++a){var l=o[a];if(!SL[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=CL(t,l);try{wL(e,l,u)}catch{}}}}return e}Mw.exports=Ow});var Dw=Ce(se=>{"use strict";var Og=Symbol.for("react.element"),Mg=Symbol.for("react.portal"),Ic=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),Mc=Symbol.for("react.profiler"),Nc=Symbol.for("react.provider"),_c=Symbol.for("react.context"),TL=Symbol.for("react.server_context"),Dc=Symbol.for("react.forward_ref"),Fc=Symbol.for("react.suspense"),Hc=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),zc=Symbol.for("react.lazy"),kL=Symbol.for("react.offscreen"),_w;_w=Symbol.for("react.module.reference");function zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Og:switch(e=e.type,e){case Ic:case Mc:case Oc:case Fc:case Hc:return e;default:switch(e=e&&e.$$typeof,e){case TL:case _c:case Dc:case zc:case Uc:case Nc:return e;default:return t}}case Mg:return t}}}se.ContextConsumer=_c;se.ContextProvider=Nc;se.Element=Og;se.ForwardRef=Dc;se.Fragment=Ic;se.Lazy=zc;se.Memo=Uc;se.Portal=Mg;se.Profiler=Mc;se.StrictMode=Oc;se.Suspense=Fc;se.SuspenseList=Hc;se.isAsyncMode=function(){return!1};se.isConcurrentMode=function(){return!1};se.isContextConsumer=function(e){return zt(e)===_c};se.isContextProvider=function(e){return zt(e)===Nc};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Og};se.isForwardRef=function(e){return zt(e)===Dc};se.isFragment=function(e){return zt(e)===Ic};se.isLazy=function(e){return zt(e)===zc};se.isMemo=function(e){return zt(e)===Uc};se.isPortal=function(e){return zt(e)===Mg};se.isProfiler=function(e){return zt(e)===Mc};se.isStrictMode=function(e){return zt(e)===Oc};se.isSuspense=function(e){return zt(e)===Fc};se.isSuspenseList=function(e){return zt(e)===Hc};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ic||e===Mc||e===Oc||e===Fc||e===Hc||e===kL||typeof e=="object"&&e!==null&&(e.$$typeof===zc||e.$$typeof===Uc||e.$$typeof===Nc||e.$$typeof===_c||e.$$typeof===Dc||e.$$typeof===_w||e.getModuleId!==void 0)};se.typeOf=zt});var Hw=Ce((ND,Fw)=>{"use strict";Fw.exports=Dw()});var uh=Ce((a6,dE)=>{"use strict";var RI="Expected a function",uE=NaN,AI="[object Symbol]",LI=/^\s+|\s+$/g,II=/^[-+]0x[0-9a-f]+$/i,OI=/^0b[01]+$/i,MI=/^0o[0-7]+$/i,NI=parseInt,_I=typeof global=="object"&&global&&global.Object===Object&&global,DI=typeof self=="object"&&self&&self.Object===Object&&self,FI=_I||DI||Function("return this")(),HI=Object.prototype,UI=HI.toString,zI=Math.max,BI=Math.min,ah=function(){return FI.Date.now()};function jI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(RI);t=cE(t)||0,lh(n)&&(c=!!n.leading,p="maxWait"in n,i=p?zI(cE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function m(b){var k=r,I=o;return r=o=void 0,u=b,s=e.apply(I,k),s}function v(b){return u=b,a=setTimeout(f,t),c?m(b):s}function y(b){var k=b-l,I=b-u,O=t-k;return p?BI(O,i-I):O}function g(b){var k=b-l,I=b-u;return l===void 0||k>=t||k<0||p&&I>=i}function f(){var b=ah();if(g(b))return h(b);a=setTimeout(f,y(b))}function h(b){return a=void 0,d&&r?m(b):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function w(){return a===void 0?s:h(ah())}function T(){var b=ah(),k=g(b);if(r=arguments,o=this,l=b,k){if(a===void 0)return v(l);if(p)return a=setTimeout(f,t),m(l)}return a===void 0&&(a=setTimeout(f,t)),s}return T.cancel=S,T.flush=w,T}function lh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function VI(e){return!!e&&typeof e=="object"}function KI(e){return typeof e=="symbol"||VI(e)&&UI.call(e)==AI}function cE(e){if(typeof e=="number")return e;if(KI(e))return uE;if(lh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(LI,"");var n=OI.test(e);return n||MI.test(e)?NI(e.slice(2),n?2:8):II.test(e)?uE:+e}dE.exports=jI});var xE=Ce((A6,SE)=>{"use strict";var YI=/["'&<>]/;SE.exports=QI;function QI(e){var t=""+e,n=YI.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var JN={};je(JN,{Card:()=>pe,ContentEditableInput:()=>qo,DeepdeskAPI:()=>ur,DeepdeskSDK:()=>Rl,HTTPClient:()=>fn,InputMediator:()=>lr,InputType:()=>co,KeyboardHint:()=>Wl,Label:()=>$l,Locale:()=>La,Section:()=>pn,SectionList:()=>ql,Sources:()=>Mn,Suggestion:()=>ee,SuggestionList:()=>ct,TextAreaInput:()=>Go,ToggleButton:()=>uo,attachFile:()=>Ek,authenticateWithKey:()=>xk,createFullRange:()=>ms,createOverlayContainer:()=>Pl,createRangeFromOffsets:()=>ro,escapeHTML:()=>Zi,fetchPlatformConfig:()=>wk,formatTextMarkup:()=>Sk,getRangeOffsets:()=>Cl,getRangeText:()=>bl,insertCKEditor:()=>vk,isHTML:()=>Ad,isSupportedInputElement:()=>Ef,updateContentEditable:()=>hk,updateTextArea:()=>gk,useClickOutsideRoot:()=>Yr,useStyles:()=>P,waitForElementVisibilityChange:()=>Tf});var zf=x(te()),It=x(_());var Bl=x(_()),hv=x(te()),Cs=Bl.default.createContext({});function P(e,t){let{debug:n,...r}=(0,Bl.useContext)(Cs),o=r[e];return Object.entries(t).reduce((i,[s,a])=>{let l=o==null?void 0:o[s];return{...i,[s]:(0,hv.default)(a,l,n?`${e}__${s}`:!1)}},{})}var yv={root:"dd-4s9wq"};var ao=x(C()),jl=()=>(0,ao.jsxs)("svg",{className:yv.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,ao.jsx)("defs",{children:(0,ao.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,ao.jsx)("title",{children:"Failed loading image"}),(0,ao.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Uf={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var lo=x(C()),Vl=(0,It.createContext)(Uf),Qk=({title:e,src:t})=>{let n=(0,It.useContext)(Vl),[r,o]=(0,It.useState)(!1);return(0,It.useEffect)(()=>{o(!1)},[t]),(0,lo.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,lo.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,lo.jsx)(jl,{})})},Zk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,It.useContext)(Vl);return(0,lo.jsx)("div",{className:(0,zf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Jk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,It.useContext)(Vl);return It.default.createElement(e,{className:(0,zf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Kl=({children:e})=>{let t=P("Card",Uf);return(0,lo.jsx)("div",{className:t.root,children:(0,lo.jsx)(Vl.Provider,{value:t,children:e})})};Kl.Image=Qk;Kl.Content=Zk;Kl.Title=Jk;var pe=Kl;var Cv=x(te());var Ev={root:"dd-llBx9"};var bv=x(C());var eP={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},tP=({className:e,keyCode:t,...n})=>{let r=P("KeyboardHint",Ev);return(0,bv.jsx)("span",{"data-key":eP[t],className:(0,Cv.default)(e,r.root),...n})},Wl=tP;var kv=x(te());var Tv={root:"dd-e6HXZ"};var Pv=x(C()),nP=({className:e,children:t,...n})=>{let r=P("Label",Tv);return(0,Pv.jsx)("span",{...n,className:(0,kv.default)(e,r.root),children:t})},$l=nP;var Rv={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var ri=x(C()),rP=({title:e,children:t,type:n,...r})=>{let o=P("Section",Rv);return(0,ri.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ri.jsx)("div",{className:o.subTitleContainer,children:(0,ri.jsx)("span",{className:o.subtitle,children:e})}),(0,ri.jsx)("div",{className:o.suggestions,children:t})]})},pn=rP;var Lv=x(te()),Iv=x(_());var Av={root:"dd-uoTXh"};var Ov=x(C()),oP=Iv.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",Av);return(0,Ov.jsx)("div",{ref:n,className:(0,Lv.default)(r.root,e),children:t})}),ql=oP;var oi=x(te()),ut=x(_());var Bf={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",iconButtons:"dd-zEJFg",iconButton:"dd-MXcDi",iconButtonDisabled:"dd-Uk1yr"};var lt=x(C()),gr=(0,ut.createContext)(Bf),iP=({fixed:e,children:t,...n})=>{let r=(0,ut.useContext)(gr);return(0,lt.jsx)("div",{...n,className:(0,oi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})};function sP({as:e,className:t,icon:n,title:r,disabled:o,...i}){let s=(0,ut.useContext)(gr);return(0,lt.jsx)(e||"button",{type:"button",className:(0,oi.default)(s.iconButton,{[s.iconButtonDisabled]:o},t),title:r,"aria-label":r,...i,children:n})}var aP=({children:e})=>{let t=(0,ut.useContext)(gr);return(0,lt.jsx)("div",{className:t.iconButtons,children:e})},lP=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ut.useContext)(gr);return(0,lt.jsxs)("div",{className:(0,oi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,lt.jsx)("ul",{className:i.dropdownList,children:o})]})},uP=({index:e,label:t,onClick:n})=>{let r=(0,ut.useContext)(gr);return(0,lt.jsx)("li",{className:r.dropdownItem,children:(0,lt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},cP=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ut.useContext)(gr);return(0,lt.jsx)("button",{type:"button",className:(0,oi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},dP=({labels:e})=>{let t=(0,ut.useContext)(gr);return(0,lt.jsx)("div",{className:t.labels,children:e.map(n=>(0,lt.jsx)("span",{className:t.label,children:n},n))})},hr=ut.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",Bf),l=(0,ut.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,lt.jsx)(o,{...i,ref:s,className:(0,oi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,lt.jsx)(gr.Provider,{value:a,children:r})})});hr.Labels=dP;hr.Actions=iP;hr.ActionButton=cP;hr.DropdownButton=lP;hr.DropdownItem=uP;hr.IconButtonContainer=aP;hr.IconButton=sP;var ee=hr;var Nv=x(te());var Mv={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var _v=x(C()),fP=({withDivider:e,children:t})=>{let n=P("SuggestionList",Mv);return(0,_v.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Nv.default)(n.root,{[n.isWithDivider]:e}),children:t})},ct=fP;var Fv=x(te());var Dv={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Gl=x(C()),pP=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",Dv);return(0,Gl.jsx)("button",{type:"button",className:(0,Fv.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Gl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Gl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},uo=pP;var Hv=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Xl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Uv=/x-deepdesk-(([a-z0-9\-_])+-version)/,Yl=["cues","custom-data"],Mn=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(Mn||{}),co=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(co||{});var $t=x(uc());var TC=x(_());function Ut(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function zn(e){return!!e&&!!e[ve]}function Zt(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===yA}(e)||Array.isArray(e)||!!e[jx]||!!(!((t=e.constructor)===null||t===void 0)&&t[jx])||sg(e)||ag(e))}function Po(e,t,n){n===void 0&&(n=!1),Hi(e)===0?(n?Object.keys:Fi)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Hi(e){var t=e[ve];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:sg(e)?2:ag(e)?3:0}function Di(e,t){return Hi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cA(e,t){return Hi(e)===2?e.get(t):e[t]}function Vx(e,t,n){var r=Hi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Kx(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function sg(e){return gA&&e instanceof Map}function ag(e){return hA&&e instanceof Set}function Hr(e){return e.o||e.t}function lg(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qx(e);delete t[ve];for(var n=Fi(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function ug(e,t){return t===void 0&&(t=!1),cg(e)||zn(e)||!Zt(e)||(Hi(e)>1&&(e.set=e.add=e.clear=e.delete=dA),Object.freeze(e),t&&Po(e,function(n,r){return ug(r,!0)},!0)),e}function dA(){Ut(2)}function cg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wn(e){var t=ig[e];return t||Ut(18,e),t}function fA(e,t){ig[e]||(ig[e]=t)}function ng(){return ba}function Zm(e,t){t&&(wn("Patches"),e.u=[],e.s=[],e.v=t)}function cc(e){rg(e),e.p.forEach(pA),e.p=null}function rg(e){e===ba&&(ba=e.l)}function Dx(e){return ba={p:[],l:ba,h:e,m:!0,_:0}}function pA(e){var t=e[ve];t.i===0||t.i===1?t.j():t.g=!0}function Jm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||wn("ES5").S(t,e,r),r?(n[ve].P&&(cc(t),Ut(4)),Zt(e)&&(e=dc(t,e),t.l||fc(t,e)),t.u&&wn("Patches").M(n[ve].t,e,t.u,t.s)):e=dc(t,n,[]),cc(t),t.u&&t.v(t.u,t.s),e!==$x?e:void 0}function dc(e,t,n){if(cg(t))return t;var r=t[ve];if(!r)return Po(t,function(a,l){return Fx(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return fc(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=lg(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Po(i,function(a,l){return Fx(e,r,o,a,l,n,s)}),fc(e,o,!1),n&&e.u&&wn("Patches").N(r,n,e.u,e.s)}return r.o}function Fx(e,t,n,r,o,i,s){if(zn(o)){var a=dc(e,o,i&&t&&t.i!==3&&!Di(t.R,r)?i.concat(r):void 0);if(Vx(n,r,a),!zn(a))return;e.m=!1}else s&&n.add(o);if(Zt(o)&&!cg(o)){if(!e.h.D&&e._<1)return;dc(e,o),t&&t.A.l||fc(e,o)}}function fc(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&ug(t,n)}function eg(e,t){var n=e[ve];return(n?Hr(n):e)[t]}function Hx(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ur(e){e.P||(e.P=!0,e.l&&Ur(e.l))}function tg(e){e.o||(e.o=lg(e.t))}function og(e,t,n){var r=sg(t)?wn("MapSet").F(t,n):ag(t)?wn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:ng(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ta;s&&(l=[a],u=Ca);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):wn("ES5").J(t,n);return(n?n.A:ng()).p.push(r),r}function mA(e){return zn(e)||Ut(22,e),function t(n){if(!Zt(n))return n;var r,o=n[ve],i=Hi(n);if(o){if(!o.P&&(o.i<4||!wn("ES5").K(o)))return o.t;o.I=!0,r=Ux(n,i),o.I=!1}else r=Ux(n,i);return Po(r,function(s,a){o&&cA(o.t,s)===a||Vx(r,s,t(a))}),i===3?new Set(r):r}(e)}function Ux(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return lg(e)}function Wx(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[ve];return Ta.get(u,s)},set:function(u){var c=this[ve];Ta.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ve];if(!l.P)switch(l.i){case 5:r(l)&&Ur(l);break;case 4:n(l)&&Ur(l)}}}function n(s){for(var a=s.t,l=s.k,u=Fi(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==ve){var d=a[p];if(d===void 0&&!Di(a,p))return!0;var m=l[p],v=m&&m[ve];if(v?v.t!==d:!Kx(m,d))return!0}}var y=!!a[ve];return u.length!==Fi(a).length+(y?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ut(3,JSON.stringify(Hr(s)))}var i={};fA("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var m=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var y=qx(d);delete y[ve];for(var g=Fi(y),f=0;f<g.length;f++){var h=g[f];y[h]=e(h,p||!!y[h].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:ng(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ve,{value:c,writable:!0}),u},S:function(s,a,l){l?zn(a)&&a[ve].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[ve];if(p){var d=p.t,m=p.k,v=p.R,y=p.i;if(y===4)Po(m,function(w){w!==ve&&(d[w]!==void 0||Di(d,w)?v[w]||u(m[w]):(v[w]=!0,Ur(p)))}),Po(d,function(w){m[w]!==void 0||Di(m,w)||(v[w]=!1,Ur(p))});else if(y===5){if(r(p)&&(Ur(p),v.length=!0),m.length<d.length)for(var g=m.length;g<d.length;g++)v[g]=!1;else for(var f=d.length;f<m.length;f++)v[f]=!0;for(var h=Math.min(m.length,d.length),S=0;S<h;S++)m.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(m[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var zx,ba,dg=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",gA=typeof Map<"u",hA=typeof Set<"u",Bx=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",$x=dg?Symbol.for("immer-nothing"):((zx={})["immer-nothing"]=!0,zx),jx=dg?Symbol.for("immer-draftable"):"__$immer_draftable",ve=dg?Symbol.for("immer-state"):"__$immer_state";var yA=""+Object.prototype.constructor,Fi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,qx=Object.getOwnPropertyDescriptors||function(e){var t={};return Fi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},ig={},Ta={get:function(e,t){if(t===ve)return e;var n=Hr(e);if(!Di(n,t))return function(o,i,s){var a,l=Hx(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Zt(r)?r:r===eg(e.t,t)?(tg(e),e.o[t]=og(e.A.h,r,e)):r},has:function(e,t){return t in Hr(e)},ownKeys:function(e){return Reflect.ownKeys(Hr(e))},set:function(e,t,n){var r=Hx(Hr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=eg(Hr(e),t),i=o==null?void 0:o[ve];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Kx(n,o)&&(n!==void 0||Di(e.t,t)))return!0;tg(e),Ur(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return eg(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,tg(e),Ur(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Hr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ut(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ut(12)}},Ca={};Po(Ta,function(e,t){Ca[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ca.deleteProperty=function(e,t){return Ca.set.call(this,e,t,void 0)},Ca.set=function(e,t,n){return Ta.set.call(this,e[0],t,n,e[0])};var vA=function(){function e(n){var r=this;this.O=Bx,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var g=this;y===void 0&&(y=a);for(var f=arguments.length,h=Array(f>1?f-1:0),S=1;S<f;S++)h[S-1]=arguments[S];return l.produce(y,function(w){var T;return(T=i).call.apply(T,[g,w].concat(h))})}}var u;if(typeof i!="function"&&Ut(6),s!==void 0&&typeof s!="function"&&Ut(7),Zt(o)){var c=Dx(r),p=og(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?cc(c):rg(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Zm(c,s),Jm(y,c)},function(y){throw cc(c),y}):(Zm(c,s),Jm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===$x&&(u=void 0),r.D&&ug(u,!0),s){var m=[],v=[];wn("Patches").M(o,u,m,v),s(m,v)}return u}Ut(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(m){return o.apply(void 0,[m].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Zt(n)||Ut(8),zn(n)&&(n=mA(n));var r=Dx(this),o=og(this,n,void 0);return o[ve].C=!0,rg(r),o},t.finishDraft=function(n,r){var o=n&&n[ve],i=o.A;return Zm(i,r),Jm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!Bx&&Ut(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=wn("Patches").$;return zn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),vt=new vA,SA=vt.produce,A_=vt.produceWithPatches.bind(vt),L_=vt.setAutoFreeze.bind(vt),I_=vt.setUseProxies.bind(vt),O_=vt.applyPatches.bind(vt),M_=vt.createDraft.bind(vt),N_=vt.finishDraft.bind(vt),pc=SA;function zr(e){"@babel/helpers - typeof";return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zr(e)}function fg(e,t){if(zr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pg(e){var t=fg(e,"string");return zr(t)==="symbol"?t:String(t)}function mg(e,t,n){return t=pg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gx(Object(n),!0).forEach(function(r){mg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ge(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Xx=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),gg=function(){return Math.random().toString(36).substring(7).split("").join(".")},gc={INIT:"@@redux/INIT"+gg(),REPLACE:"@@redux/REPLACE"+gg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gg()}};function xA(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function hg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ge(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ge(1));return n(hg)(e,t)}if(typeof e!="function")throw new Error(Ge(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Ge(3));return i}function p(y){if(typeof y!="function")throw new Error(Ge(4));if(l)throw new Error(Ge(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Ge(6));g=!1,u();var h=a.indexOf(y);a.splice(h,1),s=null}}}function d(y){if(!xA(y))throw new Error(Ge(7));if(typeof y.type>"u")throw new Error(Ge(8));if(l)throw new Error(Ge(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,f=0;f<g.length;f++){var h=g[f];h()}return y}function m(y){if(typeof y!="function")throw new Error(Ge(10));o=y,d({type:gc.REPLACE})}function v(){var y,g=p;return y={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ge(11));function S(){h.next&&h.next(c())}S();var w=g(S);return{unsubscribe:w}}},y[Xx]=function(){return this},y}return d({type:gc.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:m},r[Xx]=v,r}function wA(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:gc.INIT});if(typeof r>"u")throw new Error(Ge(12));if(typeof n(void 0,{type:gc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ge(13))})}function hc(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s,a;try{wA(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,m={},v=0;v<i.length;v++){var y=i[v],g=n[y],f=u[y],h=g(f,c);if(typeof h>"u"){var S=c&&c.type;throw new Error(Ge(14))}m[y]=h,d=d||h!==f}return d=d||i.length!==Object.keys(u).length,d?m:u}}function Ui(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function Yx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Ge(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Ui.apply(void 0,a)(o.dispatch),mc(mc({},o),{},{dispatch:i})}}}function Qx(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var Zx=Qx();Zx.withExtraArgument=Qx;var yg=Zx;var rw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),EA=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},zi=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},CA=Object.defineProperty,bA=Object.defineProperties,TA=Object.getOwnPropertyDescriptors,Jx=Object.getOwnPropertySymbols,kA=Object.prototype.hasOwnProperty,PA=Object.prototype.propertyIsEnumerable,ew=function(e,t,n){return t in e?CA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Br=function(e,t){for(var n in t||(t={}))kA.call(t,n)&&ew(e,n,t[n]);if(Jx)for(var r=0,o=Jx(t);r<o.length;r++){var n=o[r];PA.call(t,n)&&ew(e,n,t[n])}return e},vg=function(e,t){return bA(e,TA(t))},RA=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})};var AA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ui:Ui.apply(null,arguments)},Z_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function LA(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var IA=function(e){rw(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,zi([void 0],n[0].concat(this)))):new(t.bind.apply(t,zi([void 0],n.concat(this))))},t}(Array),OA=function(e){rw(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,zi([void 0],n[0].concat(this)))):new(t.bind.apply(t,zi([void 0],n.concat(this))))},t}(Array);function wg(e){return Zt(e)?pc(e,function(){}):e}function MA(e){return typeof e=="boolean"}function NA(){return function(t){return _A(t)}}function _A(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,r=e.immutableCheck,o=r===void 0?!0:r,i=e.serializableCheck,s=i===void 0?!0:i,a=new IA;if(n&&(MA(n)?a.push(yg):a.push(yg.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Sg=!0;function ow(e){var t=NA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,m;if(typeof o=="function")m=o;else if(LA(o))m=hc(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(t),!Sg&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sg&&v.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Yx.apply(void 0,v),g=Ui;l&&(g=AA(Br({trace:!Sg},typeof l=="object"&&l)));var f=new OA(y),h=f;Array.isArray(d)?h=zi([y],d):typeof d=="function"&&(h=d(f));var S=g.apply(void 0,h);return hg(m,c,S)}function xe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return Br(Br({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function iw(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function DA(e){return typeof e=="function"}function FA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?iw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(DA(e))l=function(){return wg(e())};else{var u=wg(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var m=zi([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return m.filter(function(v){return!!v}).length===0&&(m=[a]),m.reduce(function(v,y){if(y)if(zn(v)){var g=v,f=y(g,d);return f===void 0?v:f}else{if(Zt(v))return pc(v,function(h){return y(h,d)});var f=y(v,d);if(f===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}return v},p)}return c.getInitialState=l,c}function HA(e,t){return e+"/"+t}function G(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:wg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=HA(t,c),m,v;"reducer"in p?(m=p.reducer,v=p.prepare):m=p,i[c]=m,s[d]=m,a[c]=v?xe(d,v):xe(d)});function l(){var c=typeof e.extraReducers=="function"?iw(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,m=c[1],v=m===void 0?[]:m,y=c[2],g=y===void 0?void 0:y,f=Br(Br({},d),s);return FA(n,function(h){for(var S in f)h.addCase(S,f[S]);for(var w=0,T=v;w<T.length;w++){var b=T[w];h.addMatcher(b.matcher,b.reducer)}g&&h.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var UA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=UA[Math.random()*64|0];return t},BA=["name","message","stack","code"],xg=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),tw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),jA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=BA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},B=function(){function e(t,n,r){var o=xe(t+"/fulfilled",function(c,p,d,m){return{payload:c,meta:vg(Br({},m||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=xe(t+"/pending",function(c,p,d){return{payload:void 0,meta:vg(Br({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=xe(t+"/rejected",function(c,p,d,m,v){return{payload:m,error:(r&&r.serializeError||jA)(c||"Rejected"),meta:vg(Br({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,m){var v=r!=null&&r.idGenerator?r.idGenerator(c):zA(),y=new l,g,f=!1;function h(w){g=w,y.abort()}var S=function(){return RA(this,null,function(){var w,T,b,k,I,O,M;return EA(this,function(W){switch(W.label){case 0:return W.trys.push([0,4,,5]),k=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:d,extra:m}),KA(k)?[4,k]:[3,2];case 1:k=W.sent(),W.label=2;case 2:if(k===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return f=!0,I=new Promise(function(X,ne){return y.signal.addEventListener("abort",function(){return ne({name:"AbortError",message:g||"Aborted"})})}),p(i(v,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:v,arg:c},{getState:d,extra:m}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:p,getState:d,extra:m,requestId:v,signal:y.signal,abort:h,rejectWithValue:function(X,ne){return new xg(X,ne)},fulfillWithValue:function(X,ne){return new tw(X,ne)}})).then(function(X){if(X instanceof xg)throw X;return X instanceof tw?o(X.payload,v,c,X.meta):o(X,v,c)})])];case 3:return b=W.sent(),[3,5];case 4:return O=W.sent(),b=O instanceof xg?s(null,v,c,O.payload,O.meta):s(O,v,c),[3,5];case 5:return M=r&&!r.dispatchConditionRejection&&s.match(b)&&b.meta.condition,M||p(b),[2,b]}})})}();return Object.assign(S,{abort:h,requestId:v,arg:c,unwrap:function(){return S.then(VA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function VA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function KA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var WA="task",sw="listener",aw="completed",Eg="cancelled",nD="task-"+Eg,rD="task-"+aw,oD=sw+"-"+Eg,iD=sw+"-"+aw,sD=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=WA+" "+Eg+" (reason: "+t+")"}return e}();var Cg="listenerMiddleware";var aD=xe(Cg+"/add"),lD=xe(Cg+"/removeAll"),uD=xe(Cg+"/remove");var nw,cD=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(nw||(nw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},$A=function(e){return function(t){setTimeout(t,e)}},dD=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:$A(10);Wx();var Xw=x(Tg()),Yw=x(mw());var kg=x(uc());function cL(e){e()}var gw=cL,hw=e=>gw=e,yw=()=>gw;var ji=x(_());var xw=x(_());var vc=x(_()),vw=Symbol.for(`react-redux-context-${vc.version}`),Sw=globalThis;function dL(){let e=Sw[vw];return e||(e=(0,vc.createContext)(null),Sw[vw]=e),e}var Xe=new Proxy({},new Proxy({},{get(e,t){let n=dL();return(r,...o)=>Reflect[t](n,...o)}}));function ka(e=Xe){return function(){return(0,xw.useContext)(e)}}var Sc=ka();var xc=()=>{throw new Error("uSES not initialized!")};var ww=xc,Ew=e=>{ww=e},fL=(e,t)=>e===t;function Cw(e=Xe){let t=e===Xe?Sc:ka(e);return function(r,o={}){let{equalityFn:i=fL,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),m=(0,ji.useRef)(!0),v=(0,ji.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=ww(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ji.useDebugValue)(y),y}}var L=Cw();function Bn(){return Bn=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},Bn.apply(this,arguments)}function Pa(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Dg=x(Nw()),ae=x(_()),Ww=x(Hw());var RL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function AL(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function m(h,S){return l=h,u=S,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let h=e(l,u),S=!s(h,c);return c=h,S&&(d=n(c,p,u)),d}function f(h,S){let w=!i(S,u),T=!o(h,l,S,u);return l=h,u=S,w&&T?v():w?y():T?g():d}return function(S,w){return a?f(S,w):m(S,w)}}function Ng(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Pa(t,RL),s=n(e,i),a=r(e,i),l=o(e,i);return AL(s,a,l,e,i)}function _g(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Ra(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Uw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Bc(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=Uw(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Uw(u),u=i(a,l)),u},i}}function Vi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function zw(e){return e&&typeof e=="object"?Ra(t=>_g(e,t)):e?typeof e=="function"?Bc(e,"mapDispatchToProps"):Vi(e,"mapDispatchToProps"):Ra(t=>({dispatch:t}))}function Bw(e){return e?typeof e=="function"?Bc(e,"mapStateToProps"):Vi(e,"mapStateToProps"):Ra(()=>({}))}function LL(e,t,n){return Bn({},n,e,t)}function IL(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function jw(e){return e?typeof e=="function"?IL(e):Vi(e,"mergeProps"):()=>LL}function OL(){let e=yw(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Vw={notify(){},get:()=>[]};function jc(e,t){let n,r=Vw;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=OL())}function u(){n&&(n(),n=void 0,r.clear(),r=Vw)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Vc=x(_()),ML=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ki=ML?Vc.useLayoutEffect:Vc.useEffect;function Kw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Wi(e,t){if(Kw(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Kw(e[n[o]],t[n[o]]))return!1;return!0}var NL=["reactReduxForwardedRef"],$w=xc,qw=e=>{$w=e};var _L=[null,null];function DL(e,t,n){Ki(()=>e(...t),n)}function FL(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function HL(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,m=()=>{if(p||!a.current)return;let y=t.getState(),g,f;try{g=r(y,o.current)}catch(h){f=h,d=h}f||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function UL(e,t){return e===t}function zL(e,t,n,{pure:r,areStatesEqual:o=UL,areOwnPropsEqual:i=Wi,areStatePropsEqual:s=Wi,areMergedPropsEqual:a=Wi,forwardRef:l=!1,context:u=Xe}={}){let c=u,p=Bw(e),d=zw(t),m=jw(n),v=!!e;return g=>{let f=g.displayName||g.name||"Component",h=`Connect(${f})`,S={shouldHandleStateChanges:v,displayName:h,wrappedComponentName:f,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[I,O,M]=(0,ae.useMemo)(()=>{let{reactReduxForwardedRef:it}=k,At=Pa(k,NL);return[k.context,it,At]},[k]),W=(0,ae.useMemo)(()=>I&&I.Consumer&&(0,Ww.isContextConsumer)(ae.default.createElement(I.Consumer,null))?I:c,[I,c]),X=(0,ae.useContext)(W),ne=!!k.store&&!!k.store.getState&&!!k.store.dispatch,cr=!!X&&!!X.store,Pt=ne?k.store:X.store,dr=cr?X.getServerState:Pt.getState,Rt=(0,ae.useMemo)(()=>Ng(Pt.dispatch,S),[Pt]),[H,Y]=(0,ae.useMemo)(()=>{if(!v)return _L;let it=jc(Pt,ne?void 0:X.subscription),At=it.notifyNestedSubs.bind(it);return[it,At]},[Pt,ne,X]),fr=(0,ae.useMemo)(()=>ne?X:Bn({},X,{subscription:H}),[ne,X,H]),he=(0,ae.useRef)(),pr=(0,ae.useRef)(M),q=(0,ae.useRef)(),mr=(0,ae.useRef)(!1),Al=(0,ae.useRef)(!1),Yo=(0,ae.useRef)(!1),oo=(0,ae.useRef)();Ki(()=>(Yo.current=!0,()=>{Yo.current=!1}),[]);let vs=(0,ae.useMemo)(()=>()=>q.current&&M===pr.current?q.current:Rt(Pt.getState(),M),[Pt,M]),Ll=(0,ae.useMemo)(()=>At=>H?HL(v,Pt,H,Rt,pr,he,mr,Yo,q,Y,At):()=>{},[H]);DL(FL,[pr,he,mr,M,q,Y]);let qt;try{qt=$w(Ll,vs,dr?()=>Rt(dr(),M):vs)}catch(it){throw oo.current&&(it.message+=`
10
10
  The error may be correlated with this previous error:
11
- ${ro.current.stack}
11
+ ${oo.current.stack}
12
12
 
13
- `),it}Ki(()=>{ro.current=void 0,q.current=void 0,he.current=qt});let Gt=(0,ae.useMemo)(()=>ae.default.createElement(g,Bn({},qt,{ref:O})),[O,g,qt]);return(0,ae.useMemo)(()=>v?ae.default.createElement(K.Provider,{value:dr},Gt):Gt,[K,Gt,dr])}let b=ae.default.memo(w);if(b.WrappedComponent=g,b.displayName=w.displayName=h,l){let I=ae.default.forwardRef(function(N,K){return ae.default.createElement(b,Bn({},N,{reactReduxForwardedRef:K}))});return I.displayName=h,I.WrappedComponent=g,(0,Dg.default)(I,g)}return(0,Dg.default)(b,g)}}var jn=UL;var Ra=S(_());function zL({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ra.useMemo)(()=>{let u=jc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ra.useMemo)(()=>e.getState(),[e]);Ki(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Xe;return Ra.default.createElement(l.Provider,{value:s},n)}var Fg=zL;function Kc(e=Xe){let t=e===Xe?Sc:Ta(e);return function(){let{store:r}=t();return r}}var Hg=Kc();function Gw(e=Xe){let t=e===Xe?Hg:Kc(e);return function(){return t().dispatch}}var W=Gw();Ew(Yw.useSyncExternalStoreWithSelector);qw(Xw.useSyncExternalStore);hw(kg.unstable_batchedUpdates);var Aa=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Aa||{});var BL={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk"},Qw=G({name:"settings",initialState:BL,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Wc}=Qw.actions,Ug=e=>t=>t.settings[e],z=e=>L(Ug(e)),Zw=Qw.reducer;var jL={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Je=e=>e.auth.isLoggedIn,Jw=e=>e.auth.loginFetchState,e1=e=>e.auth.verifyFetchState,t1=e=>e.auth.showLoginOverlay,Vn=B("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),n1=B("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),La=B("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),r1=G({name:"auth",initialState:jL,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Vn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Vn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Vn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(La.pending,t=>{t.verifyFetchState="loading"}),e.addCase(La.rejected,t=>{t.verifyFetchState="error"}),e.addCase(La.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:$i,setShowLoginOverlay:o1}=r1.actions,i1=r1.reducer;function Kn(){}Kn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function f(){for(var y=-1*u;y<=u;y+=2){var g=void 0,m=p[y-1],h=p[y+1],x=(h?h.newPos:0)-y;m&&(p[y-1]=void 0);var w=m&&m.newPos+1<a,T=h&&0<=x&&x<l;if(!w&&!T){p[y]=void 0;continue}if(!w||T&&m.newPos<h.newPos?(g=KL(h),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),x=i.extractCommon(g,n,t,y),g.newPos+1>=a&&x+1>=l)return s(VL(i,g.components,n,t,i.useLongestToken));p[y]=g}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();f()||y()},0)})();else for(;u<=c;){var v=f();if(v)return v}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function VL(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(f,v){var y=r[l+v];return y.length>f.length?y:f}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function KL(e){return{newPos:e.newPos,components:e.components.slice(0)}}var WL=new Kn;function l1(e,t,n){return WL.diff(e,t,n)}var s1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a1=/\S/,u1=new Kn;u1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a1.test(e)&&!a1.test(t)};u1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&s1.test(t[n])&&s1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var c1=new Kn;c1.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var $L=new Kn;$L.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var qL=new Kn;qL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function $c(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$c=function(t){return typeof t}:$c=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}var GL=Object.prototype.toString,Ia=new Kn;Ia.useLongestToken=!0;Ia.tokenize=c1.tokenize;Ia.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(zg(e,null,null,o),o," ")};Ia.equals=function(e,t){return Kn.prototype.equals.call(Ia,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function zg(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(GL.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=zg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),$c(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=zg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Bg=new Kn;Bg.tokenize=function(e){return e.slice()};Bg.join=Bg.removeEmpty=function(e){return e};function d1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Br(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>Br(i,t[s],n-1)):d1(e)&&d1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Br(e[s],t[s],n-1)):!1}function XL(e){return Math.max(...e.map(t=>t.length))}function YL(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function f1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<XL(r);o++){let i=YL(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var QL=2;function jg(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=f1(e,QL);return n&&n.text!==t?n:e[0]}var ZL={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},F=ZL;var p1={current:null,isSupported:null},le=xe("resetConversation"),qi=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},jr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Gi=e=>e.conversation.isSupported,Vg=B("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),qc=B("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Gc=B("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Xc=B("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=jr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Kg=B("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),Yc=B("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=jr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),JL=[qc.rejected,Gc.rejected,Xc.rejected,Yc.rejected].map(e=>e==null?void 0:e.toString()),eI=G({name:"conversation",initialState:p1,reducers:{},extraReducers:e=>{e.addCase(Vg.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(qc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Kg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Xc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Yc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(le,()=>p1).addMatcher(t=>JL.includes(t.type),(t,n)=>{var r;throw F.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),m1=eI.reducer;var Vr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function g1(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var Zc=xe("input/replaceText"),Jc=xe("input/keyDown"),Po=xe("input/sendMessage"),ed=xe("input/uiInputChange"),td=xe("input/applyImageSuggestion"),et=xe("input/sendEvent");function Qc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var h1=G({name:"input",initialState:Vr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...Vr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=jg(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(Br(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&Qc(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:p,metaKey:d,altKey:f}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=e,{text:y}=t.payload,g=l1(v,y);v.length-y.length>1&&e.metrics.deletions.push(...g.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=v.length-y.length;break}case"C":case"V":case"X":if(!p&&!d){e.metrics.numCharsTyped+=1;let v=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}break;case"Shift":break;default:if(!p&&!d&&!f){e.metrics.numCharsTyped+=1;let v=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=Vr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&Qc(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&Qc(e)},commitSuggestion(e){Qc(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.tabCompletionSuggestion=void 0;return}let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=jg(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(le,t=>{t.tabCompletionSuggestion=Vr.tabCompletionSuggestion,t.previousKeyDownEvent=Vr.previousKeyDownEvent,t.textSuggestions=Vr.textSuggestions,t.selectedSuggestionIndex=Vr.selectedSuggestionIndex,t.metrics=Vr.metrics})}}),Xi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),tI=e=>e.input.selection,y1=()=>L(tI),{userInput:v1,changeSelection:Wg,initialInput:S1,nextTextSuggestionIndex:x1,offeredTextSuggestion:w1,previousTextSuggestionIndex:E1,registerCut:C1,registerKeyDown:b1,registerPaste:T1,reset:k1,resetToCommitted:Oa,platformInput:P1,setSelectedTextSuggestionIndex:Kr,setTextSuggestions:En,stageSuggestion:Cn,commitSuggestion:Wn,setMetrics:R1}=h1.actions,A1=h1.reducer;function nI(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function J(e){return Array.isArray(e)?e.map(J):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[nI(n)]:J(e[n])}),{}):e}function $g(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Re(e){return Array.isArray(e)?e.map(Re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[$g(n)]:Re(e[n])}),{}):e}var rI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,fetchState:"idle"},Ma=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},Na=B("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?J(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),J(r))}),qg=B("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),Gg=B("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),L1=e=>e.info.agentInfo,I1=e=>e.info.customData,O1=G({name:"info",initialState:rI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}},setCustomData(e,t){e.customData=t.payload}},extraReducers:e=>{e.addCase(Na.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Na.rejected,t=>{t.fetchState="error"}).addCase(Na.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(qg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Gg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(le,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:N1,setCustomData:M1}=O1.actions,_1=O1.reducer;var nd={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},D1=e=>e.search.isOpen,F1=e=>e.search.page,H1=e=>e.search.list,U1=e=>e.search.aggregates;function z1(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Ro=B("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ma(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),B1=G({name:"search",initialState:nd,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=nd.fetchState,e.list=nd.list}},extraReducers:e=>{e.addCase(Ro.pending,t=>{t.fetchState="loading"}).addCase(Ro.rejected,(t,n)=>{t.fetchState="error",F.error(n.error)}).addCase(Ro.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(le,()=>nd)}}),{resetSearch:rd,setIsOpen:xt,setPage:Jt}=B1.actions,j1=B1.reducer;var Xg="SetCues",Yi="ShowLoginOverlay",_a="UserLoggedIn",oI="UserLoggedOut",Wr="ApplySuggestion",Yg="ApplyImageSuggestion",iI="ShowCommandPalette",sI=e=>({[Xg]:t=>{e.dispatch({...t,isBroadcasted:!0})},[iI]:t=>{e.dispatch(xt(t.isOpen)),t.page&&e.dispatch(Jt(t.page))},[Yi]:t=>{e.dispatch(o1(t))},[_a]:()=>{e.dispatch(Vn())},[oI]:()=>{e.dispatch(Vn())},[Yg]:t=>{e.dispatch(td({suggestion:t.suggestion}))},[Wr]:t=>{e.dispatch(Cn({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Wn())}}),V1=sI;var Da=S(_()),W1=S(C()),K1=Da.default.createContext(null),Ao=({broadcastEvents:e,children:t})=>{let n=Da.default.useMemo(()=>e,[]);return(0,W1.jsx)(K1.Provider,{value:n,children:t})},Bt=()=>{let e=(0,Da.useContext)(K1);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var xd=S(te()),tn=S(_());var yd=S(_());var Qg=function(e,t){return Qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Qg(e,t)};function Fa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wt=function(){return wt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wt.apply(this,arguments)};function $1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function od(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var id;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(id||(id={}));var sd=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var en;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(en||(en={}));var ad;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ad||(ad={}));function Zg(e){return e.type===en.literal}function q1(e){return e.type===en.argument}function ld(e){return e.type===en.number}function ud(e){return e.type===en.date}function cd(e){return e.type===en.time}function dd(e){return e.type===en.select}function fd(e){return e.type===en.plural}function G1(e){return e.type===en.pound}function pd(e){return e.type===en.tag}function md(e){return!!(e&&typeof e=="object"&&e.type===ad.number)}function Ha(e){return!!(e&&typeof e=="object"&&e.type===ad.dateTime)}function Jg(e){e.forEach(function(t){if(delete t.location,dd(t)||fd(t))for(var n in t.options)delete t.options[n].location,Jg(t.options[n].value);else ld(t)&&md(t.style)||(ud(t)||cd(t))&&Ha(t.style)?delete t.style.location:pd(t)&&Jg(t.children)})}function X1(e,t){t===void 0&&(t={}),t=wt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new sd(e,t).parse();if(n.err){var r=SyntaxError(id[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Jg(n.val),n.val}function gd(e,t){var n=t&&t.cache?t.cache:fI,r=t&&t.serializer?t.serializer:dI,o=t&&t.strategy?t.strategy:lI;return o(e,{cache:n,serializer:r})}function aI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Y1(e,t,n,r){var o=aI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Q1(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function eh(e,t,n,r,o){return n.bind(t,e,r,o)}function lI(e,t){var n=e.length===1?Y1:Q1;return eh(e,this,n,t.cache.create(),t.serializer)}function uI(e,t){return eh(e,this,Q1,t.cache.create(),t.serializer)}function cI(e,t){return eh(e,this,Y1,t.cache.create(),t.serializer)}var dI=function(){return JSON.stringify(arguments)};function th(){this.cache=Object.create(null)}th.prototype.get=function(e){return this.cache[e]};th.prototype.set=function(e,t){this.cache[e]=t};var fI={create:function(){return new th}},hd={variadic:uI,monadic:cI};var Lo;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Lo||(Lo={}));var Ua=function(e){Fa(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var nh=function(e){Fa(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Lo.INVALID_VALUE,i)||this}return t}(Ua);var Z1=function(e){Fa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Lo.INVALID_VALUE,o)||this}return t}(Ua);var J1=function(e){Fa(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Lo.MISSING_VALUE,r)||this}return t}(Ua);var Ye;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ye||(Ye={}));function pI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ye.literal||n.type!==Ye.literal?t.push(n):r.value+=n.value,t},[])}function mI(e){return typeof e=="function"}function za(e,t,n,r,o,i,s){if(e.length===1&&Zg(e[0]))return[{type:Ye.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Zg(c)){a.push({type:Ye.literal,value:c.value});continue}if(G1(c)){typeof i=="number"&&a.push({type:Ye.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new J1(p,s);var d=o[p];if(q1(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ye.literal:Ye.object,value:d});continue}if(ud(c)){var f=typeof c.style=="string"?r.date[c.style]:Ha(c.style)?c.style.parsedOptions:void 0;a.push({type:Ye.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(cd(c)){var f=typeof c.style=="string"?r.time[c.style]:Ha(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ye.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(ld(c)){var f=typeof c.style=="string"?r.number[c.style]:md(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(d=d*(f.scale||1)),a.push({type:Ye.literal,value:n.getNumberFormat(t,f).format(d)});continue}if(pd(c)){var v=c.children,y=c.value,g=o[y];if(!mI(g))throw new Z1(y,"function",s);var m=za(v,t,n,r,o,i),h=g(m.map(function(T){return T.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(T){return{type:typeof T=="string"?Ye.literal:Ye.object,value:T}}))}if(dd(c)){var x=c.options[d]||c.options.other;if(!x)throw new nh(c.value,d,Object.keys(c.options),s);a.push.apply(a,za(x.value,t,n,r,o));continue}if(fd(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new Ua(`Intl.PluralRules is not available in this environment.
13
+ `),it}Ki(()=>{oo.current=void 0,q.current=void 0,he.current=qt});let Gt=(0,ae.useMemo)(()=>ae.default.createElement(g,Bn({},qt,{ref:O})),[O,g,qt]);return(0,ae.useMemo)(()=>v?ae.default.createElement(W.Provider,{value:fr},Gt):Gt,[W,Gt,fr])}let b=ae.default.memo(w);if(b.WrappedComponent=g,b.displayName=w.displayName=h,l){let I=ae.default.forwardRef(function(M,W){return ae.default.createElement(b,Bn({},M,{reactReduxForwardedRef:W}))});return I.displayName=h,I.WrappedComponent=g,(0,Dg.default)(I,g)}return(0,Dg.default)(b,g)}}var jn=zL;var Aa=x(_());function BL({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Aa.useMemo)(()=>{let u=jc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Aa.useMemo)(()=>e.getState(),[e]);Ki(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Xe;return Aa.default.createElement(l.Provider,{value:s},n)}var Fg=BL;function Kc(e=Xe){let t=e===Xe?Sc:ka(e);return function(){let{store:r}=t();return r}}var Hg=Kc();function Gw(e=Xe){let t=e===Xe?Hg:Kc(e);return function(){return t().dispatch}}var $=Gw();Ew(Yw.useSyncExternalStoreWithSelector);qw(Xw.useSyncExternalStore);hw(kg.unstable_batchedUpdates);var La=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(La||{});var jL={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk"},Qw=G({name:"settings",initialState:jL,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Wc}=Qw.actions,Ug=e=>t=>t.settings[e],z=e=>L(Ug(e)),Zw=Qw.reducer;var VL={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Je=e=>e.auth.isLoggedIn,Jw=e=>e.auth.loginFetchState,e1=e=>e.auth.verifyFetchState,t1=e=>e.auth.showLoginOverlay,Vn=B("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),n1=B("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ia=B("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),r1=G({name:"auth",initialState:VL,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Vn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Vn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Vn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ia.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ia.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ia.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:$i,setShowLoginOverlay:o1}=r1.actions,i1=r1.reducer;function Kn(){}Kn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function m(){for(var y=-1*u;y<=u;y+=2){var g=void 0,f=p[y-1],h=p[y+1],S=(h?h.newPos:0)-y;f&&(p[y-1]=void 0);var w=f&&f.newPos+1<a,T=h&&0<=S&&S<l;if(!w&&!T){p[y]=void 0;continue}if(!w||T&&f.newPos<h.newPos?(g=WL(h),i.pushComponent(g.components,void 0,!0)):(g=f,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,y),g.newPos+1>=a&&S+1>=l)return s(KL(i,g.components,n,t,i.useLongestToken));p[y]=g}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();m()||y()},0)})();else for(;u<=c;){var v=m();if(v)return v}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function KL(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(m,v){var y=r[l+v];return y.length>m.length?y:m}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function WL(e){return{newPos:e.newPos,components:e.components.slice(0)}}var $L=new Kn;function l1(e,t,n){return $L.diff(e,t,n)}var s1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a1=/\S/,u1=new Kn;u1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a1.test(e)&&!a1.test(t)};u1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&s1.test(t[n])&&s1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var c1=new Kn;c1.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var qL=new Kn;qL.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var GL=new Kn;GL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function $c(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$c=function(t){return typeof t}:$c=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}var XL=Object.prototype.toString,Oa=new Kn;Oa.useLongestToken=!0;Oa.tokenize=c1.tokenize;Oa.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(zg(e,null,null,o),o," ")};Oa.equals=function(e,t){return Kn.prototype.equals.call(Oa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function zg(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(XL.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=zg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),$c(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=zg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Bg=new Kn;Bg.tokenize=function(e){return e.slice()};Bg.join=Bg.removeEmpty=function(e){return e};function d1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function jr(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>jr(i,t[s],n-1)):d1(e)&&d1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>jr(e[s],t[s],n-1)):!1}function YL(e){return Math.max(...e.map(t=>t.length))}function QL(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function f1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<YL(r);o++){let i=QL(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var ZL=2;function jg(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=f1(e,ZL);return n&&n.text!==t?n:e[0]}var JL={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},F=JL;var p1={current:null,isSupported:null},le=xe("resetConversation"),qi=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Vr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Gi=e=>e.conversation.isSupported,Vg=B("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),qc=B("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Gc=B("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Xc=B("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Vr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Kg=B("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),Yc=B("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Vr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),eI=[qc.rejected,Gc.rejected,Xc.rejected,Yc.rejected].map(e=>e==null?void 0:e.toString()),tI=G({name:"conversation",initialState:p1,reducers:{},extraReducers:e=>{e.addCase(Vg.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(qc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Kg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Xc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Yc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(le,()=>p1).addMatcher(t=>eI.includes(t.type),(t,n)=>{var r;throw F.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),m1=tI.reducer;var Kr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function g1(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var Zc=xe("input/replaceText"),Jc=xe("input/keyDown"),Ro=xe("input/sendMessage"),ed=xe("input/uiInputChange"),td=xe("input/applyImageSuggestion"),et=xe("input/sendEvent");function Qc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var h1=G({name:"input",initialState:Kr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...Kr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=jg(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(jr(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&Qc(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:p,metaKey:d,altKey:m}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=e,{text:y}=t.payload,g=l1(v,y);v.length-y.length>1&&e.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),e.metrics.numCharsDeleted+=v.length-y.length;break}case"C":case"V":case"X":if(!p&&!d){e.metrics.numCharsTyped+=1;let v=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}break;case"Shift":break;default:if(!p&&!d&&!m){e.metrics.numCharsTyped+=1;let v=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=Kr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&Qc(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&Qc(e)},commitSuggestion(e){Qc(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.tabCompletionSuggestion=void 0;return}let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=jg(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(le,t=>{t.tabCompletionSuggestion=Kr.tabCompletionSuggestion,t.previousKeyDownEvent=Kr.previousKeyDownEvent,t.textSuggestions=Kr.textSuggestions,t.selectedSuggestionIndex=Kr.selectedSuggestionIndex,t.metrics=Kr.metrics})}}),Xi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),nI=e=>e.input.selection,y1=()=>L(nI),{userInput:v1,changeSelection:Wg,initialInput:S1,nextTextSuggestionIndex:x1,offeredTextSuggestion:w1,previousTextSuggestionIndex:E1,registerCut:C1,registerKeyDown:b1,registerPaste:T1,reset:k1,resetToCommitted:Ma,platformInput:P1,setSelectedTextSuggestionIndex:Wr,setTextSuggestions:En,stageSuggestion:Cn,commitSuggestion:Wn,setMetrics:R1}=h1.actions,A1=h1.reducer;function rI(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function J(e){return Array.isArray(e)?e.map(J):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[rI(n)]:J(e[n])}),{}):e}function $g(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Re(e){return Array.isArray(e)?e.map(Re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[$g(n)]:Re(e[n])}),{}):e}var oI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,fetchState:"idle"},_a=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},Na=B("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?J(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),J(r))}),qg=B("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),Gg=B("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),L1=e=>e.info.agentInfo,I1=e=>e.info.customData,O1=G({name:"info",initialState:oI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}},setCustomData(e,t){e.customData=t.payload}},extraReducers:e=>{e.addCase(Na.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Na.rejected,t=>{t.fetchState="error"}).addCase(Na.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(qg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Gg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(le,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:M1,setCustomData:N1}=O1.actions,_1=O1.reducer;var nd={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},D1=e=>e.search.isOpen,F1=e=>e.search.page,H1=e=>e.search.list,U1=e=>e.search.aggregates;function z1(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Ao=B("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:_a(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),B1=G({name:"search",initialState:nd,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=nd.fetchState,e.list=nd.list}},extraReducers:e=>{e.addCase(Ao.pending,t=>{t.fetchState="loading"}).addCase(Ao.rejected,(t,n)=>{t.fetchState="error",F.error(n.error)}).addCase(Ao.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(le,()=>nd)}}),{resetSearch:rd,setIsOpen:xt,setPage:Jt}=B1.actions,j1=B1.reducer;var Xg="SetCues",Yi="ShowLoginOverlay",Da="UserLoggedIn",iI="UserLoggedOut",$r="ApplySuggestion",Yg="ApplyImageSuggestion",sI="ShowCommandPalette",aI=e=>({[Xg]:t=>{e.dispatch({...t,isBroadcasted:!0})},[sI]:t=>{e.dispatch(xt(t.isOpen)),t.page&&e.dispatch(Jt(t.page))},[Yi]:t=>{e.dispatch(o1(t))},[Da]:()=>{e.dispatch(Vn())},[iI]:()=>{e.dispatch(Vn())},[Yg]:t=>{e.dispatch(td({suggestion:t.suggestion}))},[$r]:t=>{e.dispatch(Cn({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Wn())}}),V1=aI;var Fa=x(_()),W1=x(C()),K1=Fa.default.createContext(null),Lo=({broadcastEvents:e,children:t})=>{let n=Fa.default.useMemo(()=>e,[]);return(0,W1.jsx)(K1.Provider,{value:n,children:t})},Bt=()=>{let e=(0,Fa.useContext)(K1);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var xd=x(te()),tn=x(_());var yd=x(_());var Qg=function(e,t){return Qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Qg(e,t)};function Ha(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wt=function(){return wt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wt.apply(this,arguments)};function $1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function od(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var id;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(id||(id={}));var sd=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var en;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(en||(en={}));var ad;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ad||(ad={}));function Zg(e){return e.type===en.literal}function q1(e){return e.type===en.argument}function ld(e){return e.type===en.number}function ud(e){return e.type===en.date}function cd(e){return e.type===en.time}function dd(e){return e.type===en.select}function fd(e){return e.type===en.plural}function G1(e){return e.type===en.pound}function pd(e){return e.type===en.tag}function md(e){return!!(e&&typeof e=="object"&&e.type===ad.number)}function Ua(e){return!!(e&&typeof e=="object"&&e.type===ad.dateTime)}function Jg(e){e.forEach(function(t){if(delete t.location,dd(t)||fd(t))for(var n in t.options)delete t.options[n].location,Jg(t.options[n].value);else ld(t)&&md(t.style)||(ud(t)||cd(t))&&Ua(t.style)?delete t.style.location:pd(t)&&Jg(t.children)})}function X1(e,t){t===void 0&&(t={}),t=wt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new sd(e,t).parse();if(n.err){var r=SyntaxError(id[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Jg(n.val),n.val}function gd(e,t){var n=t&&t.cache?t.cache:pI,r=t&&t.serializer?t.serializer:fI,o=t&&t.strategy?t.strategy:uI;return o(e,{cache:n,serializer:r})}function lI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Y1(e,t,n,r){var o=lI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Q1(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function eh(e,t,n,r,o){return n.bind(t,e,r,o)}function uI(e,t){var n=e.length===1?Y1:Q1;return eh(e,this,n,t.cache.create(),t.serializer)}function cI(e,t){return eh(e,this,Q1,t.cache.create(),t.serializer)}function dI(e,t){return eh(e,this,Y1,t.cache.create(),t.serializer)}var fI=function(){return JSON.stringify(arguments)};function th(){this.cache=Object.create(null)}th.prototype.get=function(e){return this.cache[e]};th.prototype.set=function(e,t){this.cache[e]=t};var pI={create:function(){return new th}},hd={variadic:cI,monadic:dI};var Io;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Io||(Io={}));var za=function(e){Ha(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var nh=function(e){Ha(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Io.INVALID_VALUE,i)||this}return t}(za);var Z1=function(e){Ha(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Io.INVALID_VALUE,o)||this}return t}(za);var J1=function(e){Ha(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Io.MISSING_VALUE,r)||this}return t}(za);var Ye;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ye||(Ye={}));function mI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ye.literal||n.type!==Ye.literal?t.push(n):r.value+=n.value,t},[])}function gI(e){return typeof e=="function"}function Ba(e,t,n,r,o,i,s){if(e.length===1&&Zg(e[0]))return[{type:Ye.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Zg(c)){a.push({type:Ye.literal,value:c.value});continue}if(G1(c)){typeof i=="number"&&a.push({type:Ye.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new J1(p,s);var d=o[p];if(q1(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ye.literal:Ye.object,value:d});continue}if(ud(c)){var m=typeof c.style=="string"?r.date[c.style]:Ua(c.style)?c.style.parsedOptions:void 0;a.push({type:Ye.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(cd(c)){var m=typeof c.style=="string"?r.time[c.style]:Ua(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ye.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(ld(c)){var m=typeof c.style=="string"?r.number[c.style]:md(c.style)?c.style.parsedOptions:void 0;m&&m.scale&&(d=d*(m.scale||1)),a.push({type:Ye.literal,value:n.getNumberFormat(t,m).format(d)});continue}if(pd(c)){var v=c.children,y=c.value,g=o[y];if(!gI(g))throw new Z1(y,"function",s);var f=Ba(v,t,n,r,o,i),h=g(f.map(function(T){return T.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(T){return{type:typeof T=="string"?Ye.literal:Ye.object,value:T}}))}if(dd(c)){var S=c.options[d]||c.options.other;if(!S)throw new nh(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ba(S.value,t,n,r,o));continue}if(fd(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new za(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,Lo.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[w]||c.options.other}if(!x)throw new nh(c.value,d,Object.keys(c.options),s);a.push.apply(a,za(x.value,t,n,r,o,d-(c.offset||0)));continue}}return pI(a)}function gI(e,t){return t?wt(wt(wt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=wt(wt({},e[r]),t[r]||{}),n},{})):e}function hI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=gI(e[r],t[r]),n},wt({},e)):e}function rh(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function yI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.number),strategy:hd.variadic}),getDateTimeFormat:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.dateTime),strategy:hd.variadic}),getPluralRules:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.pluralRules),strategy:hd.variadic})}}var eE=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,f){return!d.length||f.type!==Ye.literal||typeof d[d.length-1]!="string"?d.push(f.value):d[d.length-1]+=f.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return za(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=$1(s,["formatters"]);this.ast=e.__parse(t,wt(wt({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=hI(e.formats,r),this.formatters=o&&o.formatters||yI(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=X1,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function vI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var SI="dummy",oh=(0,yd.createContext)(null);function $(e){let t=(0,yd.useContext)(oh);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=vI(n,r);return i?new eE(i).format(o):(t!==SI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var vd=S(_());var tE={root:"dd-tvkOF",content:"dd-eXA1D"};var ih=S(C()),xI=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,vd.useRef)(null),u=P("Dialog",tE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},p=d=>{d.target===l.current&&e&&r()};return(0,vd.useEffect)(()=>{var d,f;!l.current||!e||!t||(f=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||f.focus()},[e,t,l]),e?(0,ih.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:p,children:(0,ih.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},Sd=xI;var rE=S(te());var nE={root:"dd-ranhW"};var oE=S(C()),wI=({className:e,value:t,...n})=>{let r=P("TextInput",nE);return(0,oE.jsx)("input",{className:(0,rE.default)(e,r.root),type:"text",value:t,...n})},Ba=wI;var sh={};je(sh,{enUS:()=>EI,nlNL:()=>CI});var EI={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},CI={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var iE={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var Te=S(C());var bI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},TI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=$(sh),s=P("LoginTokenDialog",iE),a=L(e1),l=W(),u=z("productName"),[c,p]=(0,tn.useState)(e||""),[d,f]=(0,tn.useState)(0),[v,y]=(0,tn.useState)(""),g=(0,tn.useCallback)(async w=>{w.preventDefault(),l(n1({email:c})),f(1)},[n,c]),m=()=>{y(""),f(0)},h=(0,tn.useCallback)(async w=>{w.preventDefault();let T=bI(w.target.elements.token.value);if(!T){y(i("verifyCodeError",{login:x}));return}l(La({token:T}))},[n]),x=(0,tn.useMemo)(()=>w=>(0,Te.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:w},"back-button"),[]);return(0,tn.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,Te.jsx)(Sd,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,Te.jsxs)("div",{className:s.root,children:[(0,Te.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,Te.jsxs)("form",{onSubmit:g,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,Te.jsx)(Ba,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:w=>p(w.target.value)}),(0,Te.jsx)("div",{className:s.actions,children:(0,Te.jsx)("button",{type:"submit",className:(0,xd.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,Te.jsxs)("form",{onSubmit:h,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,Te.jsx)(Ba,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,Te.jsx)("div",{className:s.errorMessage,children:v}),(0,Te.jsxs)("div",{className:s.actions,children:[(0,Te.jsx)("button",{type:"button",className:(0,xd.default)(s.button),onClick:m,children:i("back")}),(0,Te.jsx)("button",{type:"submit",className:(0,xd.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},sE=TI;var lE=S(C()),kI=()=>{let e=L(t1),t=L(L1),n=z("adminUrl"),r=Bt(),o=()=>r.send(Yi,!1),i=()=>{r.send(Yi,!1),r.send(_a)};return(0,lE.jsx)(sE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},aE=kI;var EC=S(uh()),Ct=S(_());var KI={data:null,fetchState:"idle"},fE=e=>e.contentTypes.data,ja=B("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),WI=G({name:"contentTypes",initialState:KI,reducers:{},extraReducers:e=>{e.addCase(ja.pending,t=>{t.fetchState="loading"}).addCase(ja.rejected,t=>{t.fetchState="error"}).addCase(ja.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),pE=WI.reducer;function $n(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var Xn=S(_());var mE=S(_()),wd=S(te());var Et={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemPrimaryAction:"dd-LdJ8w",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var Io={};je(Io,{enUS:()=>$I,nlNL:()=>qI});var $I={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}]},qI={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}]};var $r=S(C()),GI=({src:e,title:t})=>{let n=P("CommandPalette",Et),[r,o]=(0,mE.useState)("loading"),i=$(Io);return(0,$r.jsxs)("div",{className:n.image,children:[(0,$r.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,wd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,$r.jsx)("span",{className:(0,wd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,$r.jsx)("span",{className:(0,wd.default)(n.imageSrc,n.imageSrcStatus),children:(0,$r.jsx)(jl,{})}),t&&(0,$r.jsx)("span",{className:n.imageTitle,children:t})]})},gE=GI;var hE=S(_()),yE=S(te());var Oo=S(C());function ch({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=$(Io),s=P("CommandPalette",Et);return hE.default.Children.count(e)===0?null:(0,Oo.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Oo.jsxs)("div",{className:s.listHeader,children:[t&&(0,Oo.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Oo.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Oo.jsx)("div",{className:(0,yE.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var qa=S(te());var Ed=S(_());function Va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=1,fh=2,ph=4,Ae=8,Cd=16,Ka=32,nn=64,dh={a:{content:oe|Ae,self:!1,type:oe|Ae|Ka|nn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:oe|Ae,void:!0},body:{content:oe|fh|ph|Ae|Cd|Ka|nn},button:{content:Ae,type:oe|Ae|Ka|nn},caption:{content:oe,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:oe|Ka|nn},dd:{content:oe,parent:["dl"]},dl:{children:["dt","dd"],type:oe},dt:{content:oe,invalid:["footer","header"],parent:["dl"]},figcaption:{content:oe,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:oe,void:!0},img:{void:!0},li:{content:oe,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:oe},picture:{children:["source","img"],type:oe|Ae|Cd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Ae,parent:["ruby","rtc"]},rtc:{content:Ae,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Ae,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:oe},tbody:{parent:["table"],children:["tr"]},td:{content:oe,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:oe,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:oe},video:{children:["track","source"]},wbr:{type:oe|Ae,void:!0}};function Mo(e){return t=>{dh[t]={...e,...dh[t]}}}["address","main","div","figure","p","pre"].forEach(Mo({content:oe,type:oe|nn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Mo({content:Ae,type:oe|Ae|nn}));["p","pre"].forEach(Mo({content:Ae,type:oe|nn}));["s","small","span","del","ins"].forEach(Mo({content:Ae,type:oe|Ae}));["article","aside","footer","header","nav","section","blockquote"].forEach(Mo({content:oe,type:oe|fh|nn}));["h1","h2","h3","h4","h5","h6"].forEach(Mo({content:Ae,type:oe|ph|nn}));["audio","canvas","iframe","img","video"].forEach(Mo({type:oe|Ae|Cd|nn}));var $a=Object.freeze(dh),mh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],gh=Object.keys($a).filter(e=>e!=="canvas"&&e!=="iframe"),ue=1,hh=2,No=3,qr=4,Td=5,kd=Object.freeze({alt:ue,cite:ue,class:ue,colspan:No,controls:qr,datetime:ue,default:qr,disabled:qr,dir:ue,height:ue,href:ue,id:ue,kind:ue,label:ue,lang:ue,loading:ue,loop:qr,media:ue,muted:qr,poster:ue,rel:ue,role:ue,rowspan:No,scope:ue,sizes:ue,span:No,start:No,style:Td,src:ue,srclang:ue,srcset:ue,tabindex:ue,target:ue,title:ue,type:ue,width:ue}),yh=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function bd(){return bd=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},bd.apply(this,arguments)}function Pd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ed.default.createElement(i,bd({className:t},e)):Ed.default.createElement(i,bd({className:t},e),n)}var Wa=class{attribute(t,n){return n}node(t,n){return n}};function vE(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var qn=class{constructor(t,n,r){Va(this,"greedy",!1),Va(this,"options",void 0),Va(this,"propName",void 0),Va(this,"inverseName",void 0),Va(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?Ed.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return vE(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var _o=S(_()),EE=S(xE());function Gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QI=/(url|image|image-set)\(/i,vh=class extends Wa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(QI)&&delete n[r]}),n}},wE=1,ZI=3,JI=/^<(!doctype|(html|head|body)(\s|>))/i,eO=/^(aria-|data-|\w+:)/iu,tO=/{{{(\w+)\/?}}}/;function nO(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Rd=class{constructor(t,n={},r=[],o=[]){var i;Gn(this,"allowed",void 0),Gn(this,"banned",void 0),Gn(this,"blocked",void 0),Gn(this,"container",void 0),Gn(this,"content",[]),Gn(this,"props",void 0),Gn(this,"matchers",void 0),Gn(this,"filters",void 0),Gn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new vh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:gh),this.banned=new Set(mh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:f,match:v,valid:y,void:g,...m}=a,h=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${h}/}}}`:`{{{${h}}}}${v}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:v,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+f),p=""):i=i.slice(d+(f||v.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
15
+ `,Io.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[w]||c.options.other}if(!S)throw new nh(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ba(S.value,t,n,r,o,d-(c.offset||0)));continue}}return mI(a)}function hI(e,t){return t?wt(wt(wt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=wt(wt({},e[r]),t[r]||{}),n},{})):e}function yI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=hI(e[r],t[r]),n},wt({},e)):e}function rh(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function vI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.number),strategy:hd.variadic}),getDateTimeFormat:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.dateTime),strategy:hd.variadic}),getPluralRules:gd(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,od([void 0],n,!1)))},{cache:rh(e.pluralRules),strategy:hd.variadic})}}var eE=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,m){return!d.length||m.type!==Ye.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Ba(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=$1(s,["formatters"]);this.ast=e.__parse(t,wt(wt({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=yI(e.formats,r),this.formatters=o&&o.formatters||vI(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=X1,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function SI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var xI="dummy",oh=(0,yd.createContext)(null);function K(e){let t=(0,yd.useContext)(oh);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=SI(n,r);return i?new eE(i).format(o):(t!==xI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var vd=x(_());var tE={root:"dd-tvkOF",content:"dd-eXA1D"};var ih=x(C()),wI=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,vd.useRef)(null),u=P("Dialog",tE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},p=d=>{d.target===l.current&&e&&r()};return(0,vd.useEffect)(()=>{var d,m;!l.current||!e||!t||(m=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||m.focus()},[e,t,l]),e?(0,ih.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:p,children:(0,ih.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},Sd=wI;var rE=x(te());var nE={root:"dd-ranhW"};var oE=x(C()),EI=({className:e,value:t,...n})=>{let r=P("TextInput",nE);return(0,oE.jsx)("input",{className:(0,rE.default)(e,r.root),type:"text",value:t,...n})},ja=EI;var sh={};je(sh,{enUS:()=>CI,nlNL:()=>bI});var CI={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},bI={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var iE={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var Te=x(C());var TI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},kI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=K(sh),s=P("LoginTokenDialog",iE),a=L(e1),l=$(),u=z("productName"),[c,p]=(0,tn.useState)(e||""),[d,m]=(0,tn.useState)(0),[v,y]=(0,tn.useState)(""),g=(0,tn.useCallback)(async w=>{w.preventDefault(),l(n1({email:c})),m(1)},[n,c]),f=()=>{y(""),m(0)},h=(0,tn.useCallback)(async w=>{w.preventDefault();let T=TI(w.target.elements.token.value);if(!T){y(i("verifyCodeError",{login:S}));return}l(Ia({token:T}))},[n]),S=(0,tn.useMemo)(()=>w=>(0,Te.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:f,children:w},"back-button"),[]);return(0,tn.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,Te.jsx)(Sd,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,Te.jsxs)("div",{className:s.root,children:[(0,Te.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,Te.jsxs)("form",{onSubmit:g,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,Te.jsx)(ja,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:w=>p(w.target.value)}),(0,Te.jsx)("div",{className:s.actions,children:(0,Te.jsx)("button",{type:"submit",className:(0,xd.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,Te.jsxs)("form",{onSubmit:h,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,Te.jsx)(ja,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,Te.jsx)("div",{className:s.errorMessage,children:v}),(0,Te.jsxs)("div",{className:s.actions,children:[(0,Te.jsx)("button",{type:"button",className:(0,xd.default)(s.button),onClick:f,children:i("back")}),(0,Te.jsx)("button",{type:"submit",className:(0,xd.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},sE=kI;var lE=x(C()),PI=()=>{let e=L(t1),t=L(L1),n=z("adminUrl"),r=Bt(),o=()=>r.send(Yi,!1),i=()=>{r.send(Yi,!1),r.send(Da)};return(0,lE.jsx)(sE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},aE=PI;var CC=x(uh()),Ct=x(_());var WI={data:null,fetchState:"idle"},fE=e=>e.contentTypes.data,Va=B("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),$I=G({name:"contentTypes",initialState:WI,reducers:{},extraReducers:e=>{e.addCase(Va.pending,t=>{t.fetchState="loading"}).addCase(Va.rejected,t=>{t.fetchState="error"}).addCase(Va.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),pE=$I.reducer;function $n(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var Yn=x(_());var mE=x(_()),wd=x(te());var Et={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemPrimaryAction:"dd-LdJ8w",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var qn={};je(qn,{enUS:()=>qI,nlNL:()=>GI});var qI={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},GI={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var qr=x(C()),XI=({src:e,title:t})=>{let n=P("CommandPalette",Et),[r,o]=(0,mE.useState)("loading"),i=K(qn);return(0,qr.jsxs)("div",{className:n.image,children:[(0,qr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,wd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,qr.jsx)("span",{className:(0,wd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,qr.jsx)("span",{className:(0,wd.default)(n.imageSrc,n.imageSrcStatus),children:(0,qr.jsx)(jl,{})}),t&&(0,qr.jsx)("span",{className:n.imageTitle,children:t})]})},gE=XI;var hE=x(_()),yE=x(te());var Oo=x(C());function ch({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=K(qn),s=P("CommandPalette",Et);return hE.default.Children.count(e)===0?null:(0,Oo.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Oo.jsxs)("div",{className:s.listHeader,children:[t&&(0,Oo.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Oo.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Oo.jsx)("div",{className:(0,yE.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Ji=x(te());var Ed=x(_());function Ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=1,fh=2,ph=4,Ae=8,Cd=16,Wa=32,nn=64,dh={a:{content:oe|Ae,self:!1,type:oe|Ae|Wa|nn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:oe|Ae,void:!0},body:{content:oe|fh|ph|Ae|Cd|Wa|nn},button:{content:Ae,type:oe|Ae|Wa|nn},caption:{content:oe,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:oe|Wa|nn},dd:{content:oe,parent:["dl"]},dl:{children:["dt","dd"],type:oe},dt:{content:oe,invalid:["footer","header"],parent:["dl"]},figcaption:{content:oe,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:oe,void:!0},img:{void:!0},li:{content:oe,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:oe},picture:{children:["source","img"],type:oe|Ae|Cd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Ae,parent:["ruby","rtc"]},rtc:{content:Ae,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Ae,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:oe},tbody:{parent:["table"],children:["tr"]},td:{content:oe,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:oe,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:oe},video:{children:["track","source"]},wbr:{type:oe|Ae,void:!0}};function No(e){return t=>{dh[t]={...e,...dh[t]}}}["address","main","div","figure","p","pre"].forEach(No({content:oe,type:oe|nn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(No({content:Ae,type:oe|Ae|nn}));["p","pre"].forEach(No({content:Ae,type:oe|nn}));["s","small","span","del","ins"].forEach(No({content:Ae,type:oe|Ae}));["article","aside","footer","header","nav","section","blockquote"].forEach(No({content:oe,type:oe|fh|nn}));["h1","h2","h3","h4","h5","h6"].forEach(No({content:Ae,type:oe|ph|nn}));["audio","canvas","iframe","img","video"].forEach(No({type:oe|Ae|Cd|nn}));var qa=Object.freeze(dh),mh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],gh=Object.keys(qa).filter(e=>e!=="canvas"&&e!=="iframe"),ue=1,hh=2,Mo=3,Gr=4,Td=5,kd=Object.freeze({alt:ue,cite:ue,class:ue,colspan:Mo,controls:Gr,datetime:ue,default:Gr,disabled:Gr,dir:ue,height:ue,href:ue,id:ue,kind:ue,label:ue,lang:ue,loading:ue,loop:Gr,media:ue,muted:Gr,poster:ue,rel:ue,role:ue,rowspan:Mo,scope:ue,sizes:ue,span:Mo,start:Mo,style:Td,src:ue,srclang:ue,srcset:ue,tabindex:ue,target:ue,title:ue,type:ue,width:ue}),yh=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function bd(){return bd=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},bd.apply(this,arguments)}function Pd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ed.default.createElement(i,bd({className:t},e)):Ed.default.createElement(i,bd({className:t},e),n)}var $a=class{attribute(t,n){return n}node(t,n){return n}};function vE(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var Gn=class{constructor(t,n,r){Ka(this,"greedy",!1),Ka(this,"options",void 0),Ka(this,"propName",void 0),Ka(this,"inverseName",void 0),Ka(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?Ed.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return vE(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var _o=x(_()),EE=x(xE());function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZI=/(url|image|image-set)\(/i,vh=class extends $a{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(ZI)&&delete n[r]}),n}},wE=1,JI=3,eO=/^<(!doctype|(html|head|body)(\s|>))/i,tO=/^(aria-|data-|\w+:)/iu,nO=/{{{(\w+)\/?}}}/;function rO(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Rd=class{constructor(t,n={},r=[],o=[]){var i;Xn(this,"allowed",void 0),Xn(this,"banned",void 0),Xn(this,"blocked",void 0),Xn(this,"container",void 0),Xn(this,"content",[]),Xn(this,"props",void 0),Xn(this,"matchers",void 0),Xn(this,"filters",void 0),Xn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new vh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:gh),this.banned=new Set(mh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:m,match:v,valid:y,void:g,...f}=a,h=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${h}/}}}`:`{{{${h}}}}${v}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:v,matcher:l,props:{...o,...f,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+m),p=""):i=i.slice(d+(m||v.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||nO)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(JI)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,EE.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==wE||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=kd[l]||kd[s];if(!this.isSafe(t)||!l.match(eO)&&(!n&&(!u||u===hh)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===qr?c=!0:u===No?c=Number.parseFloat(String(c)):u!==Td&&(c=String(c)),r[yh[l]||l]=this.applyAttributeFilters(l,c),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return $a[t]?{...n,...$a[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],u="";return[...t.childNodes].forEach(c=>{if(c.nodeType===wE){let d=c.nodeName.toLowerCase(),f=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;y=this.parseNode(v,f);let m=s(v,y,f);if(m===null)return;if(typeof m<"u"){l.push(_o.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,f))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),f.void&&(m.selfClose=f.void),l.push(_o.default.createElement(Pd,{...m,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,f)))}else l=[...l,...this.parseNode(v,f.tagName?f:n)]}else if(c.nodeType===ZI){let d=r&&!o?c.textContent:this.applyMatchers(c.textContent||"",n);Array.isArray(d)?l=[...l,...d]:u+=d}}),u&&l.push(u),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(tO);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],f;if(u)f=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));f=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(f)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function rO(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let f=new Rd(i??"",e).parse();f.length>0&&(d=f)}return d||(d=s),p?_o.default.createElement(_o.default.Fragment,null,d):_o.default.createElement(Pd,{attributes:n,className:r,tagName:c},d)}function Qi(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...f}=e,v=i?[]:l,y=o?[]:a,g=c?[c]:[],m=u?[u]:[];v.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let h=g.reduce((T,b)=>b(T,e),r??""),x=new Rd(h,f,v,y),w=m.reduce((T,b)=>b(T,e),x.parse());return _o.default.createElement(rO,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:w.length===0?void 0:w,tagName:p})}var oO=/[.*+?^${}()|[\]\\]/g,iO=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function sO(e){return e.replace(oO,"\\$&")}function aO(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function lO(e){return e.search(iO)}function CE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${sO(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function bE(e){return e.replace(Xl,'<mark data-type="placeholder">$1</mark>')}function Zi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function uO(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function Sh(e,t,n={}){if(t){let r=aO(t.toLowerCase(),e.toLowerCase()),o=Zi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=lO(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Hv).length>3||t.length>30?uO(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Zi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var cO=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Ad(e){return cO.test(e)}function TE(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ld=S(_()),RE=S(C()),kE=Ld.default.createContext(void 0);function Gr(){let e=Ld.default.useContext(kE);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var PE=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Ld.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,RE.jsx)(kE.Provider,{value:s,children:e})};var jt=S(C()),AE=({children:e})=>{let t=P("CommandPalette",Et);return(0,jt.jsx)("div",{className:t.listItemActions,children:e})};function xh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,extra:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=Gr(),f=P("CommandPalette",Et);function v(y){r(y),e&&d(!1)}return(0,jt.jsxs)("div",{className:(0,qa.default)(f.listItem,l===p&&f.listItemSelected),children:[(0,jt.jsx)("button",{type:"button",className:(0,qa.default)(f.listItemAction,f.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,jt.jsxs)("div",{className:f.listItemContent,children:[typeof n=="string"?(0,jt.jsx)("p",{className:(0,qa.default)(f.listItemText,f.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,jt.jsx)(Qi,{tagName:"p",allowList:[],content:Ad(s)?TE(s):s,className:(0,qa.default)(f.listItemDescription,u==null?void 0:u.description,t?f.lineClamp:f.truncate)})]})}),o,a&&a.length>0&&(0,jt.jsxs)("div",{className:f.sources,children:[(0,jt.jsx)("span",{className:f.sourcesTitle,children:"Sources"}),a.map(y=>y.url?(0,jt.jsx)("a",{className:f.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",onClick:()=>i&&i(y),children:y.name},y.url):(0,jt.jsx)("span",{className:f.source,children:y.name},y.name))]})]})}var Ga=S(C()),LE=()=>(0,Ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Ga.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Ga.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var Do=S(C());function wh({children:e,title:t,id:n,onDismiss:r}){let o=$(Io),i=P("CommandPalette",Et),{page:s}=Gr();return s!==n?null:(0,Do.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Do.jsxs)("div",{className:i.pageNav,children:[(0,Do.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Do.jsx)(LE,{}),o("back")]}),t&&(0,Do.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var IE=S(_());var Xa=S(C()),Ji=()=>(0,Xa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Xa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Xa.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var rn=S(C());function dO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Et);return(0,rn.jsxs)("div",{className:l.search,children:[(0,rn.jsx)("div",{className:l.searchIcon,children:(0,rn.jsx)(Ji,{})}),(0,rn.jsxs)("div",{className:l.searchInputWrapper,children:[(0,rn.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,rn.jsx)("div",{className:l.selectWrapper,children:(0,rn.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,rn.jsx)("option",{children:r}),o.map(u=>(0,rn.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var OE=(0,IE.forwardRef)(dO);var Eh=S(te());var Id=S(C()),fO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Et);return(0,Id.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Eh.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Id.jsx)("span",{className:(0,Eh.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},NE=fO;var Ya=S(C()),pO="[data-command-palette-item]";function Fo({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[f,v]=(0,Xn.useState)(),y=(0,Xn.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=y.current)==null||N.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let N=x();N.length!==0&&v(N[0].dataset.itemId)},x=()=>Array.from(document.querySelectorAll(pO)||[]),w=N=>document.querySelector(`[data-item-id=${N}]`),T=N=>{let K=w(N);K&&v(K.dataset.itemId)},b=N=>{let K=w(N);K&&K.scrollIntoView({behavior:"smooth"})},k=()=>{if(!f)return;let N=x(),K=w(f);if(!K)return;let X=N.indexOf(K),ne=N[X+1];ne&&ne.dataset.itemId?T(ne.dataset.itemId):h()},I=()=>{if(!f)return;let N=x(),K=w(f);if(!K)return;let X=N.indexOf(K),ne=N[X-1];ne&&ne.dataset.itemId?T(ne.dataset.itemId):T(N[N.length-1].dataset.itemId)},O=(0,Xn.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),k();break}case"ArrowUp":{N.preventDefault(),I();break}case"Enter":{if(f){let K=w(f);K==null||K.click()}break}}},[f]);return(0,Xn.useEffect)(()=>{h()},[d,r,l,p]),(0,Xn.useEffect)(()=>{f&&b(f)},[f]),(0,Ya.jsx)(Sd,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,onKeyDown:O,children:(0,Ya.jsxs)(PE,{selected:f,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,Ya.jsx)(OE,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Fo.Page=wh;Fo.List=ch;Fo.Image=gE;Fo.ListItem=xh;Fo.ListItemActions=AE;Fo.Button=NE;var fe=Fo;var ME=S(_());function _E(e,t){(0,ME.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Qa=S(_());var DE={data:null,fetchState:"idle"},Od=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},on=B("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),mO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),gO=G({name:"entities",initialState:DE,reducers:{},extraReducers:e=>{e.addCase(on.pending,t=>{t.fetchState="loading"}).addCase(on.rejected,t=>{t.fetchState="error"}).addCase(on.fulfilled,(t,n)=>{t.fetchState="done",t.data=mO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(le,()=>DE)}}),FE=gO.reducer;var Ch={};je(Ch,{enUS:()=>hO,nlNL:()=>yO});var hO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},yO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var HE={root:"dd-TYTKs",empty:"dd-AU7uT"};var es=S(C()),vO=({onCopy:e})=>{let t=(0,Qa.useRef)(null),n=P("EntitiesList",HE),r=L(Od),{setSelected:o}=Gr(),i=$(Ch),s=W();return(0,Qa.useEffect)(()=>{s(on())},[]),(0,Qa.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,es.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,es.jsx)(fe.List,{children:r.map((a,l)=>(0,es.jsx)(fe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,es.jsx)("p",{className:n.empty,children:i("noResults")})]})},UE=vO;var sn=S(_());var zE={data:null,fetchState:"idle"},BE=e=>e.summary.data,jE=e=>e.summary.fetchState==="error",VE=e=>e.summary.model,Yn=B("summary/getSummary",async(e,t)=>{var c,p,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(p=t.getState().info)==null?void 0:p.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u.summary?u:Promise.reject(new Error("Summary is not provided"))}),SO=G({name:"summary",initialState:zE,reducers:{},extraReducers:e=>{e.addCase(Yn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Yn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Yn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary,t.model=n.payload.model)}).addCase(le,()=>zE)}}),KE=SO.reducer;var bh={};je(bh,{enUS:()=>xO,nlNL:()=>wO});var xO={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},wO={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var WE={root:"dd-60NZr",actions:"dd-No1g3",main:"dd-l-xEF",textInput:"dd-nAaiV",loading:"dd-ciFNi",error:"dd-yNp2D"};var Nd=S(te()),XE=S(_());var Th=S(C()),kh=e=>(0,Th.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Th.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})});var Ph=S(C()),$E=e=>(0,Ph.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ph.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})});function ts(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Rh={};je(Rh,{enUS:()=>EO,nlNL:()=>CO});var EO={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},CO={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function qE(e){return B("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,{conversationId:r,...o,data:t.data})})(e)}function ns(){let e=W();return async(t,n)=>{await e(qE({name:t,data:n}))}}var GE={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var rs=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t;return o?r?n?`${o}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null:`${o}${e}`:null};var Qn=S(C()),bO=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=P("FeedbackThumbs",GE),i=z("enableFeedbackForm"),s=L(jr),a=L(rs(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=$(Rh),u=ns(),[c,p]=(0,XE.useState)(null),d=v=>{v.stopPropagation(),ts(v.target,o.fadeup),p("up"),u(e,{...t,rating:"up"})},f=v=>{v.stopPropagation(),ts(v.target,o.fadedown),p("down"),u(e,{...t,rating:"down"})};return(0,Qn.jsxs)("div",{className:o.thumbs,children:[(0,Qn.jsx)(ee.IconButton,{title:l("thumbsUp"),onClick:d,icon:(0,Qn.jsx)($E,{}),className:(0,Nd.default)(o.thumbsUp,c==="up"&&o.selected),disabled:!!c}),i&&a?(0,Qn.jsx)(ee.IconButton,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:f,icon:(0,Qn.jsx)(kh,{}),className:(0,Nd.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c}):(0,Qn.jsx)(ee.IconButton,{title:l("thumbsDown"),onClick:f,icon:(0,Qn.jsx)(kh,{}),className:(0,Nd.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c})]})},os=bO;var bn=S(C()),TO=({onCopy:e})=>{let t=(0,sn.useRef)(null),n=P("SummaryForm",WE),[r,o]=(0,sn.useState)(""),i=$(bh),s=L(VE),a=L(BE),l=L(jE),u=W(),c=()=>{u(et({name:"summary copied to clipboard",data:{originalText:a,finalText:r,model:s},options:{includeConversationData:!0}})),e(r)},p=()=>{let d=document.getSelection();d&&u(et({name:"summary copied to clipboard",data:{originalText:a,finalText:d==null?void 0:d.toString(),model:s},options:{includeConversationData:!0}}))};return(0,sn.useEffect)(()=>{u(Yn())},[]),(0,sn.useEffect)(()=>{o(a||"")},[a]),(0,sn.useEffect)(()=>{t.current&&a&&t.current.focus()},[t,a]),(0,sn.useEffect)(()=>{let d=f=>{f.key==="Enter"&&f.shiftKey&&c()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[r]),(0,bn.jsx)("div",{className:n.root,tabIndex:-1,children:l?(0,bn.jsx)("p",{className:n.error,children:i("error")}):(0,bn.jsxs)(sn.Fragment,{children:[(0,bn.jsx)("div",{className:n.main,children:(0,bn.jsx)("textarea",{placeholder:a?void 0:i("loading"),disabled:!a,className:n.textInput,ref:t,value:r,onCopy:p,onChange:d=>o(d.target.value)})}),(0,bn.jsxs)("div",{className:n.actions,children:[(0,bn.jsx)(os,{feedbackText:a||"",feedbackType:"summary",eventName:"summary feedback",eventData:{summary:a}}),(0,bn.jsx)(fe.Button,{shortKeys:[8679,8629],onClick:c,children:i("copy")})]})]})})},YE=TO;var Za={};je(Za,{enUS:()=>kO,nlNL:()=>PO});var kO={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},PO={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Zn=S(_());var Ah={};je(Ah,{enUS:()=>RO,nlNL:()=>AO});var RO={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},AO={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var QE={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var LO={data:null,fetchState:"idle"},ZE=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},Ja=B("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),IO=G({name:"knowledgeAssistant",initialState:LO,reducers:{},extraReducers:e=>{e.addCase(Ja.pending,t=>{t.fetchState="loading"}).addCase(Ja.rejected,t=>{t.fetchState="error"}).addCase(Ja.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),JE=IO.reducer;var Lh={data:[],fetchState:"idle"},eC=e=>{var t;return(t=e.answer)==null?void 0:t.data},tC=e=>e.answer.fetchState,is=xe("answer/resetKnowledgeSearch"),el=B("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=ZE(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({customerInstruction:o.customerInstruction,doNotKnowAnswer:o.doNotKnowAnswer,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),OO=G({name:"answer",initialState:Lh,reducers:{},extraReducers:e=>{e.addCase(el.pending,t=>{t.fetchState="loading"}).addCase(el.rejected,t=>{t.fetchState="error"}).addCase(el.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(le,()=>Lh).addCase(is,()=>Lh)}}),nC=OO.reducer;var tl=S(C()),rC=()=>(0,tl.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,tl.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,tl.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var tt=S(C()),NO=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Zn.default.useState(""),[i,s]=Zn.default.useState(!1),{setSelected:a}=Gr(),l=(0,Zn.useRef)(null),u=P("KnowledgeSearchStyles",QE),c=$(Ah),p=W(),d=L(eC),f=L(tC),v=async m=>{s(!0),await p(el(m)),l.current&&s(!1)},y=async m=>{m.preventDefault(),m.stopPropagation(),r!==""&&v(r)},g=(m,h)=>{p(et({name:"knowledge assist source viewed",data:{question:h,sourceViewed:m.url||m.name},options:{includeConversationData:!0}}))};return(0,Zn.useEffect)(()=>{var m;n&&f==="idle"?v(n):(m=l.current)==null||m.focus()},[l,f]),(0,Zn.useEffect)(()=>{f==="done"&&(p(et({name:"knowledge assist question answered",data:{question:r||n,sources:d[d.length-1].answer.sources,answer:d[d.length-1].answer.answer,isFollowUpQuestion:d.length>1},options:{includeConversationData:!0}})),a(`knowledge-assist-${d.length-1}`),o(""))},[f,d]),(0,Zn.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,d]),(0,tt.jsxs)("div",{className:u.root,children:[d.length>0&&(0,tt.jsx)("div",{className:u.alignRight,children:(0,tt.jsx)(fe.Button,{onClick:t,children:c("reset")})}),d.map(({question:m,answer:h},x)=>(0,tt.jsx)(fe.List,{children:(0,tt.jsx)(fe.ListItem,{id:`knowledge-assist-${x}`,"data-testid":"knowledge-search-answer",description:h.answer,closeOnSelect:!0,onClick:()=>e(h.answer),onSourceClick:w=>g(w,m),sources:h.sources,styles:{title:u.question,description:u.answer},extra:(0,tt.jsx)("div",{className:u.listItemFeedback,children:(0,tt.jsx)(os,{feedbackText:h.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:{question:m,isAgent:n!==m,isFollowUpQuestion:d.length>1,...h}})}),children:m})},`${h.answer}_${x}`)),f==="loading"&&(0,tt.jsx)("p",{className:u.status,children:c("loading")}),f==="error"&&(0,tt.jsx)("p",{className:u.status,children:c("error")}),(0,tt.jsxs)("form",{className:u.form,onSubmit:y,children:[(0,tt.jsx)("input",{ref:l,placeholder:c("anotherQuestion"),className:u.input,type:"text",value:r,onFocus:()=>{a(void 0)},onChange:m=>{a(void 0),o(m.target.value)}}),(0,tt.jsx)("button",{type:"submit",className:u.submit,disabled:i,children:(0,tt.jsx)(rC,{})})]})]})},oC=NO;var MO={data:null,fetchState:"idle"},Jn=e=>e.profile.data,Md=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],iC=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,nl=B("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),_O=G({name:"profile",initialState:MO,reducers:{},extraReducers:e=>{e.addCase(nl.pending,t=>{t.fetchState="loading"}).addCase(nl.rejected,t=>{t.fetchState="error"}).addCase(nl.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),sC=_O.reducer;var gC=S(_());var DO=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],FO=new RegExp(DO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function aC(e,t){let n=e.split(FO),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function lC(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var cC={suggestions:[],fetchState:"idle"},uC={default:cC},dC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},_d=e=>e.textSuggestions,fC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Dd=xe("textSuggestions/refresh"),an=B("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=Xi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ma(r),e);if(e==="default"){let c=s?l.filter(fC(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),rl=B("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...Ma(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(fC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?aC(c.text,e):c.text}))),l=lC(l,i),t.dispatch(En(l)),l}),pC=G({name:"textSuggestions",initialState:uC,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(an.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||cC;return{...t,[r]:{...o,fetchState:"loading"}}}).addCase(an.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(an.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(rl.pending,t=>{t.default.fetchState="loading"}).addCase(rl.rejected,t=>{t.default.fetchState="error"}).addCase(rl.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(le,()=>uC)}}),{setTextSuggestions:m8,setSuggestionState:g8}=pC.actions,mC=pC.reducer;var Ho=S(C()),HO=({commands:e,onClick:t})=>{var a,l,u;let n=W(),r=$(Za),o=L(Jn),i=L(_d),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,gC.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(an(c))})},[]),(0,Ho.jsxs)("div",{children:[e.length>0&&(0,Ho.jsx)(fe.List,{heading:r("commands"),children:e.map((c,p)=>(0,Ho.jsx)(fe.ListItem,{id:`command-${p}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:p})=>{var d;return(0,Ho.jsx)(fe.List,{heading:p,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((f,v)=>(0,Ho.jsx)(fe.ListItem,{id:`${c}-${v}`,closeOnSelect:!1,description:f.text,onClick:()=>t(f.text,f),"data-testid":"search-overlay-suggestion",children:f.title},`${f.id}-${f.text}`))},c)})]})},hC=HO;var Ue=S(_()),yC=S(te());var Ih={root:"dd-uVyL0",trigger:"dd-KIzQa",content:"dd-Ly3zO",contentOpen:"dd-O-8fR",contentTop:"dd-q3fGa",contentBottom:"dd-SFrvc",item:"dd-HZNy-"};var Uo=S(C()),UO=0,vC=Ue.default.createContext(null),zO=()=>{let e=(0,Ue.useContext)(vC);if(!e)throw new Error("Invalid DropdownContext");return e},SC=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ue.useMemo)(()=>++UO,[]),o=(0,Ue.useRef)(null),i=(0,Ue.useRef)(null),s=P("Dropdown",Ih),[a,l]=(0,Ue.useState)(!1),[u,c]=(0,Ue.useState)(n),p=f=>{f.preventDefault(),f.stopPropagation(),l(!a)},d=(0,Ue.useCallback)(([f])=>{!f.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ue.useEffect)(()=>{let f=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),(0,Ue.useEffect)(()=>{if(!i.current&&!a)return()=>{};let f=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&f.observe(i.current),()=>{i.current&&f.unobserve(i.current)}},[i,a]),(0,Uo.jsx)(vC.Provider,{value:{setIsOpen:l},children:(0,Uo.jsxs)("div",{ref:o,className:s.root,children:[(0,Uo.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,Uo.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,yC.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function BO({as:e,children:t,onClick:n,...r}){let o=e||"button",i=P("Dropdown",Ih),{setIsOpen:s}=zO(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,Uo.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}SC.Item=BO;var Oh=SC;var Nh=S(C()),xC=e=>(0,Nh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Nh.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var zo={};je(zo,{enUS:()=>jO,nlNL:()=>VO});var jO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},VO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Fd=S(C()),KO=({suggestion:e,source:t,context:n})=>{let r=$(zo),o=L(jr),i=W(),s=z("enableSuggestionFeedback"),a=`${e.text}`,l=L(rs(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),u=()=>{i(et({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,Fd.jsx)(Oh,{trigger:(0,Fd.jsx)(xC,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Fd.jsx)(Oh.Item,{as:"a",onClick:u,target:"_blank",href:l,children:r("giveFeedback")})})},Hd=KO;var Le=S(C()),$O=200,qO=5,GO=4,wC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),XO=()=>{let e=W(),t=Bt(),n=$(Za),[r,o]=(0,Ct.useState)(!1),[i,s]=(0,Ct.useState)(""),a=L(F1),l=L(Jn),[u,c]=(0,Ct.useState)(),p=L(Je),d=z("showSearch"),f=z("enableSuggestionFeedback"),v=z("showEntitiesCommand"),y=z("showSummaryCommand"),g=z("showKnowledgeSearch"),m=z("showImageSearch"),h=z("searchTriggerKey"),x=L(fE),w=L(H1),T=L(U1),b=L(D1),k=H=>cr(w.filter(Y=>Y.type===H.toUpperCase()),H),I=[{value:"PERSONAL",label:n("personalSuggestions"),list:k("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:k("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:k("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:k("IMAGE"),listOrientation:"horizontal",shouldShow:m}].filter(H=>H.shouldShow),O=[{label:n("entitiesClipboard"),onClick:()=>e(Jt("entities")),shouldShow:v&&wC(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Jt("summary")),shouldShow:y&&wC(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Jt("knowledgeAssist")),shouldShow:g}].filter(H=>H.shouldShow),N=(x==null?void 0:x.map(H=>({value:H.code.toUpperCase(),label:`${H.name}s`,list:k(H.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],K=(0,Ct.useCallback)((0,EC.default)((H,Y)=>{e(Ro({query:H,type:Y,tags:["search-overlay"],size:u?50:20}))},$O),[u]),X=(0,Ct.useCallback)((H,Y)=>{switch(Y.type){case"IMAGE":t.send(Yg,{suggestion:Y});break;default:t.send(Wr,{text:H,suggestion:Y})}e(xt(!1))},[e]),ne=H=>{$n(H.text),e(et({name:"entity copied",data:{entity:H,type:"copy"}})),e(xt(!1))},ur=H=>{t.send(Wr,{text:H,suggestion:{source:"knowledge-assist",text:H}}),e(et({name:"answer used",data:{originalText:H},options:{includeConversationData:!0}})),s(""),e(Jt("search")),e(is()),e(xt(!1))},Pt=H=>{$n(H),e(xt(!1))};function cr(H,Y){return H.slice(0,u?10:Y.toLowerCase()==="image"?GO:qO)}function Rt(H){return Y=>{r?window.confirm(n("warning"))&&(H(Y),o(!1)):H(Y)}}return(0,Ct.useEffect)(()=>{i?K(i,u):e(rd())},[i,u]),(0,Ct.useEffect)(()=>{a==="search"&&e(is())},[a]),(0,Ct.useEffect)(()=>{p&&e(ja())},[p]),_E(h,()=>e(xt(!0))),!d||!l?null:(0,Le.jsxs)(fe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Rt(H=>e(xt(H))),onChangeType:H=>c(H),onChangePage:Rt(H=>e(Jt(H))),selectedType:u,search:i,page:a,isOpen:b,types:[...N,...I],children:[(0,Le.jsxs)(fe.Page,{id:"search",children:[i.length===0&&(0,Le.jsx)(hC,{commands:O,onClick:X}),i.length>0&&(0,Le.jsxs)(Ct.Fragment,{children:[O.length>0&&(0,Le.jsx)(fe.List,{heading:n("commands"),children:O.map((H,Y)=>(0,Le.jsx)(fe.ListItem,{closeOnSelect:!1,onClick:H.onClick,id:`commands-${Y}`,children:H.label},H.label))}),[...N,...I].map(({value:H,label:Y,list:dr,lineClamp:he,listOrientation:fr})=>(0,Le.jsx)(fe.List,{heading:Y,orientation:fr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(H),hasMore:!u&&T[H.toLowerCase()]>cr(dr,H).length,children:cr(dr,H).map(q=>(0,Le.jsx)(fe.ListItem,{id:`${H}-${q.id}`,closeOnSelect:!1,lineClamp:he,onClick:()=>X(q.text,q),description:H!=="IMAGE"?q.title&&q.text:void 0,extra:f&&(0,Le.jsx)(fe.ListItemActions,{children:(0,Le.jsx)(Hd,{context:i,source:"search",suggestion:q})}),children:H==="IMAGE"?(0,Le.jsx)(fe.Image,{title:q.title||q.text,src:q.image}):q.title||q.text},`${q.id}-${q.text}`))},H))]})]}),(0,Le.jsx)(fe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Rt(()=>{e(Jt("search"))}),children:(0,Le.jsx)(UE,{onCopy:ne})}),(0,Le.jsx)(fe.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Rt(()=>{e(Jt("search"))}),children:(0,Le.jsx)(YE,{onCopy:Pt})}),(0,Le.jsx)(fe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Rt(()=>{e(is()),e(Jt("search"))}),children:(0,Le.jsx)(oC,{question:i,onUse:ur,onResetQuestion:()=>{e(is()),s("")}})})]})},CC=XO;var ol=S(C()),YO=()=>{let e=z("showSearch"),t=z("isEmbedded");return(0,ol.jsxs)(bC.Fragment,{children:[e&&(0,ol.jsx)(CC,{}),t&&(0,ol.jsx)(aE,{})]})},TC=YO;var AC=S(te());var Ud=S(C()),kC=({className:e})=>(0,Ud.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Ud.jsx)("g",{children:(0,Ud.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||rO)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(eO)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,EE.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==wE||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=kd[l]||kd[s];if(!this.isSafe(t)||!l.match(tO)&&(!n&&(!u||u===hh)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===Gr?c=!0:u===Mo?c=Number.parseFloat(String(c)):u!==Td&&(c=String(c)),r[yh[l]||l]=this.applyAttributeFilters(l,c),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return qa[t]?{...n,...qa[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],u="";return[...t.childNodes].forEach(c=>{if(c.nodeType===wE){let d=c.nodeName.toLowerCase(),m=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;y=this.parseNode(v,m);let f=s(v,y,m);if(f===null)return;if(typeof f<"u"){l.push(_o.default.cloneElement(f,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,m))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),f={tagName:d};g&&(f.attributes=g),m.void&&(f.selfClose=m.void),l.push(_o.default.createElement(Pd,{...f,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,m)))}else l=[...l,...this.parseNode(v,m.tagName?m:n)]}else if(c.nodeType===JI){let d=r&&!o?c.textContent:this.applyMatchers(c.textContent||"",n);Array.isArray(d)?l=[...l,...d]:u+=d}}),u&&l.push(u),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(nO);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],m;if(u)m=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));m=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(m)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function oO(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let m=new Rd(i??"",e).parse();m.length>0&&(d=m)}return d||(d=s),p?_o.default.createElement(_o.default.Fragment,null,d):_o.default.createElement(Pd,{attributes:n,className:r,tagName:c},d)}function Qi(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...m}=e,v=i?[]:l,y=o?[]:a,g=c?[c]:[],f=u?[u]:[];v.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&f.push(T.onAfterParse.bind(T))});let h=g.reduce((T,b)=>b(T,e),r??""),S=new Rd(h,m,v,y),w=f.reduce((T,b)=>b(T,e),S.parse());return _o.default.createElement(oO,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:w.length===0?void 0:w,tagName:p})}var AE=x(_());var iO=/[.*+?^${}()|[\]\\]/g,sO=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function aO(e){return e.replace(iO,"\\$&")}function lO(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function uO(e){return e.search(sO)}function CE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${aO(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function bE(e){return e.replace(Xl,'<mark data-type="placeholder">$1</mark>')}function Zi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function cO(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function Sh(e,t,n={}){if(t){let r=lO(t.toLowerCase(),e.toLowerCase()),o=Zi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=uO(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Hv).length>3||t.length>30?cO(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Zi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var dO=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Ad(e){return dO.test(e)}function TE(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ld=x(_()),RE=x(C()),kE=Ld.default.createContext(void 0);function Xr(){let e=Ld.default.useContext(kE);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var PE=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Ld.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,RE.jsx)(kE.Provider,{value:s,children:e})};var jt=x(C()),fO=3,LE=({children:e})=>{let t=P("CommandPalette",Et);return(0,jt.jsx)("div",{className:t.listItemActions,children:e})};function xh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,extra:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,defaultSourcesAmount:c=fO,...p}){let d=K(qn),[m,v]=(0,AE.useState)(!1),{selected:y,onChangeOpen:g}=Xr(),f=P("CommandPalette",Et);function h(S){r(S),e&&g(!1)}return(0,jt.jsxs)("div",{className:(0,Ji.default)(f.listItem,l===y&&f.listItemSelected),children:[(0,jt.jsx)("button",{type:"button",className:(0,Ji.default)(f.listItemAction,f.listItemPrimaryAction),"aria-disabled":p.disabled??!1,onClick:h,"data-command-palette-item":!0,"data-item-id":l,...p,children:(0,jt.jsxs)("div",{className:f.listItemContent,children:[typeof n=="string"?(0,jt.jsx)("p",{className:(0,Ji.default)(f.listItemText,f.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,jt.jsx)(Qi,{tagName:"p",allowList:[],content:Ad(s)?TE(s):s,className:(0,Ji.default)(f.listItemDescription,u==null?void 0:u.description,t?f.lineClamp:f.truncate)})]})}),o,a&&a.length>0&&(0,jt.jsxs)("div",{className:f.sources,children:[(0,jt.jsx)("span",{className:f.sourcesTitle,children:d("sources")}),a.slice(0,m?a.length:c).map(S=>(0,jt.jsx)("a",{className:f.source,href:S.url,target:"_blank",title:S.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>i&&i(S),children:S.name},S.url)),!m&&a.length>c&&(0,jt.jsx)("button",{className:(0,Ji.default)(f.source,f.sourceShowMore),type:"button",onClick:()=>v(!0),children:d("showMore",{amount:a.length-c})})]})]})}var Ga=x(C()),IE=()=>(0,Ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Ga.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Ga.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var Do=x(C());function wh({children:e,title:t,id:n,onDismiss:r}){let o=K(qn),i=P("CommandPalette",Et),{page:s}=Xr();return s!==n?null:(0,Do.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Do.jsxs)("div",{className:i.pageNav,children:[(0,Do.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Do.jsx)(IE,{}),o("back")]}),t&&(0,Do.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var OE=x(_());var Xa=x(C()),es=()=>(0,Xa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Xa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Xa.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var rn=x(C());function pO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Et);return(0,rn.jsxs)("div",{className:l.search,children:[(0,rn.jsx)("div",{className:l.searchIcon,children:(0,rn.jsx)(es,{})}),(0,rn.jsxs)("div",{className:l.searchInputWrapper,children:[(0,rn.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,rn.jsx)("div",{className:l.selectWrapper,children:(0,rn.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,rn.jsx)("option",{children:r}),o.map(u=>(0,rn.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var ME=(0,OE.forwardRef)(pO);var Eh=x(te());var Id=x(C()),mO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Et);return(0,Id.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Eh.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Id.jsx)("span",{className:(0,Eh.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},NE=mO;var Ya=x(C()),gO="[data-command-palette-item]";function Fo({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[m,v]=(0,Yn.useState)(),y=(0,Yn.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},f=()=>{var M;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(M=y.current)==null||M.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let M=S();M.length!==0&&v(M[0].dataset.itemId)},S=()=>Array.from(document.querySelectorAll(gO)||[]),w=M=>document.querySelector(`[data-item-id=${M}]`),T=M=>{let W=w(M);W&&v(W.dataset.itemId)},b=M=>{let W=w(M);W&&W.scrollIntoView({behavior:"smooth"})},k=()=>{if(!m)return;let M=S(),W=w(m);if(!W)return;let X=M.indexOf(W),ne=M[X+1];ne&&ne.dataset.itemId?T(ne.dataset.itemId):h()},I=()=>{if(!m)return;let M=S(),W=w(m);if(!W)return;let X=M.indexOf(W),ne=M[X-1];ne&&ne.dataset.itemId?T(ne.dataset.itemId):T(M[M.length-1].dataset.itemId)},O=(0,Yn.useCallback)(M=>{switch(M.key){case"ArrowDown":{M.preventDefault(),k();break}case"ArrowUp":{M.preventDefault(),I();break}case"Enter":{if(m){let W=w(m);W==null||W.click()}break}}},[m]);return(0,Yn.useEffect)(()=>{h()},[d,r,l,p]),(0,Yn.useEffect)(()=>{m&&b(m)},[m]),(0,Ya.jsx)(Sd,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:f,onClose:g,onKeyDown:O,children:(0,Ya.jsxs)(PE,{selected:m,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,Ya.jsx)(ME,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Fo.Page=wh;Fo.List=ch;Fo.Image=gE;Fo.ListItem=xh;Fo.ListItemActions=LE;Fo.Button=NE;var fe=Fo;var _E=x(_());function DE(e,t){(0,_E.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Qa=x(_());var FE={data:null,fetchState:"idle"},Od=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},on=B("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),hO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),yO=G({name:"entities",initialState:FE,reducers:{},extraReducers:e=>{e.addCase(on.pending,t=>{t.fetchState="loading"}).addCase(on.rejected,t=>{t.fetchState="error"}).addCase(on.fulfilled,(t,n)=>{t.fetchState="done",t.data=hO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(le,()=>FE)}}),HE=yO.reducer;var Ch={};je(Ch,{enUS:()=>vO,nlNL:()=>SO});var vO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},SO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var UE={root:"dd-TYTKs",empty:"dd-AU7uT"};var ts=x(C()),xO=({onCopy:e})=>{let t=(0,Qa.useRef)(null),n=P("EntitiesList",UE),r=L(Od),{setSelected:o}=Xr(),i=K(Ch),s=$();return(0,Qa.useEffect)(()=>{s(on())},[]),(0,Qa.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,ts.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,ts.jsx)(fe.List,{children:r.map((a,l)=>(0,ts.jsx)(fe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,ts.jsx)("p",{className:n.empty,children:i("noResults")})]})},zE=xO;var sn=x(_());var BE={data:null,fetchState:"idle"},jE=e=>e.summary.data,VE=e=>e.summary.fetchState==="error",KE=e=>e.summary.model,Qn=B("summary/getSummary",async(e,t)=>{var c,p,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(p=t.getState().info)==null?void 0:p.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u.summary?u:Promise.reject(new Error("Summary is not provided"))}),wO=G({name:"summary",initialState:BE,reducers:{},extraReducers:e=>{e.addCase(Qn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Qn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Qn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary,t.model=n.payload.model)}).addCase(le,()=>BE)}}),WE=wO.reducer;var bh={};je(bh,{enUS:()=>EO,nlNL:()=>CO});var EO={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},CO={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var $E={root:"dd-60NZr",actions:"dd-No1g3",main:"dd-l-xEF",textInput:"dd-nAaiV",loading:"dd-ciFNi",error:"dd-yNp2D"};var Md=x(te()),YE=x(_());var Th=x(C()),kh=e=>(0,Th.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Th.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})});var Ph=x(C()),qE=e=>(0,Ph.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ph.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})});function ns(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Rh={};je(Rh,{enUS:()=>bO,nlNL:()=>TO});var bO={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},TO={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function GE(e){return B("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,{conversationId:r,...o,data:t.data})})(e)}function rs(){let e=$();return async(t,n)=>{await e(GE({name:t,data:n}))}}var XE={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var os=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t;return o?r?n?`${o}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null:`${o}${e}`:null};var Zn=x(C()),kO=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=P("FeedbackThumbs",XE),i=z("enableFeedbackForm"),s=L(Vr),a=L(os(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=K(Rh),u=rs(),[c,p]=(0,YE.useState)(null),d=v=>{v.stopPropagation(),ns(v.target,o.fadeup),p("up"),u(e,{...t,rating:"up"})},m=v=>{v.stopPropagation(),ns(v.target,o.fadedown),p("down"),u(e,{...t,rating:"down"})};return(0,Zn.jsxs)("div",{className:o.thumbs,children:[(0,Zn.jsx)(ee.IconButton,{title:l("thumbsUp"),onClick:d,icon:(0,Zn.jsx)(qE,{}),className:(0,Md.default)(o.thumbsUp,c==="up"&&o.selected),disabled:!!c}),i&&a?(0,Zn.jsx)(ee.IconButton,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:m,icon:(0,Zn.jsx)(kh,{}),className:(0,Md.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c}):(0,Zn.jsx)(ee.IconButton,{title:l("thumbsDown"),onClick:m,icon:(0,Zn.jsx)(kh,{}),className:(0,Md.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c})]})},is=kO;var bn=x(C()),PO=({onCopy:e})=>{let t=(0,sn.useRef)(null),n=P("SummaryForm",$E),[r,o]=(0,sn.useState)(""),i=K(bh),s=L(KE),a=L(jE),l=L(VE),u=$(),c=()=>{u(et({name:"summary copied to clipboard",data:{originalText:a,finalText:r,model:s},options:{includeConversationData:!0}})),e(r)},p=()=>{let d=document.getSelection();d&&u(et({name:"summary copied to clipboard",data:{originalText:a,finalText:d==null?void 0:d.toString(),model:s},options:{includeConversationData:!0}}))};return(0,sn.useEffect)(()=>{u(Qn())},[]),(0,sn.useEffect)(()=>{o(a||"")},[a]),(0,sn.useEffect)(()=>{t.current&&a&&t.current.focus()},[t,a]),(0,sn.useEffect)(()=>{let d=m=>{m.key==="Enter"&&m.shiftKey&&c()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[r]),(0,bn.jsx)("div",{className:n.root,tabIndex:-1,children:l?(0,bn.jsx)("p",{className:n.error,children:i("error")}):(0,bn.jsxs)(sn.Fragment,{children:[(0,bn.jsx)("div",{className:n.main,children:(0,bn.jsx)("textarea",{placeholder:a?void 0:i("loading"),disabled:!a,className:n.textInput,ref:t,value:r,onCopy:p,onChange:d=>o(d.target.value)})}),(0,bn.jsxs)("div",{className:n.actions,children:[(0,bn.jsx)(is,{feedbackText:a||"",feedbackType:"summary",eventName:"summary feedback",eventData:{summary:a}}),(0,bn.jsx)(fe.Button,{shortKeys:[8679,8629],onClick:c,children:i("copy")})]})]})})},QE=PO;var Za={};je(Za,{enUS:()=>RO,nlNL:()=>AO});var RO={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},AO={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Jn=x(_());var Ah={};je(Ah,{enUS:()=>LO,nlNL:()=>IO});var LO={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},IO={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var ZE={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var OO={data:null,fetchState:"idle"},JE=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},Ja=B("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),MO=G({name:"knowledgeAssistant",initialState:OO,reducers:{},extraReducers:e=>{e.addCase(Ja.pending,t=>{t.fetchState="loading"}).addCase(Ja.rejected,t=>{t.fetchState="error"}).addCase(Ja.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),eC=MO.reducer;var Lh={data:[],fetchState:"idle"},tC=e=>{var t;return(t=e.answer)==null?void 0:t.data},nC=e=>e.answer.fetchState,ss=xe("answer/resetKnowledgeSearch"),el=B("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=JE(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({customerInstruction:o.customerInstruction,doNotKnowAnswer:o.doNotKnowAnswer,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),NO=G({name:"answer",initialState:Lh,reducers:{},extraReducers:e=>{e.addCase(el.pending,t=>{t.fetchState="loading"}).addCase(el.rejected,t=>{t.fetchState="error"}).addCase(el.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(le,()=>Lh).addCase(ss,()=>Lh)}}),rC=NO.reducer;var tl=x(C()),oC=()=>(0,tl.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,tl.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,tl.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var tt=x(C()),_O=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Jn.default.useState(""),[i,s]=Jn.default.useState(!1),{setSelected:a}=Xr(),l=(0,Jn.useRef)(null),u=P("KnowledgeSearchStyles",ZE),c=K(Ah),p=$(),d=L(tC),m=L(nC),v=async f=>{s(!0),await p(el(f)),l.current&&s(!1)},y=async f=>{f.preventDefault(),f.stopPropagation(),r!==""&&v(r)},g=(f,h)=>{p(et({name:"knowledge assist source viewed",data:{question:h,sourceViewed:f.url||f.name},options:{includeConversationData:!0}}))};return(0,Jn.useEffect)(()=>{var f;n&&m==="idle"?v(n):(f=l.current)==null||f.focus()},[l,m]),(0,Jn.useEffect)(()=>{m==="done"&&(p(et({name:"knowledge assist question answered",data:{question:r||n,sources:d[d.length-1].answer.sources,answer:d[d.length-1].answer.answer,isFollowUpQuestion:d.length>1},options:{includeConversationData:!0}})),a(`knowledge-assist-${d.length-1}`),o(""))},[m,d]),(0,Jn.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,d]),(0,tt.jsxs)("div",{className:u.root,children:[d.length>0&&(0,tt.jsx)("div",{className:u.alignRight,children:(0,tt.jsx)(fe.Button,{onClick:t,children:c("reset")})}),d.map(({question:f,answer:h},S)=>(0,tt.jsx)(fe.List,{children:(0,tt.jsx)(fe.ListItem,{id:`knowledge-assist-${S}`,"data-testid":"knowledge-search-answer",description:h.answer,closeOnSelect:!0,onClick:()=>e(h.answer),onSourceClick:w=>g(w,f),sources:h.sources,styles:{title:u.question,description:u.answer},extra:(0,tt.jsx)("div",{className:u.listItemFeedback,children:(0,tt.jsx)(is,{feedbackText:h.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:{question:f,isAgent:n!==f,isFollowUpQuestion:d.length>1,...h}})}),children:f})},`${h.answer}_${S}`)),m==="loading"&&(0,tt.jsx)("p",{className:u.status,children:c("loading")}),m==="error"&&(0,tt.jsx)("p",{className:u.status,children:c("error")}),(0,tt.jsxs)("form",{className:u.form,onSubmit:y,children:[(0,tt.jsx)("input",{ref:l,placeholder:c("anotherQuestion"),className:u.input,type:"text",value:r,onFocus:()=>{a(void 0)},onChange:f=>{a(void 0),o(f.target.value)}}),(0,tt.jsx)("button",{type:"submit",className:u.submit,disabled:i,children:(0,tt.jsx)(oC,{})})]})]})},iC=_O;var DO={data:null,fetchState:"idle"},er=e=>e.profile.data,Nd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],sC=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,nl=B("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),FO=G({name:"profile",initialState:DO,reducers:{},extraReducers:e=>{e.addCase(nl.pending,t=>{t.fetchState="loading"}).addCase(nl.rejected,t=>{t.fetchState="error"}).addCase(nl.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),aC=FO.reducer;var hC=x(_());var HO=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],UO=new RegExp(HO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function lC(e,t){let n=e.split(UO),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function uC(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var dC={suggestions:[],fetchState:"idle"},cC={default:dC},fC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},_d=e=>e.textSuggestions,pC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Dd=xe("textSuggestions/refresh"),an=B("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=Xi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,_a(r),e);if(e==="default"){let c=s?l.filter(pC(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),rl=B("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{..._a(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(pC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?lC(c.text,e):c.text}))),l=uC(l,i),t.dispatch(En(l)),l}),mC=G({name:"textSuggestions",initialState:cC,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(an.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||dC;return{...t,[r]:{...o,fetchState:"loading"}}}).addCase(an.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(an.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(rl.pending,t=>{t.default.fetchState="loading"}).addCase(rl.rejected,t=>{t.default.fetchState="error"}).addCase(rl.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(le,()=>cC)}}),{setTextSuggestions:x8,setSuggestionState:w8}=mC.actions,gC=mC.reducer;var Ho=x(C()),zO=({commands:e,onClick:t})=>{var a,l,u;let n=$(),r=K(Za),o=L(er),i=L(_d),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,hC.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(an(c))})},[]),(0,Ho.jsxs)("div",{children:[e.length>0&&(0,Ho.jsx)(fe.List,{heading:r("commands"),children:e.map((c,p)=>(0,Ho.jsx)(fe.ListItem,{id:`command-${p}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:p})=>{var d;return(0,Ho.jsx)(fe.List,{heading:p,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((m,v)=>(0,Ho.jsx)(fe.ListItem,{id:`${c}-${v}`,closeOnSelect:!1,description:m.text,onClick:()=>t(m.text,m),"data-testid":"search-overlay-suggestion",children:m.title},`${m.id}-${m.text}`))},c)})]})},yC=zO;var Ue=x(_()),vC=x(te());var Ih={root:"dd-uVyL0",trigger:"dd-KIzQa",content:"dd-Ly3zO",contentOpen:"dd-O-8fR",contentTop:"dd-q3fGa",contentBottom:"dd-SFrvc",item:"dd-HZNy-"};var Uo=x(C()),BO=0,SC=Ue.default.createContext(null),jO=()=>{let e=(0,Ue.useContext)(SC);if(!e)throw new Error("Invalid DropdownContext");return e},xC=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ue.useMemo)(()=>++BO,[]),o=(0,Ue.useRef)(null),i=(0,Ue.useRef)(null),s=P("Dropdown",Ih),[a,l]=(0,Ue.useState)(!1),[u,c]=(0,Ue.useState)(n),p=m=>{m.preventDefault(),m.stopPropagation(),l(!a)},d=(0,Ue.useCallback)(([m])=>{!m.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ue.useEffect)(()=>{let m=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}},[]),(0,Ue.useEffect)(()=>{if(!i.current&&!a)return()=>{};let m=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&m.observe(i.current),()=>{i.current&&m.unobserve(i.current)}},[i,a]),(0,Uo.jsx)(SC.Provider,{value:{setIsOpen:l},children:(0,Uo.jsxs)("div",{ref:o,className:s.root,children:[(0,Uo.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,Uo.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,vC.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function VO({as:e,children:t,onClick:n,...r}){let o=e||"button",i=P("Dropdown",Ih),{setIsOpen:s}=jO(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,Uo.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}xC.Item=VO;var Oh=xC;var Mh=x(C()),wC=e=>(0,Mh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Mh.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var zo={};je(zo,{enUS:()=>KO,nlNL:()=>WO});var KO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},WO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Fd=x(C()),$O=({suggestion:e,source:t,context:n})=>{let r=K(zo),o=L(Vr),i=$(),s=z("enableSuggestionFeedback"),a=`${e.text}`,l=L(os(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),u=()=>{i(et({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,Fd.jsx)(Oh,{trigger:(0,Fd.jsx)(wC,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Fd.jsx)(Oh.Item,{as:"a",onClick:u,target:"_blank",href:l,children:r("giveFeedback")})})},Hd=$O;var Le=x(C()),GO=200,XO=5,YO=4,EC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),QO=()=>{let e=$(),t=Bt(),n=K(Za),[r,o]=(0,Ct.useState)(!1),[i,s]=(0,Ct.useState)(""),a=L(F1),l=L(er),[u,c]=(0,Ct.useState)(),p=L(Je),d=z("showSearch"),m=z("enableSuggestionFeedback"),v=z("showEntitiesCommand"),y=z("showSummaryCommand"),g=z("showKnowledgeSearch"),f=z("showImageSearch"),h=z("searchTriggerKey"),S=L(fE),w=L(H1),T=L(U1),b=L(D1),k=H=>dr(w.filter(Y=>Y.type===H.toUpperCase()),H),I=[{value:"PERSONAL",label:n("personalSuggestions"),list:k("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:k("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:k("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:k("IMAGE"),listOrientation:"horizontal",shouldShow:f}].filter(H=>H.shouldShow),O=[{label:n("entitiesClipboard"),onClick:()=>e(Jt("entities")),shouldShow:v&&EC(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Jt("summary")),shouldShow:y&&EC(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Jt("knowledgeAssist")),shouldShow:g}].filter(H=>H.shouldShow),M=(S==null?void 0:S.map(H=>({value:H.code.toUpperCase(),label:`${H.name}s`,list:k(H.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],W=(0,Ct.useCallback)((0,CC.default)((H,Y)=>{e(Ao({query:H,type:Y,tags:["search-overlay"],size:u?50:20}))},GO),[u]),X=(0,Ct.useCallback)((H,Y)=>{switch(Y.type){case"IMAGE":t.send(Yg,{suggestion:Y});break;default:t.send($r,{text:H,suggestion:Y})}e(xt(!1))},[e]),ne=H=>{$n(H.text),e(et({name:"entity copied",data:{entity:H,type:"copy"}})),e(xt(!1))},cr=H=>{t.send($r,{text:H,suggestion:{source:"knowledge-assist",text:H}}),e(et({name:"answer used",data:{originalText:H},options:{includeConversationData:!0}})),s(""),e(Jt("search")),e(ss()),e(xt(!1))},Pt=H=>{$n(H),e(xt(!1))};function dr(H,Y){return H.slice(0,u?10:Y.toLowerCase()==="image"?YO:XO)}function Rt(H){return Y=>{r?window.confirm(n("warning"))&&(H(Y),o(!1)):H(Y)}}return(0,Ct.useEffect)(()=>{i?W(i,u):e(rd())},[i,u]),(0,Ct.useEffect)(()=>{a==="search"&&e(ss())},[a]),(0,Ct.useEffect)(()=>{p&&e(Va())},[p]),DE(h,()=>e(xt(!0))),!d||!l?null:(0,Le.jsxs)(fe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Rt(H=>e(xt(H))),onChangeType:H=>c(H),onChangePage:Rt(H=>e(Jt(H))),selectedType:u,search:i,page:a,isOpen:b,types:[...M,...I],children:[(0,Le.jsxs)(fe.Page,{id:"search",children:[i.length===0&&(0,Le.jsx)(yC,{commands:O,onClick:X}),i.length>0&&(0,Le.jsxs)(Ct.Fragment,{children:[O.length>0&&(0,Le.jsx)(fe.List,{heading:n("commands"),children:O.map((H,Y)=>(0,Le.jsx)(fe.ListItem,{closeOnSelect:!1,onClick:H.onClick,id:`commands-${Y}`,children:H.label},H.label))}),[...M,...I].map(({value:H,label:Y,list:fr,lineClamp:he,listOrientation:pr})=>(0,Le.jsx)(fe.List,{heading:Y,orientation:pr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(H),hasMore:!u&&T[H.toLowerCase()]>dr(fr,H).length,children:dr(fr,H).map(q=>(0,Le.jsx)(fe.ListItem,{id:`${H}-${q.id}`,closeOnSelect:!1,lineClamp:he,onClick:()=>X(q.text,q),description:H!=="IMAGE"?q.title&&q.text:void 0,extra:m&&(0,Le.jsx)(fe.ListItemActions,{children:(0,Le.jsx)(Hd,{context:i,source:"search",suggestion:q})}),children:H==="IMAGE"?(0,Le.jsx)(fe.Image,{title:q.title||q.text,src:q.image}):q.title||q.text},`${q.id}-${q.text}`))},H))]})]}),(0,Le.jsx)(fe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Rt(()=>{e(Jt("search"))}),children:(0,Le.jsx)(zE,{onCopy:ne})}),(0,Le.jsx)(fe.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Rt(()=>{e(Jt("search"))}),children:(0,Le.jsx)(QE,{onCopy:Pt})}),(0,Le.jsx)(fe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Rt(()=>{e(ss()),e(Jt("search"))}),children:(0,Le.jsx)(iC,{question:i,onUse:cr,onResetQuestion:()=>{e(ss()),s("")}})})]})},bC=QO;var ol=x(C()),ZO=()=>{let e=z("showSearch"),t=z("isEmbedded");return(0,ol.jsxs)(TC.Fragment,{children:[e&&(0,ol.jsx)(bC,{}),t&&(0,ol.jsx)(aE,{})]})},kC=ZO;var LC=x(te());var Ud=x(C()),PC=({className:e})=>(0,Ud.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Ud.jsx)("g",{children:(0,Ud.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
20
20
  c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
21
21
  c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
22
22
  c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
23
- c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var Mh=S(C()),QO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},PC=({className:e,color:t})=>(0,Mh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Mh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:QO[t||"pink"]})});var RC={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var _h={};je(_h,{enUS:()=>ZO,nlNL:()=>JO});var ZO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},JO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Bo=S(C()),LC=({onLogIn:e})=>{let t=$(_h),n=z("floatingMenu"),r=z("productName"),o=W(),i=L(Je),s=P("FloatingMenu",RC);if(i===null||n===!1)return null;let a=()=>{i===!0?o(xt(!0)):e()};return(0,Bo.jsxs)("button",{className:(0,AC.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Bo.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Bo.jsxs)("div",{className:s.icon,children:[(0,Bo.jsx)(PC,{className:s.logo,color:"pink"}),i===!1&&(0,Bo.jsx)(kC,{className:s.lock})]})]})};var Vd=S(_());var IC=S(_());function Xr(e){(0,IC.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function jo(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function ss(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var eN={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var zd=({ui:e})=>e.overlayCollapsed;var OC=G({name:"ui",initialState:eN,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:il,setInputHasFocus:Dh,setOverlayCollapsed:Yr,setOpenOverlayWhenTyping:NC,setOverlayCollapsedUserOverwrite:MC}=OC.actions,_C=OC.reducer;var Bd=S(_());var as=S(_());var DC=S(_());function FC(e,t,n){(0,DC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var HC={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var Vo=S(C()),nN=["search","personal-collection-search","search-autocomplete"];function rN(e,t,n,r={}){let o="";return nN.includes(t)?o=CE(Sh(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Sh(e,n,r),r.placeholders===!0&&(o=bE(o)),o}var oN=()=>{},iN=({index:e,selected:t,suggestion:n})=>{let r=z("inlineSuggestions"),o=L(Xi),i=z("enableSuggestionFeedback"),s=L(p=>p.input.text),a=W(),l=P("TextSuggestion",HC),u=(0,as.useRef)(null);(0,as.useEffect)(()=>{let p=setTimeout(()=>{a(w1({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(p)}},[n]),FC(u,"click",()=>{a(Kr(e)),a(Cn({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let c=(0,as.useMemo)(()=>rN(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"&&!r?null:(0,Vo.jsxs)("div",{className:l.root,onMouseEnter:()=>a(Kr(e)),children:[(0,Vo.jsx)(ee,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:oN,children:(0,Vo.jsx)(Qi,{containerTagName:"div",noWrap:!1,tagName:"span",className:l.formattedText,content:c})}),t&&i&&(0,Vo.jsx)("div",{className:l.actions,children:(0,Vo.jsx)(Hd,{source:"overlay",context:s,suggestion:n})})]})},UC=iN;var Fh=S(C()),sN=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,Bd.useMemo)(()=>{let o=e.map((i,s)=>(0,Fh.jsx)(UC,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Fh.jsx)(Bd.Fragment,{children:r})},jd=sN;var zC={root:"dd-PfvRI",paper:"dd-HYlyY"};var sl=S(C()),aN=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Vd.useRef)(null),r=P("InlineSuggestionsOverlay",zC),o=L(ss),i=W(),s=L(Je),a=L(Gi),l=L(zd),u=z("showTextSuggestions");return Xr(()=>{setTimeout(()=>{i(Yr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Vd.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,sl.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,sl.jsx)("div",{ref:n,className:r.paper,children:(0,sl.jsx)(ct,{children:(0,sl.jsx)(jd,{suggestions:e,selectedIndex:t})})})})},lN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),BC=jn(lN)(aN);var al=S(C()),uN=({children:e})=>{let n=z("locale").replace("-","");return(0,al.jsx)(oh.Provider,{value:n,children:e})},cN=({store:e,customStyles:t={},children:n})=>(0,al.jsx)(Fg,{store:e,children:(0,al.jsx)(uN,{children:(0,al.jsx)(Es.Provider,{value:t,children:n})})}),Ko=cN;var Wd=S(te()),ls=S(_());var jC=S(_());function VC(e,t){let[n,r]=(0,jC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return F.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){F.error(s)}}]}var KC=()=>/Mac/i.test(navigator.platform);var $C=S(te()),er=S(_());var Hh={};je(Hh,{enUS:()=>dN,nlNL:()=>fN});var dN={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},fN={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var WC={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var Qr=S(C()),Uh=(e,t,n)=>r=>(0,Qr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),pN=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=$(Hh),s=Bt(),a=P("Login",WC),l=z("productName"),u=(0,er.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,er.useCallback)(g=>{g.preventDefault(),s.send(Yi,!0)},[t]),p=(0,er.useMemo)(()=>g=>(0,Qr.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,er.useCallback)(g=>(0,Qr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:f,hour:v,day:y}=(0,er.useMemo)(()=>({min:Uh(a,60*10,u),hour:Uh(a,60*60,u),day:Uh(a,60*60*12,u)}),[]);return(0,Qr.jsxs)("div",{className:(0,$C.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,Qr.jsxs)(er.Fragment,{children:[(0,Qr.jsx)("br",{}),i("snooze",{min:f,hour:v,day:y})]})]})},Kd=pN;var qC={root:"dd-DoQhb",text:"dd-Jwnev"};var ll=S(C()),mN=({title:e})=>{let t=P("SearchTrigger",qC),n=W();return(0,ll.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(xt(!0)),children:[(0,ll.jsx)(Ji,{}),(0,ll.jsx)("span",{className:t.text,children:e})]})},GC=mN;var zh={};je(zh,{enUS:()=>gN,nlNL:()=>hN});var gN={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},hN={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var XC={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Se=S(C()),yN=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=P("SuggestionsOverlay",XC),o=$(zh),i=L(ss),s=y1(),a=W(),l=(0,ls.useRef)(null),u=z("searchTriggerKey"),c=z("productName"),p=L(zd),d=L(Je),f=L(Gi),[v,y]=(0,ls.useState)(null),g=z("showSearch"),m=z("showTextSuggestions"),h=z("adminUrl"),x=z("isEmbedded"),[w,T]=VC("dd-snooze-until-ms",0),b=p||w>Date.now(),k=e.filter(N=>N.source!=="gpt").length,I=()=>{b&&T(0),a(MC(!b))},O=N=>{let K=Date.now()+N*1e3;T(K),F.info(`Snooze until: ${new Date(K)}`),a(Yr({collapse:!0}))};return(0,ls.useEffect)(()=>{k===0&&y(null)},[e,k]),Xr(()=>{a(Yr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||f===!1?null:d===!1?(0,Se.jsxs)("div",{ref:l,className:(0,Wd.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1}}),(0,Se.jsx)("div",{className:r.triggersRight,children:(0,Se.jsx)(lo,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(lo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),(0,Se.jsx)("div",{className:r.collapsible,children:(0,Se.jsx)(Kd,{loginUrl:h,isEmbedded:x,onLogIn:n,onSnooze:O})})]}):!s||!i?null:(0,Se.jsxs)("div",{ref:l,className:(0,Wd.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1},children:g&&(0,Se.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>y(o(KC()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>y(null),children:(0,Se.jsx)(GC,{title:o("search")})})}),(0,Se.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Se.jsx)("div",{className:(0,Wd.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Se.jsx)(lo,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})]})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(lo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),k>0&&m&&(0,Se.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Se.jsx)(ct,{children:(0,Se.jsx)(jd,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},vN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),YC=jn(vN)(yN);var af=S(te());var or=S(_());var us=S(_());function $d(e){return e.contentEditable==="true"}function SN(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function QC(e){let{selectionStart:t,selectionEnd:n}=$d(e)?SN(e):e;return[t,n]}function ZC(e){let[,t]=(0,us.useState)(),n=(0,us.useRef)(null);return n.current=QC(e),(0,us.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=QC(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function JC(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Xl);if(!s||s.length===0)return;let a=0;s.find(l=>{let u=r.indexOf(l,a);return o>u&&i<u+l.length?(n.selectionStart=u,n.selectionEnd=u+l.length,!0):(a=u+l.length,!1)})}var eb=S(_()),xN=["div","span","mark","strong","b","i","u","em"];function Bh(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(xN.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,eb.cloneElement)(r,{children:Bh(s,t,n+1)})]}return[...e,...t]}function Zr(e){return e.tagName.toLowerCase()==="textarea"}var tb={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var db=S(te());var tf=S(_());var cs=S(_());function nb(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function qd(e){let t=(0,cs.useRef)(null),[n,r]=(0,cs.useState)(!1);return(0,cs.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=nb((c,p)=>{let d=t.current;if(!d)return;let f=c/i,v=p/i,y=d.getBoundingClientRect(),g=f>y.x&&f<y.x+y.width&&v>y.y&&v<y.y+y.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=nb(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function rb(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Gd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function ob(e){return e!=null}var Vh=S(te()),Vt=S(_());var Xd=S(_()),wN=["bottom","height","left","right","top","width"],EN=(e={},t={})=>wN.some(n=>e[n]!==t[n]),tr=new Map,ib,sb=()=>{let e=[],t=[];tr.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();EN(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{tr.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),ib=window.requestAnimationFrame(sb)};function CN(e,t){return{observe(){let n=tr.size===0;if(tr.has(e)){let r=tr.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else tr.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&sb()},unobserve(){let n=tr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||tr.delete(e),tr.size||cancelAnimationFrame(ib)}}}}function jh(e){let[t,n]=(0,Xd.useState)(null);return(0,Xd.useLayoutEffect)(()=>{if(!e.current)return;let r=CN(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var ds=S(_()),lb=S(uc());var ab={root:"dd-r-dgo"};var ub=({children:e,parentNode:t})=>{let[n,r]=(0,ds.useState)(null),o=(0,ds.useContext)(Es);return(0,ds.useLayoutEffect)(()=>{let i=document.createElement("div");return jo(i),i.classList.add(ab.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,lb.createPortal)(e,n):null};var Tn={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var Yd=S(C()),Qd=(e=!1)=>{let[t,n]=(0,Vt.useState)(e),r=(0,Vt.useCallback)(()=>n(!0),[]),o=(0,Vt.useCallback)(()=>n(!1),[]),i=(0,Vt.useCallback)(()=>n(a=>!a),[]),s=(0,Vt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Kh(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var fs=({className:e,triggerRef:t,boundaryRef:n=(0,Vt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Kh,parentNode:a,...l})=>{let u=jh(t),c=jh(n),p=(0,Vt.useMemo)(()=>s(u,c,0),[u,c]);return(0,Yd.jsx)(ub,{parentNode:a,children:(0,Yd.jsx)("div",{className:(0,Vh.default)(Tn.ref,{[Tn.positionAbove]:r==="above",[Tn.positionBelow]:r==="below",[Tn.positionLeft]:r==="left",[Tn.positionRight]:r==="right",[Tn.alignStart]:o==="start",[Tn.alignCenter]:o==="center",[Tn.alignEnd]:o==="end"}),style:p,...l,role:"dialog",children:(0,Yd.jsx)("div",{className:(0,Vh.default)(e,Tn.root),children:i})})})};var cb=S(te()),Zd=S(_());var nr={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var Wh=S(C()),Jd=(0,Zd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Zd.useRef)(null),i=P("TabCompletion",nr);return(0,Wh.jsx)("div",{ref:Gd([o,r]),className:(0,cb.default)(e,i.popoverContentContainer),...n,children:(0,Wh.jsx)("div",{className:i.popoverContent,children:t})})});var Jr=S(C()),bN=e=>t=>{let n=Kh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},TN=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",nr),s=Qd(),a=(0,tf.useMemo)(()=>bN(e.getBoundingClientRect()),[e]),[l,u]=qd(e);return(0,tf.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Jr.jsxs)("span",{children:[(0,Jr.jsx)("mark",{ref:Gd([l,s.triggerRef]),className:(0,db.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Jr.jsx)(fs,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Jr.jsx)(Jd,{style:n,children:(0,Jr.jsx)("div",{className:i.hintText,children:o})})})]})},ef=class extends qn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${rb(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(ob);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,Jr.jsx)(TN,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var fb=S(te());var $h=S(C()),kN=({inputElement:e,children:t})=>{let n=P("TabCompletion",nr),[r,o]=qd(e);return(0,$h.jsx)("mark",{ref:r,className:(0,fb.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},nf=class extends qn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,$h.jsx)(kN,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var of=S(te());var rt=S(_());var qh=S(C()),pb=()=>(0,qh.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,qh.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var eo=S(_());var gb=S(uh());var mb={root:"dd-ky-Bv",content:"dd-kV5e1"};function rf(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch{return null}}function Gh(e){return e.replace("https://www.","").replace("https://","")}var Kt=S(C()),PN=3,RN=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),AN=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=PN})=>{let i=P("LinkSearch",mb),[s,a]=(0,eo.useState)(""),l=W(),u=L(dC("url")),c=L(z1("URL",RN)),[p,d]=(0,eo.useState)(c.length-1),f=z("fallbackImage"),v=h=>{let x=h.target;a(x.value)},y=(h,x)=>{h.stopPropagation(),h.preventDefault(),window.open(x,"_blank")},g=h=>{var T;let x=p-1<0?c.length-1:p-1,w=p+1===c.length?0:p+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(x),h.code==="ArrowDown"&&d(w),h.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,eo.useCallback)((0,gb.default)(h=>{l(Ro({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,eo.useEffect)(()=>{s&&m(s)},[s]),(0,eo.useEffect)(()=>()=>{l(rd())},[]),(0,Kt.jsxs)("div",{className:i.root,children:[(0,Kt.jsx)(ct,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,x)=>(0,Kt.jsx)(ee,{selected:p===x,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Kt.jsxs)(pe,{children:[(0,Kt.jsx)(pe.Image,{src:rf(h,"small",f||void 0),title:h.title||h.text}),(0,Kt.jsxs)(pe.Content,{className:i.content,cropText:!0,children:[(0,Kt.jsx)(pe.Title,{children:h.title||Gh(h.text)}),h.title&&Gh(h.text)]}),(0,Kt.jsx)(ee.Actions,{children:(0,Kt.jsx)(ee.ActionButton,{label:r,onClick:w=>y(w,h.text)})})]})},h.text))}),(0,Kt.jsx)(Ba,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},hb=AN;var Xh={};je(Xh,{enUS:()=>LN,nlNL:()=>IN});var LN={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},IN={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var nt=S(C()),ON=(0,rt.forwardRef)((e,t)=>{let n=P("TabCompletion",nr);return(0,nt.jsx)("mark",{ref:t,className:(0,of.default)(n.matchSelection)},"selection-start")}),NN=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=$(Xh),s=P("TabCompletion",nr),a=(0,rt.useRef)(null),l=(0,rt.useRef)(null),[u,c]=(0,rt.useState)(null),p=W(),d=Qd(document.activeElement===r),[f]=(0,rt.useState)(()=>document.createRange());d.triggerRef.current=f,(0,rt.useEffect)(()=>()=>f.detach(),[]),(0,rt.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(f.setStart(y,0),f.setEnd(g,0))},[e.current,a.current]),Xr(()=>{d.close()});let v=(0,rt.useCallback)(y=>{let g=f.toString(),m=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(Zc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,nt.jsxs)("span",{children:[(0,nt.jsx)("mark",{ref:a,className:(0,of.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,nt.jsx)(fs,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,nt.jsxs)(Jd,{style:n,ref:l,children:[(0,nt.jsx)("div",{className:(0,of.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,nt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,nt.jsx)(pb,{}),(0,nt.jsx)("span",{children:"\xA0"}),(0,nt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,nt.jsx)(hb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},sf=class extends qn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,rt.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,nt.jsx)(ON,{ref:this.startRef}):(0,nt.jsx)(NN,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var rr=S(C()),MN=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",tb),c=z("insertLink"),p=z("showMidSentenceSuggestions"),d=z("inlineSuggestions"),f=ZC(a),v=(0,or.useRef)(null),y=L(Je);(0,or.useEffect)(()=>{Zr(a)&&f&&JC(a,f)},[f]);let g=(0,or.useCallback)(x=>{if(!o||!n)return x;let w=[(0,rr.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,rr.jsx)("span",{"data-testid":"tab-completion",className:(0,af.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,rr.jsx)("span",{className:(0,af.default)(u.hint,u.resetIndent),children:(0,rr.jsx)(Wl,{keyCode:"tab"},"tabHint")})),Bh(x,w)},[o,n,r]),m=(0,or.useMemo)(()=>{let x=[];return c&&x.push(new sf("selection")),x.push(new nf("placeholders")),i&&x.push(new ef("keywords")),x},[d,c,i]),h=(0,or.useMemo)(()=>{let x=window.getComputedStyle(a);return{"--dd-color":x.color,"--dd-font-size":x.fontSize,"--dd-font-family":x.fontFamily,"--dd-font-variant":x.fontVariant}},[]);return!e||!y?null:(0,rr.jsxs)("div",{ref:x=>{x!=null&&x.parentElement&&(v.current=x==null?void 0:x.parentElement)},className:u.root,style:h,children:[(0,rr.jsx)(Qi,{tagName:"span",containerTagName:"div",className:(0,af.default)(u.container,u.agentText),disableLineBreaks:Zr(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:f,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,rr.jsx)("br",{})]})},_N=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Zi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:f,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:f&&p!==!1}},yb=jn(_N)(MN);var OT=S(te()),wl=S(_());var vb={list:[],fetchState:"idle"},xb=e=>e.autoflows.list||[],Sb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},ir=B("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Yh=B("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(ir(e.platformSessionId))}),Qh=B("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(ir(e.platformSessionId))}),DN=G({name:"autoflows",initialState:vb,reducers:{},extraReducers:e=>{e.addCase(Yh.pending,(t,n)=>{let r=Sb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Qh.pending,(t,n)=>{let r=Sb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(ir.pending,t=>{t.fetchState="loading"}),e.addCase(ir.rejected,t=>{t.fetchState="error"}),e.addCase(ir.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(le,()=>vb)}}),wb=B("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(ir(e))}),o.on("sessionCompleted",()=>{n(ir(e))})}),Eb=B("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Cb=DN.reducer;var bb={list:[],fetchState:"idle",sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},Tb=e=>e.customMessages.list,kb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),Pb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),Rb=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),ul=B("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),lf=B("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),uf=B("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),Ab=G({name:"customMessages",initialState:bb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(ul.pending,t=>{t.fetchState="loading"}).addCase(ul.rejected,t=>{t.fetchState="error"}).addCase(ul.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(lf.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(lf.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(uf.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(uf.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(le,()=>bb)}}),Lb=B("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(Ab.actions.onCustomMessage(i))})}),Ib=B("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Ob=Ab.reducer;var FN={token:null,interval:null},Zh=B("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return{token:await n.requestPasswordlessToken()}}),Jh=B("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Zh()),setInterval(()=>r(Zh()),n)}),Nb=G({name:"passwordlessToken",initialState:FN,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Zh.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(Jh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:Mb}=Nb.actions,_b=Nb.reducer;var Db={shouldEmit:!0},ey={cues:[],fetchState:"idle"},Fb=e=>{var t;return(t=e.rules)==null?void 0:t.cues},HN=xe("rules/resetCues"),Wo=B("rules/evaluate",async(e,t)=>{var n,r;try{let{deepdeskAPI:o}=t.extra,i=t.getState(),s=(n=i.conversation.current)==null?void 0:n.id;if(!s)throw new Error("No current conversation to evaluate rules");if(!(await o.getAccount()).ruleEngine)throw new Error("Rule engine is not enabled for this account");if(!(await o.getRules()).filter(p=>p.isEnabled).some(p=>p.label===e.label))throw new Error(`No enabled rules found with label: ${e.label}`);return{cues:await o.evaluateRule(e.label,s,{tags:((r=i.conversation.current)==null?void 0:r.tags)||void 0,...e.params}),options:e.options}}catch(o){return F.info(o.message),{cues:[],options:e.options}}}),Hb=G({name:"answer",initialState:ey,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.rule.id!==t.payload.id)}},extraReducers:e=>{e.addCase(Wo.pending,t=>{t.fetchState="loading"}).addCase(Wo.rejected,t=>{t.fetchState="error"}).addCase(Wo.fulfilled,(t,n)=>{let r=n.payload.cues.map(i=>i.rule.id),o=t.cues.filter(i=>!r.includes(i.rule.id));t.fetchState="done",t.cues=[...n.payload.cues,...o]}).addCase(le,()=>ey).addCase(HN.toString(),()=>ey)}}),{removeCue:Ub}=Hb.actions,zb=Hb.reducer;var Xb=S(_());var $b=S(te()),qb=S(_());var jb=S(te());var Bb={root:"dd-uszkm"};var Kb=S(C()),UN=({className:e,children:t})=>{let n=P("Unicode",Bb);return(0,Kb.jsx)("span",{className:(0,jb.default)(e,n.root),children:t})},Vb=UN;var Wb={isDisabled:"dd-Sp--t",root:"dd-maqTG",buttonStop:"dd-rcq8w",stateBadge:"dd-zOnkT",isCompleted:"dd-GA-rt",isStarted:"dd-PZwtX",isAborted:"dd-PAXSE"};var ty={};je(ty,{enUS:()=>zN,nlNL:()=>BN});var zN={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},BN={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var bt=S(C()),VN=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",Wb),a=$(ty),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,bt.jsxs)(ee,{className:(0,$b.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,bt.jsx)(pe,{children:(0,bt.jsxs)(pe.Content,{children:[(0,bt.jsxs)(pe.Title,{children:[t&&(0,bt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,bt.jsx)("span",{children:r})]})}),(0,bt.jsx)(ee.Actions,{fixed:t==="Started",children:(0,bt.jsx)(ee.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,bt.jsxs)(qb.Fragment,{children:[(0,bt.jsx)(Vb,{children:u})," ",(0,bt.jsx)("span",{children:a(l)})]})})})]})},Gb=VN;var ny=S(C()),KN=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},WN=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ny.jsx)(Xb.Fragment,{children:e.map(o=>(0,ny.jsx)(Gb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||KN(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),$N=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},qN={onStartAutoflow:Yh,onStopAutoflow:Qh},Yb=jn($N,qN)(WN);var Qb=S(te()),ry=S(_());var sr={root:"dd-ERsBr",title:"dd-b36p6",isUsed:"dd-fp2IX",quickReplies:"dd--VrvP",quickReply:"dd-wFhWh",label:"dd-R9sND",errorIcon:"dd-8cdcH"};var gt=S(C()),GN=({suggestion:e})=>{let t=$(zo),n=W(),r=L(kb(e.text)),o=L(Pb(e.text)),i=L(Rb(e.text)),s=L(qi),{replyOptions:a}=e,l=(0,ry.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(lf({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,ry.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(uf({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,gt.jsxs)(ee,{onClick:l,className:(0,Qb.default)(sr.root,{[sr.isUsed]:r,[sr.hasError]:i}),children:[(0,gt.jsx)(pe,{children:(0,gt.jsxs)(pe.Content,{children:[(0,gt.jsxs)(pe.Title,{className:sr.title,children:[e.text," ",(0,gt.jsx)($l,{className:sr.label,children:"analyse tool"})," ",i&&(0,gt.jsx)("span",{className:sr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,gt.jsx)("ul",{className:sr.quickReplies,children:a.map(c=>(0,gt.jsx)("li",{className:sr.quickReply,children:c.title},c.title))})]})}),(0,gt.jsxs)(ee.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,gt.jsx)(ee.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,gt.jsx)(ee.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,gt.jsx)(ee.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Zb=GN;var cf=S(_());var iy=S(te());var oy=S(C()),cl=()=>(0,oy.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,oy.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var Jb={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var kn=S(C()),XN=({entities:e})=>{let t=P("EntitiesWidgetList",Jb),[n,r]=(0,cf.useState)(void 0),o=W(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),$n(a.text),o(et({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,cf.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,kn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,kn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,kn.jsx)("span",{className:t.entityText,children:a.text}),(0,kn.jsxs)("span",{className:t.iconWrapper,children:[(0,kn.jsx)("span",{className:(0,iy.default)(t.icon),children:(0,kn.jsx)(cl,{})}),(0,kn.jsx)("span",{className:(0,iy.default)(t.icon,n===l&&t.iconClicked),children:(0,kn.jsx)(cl,{})})]})]},a.text))})},eT=XN;var sy=S(C()),tT=()=>(0,sy.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,sy.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var ay=S(C()),nT=()=>(0,ay.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ay.jsx)("path",{d:"M543-340q16.595 0 28.798-12.202Q584-364.405 584-381t-12.202-28.798Q559.595-422 543-422t-28.798 12.202Q502-397.595 502-381t12.202 28.798Q526.405-340 543-340Zm-25-126h47q2-29 8.5-43t32.5-39q27-26 37.5-45.395Q654-612.79 654-639q0-45.882-31.5-74.941Q591-743 540-743q-38 0-68 20.5T428-665l45 19q11-25 27.5-38t39.5-13q29.778 0 48.389 17Q607-663 607-637q0 20-9 35t-32 32q-32 29-40 46.5t-8 57.5ZM260-200q-24 0-42-18t-18-42v-560q0-24 18-42t42-18h560q24 0 42 18t18 42v560q0 24-18 42t-42 18H260Zm0-60h560v-560H260v560ZM140-80q-24 0-42-18t-18-42v-620h60v620h620v60H140Zm120-740v560-560Z"})});var ly=S(C()),rT=()=>(0,ly.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ly.jsx)("path",{d:"M319-250h322v-60H319v60Zm0-170h322v-60H319v60ZM220-80q-24 0-42-18t-18-42v-680q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554v-186H220v680h520v-494H551ZM220-820v186-186 680-680Z"})});var ET=S(_());var dl=S(C()),oT=({className:e})=>(0,dl.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,dl.jsx)("line",{x1:"2",y1:"10",x2:"10",y2:"2",stroke:"black",strokeWidth:"1"}),(0,dl.jsx)("line",{x1:"2",y1:"2",x2:"10",y2:"10",stroke:"black",strokeWidth:"1"})]});var{entries:fT,setPrototypeOf:iT,isFrozen:YN,getPrototypeOf:QN,getOwnPropertyDescriptor:ZN}=Object,{freeze:ot,seal:un,create:pT}=Object,{apply:my,construct:gy}=typeof Reflect<"u"&&Reflect;ot||(ot=function(t){return t});un||(un=function(t){return t});my||(my=function(t,n,r){return t.apply(n,r)});gy||(gy=function(t,n){return new t(...n)});var df=kt(Array.prototype.forEach),sT=kt(Array.prototype.pop),fl=kt(Array.prototype.push),mf=kt(String.prototype.toLowerCase),uy=kt(String.prototype.toString),JN=kt(String.prototype.match),pl=kt(String.prototype.replace),eM=kt(String.prototype.indexOf),tM=kt(String.prototype.trim),ln=kt(Object.prototype.hasOwnProperty),Tt=kt(RegExp.prototype.test),ml=nM(TypeError);function kt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return my(e,t,r)}}function nM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gy(e,n)}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mf;iT&&iT(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(YN(t)||(t[r]=i),o=i)}e[o]=!0}return e}function rM(e){for(let t=0;t<e.length;t++)ln(e,t)||(e[t]=null);return e}function $o(e){let t=pT(null);for(let[n,r]of fT(e))ln(e,n)&&(Array.isArray(r)?t[n]=rM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$o(r):t[n]=r);return t}function ff(e,t){for(;e!==null;){let r=ZN(e,t);if(r){if(r.get)return kt(r.get);if(typeof r.value=="function")return kt(r.value)}e=QN(e)}function n(){return null}return n}var aT=ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cy=ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dy=ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oM=ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fy=ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iM=ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),lT=ot(["#text"]),uT=ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),py=ot(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cT=ot(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),pf=ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sM=un(/\{\{[\w\W]*|[\w\W]*\}\}/gm),aM=un(/<%[\w\W]*|[\w\W]*%>/gm),lM=un(/\${[\w\W]*}/gm),uM=un(/^data-[\-\w.\u00B7-\uFFFF]/),cM=un(/^aria-[\-\w]+$/),mT=un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dM=un(/^(?:\w+script|data):/i),fM=un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gT=un(/^html$/i),dT=Object.freeze({__proto__:null,MUSTACHE_EXPR:sM,ERB_EXPR:aM,TMPLIT_EXPR:lM,DATA_ATTR:uM,ARIA_ATTR:cM,IS_ALLOWED_URI:mT,IS_SCRIPT_OR_DATA:dM,ATTR_WHITESPACE:fM,DOCTYPE_NAME:gT}),pM=function(){return typeof window>"u"?null:window},mM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function hT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pM(),t=U=>hT(U);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:d,trustedTypes:f}=e,v=l.prototype,y=ff(v,"cloneNode"),g=ff(v,"nextSibling"),m=ff(v,"childNodes"),h=ff(v,"parentNode");if(typeof s=="function"){let U=n.createElement("template");U.content&&U.content.ownerDocument&&(n=U.content.ownerDocument)}let x,w="",{implementation:T,createNodeIterator:b,createDocumentFragment:k,getElementsByTagName:I}=n,{importNode:O}=r,N={};t.isSupported=typeof fT=="function"&&typeof h=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:K,ERB_EXPR:X,TMPLIT_EXPR:ne,DATA_ATTR:ur,ARIA_ATTR:Pt,IS_SCRIPT_OR_DATA:cr,ATTR_WHITESPACE:Rt}=dT,{IS_ALLOWED_URI:H}=dT,Y=null,dr=Q({},[...aT,...cy,...dy,...fy,...lT]),he=null,fr=Q({},[...uT,...py,...cT,...pf]),q=Object.seal(pT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pr=null,Al=null,Yo=!0,ro=!0,ys=!1,Ll=!0,qt=!1,Gt=!1,Il=!1,it=!1,At=!1,Ol=!1,Nl=!1,Ly=!0,Iy=!1,Ek="user-content-",kf=!0,vs=!1,Qo={},Zo=null,Oy=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ny=null,My=Q({},["audio","video","img","source","image","track"]),Pf=null,_y=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ml="http://www.w3.org/1998/Math/MathML",_l="http://www.w3.org/2000/svg",Ln="http://www.w3.org/1999/xhtml",Jo=Ln,Rf=!1,Af=null,Ck=Q({},[Ml,_l,Ln],uy),Ss=null,bk=["application/xhtml+xml","text/html"],Tk="text/html",Oe=null,ei=null,kk=n.createElement("form"),Dy=function(E){return E instanceof RegExp||E instanceof Function},Lf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ei&&ei===E)){if((!E||typeof E!="object")&&(E={}),E=$o(E),Ss=bk.indexOf(E.PARSER_MEDIA_TYPE)===-1?Tk:E.PARSER_MEDIA_TYPE,Oe=Ss==="application/xhtml+xml"?uy:mf,Y=ln(E,"ALLOWED_TAGS")?Q({},E.ALLOWED_TAGS,Oe):dr,he=ln(E,"ALLOWED_ATTR")?Q({},E.ALLOWED_ATTR,Oe):fr,Af=ln(E,"ALLOWED_NAMESPACES")?Q({},E.ALLOWED_NAMESPACES,uy):Ck,Pf=ln(E,"ADD_URI_SAFE_ATTR")?Q($o(_y),E.ADD_URI_SAFE_ATTR,Oe):_y,Ny=ln(E,"ADD_DATA_URI_TAGS")?Q($o(My),E.ADD_DATA_URI_TAGS,Oe):My,Zo=ln(E,"FORBID_CONTENTS")?Q({},E.FORBID_CONTENTS,Oe):Oy,pr=ln(E,"FORBID_TAGS")?Q({},E.FORBID_TAGS,Oe):{},Al=ln(E,"FORBID_ATTR")?Q({},E.FORBID_ATTR,Oe):{},Qo=ln(E,"USE_PROFILES")?E.USE_PROFILES:!1,Yo=E.ALLOW_ARIA_ATTR!==!1,ro=E.ALLOW_DATA_ATTR!==!1,ys=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Ll=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,At=E.RETURN_DOM||!1,Ol=E.RETURN_DOM_FRAGMENT||!1,Nl=E.RETURN_TRUSTED_TYPE||!1,it=E.FORCE_BODY||!1,Ly=E.SANITIZE_DOM!==!1,Iy=E.SANITIZE_NAMED_PROPS||!1,kf=E.KEEP_CONTENT!==!1,vs=E.IN_PLACE||!1,H=E.ALLOWED_URI_REGEXP||mT,Jo=E.NAMESPACE||Ln,q=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Dy(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Dy(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(ro=!1),Ol&&(At=!0),Qo&&(Y=Q({},lT),he=[],Qo.html===!0&&(Q(Y,aT),Q(he,uT)),Qo.svg===!0&&(Q(Y,cy),Q(he,py),Q(he,pf)),Qo.svgFilters===!0&&(Q(Y,dy),Q(he,py),Q(he,pf)),Qo.mathMl===!0&&(Q(Y,fy),Q(he,cT),Q(he,pf))),E.ADD_TAGS&&(Y===dr&&(Y=$o(Y)),Q(Y,E.ADD_TAGS,Oe)),E.ADD_ATTR&&(he===fr&&(he=$o(he)),Q(he,E.ADD_ATTR,Oe)),E.ADD_URI_SAFE_ATTR&&Q(Pf,E.ADD_URI_SAFE_ATTR,Oe),E.FORBID_CONTENTS&&(Zo===Oy&&(Zo=$o(Zo)),Q(Zo,E.FORBID_CONTENTS,Oe)),kf&&(Y["#text"]=!0),Gt&&Q(Y,["html","head","body"]),Y.table&&(Q(Y,["tbody"]),delete pr.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ml('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ml('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=E.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else x===void 0&&(x=mM(f,o)),x!==null&&typeof w=="string"&&(w=x.createHTML(""));ot&&ot(E),ei=E}},Fy=Q({},["mi","mo","mn","ms","mtext"]),Hy=Q({},["foreignobject","desc","title","annotation-xml"]),Pk=Q({},["title","style","font","a","script"]),Uy=Q({},[...cy,...dy,...oM]),zy=Q({},[...fy,...iM]),Rk=function(E){let A=h(E);(!A||!A.tagName)&&(A={namespaceURI:Jo,tagName:"template"});let D=mf(E.tagName),ce=mf(A.tagName);return Af[E.namespaceURI]?E.namespaceURI===_l?A.namespaceURI===Ln?D==="svg":A.namespaceURI===Ml?D==="svg"&&(ce==="annotation-xml"||Fy[ce]):!!Uy[D]:E.namespaceURI===Ml?A.namespaceURI===Ln?D==="math":A.namespaceURI===_l?D==="math"&&Hy[ce]:!!zy[D]:E.namespaceURI===Ln?A.namespaceURI===_l&&!Hy[ce]||A.namespaceURI===Ml&&!Fy[ce]?!1:!zy[D]&&(Pk[D]||!Uy[D]):!!(Ss==="application/xhtml+xml"&&Af[E.namespaceURI]):!1},oo=function(E){fl(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},If=function(E,A){try{fl(t.removed,{attribute:A.getAttributeNode(E),from:A})}catch{fl(t.removed,{attribute:null,from:A})}if(A.removeAttribute(E),E==="is"&&!he[E])if(At||Ol)try{oo(A)}catch{}else try{A.setAttribute(E,"")}catch{}},By=function(E){let A=null,D=null;if(it)E="<remove></remove>"+E;else{let Be=JN(E,/^[\r\n\t ]+/);D=Be&&Be[0]}Ss==="application/xhtml+xml"&&Jo===Ln&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let ce=x?x.createHTML(E):E;if(Jo===Ln)try{A=new d().parseFromString(ce,Ss)}catch{}if(!A||!A.documentElement){A=T.createDocument(Jo,"template",null);try{A.documentElement.innerHTML=Rf?w:ce}catch{}}let ze=A.body||A.documentElement;return E&&D&&ze.insertBefore(n.createTextNode(D),ze.childNodes[0]||null),Jo===Ln?I.call(A,Gt?"html":"body")[0]:Gt?A.documentElement:ze},jy=function(E){return b.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Ak=function(E){return E instanceof p&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof c)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Vy=function(E){return typeof a=="function"&&E instanceof a},In=function(E,A,D){N[E]&&df(N[E],ce=>{ce.call(t,A,D,ei)})},Ky=function(E){let A=null;if(In("beforeSanitizeElements",E,null),Ak(E))return oo(E),!0;let D=Oe(E.nodeName);if(In("uponSanitizeElement",E,{tagName:D,allowedTags:Y}),E.hasChildNodes()&&!Vy(E.firstElementChild)&&Tt(/<[/\w]/g,E.innerHTML)&&Tt(/<[/\w]/g,E.textContent))return oo(E),!0;if(!Y[D]||pr[D]){if(!pr[D]&&$y(D)&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,D)||q.tagNameCheck instanceof Function&&q.tagNameCheck(D)))return!1;if(kf&&!Zo[D]){let ce=h(E)||E.parentNode,ze=m(E)||E.childNodes;if(ze&&ce){let Be=ze.length;for(let st=Be-1;st>=0;--st)ce.insertBefore(y(ze[st],!0),g(E))}}return oo(E),!0}return E instanceof l&&!Rk(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Tt(/<\/no(script|embed|frames)/i,E.innerHTML)?(oo(E),!0):(qt&&E.nodeType===3&&(A=E.textContent,df([K,X,ne],ce=>{A=pl(A,ce," ")}),E.textContent!==A&&(fl(t.removed,{element:E.cloneNode()}),E.textContent=A)),In("afterSanitizeElements",E,null),!1)},Wy=function(E,A,D){if(Ly&&(A==="id"||A==="name")&&(D in n||D in kk))return!1;if(!(ro&&!Al[A]&&Tt(ur,A))){if(!(Yo&&Tt(Pt,A))){if(!he[A]||Al[A]){if(!($y(E)&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,E)||q.tagNameCheck instanceof Function&&q.tagNameCheck(E))&&(q.attributeNameCheck instanceof RegExp&&Tt(q.attributeNameCheck,A)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(A))||A==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,D)||q.tagNameCheck instanceof Function&&q.tagNameCheck(D))))return!1}else if(!Pf[A]){if(!Tt(H,pl(D,Rt,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&E!=="script"&&eM(D,"data:")===0&&Ny[E])){if(!(ys&&!Tt(cr,pl(D,Rt,"")))){if(D)return!1}}}}}}return!0},$y=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},qy=function(E){In("beforeSanitizeAttributes",E,null);let{attributes:A}=E;if(!A)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he},ce=A.length;for(;ce--;){let ze=A[ce],{name:Be,namespaceURI:st,value:io}=ze,xs=Oe(Be),at=Be==="value"?io:tM(io);if(D.attrName=xs,D.attrValue=at,D.keepAttr=!0,D.forceKeepAttr=void 0,In("uponSanitizeAttribute",E,D),at=D.attrValue,D.forceKeepAttr||(If(Be,E),!D.keepAttr))continue;if(!Ll&&Tt(/\/>/i,at)){If(Be,E);continue}qt&&df([K,X,ne],Xy=>{at=pl(at,Xy," ")});let Gy=Oe(E.nodeName);if(Wy(Gy,xs,at)){if(Iy&&(xs==="id"||xs==="name")&&(If(Be,E),at=Ek+at),x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!st)switch(f.getAttributeType(Gy,xs)){case"TrustedHTML":{at=x.createHTML(at);break}case"TrustedScriptURL":{at=x.createScriptURL(at);break}}try{st?E.setAttributeNS(st,Be,at):E.setAttribute(Be,at),sT(t.removed)}catch{}}}In("afterSanitizeAttributes",E,null)},Lk=function U(E){let A=null,D=jy(E);for(In("beforeSanitizeShadowDOM",E,null);A=D.nextNode();)In("uponSanitizeShadowNode",A,null),!Ky(A)&&(A.content instanceof i&&U(A.content),qy(A));In("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(U){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=null,D=null,ce=null,ze=null;if(Rf=!U,Rf&&(U="<!-->"),typeof U!="string"&&!Vy(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw ml("dirty is not a string, aborting")}else throw ml("toString is not a function");if(!t.isSupported)return U;if(Il||Lf(E),t.removed=[],typeof U=="string"&&(vs=!1),vs){if(U.nodeName){let io=Oe(U.nodeName);if(!Y[io]||pr[io])throw ml("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof a)A=By("<!---->"),D=A.ownerDocument.importNode(U,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?A=D:A.appendChild(D);else{if(!At&&!qt&&!Gt&&U.indexOf("<")===-1)return x&&Nl?x.createHTML(U):U;if(A=By(U),!A)return At?null:Nl?w:""}A&&it&&oo(A.firstChild);let Be=jy(vs?U:A);for(;ce=Be.nextNode();)Ky(ce)||(ce.content instanceof i&&Lk(ce.content),qy(ce));if(vs)return U;if(At){if(Ol)for(ze=k.call(A.ownerDocument);A.firstChild;)ze.appendChild(A.firstChild);else ze=A;return(he.shadowroot||he.shadowrootmode)&&(ze=O.call(r,ze,!0)),ze}let st=Gt?A.outerHTML:A.innerHTML;return Gt&&Y["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&Tt(gT,A.ownerDocument.doctype.name)&&(st="<!DOCTYPE "+A.ownerDocument.doctype.name+`>
24
- `+st),qt&&df([K,X,ne],io=>{st=pl(st,io," ")}),x&&Nl?x.createHTML(st):st},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lf(U),Il=!0},t.clearConfig=function(){ei=null,Il=!1},t.isValidAttribute=function(U,E,A){ei||Lf({});let D=Oe(U),ce=Oe(E);return Wy(D,ce,A)},t.addHook=function(U,E){typeof E=="function"&&(N[U]=N[U]||[],fl(N[U],E))},t.removeHook=function(U){if(N[U])return sT(N[U])},t.removeHooks=function(U){N[U]&&(N[U]=[])},t.removeAllHooks=function(){N={}},t}var yT=hT();var to=S(_());var gM={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function vT(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function gl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function hl(e,t){var n,r,o,i,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],u="",c=t||{},p=0;function d(v){var y=gM[v[1]||""],g=l[l.length-1]==v;return y?y[1]?(g?l.pop():l.push(v),y[0|g]):y[0]:v}function f(){for(var v="";l.length;)v+=d(l[l.length-1]);return v}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(v,y,g){return c[y.toLowerCase()]=g,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(p,o.index),p=a.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((s=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+vT(gl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=hl(vT(o[5].replace(/^\s*[>*+.-]/gm,""))),s==">"?s="blockquote":(s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+i+"</"+s+">"):o[8]?n='<img src="'+gl(o[8])+'" alt="'+gl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+gl(o[11]||c[r.toLowerCase()])+'">'),n=f()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+hl(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+gl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(p)+f()).replace(/^\n+|\n+$/g,"")}var ST={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var Pn=S(C());function hM(e){return`<button type="button" class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function hy(e){let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(n=>n.remove()),t.textContent??""}function yM(e){return e.replace(/\r\n/g,`
25
- `)}var vM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=P("Markdown",ST),s=(0,to.useRef)(null),[a,l]=(0,to.useState)(null),u=(0,to.useMemo)(()=>{let y=hl(yM(e));return yT.sanitize(y).replace(/<\/code>/g,`${hM(i.copyIcon)}</code>`)},[e]),c=y=>{var h;let g=y.target,m=!!((h=s.current)!=null&&h.querySelector("code"));a||m&&g.tagName!=="CODE"||!m&&g!==s.current||(g.addEventListener("mouseleave",()=>l(null),{once:!0}),l(g))},p=()=>{if(!a)return;l(null);let y=a.querySelector("button");y&&(ts(y,i.fadeup),r(hy(a)))},d=y=>{y.target.tagName.toLowerCase()==="button"&&(ts(y.target,i.fadeup),r(hy(y.target.parentElement)))},f=()=>{a&&(l(null),o(hy(a)))},v=y=>{if(y===null)return;let g=y.getBoundingClientRect();g.left<0?y.style.transform=`translateX(${-g.left+2}px)`:g.right>window.innerWidth&&(y.style.transform=`translateX(${window.innerWidth-g.right-2}px)`)};return(0,Pn.jsxs)(to.Fragment,{children:[a&&(0,Pn.jsxs)(fs,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,Pn.jsxs)("div",{className:i.options,ref:v,children:[(0,Pn.jsx)("button",{type:"button",className:i.option,onClick:p,children:n}),(0,Pn.jsx)("div",{className:i.divider}),(0,Pn.jsx)("button",{type:"button",className:i.option,onClick:f,children:t})]}),(0,Pn.jsx)("div",{className:i.arrow})]}),(0,Pn.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:u},onMouseOver:c,onClick:d})]})},xT=vM;var yy={};je(yy,{enUS:()=>SM,nlNL:()=>xM});var SM={useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},xM={useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var wT={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l"};var cn=S(C()),wM=({cue:e,onRemove:t,onCopy:n,onUse:r})=>{let o=P("WidgetCue",wT),i=$(yy),s=ns(),a=c=>{n&&n(c,e)},l=c=>{r&&r(c,e)},u=c=>{c.preventDefault(),c.stopPropagation(),t(e)};return(0,ET.useEffect)(()=>{s("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,cn.jsxs)(ee,{"data-testid":"cue",children:[(0,cn.jsx)(pe,{children:(0,cn.jsxs)(pe.Content,{children:[e.title&&(0,cn.jsx)(pe.Title,{className:o.title,"data-testid":"widget-cue-title",children:e.title}),(0,cn.jsx)(xT,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:a,onUse:l})]})}),(0,cn.jsxs)(ee.IconButtonContainer,{children:[(0,cn.jsx)(os,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"}),(0,cn.jsx)(ee.IconButton,{title:i("removeCue"),onClick:u,icon:(0,cn.jsx)(oT,{})})]})]})},CT=wM;var yl=S(C()),EM=({cues:e})=>{let t=W(),n=Bt(),r=ns(),o=a=>{t(Ub({id:a.rule.id})),r("Assistant response closed",{name:a.rule.name,group:a.rule.label,description:a.rule.description,cueText:a.text})},i=(a,l)=>{$n(a),r("Assistant response copied",{name:l.rule.name,group:l.rule.label,description:l.rule.description,copiedText:a})},s=(a,l)=>{n.send(Wr,{text:a,suggestion:{source:"cue",sourceText:a}}),r("Assistant response used",{name:l.rule.name,group:l.rule.label,description:l.rule.description,usedText:a})};return(0,yl.jsx)(yl.Fragment,{children:e.map(a=>(0,yl.jsx)(CT,{cue:a,onRemove:o,onCopy:i,onUse:s},a.rule.id))})},bT=EM;var gf=S(_());var TT={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var dn=S(C());function CM(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var kT=({data:e,schema:t})=>{let n=P("WidgetCustomData",TT),r=o=>{$n(o)};return(0,gf.useEffect)(()=>{F.info("Custom data",e,t)},[e]),(0,dn.jsx)("dl",{className:n.root,children:t.map(o=>{let i=CM(e,o.path);return(0,dn.jsxs)(gf.Fragment,{children:[(0,dn.jsx)("dt",{className:n.label,children:o.label}),(0,dn.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,dn.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,dn.jsx)("span",{className:n.isFalse,children:o.falseValue}):i?(0,dn.jsxs)("button",{type:"button",onClick:()=>r(i),className:n.copyButton,children:[(0,dn.jsx)("span",{children:i}),(0,dn.jsx)(cl,{})]}):"-"})]},o.label)})})};var RT=S(_());var bM=/(https?:\/\/[^\s]+)/,PT=e=>e.split(" ").find(t=>bM.test(t));var Wt=S(C()),TM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=PT(r),i=$(zo),s=z("showImages"),a=z("fallbackImage"),l=p=>{p.preventDefault(),p.stopPropagation(),n(r)},u=(0,RT.useCallback)(p=>{window.open(o,"_blank"),p.stopPropagation(),p.preventDefault()},[o]);return(0,Wt.jsxs)(ee,{onClick:l,"data-testid":"edit-suggestion",children:[(0,Wt.jsxs)(pe,{children:[s&&e.image&&(0,Wt.jsx)(pe.Image,{src:rf(e,"small",a||void 0),title:e.title}),(0,Wt.jsxs)(pe.Content,{children:[e.title&&(0,Wt.jsx)(pe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,Wt.jsx)(ee.Labels,{labels:e.searchKeywords}),(0,Wt.jsx)(pe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Wt.jsxs)(ee.Actions,{children:[o&&(0,Wt.jsx)(ee.ActionButton,{onClick:u,label:i("visitUrl")}),(0,Wt.jsx)(ee.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},AT=TM;var vl=S(C()),kM=({lines:e,suggestions:t})=>{let n=Bt(),r=(o,i)=>{n.send(Wr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,vl.jsx)(vl.Fragment,{children:t.map(o=>(0,vl.jsx)(AT,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},LT=kM;var Sl={};je(Sl,{enUS:()=>PM,nlNL:()=>RM});var PM={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},RM={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xl={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",sectionList:"dd-bF9pF",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",link:"dd-DRo0x"};var V=S(C()),hf=(e,t)=>{let n=L(Je);(0,wl.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},AM=({onLogIn:e})=>{let t=P("Widget",xl),n=z("isEmbedded"),r=z("adminUrl");return(0,V.jsx)("div",{className:t.loginText,children:(0,V.jsx)("div",{children:(0,V.jsx)(Kd,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},IT=({text:e})=>{let t=P("Widget",xl);return(0,V.jsx)("div",{className:t.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:e})})},"notification")},LM=()=>{let e=$(Sl),t=W(),n=P("Widget",xl),r=z("showSearch"),o=z("showSummaryCommand"),i=z("showKnowledgeSearch"),s=L(rs("/admin/")),a=Bt(),l=z("productName"),u=r||o||i||s;return hf(()=>(t(Jh()),()=>{t(Mb())}),[t]),u?(0,V.jsx)(pn,{title:e("actions"),type:"shortcuts",children:(0,V.jsxs)("div",{className:n.shortcutList,children:[r&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-search","aria-label":e("linkSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0}),children:[(0,V.jsx)(Ji,{}),e("linkSearch")]}),o&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-summary","aria-label":e("linkSummary"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,V.jsx)(rT,{}),e("linkSummary")]}),i&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-knowledge-assist","aria-label":e("linkKnowledgeSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,V.jsx)(nT,{}),e("linkKnowledgeSearch")]}),s&&(0,V.jsxs)("a",{className:n.shortcut,target:"_blank",href:s,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:l}),rel:"noreferrer",children:[(0,V.jsx)(tT,{}),e("linkStudioLogin",{productName:l})]})]})}):null},IM=()=>{let e=W(),t=z("showCustomMessages"),n=L(Tb),r=L(qi);return hf(()=>(e(ul(r)),e(Lb(r)),()=>{e(Ib(r))}),[e,t,r]),!t||n.length===0?null:(0,V.jsx)(pn,{type:"custom-messages","data-testid":"custom-messages",children:(0,V.jsx)(ct,{withDivider:!0,children:n.map(o=>(0,V.jsx)(Zb,{suggestion:o},o.text))})})},OM=()=>{let e=$(Sl),t=W(),n=z("showAutoflows"),r=L(xb),o=L(qi);return hf(()=>(t(ir(o)),t(wb(o)),()=>{t(Eb(o))}),[t,n,o]),!n||r.length===0?null:(0,V.jsx)(pn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(Yb,{})})})},NM=()=>{let e=W(),t=L(Md),n=L(iC),r=L(Fb),o=L(I1),i=L(Od),s=L(_d),a=L(Jn),l=L(jr);return(0,wl.useEffect)(()=>{!!o&&!n&&F.warn("Custom data provided, but no schema.")},[o,n]),hf(()=>{t.forEach(({type:u})=>{u==="entities"?e(on()):Yl.includes(u)||e(an(u))})},[e,l,a]),(0,V.jsx)(wl.Fragment,{children:t.map(({type:u,title:c,amount:p,lines:d,schema:f})=>{var v,y;switch(u){case"entities":return i&&i.length>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(eT,{entities:i})},u);case"cues":return r&&r.length>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(bT,{cues:r})})},u);case"custom-data":return o&&f&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(kT,{data:o,schema:f})})},u);default:return((y=(v=s[u])==null?void 0:v.suggestions)==null?void 0:y.length)>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(LT,{lines:d,contentType:u,suggestions:s[u].suggestions.slice(0,p)||[]})})},u)}})})},MM=({onLogIn:e})=>{let t=$(Sl),n=P("Widget",xl),r=L(Gi),o=L(Je),i=L(qi),s=L(Jn);return r===!1?(0,V.jsx)(IT,{text:t("notSupported")}):o===!1?(0,V.jsx)(AM,{onLogIn:e}):!s||!i||o===null?(0,V.jsx)(IT,{text:t("waiting")}):(0,V.jsx)("div",{className:(0,OT.default)(n.root),"data-testid":"widget",children:(0,V.jsxs)(ql,{className:n.sectionList,children:[(0,V.jsx)(LM,{}),(0,V.jsx)(IM,{}),(0,V.jsx)(OM,{}),(0,V.jsx)(NM,{})]})})},NT=MM;function ps(e){let t=new Range;return t.selectNodeContents(e),t}function MT(e,t,n){try{return no(e,t,n),!0}catch{return!1}}function yf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function vf(e){return"tagName"in e&&e.tagName==="BR"}var El=/[\u200B-\u200D\uFEFF]/g;function no(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(El,""),p=o+c.length,d=t>=o&&t<=p,f=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!f?r.setStartBefore(l):r.setStart(l,v)}f&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(vf(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;yf(l)&&u&&!yf(u)&&!vf(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Cl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,f=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(El,"").length),f&&(l=u+v.substring(0,i).replace(El,"").length),u+=v.replace(El,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;vf(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let g=d&&y===r,m=f&&y===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(p.childNodes[y]),f&&y===i-1&&(l=u),l!==void 0))break}!f&&yf(p)&&!v&&u++,f&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function bl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,f=p?i:void 0,v=u.textContent.replace(El,"");d===0&&f===void 0?a+=v:a+=v.substring(d,f);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&vf(u)&&!d&&(a+=`
26
- `);for(let f=c?r:0;f<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[f]),s!==1);f++);!p&&s===0&&yf(u)&&!d&&(a+=`
27
- `);break}default:break}p&&s++}return l(e),a}var _T=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(_T||{}),ar=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();Br(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(_T).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(t={shouldObserve:!0}){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t!=null&&t.shouldObserve&&n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function DT(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var qo=class extends ar{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),bl(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!DT(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!DT(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Cl(this.element,t);let n=this.lastKnownSelection;if(n&&MT(this.element,n.start,n.end))return n;let r=ps(this.element);return r.collapse(!1),Cl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return bl(this.element,no(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(t={shouldObserve:!0}){super.listen(t),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),t!=null&&t.shouldObserve&&this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Go=class extends ar{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function FT(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function _M(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var vy=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},Sy=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=FT(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},xy=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),F.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new Sy(t,this.deepdeskUrl,{debug:!0}):new vy(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=_M(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(F.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;F.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},HT=xy;var ms=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var wy=e=>new Promise(t=>{setTimeout(t,e)});var gs=class extends ms{name="ClientError"},Cy=class extends ms{name="ServerError"},Ey=new Map;async function DM(e){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t&&t.includes("application/json"))return e.json();let n=await e.text();return n===""?null:(F.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))}var fn=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",{useCache:u=!1,abortLatest:c=!1,attempts:p=1,retryDelay:d=500,refreshTokenOn401:f=!0,retryOnError:v=b=>b instanceof TypeError,retryOnResponse:y=b=>b.status>=500,version:g="v1",...m}=n;if(u)if(l){if(Ey.has(s)){r(Ey.get(s));return}}else throw new Error(`Can't use 'useCache' for ${n.method}`);let h={credentials:"include",...m,headers:{"Content-Type":"application/json",...m.headers}};!l&&this.csrfToken&&(h.headers={...h.headers,"X-CSRFToken":this.csrfToken}),typeof g=="string"&&(h.headers={...h.headers,"X-Deepdesk-API-Version":g});let x=p,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&c&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let T=async()=>(x--,a(s,h).then(async b=>y(b)&&!i.isAborted&&x>0?(await wy(d),T()):b.status===401&&f===!0&&w===!1?(w=!0,await this.refreshToken(),T()):b).catch(async b=>{if(v(b)&&!i.isAborted&&x>0)return await wy(d),T();throw b}));T().then(async b=>{let k=await DM(b);if(delete this.latestRequestByUrl[s],b.status>=500){o(new Cy("Server Error",k));return}else if(b.status===401){o(new gs("Unauthorized",k));return}else if(b.status===403){o(new gs("Forbidden",k));return}else if(b.status===404){o(new gs("Not Found",k));return}else if(b.status>=400){o(new gs("Bad Request",k));return}u&&Ey.set(s,k),r(k)}).catch(b=>{o(b)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var FM;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(FM||={});function Sf(e){return{...J(e),tags:e.tags}}var lr=class e{constructor(t,n={}){this.options=n;this.client=new fn(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),F.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Re(t),tags:t.tags},{version:"v2"});return Sf(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null,useCache:!0});return J(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null,useCache:!0});return J(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null,useCache:!0});return J(t)}async getAccount(){let t=await this.client.get("/apis/admin/account/",{version:null,useCache:!0});return J(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null,useCache:!0});return J(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),F.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return F.info(`Successfully retrieved conversation ${i.id} for session ${t}`),Sf(i)}async isConversationSupported(t,n={}){F.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=Re(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Sf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Re(o),tags:o.tags})),{version:"v2"})).map(o=>Sf(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",Re({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:Re({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){let r=await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model});return J(r)}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw F.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Re(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,Re(n),{abortLatest:!0})).map(i=>({...J(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,Re(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return J(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",Re(t),{abortLatest:!0});return J(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Re(t),{version:"v2"});return J(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Re({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return J(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return J(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return J(t.token)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return J(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return J(s.cues)}async getRules(){let t=new URLSearchParams,n=await this.client.get(`/apis/admin/rule-engine/rules/?${t.toString()}`,{version:null,useCache:!0});return J(n)}async translateMessages(t){let n=await this.client.post("/api/translate",Re(t),{version:"v2"});return J(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Uv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&F.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Tl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener($g(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,J(o))}catch{F.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var HM;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(HM||={});var kl=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=F;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return J(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Re(n));return J(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Re(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return J(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Re(t));return J(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Tl(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var UT={startTime:null,stopTime:null},zT=G({name:"handlingTime",initialState:UT,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(le,()=>UT)}}),{handlingTimeStart:BT,handlingTimeStop:xf,handlingTimeReset:jT}=zT.actions,VT=zT.reducer;var KT=(e={})=>{let t={onAuthError:$i(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var wf={list:{keywordMatches:[]},fetchState:"idle"};var Xo=B("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return wf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),UM=G({name:"styleSuggestions",initialState:wf,reducers:{},extraReducers:e=>{e.addCase(Xo.pending,t=>{t.fetchState="loading"}).addCase(Xo.rejected,t=>{t.fetchState="error"}).addCase(Xo.fulfilled,(t,n)=>{t.fetchState="done",Br(t.list,n.payload)||(t.list=n.payload)}).addCase(Po,t=>{t.list=wf.list}).addCase(le,()=>wf)}}),WT=UM.reducer;var $T=(e={})=>{let t,n=!0,r={getStyleSuggestions:Xo,debounce:500,...e};return o=>i=>s=>{var f;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((f=u.conversation.current)==null?void 0:f.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function zM(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var qT=(e={})=>{let t={getTextSuggestions:an,getAutocompleteSuggestions:rl,debounce:200,check:ss,...e},n;return r=>o=>i=>{var y;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Dd.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:f}}=l;return zM(f,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=Xi(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var GT=Xo.fulfilled.toString();function BM(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var XT=e=>t=>n=>r=>{var u;if(r.type!==GT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=BM(o,s);r.type===GT&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var jM=hc({answer:nC,auth:i1,autoflows:Cb,conversation:m1,contentTypes:pE,customMessages:Ob,passwordlessToken:_b,entities:FE,knowledgeAssistant:JE,handlingTime:VT,info:_1,input:A1,settings:Zw,profile:sC,search:j1,summary:KE,styleSuggestions:WT,ui:_C,rules:zb,textSuggestions:mC});function YT(e){return ow({reducer:jM,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),KT(),qT({debounce:200}),$T({debounce:500}),XT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var VM=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},KM=e=>t=>n=>r=>{var a,l,u,c,p,d;let o=t.getState(),i=Ug("inlineSuggestions")(o);switch(r.type){case $i.toString():{!r.payload&&e.emit("logout",void 0);break}case on.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case et.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((u=o.conversation.current)==null?void 0:u.id),data:r.payload.data});break;case Jc.toString():e.handleKeyDown(r.payload);break;case Po.toString():e.logSendMessage(r.payload);break;case ed.toString():e.handleInputChanged(r.payload);break;case Wo.fulfilled.toString():r.isBroadcasted||e.broadcast(Xg,r,!1),(c=r.payload.options)!=null&&c.shouldEmit&&e.emit("cues",r.payload.cues);break;default:break}let s=n(r);switch(r.type){case Po.toString():e.handleAfterSendMessage(r.payload);break;case il.toString():e.onUpdateShowTabHint(r.payload);break;case xf.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case Cn.toString():{let{start:f,end:v}=o.input.selection;e.emit("select-suggestion",{type:VM(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:f,end:v}:{start:0,end:v}},{mayApplyChanges:!0}),i&&(t.dispatch(En([])),t.dispatch(Wn()));break}case Zc.toString():{let{start:f,end:v}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:f,end:v}:{start:0,end:v}},{mayApplyChanges:!0});break}case Oa.toString():{let f=t.getState(),{text:v,selection:y}=f.input.userCommitted;e.emit("reset",{text:v,selectionAfter:y},{mayApplyChanges:!0});break}case td.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:(p=o.conversation.current)==null?void 0:p.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case En.toString():{i&&r.payload.length>0&&t.dispatch(Kr(0));break}case Yn.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload.summary,model:t.getState().summary.model}});break}default:break}return s},QT=KM;function by(e){return e.toISOString().replace("T"," ").replace("Z","")}function ZT(e,t){var i,s,a,l;let n=(i=e.conversation.current)==null?void 0:i.id;if(!n)return F.warn("No conversationId for handling time metrics"),null;let{startTime:r,stopTime:o}=e.handlingTime;return!r||!o?(F.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:n,clientVersion:t.version,agentId:(s=e.info.agentInfo)==null?void 0:s.agentId,agentName:(a=e.info.agentInfo)==null?void 0:a.agentName,agentEmail:(l=e.info.agentInfo)==null?void 0:l.agentEmail,timeStart:by(r),timeStop:by(o)}}function JT(e,t,n){var I,O,N,K;let r=(I=t.conversation.current)==null?void 0:I.id;if(!r)return F.warn("No conversationId for send message metrics"),null;let{text:o,metrics:{numCharsTyped:i,numCharsPasted:s,numCharsCut:a,numCharsDeleted:l,numPaste:u,agentStartedTypingTimestamp:c,externalTimeTotalSeconds:p,pastes:d,cuts:f,deletions:v,textSuggestions:y,offeredTextSuggestions:g}}=t[e],m=o.length,x=y.reduce((X,{text:ne,searchTerm:ur})=>X+ne.length-(ur?ur.length:0),0),w=c??Date.now(),T=(Date.now()-w)/1e3+(p||0),b=i/T,k=y.reduce((X,{searchTerm:ne})=>X+(ne?ne.length:0),0);return{conversationId:r,source:"agent",text:o,clientVersion:n.version,pastes:d,cuts:f,deletions:v,lenTextTyped:i+k,lenTextTotal:m,lenTextAssisted:x,lenTextPasted:s,lenTextCut:a,lenTextDeleted:l,timeTotalSeconds:T,charsPerSecond:b,numPastes:u,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:g.filter(X=>X.source==="gpt").length}],agentId:(O=t.info.agentInfo)==null?void 0:O.agentId,agentName:(N=t.info.agentInfo)==null?void 0:N.agentName,agentEmail:(K=t.info.agentInfo)==null?void 0:K.agentEmail}}function Ty(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return Ty(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?Ty(o,t):null}function ek(e,t){return Ty(e,t)}function tk(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function WM(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Ef(e){return WM(e)&&(Zr(e)||$d(e))}var rk,Rn=new Map,$M=["bottom","height","left","right","top","width"],nk=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:$M.some(n=>e[n]!==t[n]);function ok(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...ok(t)]:[]}function ik(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var Cf=!1,sk=()=>{Cf=!0;let e=[];if(Rn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Rn.delete(n);return}let r=n.getBoundingClientRect();nk(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(ik,t.rect):t.rect;nk(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Rn.size===0){Cf=!1;return}rk=window.requestAnimationFrame(sk)};function ky(e,t){let n=ok(e),r=[],o=n.map((i,s)=>ky(i,a=>{r[s]=a;let l=Rn.get(e);if(!l)return;let u=r.reduce(ik,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Rn.has(e)){let s=Rn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Rn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!Cf&&sk()},unobserve(){o.forEach(s=>s.unobserve());let i=Rn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Rn.delete(e),Rn.size||(cancelAnimationFrame(rk),Cf=!1)}}}}var ak,An=new Map,lk=()=>{An.forEach((e,t)=>{if(!t.isConnected){An.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),An.size!==0&&(ak=window.requestAnimationFrame(lk))};function uk(e,t){return{observe(){let n=An.size===0;An.has(e)?An.get(e).callbacks.push(t):An.set(e,{visible:void 0,callbacks:[t]}),n&&lk()},unobserve(){let n=An.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||An.delete(e),An.size||cancelAnimationFrame(ak)}}}}var Py=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function Ry(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function hs(e){return parseFloat(e)}function bf(e){return Math.round(e*1e6)}function ck(e){return e/1e6}function Ay(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=hs(e.width),i=hs(e.borderLeftWidth),s=hs(e.borderRightWidth),a=hs(e.paddingRight),l=ck(bf(o)-bf(i)-bf(s)),u=ck(bf(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function Pl(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",jo(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};Ry(r,n,Py),Ay(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=uk(e,()=>{Ry(r,n,Py),Ay(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=ky(e,p=>{if(p===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),p.height===0&&p.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(Ry(r,n,Py),Ay(r,e,n),i(),n.style.top=`${p.top}px`,n.style.left=`${p.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),v=hs(f.borderTopWidth),y=hs(f.borderBottomWidth),g=d.top+v-p.top,m=p.top+p.height+-(d.top+d.height-y);n.style.clipPath=`inset(${g}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var dk=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{F.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function qM(e){return e.offsetParent!==null}function fk(e){if(!qM(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function Tf(e,t,n=100){let r=fk(e);t({isVisible:r});let o=setInterval(()=>{let i=fk(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Ie=S(C());var pk=dk("showTabHint",!0),Rl=class e{static version="11.5.5-beta.2";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new lr(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[QT({broadcast:(p,d,f)=>{this.broadcastEvents.send(p,d,f)},emit:(p,d,f)=>this.emit(p,d,f),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),onUpdateShowTabHint:p=>pk.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new kl(n)}),this.store=YT(c),this.broadcastEvents=new HT({debug:!0,deepdeskUrl:u,eventMap:V1(this.store),createCustomChannel:l}),this.store.dispatch(il(pk.value())),this.store.dispatch(Wc({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(F.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(F.warn("Profile has not been loaded (yet)"),!0):(F.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch($i(null)),this.store.dispatch(Vn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Je(r)&&Jw(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Vn())).payload}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){F.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Vg({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(qc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Gc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Kg(t))).payload}async postMessages(t){return(await this.store.dispatch(Yc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Xc(t))).payload}resetConversation(){this.store.dispatch(le()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Yn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Wc(t))}setVisitorInfo(t){this.store.dispatch(N1(t))}setCustomData(t){this.store.dispatch(M1(t))}async setAgentInfo(t){await this.store.dispatch(Na(t))}async setAgentSettings(t){await this.store.dispatch(qg(t))}async getAgentSettings(){return(await this.store.dispatch(Gg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Dd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(ed(t))}notifyKeyDown(t){this.store.dispatch(Jc(t))}notifyPaste(t,n){this.store.dispatch(T1({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(C1(t))}notifyExternalSuggestion(t){this.store.dispatch(Cn(t)),this.store.dispatch(Wn())}async evaluateRule(t,n={},r=Db){let{payload:o,error:i}=await this.store.dispatch(Wo({label:t,params:n,options:r}));if(i)throw new Error(i.message);return o.cues}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Yr({collapse:!1})),this.inputMediator&&this.store.dispatch(v1({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(En([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(b1(g1(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(x1()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(E1()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(Oa()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Kr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Kr(-1)),this.store.dispatch(Oa()),t.preventDefault()):n||(this.store.dispatch(Yr({collapse:!0})),this.store.dispatch(NC(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:f}=this.state.input;this.store.dispatch(il(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&f&&f.text.startsWith(d)&&(this.store.dispatch(Cn({text:f.text,suggestion:f,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Wn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(k1()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(F.info("Start handling time"),this.store.dispatch(BT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(F.info("Stop handling time"),this.store.dispatch(xf()))}logSendMessage(t){let n=JT("input",this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n))}logHandlingTime(){let t=ZT(this.state,{version:this.version});t&&(this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(jT()))}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Wn()),this.store.dispatch(Po(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Cn({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{let i=this.eventListeners[t];i&&i.forEach(s=>{try{s(n)}catch(a){F.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),F.error(a)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=Pl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=Pl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return jo(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),F.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(F.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(R1(r.metrics))):F.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Ef(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:f,inputMediator:v,closestScrollSelector:y,appendOverlayTo:g,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:f,isEmbedded:p,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),jo(t),this.inputMediator=v||(Zr(t)?new Go(t):new qo(t)),this.inputMediator.on("change",({plainText:T})=>{this.notifyInputChanged(T)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(P1({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",T=>{this.notifyKeyDown(T)}),this.inputMediator.on("paste",({pastedText:T,selectionText:b})=>{this.notifyPaste(T,b)}),this.inputMediator.on("cut",({selectionText:T})=>{this.notifyCut(T)});let x=y&&ek(t,y)||void 0;if(m){let{customStyles:T,appendOverlayTo:b}=n;if(Zr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:T,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(BC,{})})}),k),this.inputMediator.on("caret",O=>{this.store.dispatch(En([])),O?(k.style.display="block",k.style.top=`${O.top}px`,k.style.left=`${O.left}px`):k.style.display="none"});let I=this.overlayContainerFactory("floating-menu",x||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:b},T==null?void 0:T.floatingMenuRootNode);(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:T,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(LC,{onLogIn:()=>this.loginViaPopup().catch(O=>F.warn(O.message))})})}),I)}else{let T=this.overlayContainerFactory("deepdesk-tab-completion",x||t,{appendTo:g,closestScrollElement:x,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",x||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(yb,{inputElement:t})})}),T),(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(YC,{onLogIn:()=>this.loginViaPopup().catch(k=>F.warn(k.message))})})}),b)}(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(TC,{})})}),this.createContainer("deepdesk-overlays"));let w;this.inputMediator.on("selection",T=>{clearTimeout(w),T===null?w=setTimeout(()=>{T!==null&&this.store.dispatch(Wg(T))},500):this.store.dispatch(Wg(T))}),this.inputMediator.on("disabled",()=>{var T;(T=this.inputMediator)==null||T.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(Dh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Dh(!0))),this.store.dispatch(S1({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Wn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var T;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((T=this.state.conversation.current)==null?void 0:T.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&F.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Ao,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(NT,{onLogIn:()=>this.loginViaPopup().catch(s=>F.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Tf(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){tk(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(nl());let t=Jn(this.state);t&&(await this.store.dispatch(Ja()),this.store.dispatch(Wc({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",p),clearInterval(d)};i.onmessage=async f=>{var v,y;if((v=f.data)!=null&&v.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((y=f.data)==null?void 0:y.jwt),await this.isLoggedIn(),this.broadcastEvents.send(_a),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let p=async f=>{var v;if(f.origin===a.origin)switch((v=f.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let y=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(y,a.origin,[o.port2])}catch(y){F.error("Error posting message to popup",y),r(y)}break}case"deepdesk-popup-error":{u(),f.data.message==="Timeout"&&F.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(f.data.message));break}}};window.addEventListener("message",p);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(F.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;F.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Md(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(on()):Yl.includes(r)||this.store.dispatch(an(r))})}catch(r){this.handleError(r)}}};async function mk(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function gk(e,t,n={}){let r=n.replace?no(e,n.replace.start,n.replace.end):ps(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
28
- `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?no(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function GM(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function XM(e){let t=document.createDocumentFragment();return e.split(`
29
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function hk(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):hk(n,t)}async function yk(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?GM(t):XM(t);n?hk(l.startContainer,u):(l.insertNode(u),l.collapse(!1))};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function vk(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function Sk(e,t,n){await new lr(e).authenticateWithKey(t,n)}async function xk(e){let n=await new fn(e).get("/platform/config/",{version:null,useCache:!0});return J(n)}async function YM(e){let n=await(e.fetch??window.fetch)(e.url),r=await n.blob();return new File([r],e.name,{type:e.mimeType??n.headers.get("Content-Type")??"image/jpeg"})}async function wk(e,t){let n=await YM(t),r=new Event("change",{bubbles:!0,cancelable:!0});try{Object.defineProperty(e,"files",{configurable:!0,get:()=>[n]}),e.dispatchEvent(r)}finally{Object.hasOwn(e,"files")&&delete e.files}}return Dk(QM);})();
23
+ c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var Nh=x(C()),JO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},RC=({className:e,color:t})=>(0,Nh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Nh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:JO[t||"pink"]})});var AC={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var _h={};je(_h,{enUS:()=>eM,nlNL:()=>tM});var eM={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},tM={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Bo=x(C()),IC=({onLogIn:e})=>{let t=K(_h),n=z("floatingMenu"),r=z("productName"),o=$(),i=L(Je),s=P("FloatingMenu",AC);if(i===null||n===!1)return null;let a=()=>{i===!0?o(xt(!0)):e()};return(0,Bo.jsxs)("button",{className:(0,LC.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Bo.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Bo.jsxs)("div",{className:s.icon,children:[(0,Bo.jsx)(RC,{className:s.logo,color:"pink"}),i===!1&&(0,Bo.jsx)(PC,{className:s.lock})]})]})};var Vd=x(_());var OC=x(_());function Yr(e){(0,OC.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function jo(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function as(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var nM={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var zd=({ui:e})=>e.overlayCollapsed;var MC=G({name:"ui",initialState:nM,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:il,setInputHasFocus:Dh,setOverlayCollapsed:Qr,setOpenOverlayWhenTyping:NC,setOverlayCollapsedUserOverwrite:_C}=MC.actions,DC=MC.reducer;var Bd=x(_());var ls=x(_());var FC=x(_());function HC(e,t,n){(0,FC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var UC={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var Vo=x(C()),oM=["search","personal-collection-search","search-autocomplete"];function iM(e,t,n,r={}){let o="";return oM.includes(t)?o=CE(Sh(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Sh(e,n,r),r.placeholders===!0&&(o=bE(o)),o}var sM=()=>{},aM=({index:e,selected:t,suggestion:n})=>{let r=z("inlineSuggestions"),o=L(Xi),i=z("enableSuggestionFeedback"),s=L(p=>p.input.text),a=$(),l=P("TextSuggestion",UC),u=(0,ls.useRef)(null);(0,ls.useEffect)(()=>{let p=setTimeout(()=>{a(w1({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(p)}},[n]),HC(u,"click",()=>{a(Wr(e)),a(Cn({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let c=(0,ls.useMemo)(()=>iM(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"&&!r?null:(0,Vo.jsxs)("div",{className:l.root,onMouseEnter:()=>a(Wr(e)),children:[(0,Vo.jsx)(ee,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:sM,children:(0,Vo.jsx)(Qi,{containerTagName:"div",noWrap:!1,tagName:"span",className:l.formattedText,content:c})}),t&&i&&(0,Vo.jsx)("div",{className:l.actions,children:(0,Vo.jsx)(Hd,{source:"overlay",context:s,suggestion:n})})]})},zC=aM;var Fh=x(C()),lM=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,Bd.useMemo)(()=>{let o=e.map((i,s)=>(0,Fh.jsx)(zC,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Fh.jsx)(Bd.Fragment,{children:r})},jd=lM;var BC={root:"dd-PfvRI",paper:"dd-HYlyY"};var sl=x(C()),uM=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Vd.useRef)(null),r=P("InlineSuggestionsOverlay",BC),o=L(as),i=$(),s=L(Je),a=L(Gi),l=L(zd),u=z("showTextSuggestions");return Yr(()=>{setTimeout(()=>{i(Qr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Vd.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,sl.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,sl.jsx)("div",{ref:n,className:r.paper,children:(0,sl.jsx)(ct,{children:(0,sl.jsx)(jd,{suggestions:e,selectedIndex:t})})})})},cM=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),jC=jn(cM)(uM);var al=x(C()),dM=({children:e})=>{let n=z("locale").replace("-","");return(0,al.jsx)(oh.Provider,{value:n,children:e})},fM=({store:e,customStyles:t={},children:n})=>(0,al.jsx)(Fg,{store:e,children:(0,al.jsx)(dM,{children:(0,al.jsx)(Cs.Provider,{value:t,children:n})})}),Ko=fM;var Wd=x(te()),us=x(_());var VC=x(_());function KC(e,t){let[n,r]=(0,VC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return F.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){F.error(s)}}]}var WC=()=>/Mac/i.test(navigator.platform);var qC=x(te()),tr=x(_());var Hh={};je(Hh,{enUS:()=>pM,nlNL:()=>mM});var pM={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},mM={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var $C={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var Zr=x(C()),Uh=(e,t,n)=>r=>(0,Zr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),gM=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=K(Hh),s=Bt(),a=P("Login",$C),l=z("productName"),u=(0,tr.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,tr.useCallback)(g=>{g.preventDefault(),s.send(Yi,!0)},[t]),p=(0,tr.useMemo)(()=>g=>(0,Zr.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,tr.useCallback)(g=>(0,Zr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:m,hour:v,day:y}=(0,tr.useMemo)(()=>({min:Uh(a,60*10,u),hour:Uh(a,60*60,u),day:Uh(a,60*60*12,u)}),[]);return(0,Zr.jsxs)("div",{className:(0,qC.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,Zr.jsxs)(tr.Fragment,{children:[(0,Zr.jsx)("br",{}),i("snooze",{min:m,hour:v,day:y})]})]})},Kd=gM;var GC={root:"dd-DoQhb",text:"dd-Jwnev"};var ll=x(C()),hM=({title:e})=>{let t=P("SearchTrigger",GC),n=$();return(0,ll.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(xt(!0)),children:[(0,ll.jsx)(es,{}),(0,ll.jsx)("span",{className:t.text,children:e})]})},XC=hM;var zh={};je(zh,{enUS:()=>yM,nlNL:()=>vM});var yM={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},vM={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var YC={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Se=x(C()),SM=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=P("SuggestionsOverlay",YC),o=K(zh),i=L(as),s=y1(),a=$(),l=(0,us.useRef)(null),u=z("searchTriggerKey"),c=z("productName"),p=L(zd),d=L(Je),m=L(Gi),[v,y]=(0,us.useState)(null),g=z("showSearch"),f=z("showTextSuggestions"),h=z("adminUrl"),S=z("isEmbedded"),[w,T]=KC("dd-snooze-until-ms",0),b=p||w>Date.now(),k=e.filter(M=>M.source!=="gpt").length,I=()=>{b&&T(0),a(_C(!b))},O=M=>{let W=Date.now()+M*1e3;T(W),F.info(`Snooze until: ${new Date(W)}`),a(Qr({collapse:!0}))};return(0,us.useEffect)(()=>{k===0&&y(null)},[e,k]),Yr(()=>{a(Qr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||m===!1?null:d===!1?(0,Se.jsxs)("div",{ref:l,className:(0,Wd.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1}}),(0,Se.jsx)("div",{className:r.triggersRight,children:(0,Se.jsx)(uo,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(uo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),(0,Se.jsx)("div",{className:r.collapsible,children:(0,Se.jsx)(Kd,{loginUrl:h,isEmbedded:S,onLogIn:n,onSnooze:O})})]}):!s||!i?null:(0,Se.jsxs)("div",{ref:l,className:(0,Wd.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1},children:g&&(0,Se.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>y(o(WC()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>y(null),children:(0,Se.jsx)(XC,{title:o("search")})})}),(0,Se.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Se.jsx)("div",{className:(0,Wd.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Se.jsx)(uo,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})]})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(uo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),k>0&&f&&(0,Se.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Se.jsx)(ct,{children:(0,Se.jsx)(jd,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},xM=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),QC=jn(xM)(SM);var af=x(te());var ir=x(_());var cs=x(_());function $d(e){return e.contentEditable==="true"}function wM(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function ZC(e){let{selectionStart:t,selectionEnd:n}=$d(e)?wM(e):e;return[t,n]}function JC(e){let[,t]=(0,cs.useState)(),n=(0,cs.useRef)(null);return n.current=ZC(e),(0,cs.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=ZC(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function eb(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Xl);if(!s||s.length===0)return;let a=0;s.find(l=>{let u=r.indexOf(l,a);return o>u&&i<u+l.length?(n.selectionStart=u,n.selectionEnd=u+l.length,!0):(a=u+l.length,!1)})}var tb=x(_()),EM=["div","span","mark","strong","b","i","u","em"];function Bh(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(EM.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,tb.cloneElement)(r,{children:Bh(s,t,n+1)})]}return[...e,...t]}function Jr(e){return e.tagName.toLowerCase()==="textarea"}var nb={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var fb=x(te());var tf=x(_());var ds=x(_());function rb(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function qd(e){let t=(0,ds.useRef)(null),[n,r]=(0,ds.useState)(!1);return(0,ds.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=rb((c,p)=>{let d=t.current;if(!d)return;let m=c/i,v=p/i,y=d.getBoundingClientRect(),g=m>y.x&&m<y.x+y.width&&v>y.y&&v<y.y+y.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=rb(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function ob(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Gd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function ib(e){return e!=null}var Vh=x(te()),Vt=x(_());var Xd=x(_()),CM=["bottom","height","left","right","top","width"],bM=(e={},t={})=>CM.some(n=>e[n]!==t[n]),nr=new Map,sb,ab=()=>{let e=[],t=[];nr.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();bM(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{nr.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),sb=window.requestAnimationFrame(ab)};function TM(e,t){return{observe(){let n=nr.size===0;if(nr.has(e)){let r=nr.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else nr.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&ab()},unobserve(){let n=nr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||nr.delete(e),nr.size||cancelAnimationFrame(sb)}}}}function jh(e){let[t,n]=(0,Xd.useState)(null);return(0,Xd.useLayoutEffect)(()=>{if(!e.current)return;let r=TM(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var fs=x(_()),ub=x(uc());var lb={root:"dd-r-dgo"};var cb=({children:e,parentNode:t})=>{let[n,r]=(0,fs.useState)(null),o=(0,fs.useContext)(Cs);return(0,fs.useLayoutEffect)(()=>{let i=document.createElement("div");return jo(i),i.classList.add(lb.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,ub.createPortal)(e,n):null};var Tn={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var Yd=x(C()),Qd=(e=!1)=>{let[t,n]=(0,Vt.useState)(e),r=(0,Vt.useCallback)(()=>n(!0),[]),o=(0,Vt.useCallback)(()=>n(!1),[]),i=(0,Vt.useCallback)(()=>n(a=>!a),[]),s=(0,Vt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Kh(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var ps=({className:e,triggerRef:t,boundaryRef:n=(0,Vt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Kh,parentNode:a,...l})=>{let u=jh(t),c=jh(n),p=(0,Vt.useMemo)(()=>s(u,c,0),[u,c]);return(0,Yd.jsx)(cb,{parentNode:a,children:(0,Yd.jsx)("div",{className:(0,Vh.default)(Tn.ref,{[Tn.positionAbove]:r==="above",[Tn.positionBelow]:r==="below",[Tn.positionLeft]:r==="left",[Tn.positionRight]:r==="right",[Tn.alignStart]:o==="start",[Tn.alignCenter]:o==="center",[Tn.alignEnd]:o==="end"}),style:p,...l,role:"dialog",children:(0,Yd.jsx)("div",{className:(0,Vh.default)(e,Tn.root),children:i})})})};var db=x(te()),Zd=x(_());var rr={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var Wh=x(C()),Jd=(0,Zd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Zd.useRef)(null),i=P("TabCompletion",rr);return(0,Wh.jsx)("div",{ref:Gd([o,r]),className:(0,db.default)(e,i.popoverContentContainer),...n,children:(0,Wh.jsx)("div",{className:i.popoverContent,children:t})})});var eo=x(C()),kM=e=>t=>{let n=Kh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},PM=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",rr),s=Qd(),a=(0,tf.useMemo)(()=>kM(e.getBoundingClientRect()),[e]),[l,u]=qd(e);return(0,tf.useEffect)(()=>{u?s.open():s.close()},[u]),(0,eo.jsxs)("span",{children:[(0,eo.jsx)("mark",{ref:Gd([l,s.triggerRef]),className:(0,fb.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,eo.jsx)(ps,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,eo.jsx)(Jd,{style:n,children:(0,eo.jsx)("div",{className:i.hintText,children:o})})})]})},ef=class extends Gn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${ob(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(ib);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,eo.jsx)(PM,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pb=x(te());var $h=x(C()),RM=({inputElement:e,children:t})=>{let n=P("TabCompletion",rr),[r,o]=qd(e);return(0,$h.jsx)("mark",{ref:r,className:(0,pb.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},nf=class extends Gn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,$h.jsx)(RM,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var of=x(te());var rt=x(_());var qh=x(C()),mb=()=>(0,qh.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,qh.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var to=x(_());var hb=x(uh());var gb={root:"dd-ky-Bv",content:"dd-kV5e1"};function rf(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch{return null}}function Gh(e){return e.replace("https://www.","").replace("https://","")}var Kt=x(C()),AM=3,LM=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),IM=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=AM})=>{let i=P("LinkSearch",gb),[s,a]=(0,to.useState)(""),l=$(),u=L(fC("url")),c=L(z1("URL",LM)),[p,d]=(0,to.useState)(c.length-1),m=z("fallbackImage"),v=h=>{let S=h.target;a(S.value)},y=(h,S)=>{h.stopPropagation(),h.preventDefault(),window.open(S,"_blank")},g=h=>{var T;let S=p-1<0?c.length-1:p-1,w=p+1===c.length?0:p+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(S),h.code==="ArrowDown"&&d(w),h.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},f=(0,to.useCallback)((0,hb.default)(h=>{l(Ao({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,to.useEffect)(()=>{s&&f(s)},[s]),(0,to.useEffect)(()=>()=>{l(rd())},[]),(0,Kt.jsxs)("div",{className:i.root,children:[(0,Kt.jsx)(ct,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,S)=>(0,Kt.jsx)(ee,{selected:p===S,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Kt.jsxs)(pe,{children:[(0,Kt.jsx)(pe.Image,{src:rf(h,"small",m||void 0),title:h.title||h.text}),(0,Kt.jsxs)(pe.Content,{className:i.content,cropText:!0,children:[(0,Kt.jsx)(pe.Title,{children:h.title||Gh(h.text)}),h.title&&Gh(h.text)]}),(0,Kt.jsx)(ee.Actions,{children:(0,Kt.jsx)(ee.ActionButton,{label:r,onClick:w=>y(w,h.text)})})]})},h.text))}),(0,Kt.jsx)(ja,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},yb=IM;var Xh={};je(Xh,{enUS:()=>OM,nlNL:()=>MM});var OM={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},MM={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var nt=x(C()),NM=(0,rt.forwardRef)((e,t)=>{let n=P("TabCompletion",rr);return(0,nt.jsx)("mark",{ref:t,className:(0,of.default)(n.matchSelection)},"selection-start")}),_M=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=K(Xh),s=P("TabCompletion",rr),a=(0,rt.useRef)(null),l=(0,rt.useRef)(null),[u,c]=(0,rt.useState)(null),p=$(),d=Qd(document.activeElement===r),[m]=(0,rt.useState)(()=>document.createRange());d.triggerRef.current=m,(0,rt.useEffect)(()=>()=>m.detach(),[]),(0,rt.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(m.setStart(y,0),m.setEnd(g,0))},[e.current,a.current]),Yr(()=>{d.close()});let v=(0,rt.useCallback)(y=>{let g=m.toString(),f=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(Zc({text:`[${g}](${f})`,replace:"selection"}))},[]);return(0,nt.jsxs)("span",{children:[(0,nt.jsx)("mark",{ref:a,className:(0,of.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,nt.jsx)(ps,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,nt.jsxs)(Jd,{style:n,ref:l,children:[(0,nt.jsx)("div",{className:(0,of.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,nt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,nt.jsx)(mb,{}),(0,nt.jsx)("span",{children:"\xA0"}),(0,nt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,nt.jsx)(yb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},sf=class extends Gn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,rt.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,nt.jsx)(NM,{ref:this.startRef}):(0,nt.jsx)(_M,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var or=x(C()),DM=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",nb),c=z("insertLink"),p=z("showMidSentenceSuggestions"),d=z("inlineSuggestions"),m=JC(a),v=(0,ir.useRef)(null),y=L(Je);(0,ir.useEffect)(()=>{Jr(a)&&m&&eb(a,m)},[m]);let g=(0,ir.useCallback)(S=>{if(!o||!n)return S;let w=[(0,or.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,or.jsx)("span",{"data-testid":"tab-completion",className:(0,af.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,or.jsx)("span",{className:(0,af.default)(u.hint,u.resetIndent),children:(0,or.jsx)(Wl,{keyCode:"tab"},"tabHint")})),Bh(S,w)},[o,n,r]),f=(0,ir.useMemo)(()=>{let S=[];return c&&S.push(new sf("selection")),S.push(new nf("placeholders")),i&&S.push(new ef("keywords")),S},[d,c,i]),h=(0,ir.useMemo)(()=>{let S=window.getComputedStyle(a);return{"--dd-color":S.color,"--dd-font-size":S.fontSize,"--dd-font-family":S.fontFamily,"--dd-font-variant":S.fontVariant}},[]);return!e||!y?null:(0,or.jsxs)("div",{ref:S=>{S!=null&&S.parentElement&&(v.current=S==null?void 0:S.parentElement)},className:u.root,style:h,children:[(0,or.jsx)(Qi,{tagName:"span",containerTagName:"div",className:(0,af.default)(u.container,u.agentText),disableLineBreaks:Jr(a),content:t||"\u200B",onAfterParse:g,matchers:f,selection:m,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,or.jsx)("br",{})]})},FM=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Zi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:m,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:m&&p!==!1}},vb=jn(FM)(DM);var MT=x(te()),wl=x(_());var Sb={list:[],fetchState:"idle"},wb=e=>e.autoflows.list||[],xb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},sr=B("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Yh=B("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(sr(e.platformSessionId))}),Qh=B("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(sr(e.platformSessionId))}),HM=G({name:"autoflows",initialState:Sb,reducers:{},extraReducers:e=>{e.addCase(Yh.pending,(t,n)=>{let r=xb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Qh.pending,(t,n)=>{let r=xb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(sr.pending,t=>{t.fetchState="loading"}),e.addCase(sr.rejected,t=>{t.fetchState="error"}),e.addCase(sr.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(le,()=>Sb)}}),Eb=B("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(sr(e))}),o.on("sessionCompleted",()=>{n(sr(e))})}),Cb=B("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),bb=HM.reducer;var Tb={list:[],fetchState:"idle",sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},kb=e=>e.customMessages.list,Pb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),Rb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),Ab=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),ul=B("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),lf=B("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),uf=B("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),Lb=G({name:"customMessages",initialState:Tb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(ul.pending,t=>{t.fetchState="loading"}).addCase(ul.rejected,t=>{t.fetchState="error"}).addCase(ul.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(lf.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(lf.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(uf.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(uf.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(le,()=>Tb)}}),Ib=B("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(Lb.actions.onCustomMessage(i))})}),Ob=B("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Mb=Lb.reducer;var UM={token:null,interval:null},Zh=B("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return{token:await n.requestPasswordlessToken()}}),Jh=B("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Zh()),setInterval(()=>r(Zh()),n)}),Nb=G({name:"passwordlessToken",initialState:UM,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Zh.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(Jh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:_b}=Nb.actions,Db=Nb.reducer;var Fb={shouldEmit:!0},ey={cues:[],fetchState:"idle"},Hb=e=>{var t;return(t=e.rules)==null?void 0:t.cues},zM=xe("rules/resetCues"),Wo=B("rules/evaluate",async(e,t)=>{var n,r;try{let{deepdeskAPI:o}=t.extra,i=t.getState(),s=(n=i.conversation.current)==null?void 0:n.id;if(!s)throw new Error("No current conversation to evaluate rules");if(!(await o.getAccount()).ruleEngine)throw new Error("Rule engine is not enabled for this account");if(!(await o.getRules()).filter(p=>p.isEnabled).some(p=>p.label===e.label))throw new Error(`No enabled rules found with label: ${e.label}`);return{cues:await o.evaluateRule(e.label,s,{tags:((r=i.conversation.current)==null?void 0:r.tags)||void 0,...e.params}),options:e.options}}catch(o){return F.info(o.message),{cues:[],options:e.options}}}),Ub=G({name:"answer",initialState:ey,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.rule.id!==t.payload.id)}},extraReducers:e=>{e.addCase(Wo.pending,t=>{t.fetchState="loading"}).addCase(Wo.rejected,t=>{t.fetchState="error"}).addCase(Wo.fulfilled,(t,n)=>{let r=n.payload.cues.map(i=>i.rule.id),o=t.cues.filter(i=>!r.includes(i.rule.id));t.fetchState="done",t.cues=[...n.payload.cues,...o]}).addCase(le,()=>ey).addCase(zM.toString(),()=>ey)}}),{removeCue:zb}=Ub.actions,Bb=Ub.reducer;var Yb=x(_());var qb=x(te()),Gb=x(_());var Vb=x(te());var jb={root:"dd-uszkm"};var Wb=x(C()),BM=({className:e,children:t})=>{let n=P("Unicode",jb);return(0,Wb.jsx)("span",{className:(0,Vb.default)(e,n.root),children:t})},Kb=BM;var $b={isDisabled:"dd-Sp--t",root:"dd-maqTG",buttonStop:"dd-rcq8w",stateBadge:"dd-zOnkT",isCompleted:"dd-GA-rt",isStarted:"dd-PZwtX",isAborted:"dd-PAXSE"};var ty={};je(ty,{enUS:()=>jM,nlNL:()=>VM});var jM={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},VM={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var bt=x(C()),WM=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",$b),a=K(ty),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,bt.jsxs)(ee,{className:(0,qb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,bt.jsx)(pe,{children:(0,bt.jsxs)(pe.Content,{children:[(0,bt.jsxs)(pe.Title,{children:[t&&(0,bt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,bt.jsx)("span",{children:r})]})}),(0,bt.jsx)(ee.Actions,{fixed:t==="Started",children:(0,bt.jsx)(ee.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,bt.jsxs)(Gb.Fragment,{children:[(0,bt.jsx)(Kb,{children:u})," ",(0,bt.jsx)("span",{children:a(l)})]})})})]})},Xb=WM;var ny=x(C()),$M=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},qM=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ny.jsx)(Yb.Fragment,{children:e.map(o=>(0,ny.jsx)(Xb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||$M(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),GM=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},XM={onStartAutoflow:Yh,onStopAutoflow:Qh},Qb=jn(GM,XM)(qM);var Zb=x(te()),ry=x(_());var ar={root:"dd-ERsBr",title:"dd-b36p6",isUsed:"dd-fp2IX",quickReplies:"dd--VrvP",quickReply:"dd-wFhWh",label:"dd-R9sND",errorIcon:"dd-8cdcH"};var gt=x(C()),YM=({suggestion:e})=>{let t=K(zo),n=$(),r=L(Pb(e.text)),o=L(Rb(e.text)),i=L(Ab(e.text)),s=L(qi),{replyOptions:a}=e,l=(0,ry.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(lf({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,ry.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(uf({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,gt.jsxs)(ee,{onClick:l,className:(0,Zb.default)(ar.root,{[ar.isUsed]:r,[ar.hasError]:i}),children:[(0,gt.jsx)(pe,{children:(0,gt.jsxs)(pe.Content,{children:[(0,gt.jsxs)(pe.Title,{className:ar.title,children:[e.text," ",(0,gt.jsx)($l,{className:ar.label,children:"analyse tool"})," ",i&&(0,gt.jsx)("span",{className:ar.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,gt.jsx)("ul",{className:ar.quickReplies,children:a.map(c=>(0,gt.jsx)("li",{className:ar.quickReply,children:c.title},c.title))})]})}),(0,gt.jsxs)(ee.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,gt.jsx)(ee.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,gt.jsx)(ee.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,gt.jsx)(ee.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Jb=YM;var cf=x(_());var iy=x(te());var oy=x(C()),cl=()=>(0,oy.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,oy.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var eT={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var kn=x(C()),QM=({entities:e})=>{let t=P("EntitiesWidgetList",eT),[n,r]=(0,cf.useState)(void 0),o=$(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),$n(a.text),o(et({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,cf.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,kn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,kn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,kn.jsx)("span",{className:t.entityText,children:a.text}),(0,kn.jsxs)("span",{className:t.iconWrapper,children:[(0,kn.jsx)("span",{className:(0,iy.default)(t.icon),children:(0,kn.jsx)(cl,{})}),(0,kn.jsx)("span",{className:(0,iy.default)(t.icon,n===l&&t.iconClicked),children:(0,kn.jsx)(cl,{})})]})]},a.text))})},tT=QM;var sy=x(C()),nT=()=>(0,sy.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,sy.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var ay=x(C()),rT=()=>(0,ay.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ay.jsx)("path",{d:"M543-340q16.595 0 28.798-12.202Q584-364.405 584-381t-12.202-28.798Q559.595-422 543-422t-28.798 12.202Q502-397.595 502-381t12.202 28.798Q526.405-340 543-340Zm-25-126h47q2-29 8.5-43t32.5-39q27-26 37.5-45.395Q654-612.79 654-639q0-45.882-31.5-74.941Q591-743 540-743q-38 0-68 20.5T428-665l45 19q11-25 27.5-38t39.5-13q29.778 0 48.389 17Q607-663 607-637q0 20-9 35t-32 32q-32 29-40 46.5t-8 57.5ZM260-200q-24 0-42-18t-18-42v-560q0-24 18-42t42-18h560q24 0 42 18t18 42v560q0 24-18 42t-42 18H260Zm0-60h560v-560H260v560ZM140-80q-24 0-42-18t-18-42v-620h60v620h620v60H140Zm120-740v560-560Z"})});var ly=x(C()),oT=()=>(0,ly.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ly.jsx)("path",{d:"M319-250h322v-60H319v60Zm0-170h322v-60H319v60ZM220-80q-24 0-42-18t-18-42v-680q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554v-186H220v680h520v-494H551ZM220-820v186-186 680-680Z"})});var CT=x(_());var dl=x(C()),iT=({className:e})=>(0,dl.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,dl.jsx)("line",{x1:"2",y1:"10",x2:"10",y2:"2",stroke:"black",strokeWidth:"1"}),(0,dl.jsx)("line",{x1:"2",y1:"2",x2:"10",y2:"10",stroke:"black",strokeWidth:"1"})]});var{entries:pT,setPrototypeOf:sT,isFrozen:ZM,getPrototypeOf:JM,getOwnPropertyDescriptor:eN}=Object,{freeze:ot,seal:un,create:mT}=Object,{apply:my,construct:gy}=typeof Reflect<"u"&&Reflect;ot||(ot=function(t){return t});un||(un=function(t){return t});my||(my=function(t,n,r){return t.apply(n,r)});gy||(gy=function(t,n){return new t(...n)});var df=kt(Array.prototype.forEach),aT=kt(Array.prototype.pop),fl=kt(Array.prototype.push),mf=kt(String.prototype.toLowerCase),uy=kt(String.prototype.toString),tN=kt(String.prototype.match),pl=kt(String.prototype.replace),nN=kt(String.prototype.indexOf),rN=kt(String.prototype.trim),ln=kt(Object.prototype.hasOwnProperty),Tt=kt(RegExp.prototype.test),ml=oN(TypeError);function kt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return my(e,t,r)}}function oN(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gy(e,n)}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mf;sT&&sT(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(ZM(t)||(t[r]=i),o=i)}e[o]=!0}return e}function iN(e){for(let t=0;t<e.length;t++)ln(e,t)||(e[t]=null);return e}function $o(e){let t=mT(null);for(let[n,r]of pT(e))ln(e,n)&&(Array.isArray(r)?t[n]=iN(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$o(r):t[n]=r);return t}function ff(e,t){for(;e!==null;){let r=eN(e,t);if(r){if(r.get)return kt(r.get);if(typeof r.value=="function")return kt(r.value)}e=JM(e)}function n(){return null}return n}var lT=ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cy=ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dy=ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sN=ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fy=ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aN=ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uT=ot(["#text"]),cT=ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),py=ot(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dT=ot(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),pf=ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lN=un(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uN=un(/<%[\w\W]*|[\w\W]*%>/gm),cN=un(/\${[\w\W]*}/gm),dN=un(/^data-[\-\w.\u00B7-\uFFFF]/),fN=un(/^aria-[\-\w]+$/),gT=un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pN=un(/^(?:\w+script|data):/i),mN=un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hT=un(/^html$/i),fT=Object.freeze({__proto__:null,MUSTACHE_EXPR:lN,ERB_EXPR:uN,TMPLIT_EXPR:cN,DATA_ATTR:dN,ARIA_ATTR:fN,IS_ALLOWED_URI:gT,IS_SCRIPT_OR_DATA:pN,ATTR_WHITESPACE:mN,DOCTYPE_NAME:hT}),gN=function(){return typeof window>"u"?null:window},hN=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function yT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gN(),t=U=>yT(U);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:d,trustedTypes:m}=e,v=l.prototype,y=ff(v,"cloneNode"),g=ff(v,"nextSibling"),f=ff(v,"childNodes"),h=ff(v,"parentNode");if(typeof s=="function"){let U=n.createElement("template");U.content&&U.content.ownerDocument&&(n=U.content.ownerDocument)}let S,w="",{implementation:T,createNodeIterator:b,createDocumentFragment:k,getElementsByTagName:I}=n,{importNode:O}=r,M={};t.isSupported=typeof pT=="function"&&typeof h=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:W,ERB_EXPR:X,TMPLIT_EXPR:ne,DATA_ATTR:cr,ARIA_ATTR:Pt,IS_SCRIPT_OR_DATA:dr,ATTR_WHITESPACE:Rt}=fT,{IS_ALLOWED_URI:H}=fT,Y=null,fr=Q({},[...lT,...cy,...dy,...fy,...uT]),he=null,pr=Q({},[...cT,...py,...dT,...pf]),q=Object.seal(mT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),mr=null,Al=null,Yo=!0,oo=!0,vs=!1,Ll=!0,qt=!1,Gt=!1,Il=!1,it=!1,At=!1,Ol=!1,Ml=!1,Ly=!0,Iy=!1,Ck="user-content-",kf=!0,Ss=!1,Qo={},Zo=null,Oy=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),My=null,Ny=Q({},["audio","video","img","source","image","track"]),Pf=null,_y=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nl="http://www.w3.org/1998/Math/MathML",_l="http://www.w3.org/2000/svg",Ln="http://www.w3.org/1999/xhtml",Jo=Ln,Rf=!1,Af=null,bk=Q({},[Nl,_l,Ln],uy),xs=null,Tk=["application/xhtml+xml","text/html"],kk="text/html",Oe=null,ei=null,Pk=n.createElement("form"),Dy=function(E){return E instanceof RegExp||E instanceof Function},Lf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ei&&ei===E)){if((!E||typeof E!="object")&&(E={}),E=$o(E),xs=Tk.indexOf(E.PARSER_MEDIA_TYPE)===-1?kk:E.PARSER_MEDIA_TYPE,Oe=xs==="application/xhtml+xml"?uy:mf,Y=ln(E,"ALLOWED_TAGS")?Q({},E.ALLOWED_TAGS,Oe):fr,he=ln(E,"ALLOWED_ATTR")?Q({},E.ALLOWED_ATTR,Oe):pr,Af=ln(E,"ALLOWED_NAMESPACES")?Q({},E.ALLOWED_NAMESPACES,uy):bk,Pf=ln(E,"ADD_URI_SAFE_ATTR")?Q($o(_y),E.ADD_URI_SAFE_ATTR,Oe):_y,My=ln(E,"ADD_DATA_URI_TAGS")?Q($o(Ny),E.ADD_DATA_URI_TAGS,Oe):Ny,Zo=ln(E,"FORBID_CONTENTS")?Q({},E.FORBID_CONTENTS,Oe):Oy,mr=ln(E,"FORBID_TAGS")?Q({},E.FORBID_TAGS,Oe):{},Al=ln(E,"FORBID_ATTR")?Q({},E.FORBID_ATTR,Oe):{},Qo=ln(E,"USE_PROFILES")?E.USE_PROFILES:!1,Yo=E.ALLOW_ARIA_ATTR!==!1,oo=E.ALLOW_DATA_ATTR!==!1,vs=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Ll=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,At=E.RETURN_DOM||!1,Ol=E.RETURN_DOM_FRAGMENT||!1,Ml=E.RETURN_TRUSTED_TYPE||!1,it=E.FORCE_BODY||!1,Ly=E.SANITIZE_DOM!==!1,Iy=E.SANITIZE_NAMED_PROPS||!1,kf=E.KEEP_CONTENT!==!1,Ss=E.IN_PLACE||!1,H=E.ALLOWED_URI_REGEXP||gT,Jo=E.NAMESPACE||Ln,q=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Dy(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Dy(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(oo=!1),Ol&&(At=!0),Qo&&(Y=Q({},uT),he=[],Qo.html===!0&&(Q(Y,lT),Q(he,cT)),Qo.svg===!0&&(Q(Y,cy),Q(he,py),Q(he,pf)),Qo.svgFilters===!0&&(Q(Y,dy),Q(he,py),Q(he,pf)),Qo.mathMl===!0&&(Q(Y,fy),Q(he,dT),Q(he,pf))),E.ADD_TAGS&&(Y===fr&&(Y=$o(Y)),Q(Y,E.ADD_TAGS,Oe)),E.ADD_ATTR&&(he===pr&&(he=$o(he)),Q(he,E.ADD_ATTR,Oe)),E.ADD_URI_SAFE_ATTR&&Q(Pf,E.ADD_URI_SAFE_ATTR,Oe),E.FORBID_CONTENTS&&(Zo===Oy&&(Zo=$o(Zo)),Q(Zo,E.FORBID_CONTENTS,Oe)),kf&&(Y["#text"]=!0),Gt&&Q(Y,["html","head","body"]),Y.table&&(Q(Y,["tbody"]),delete mr.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ml('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ml('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=E.TRUSTED_TYPES_POLICY,w=S.createHTML("")}else S===void 0&&(S=hN(m,o)),S!==null&&typeof w=="string"&&(w=S.createHTML(""));ot&&ot(E),ei=E}},Fy=Q({},["mi","mo","mn","ms","mtext"]),Hy=Q({},["foreignobject","desc","title","annotation-xml"]),Rk=Q({},["title","style","font","a","script"]),Uy=Q({},[...cy,...dy,...sN]),zy=Q({},[...fy,...aN]),Ak=function(E){let A=h(E);(!A||!A.tagName)&&(A={namespaceURI:Jo,tagName:"template"});let D=mf(E.tagName),ce=mf(A.tagName);return Af[E.namespaceURI]?E.namespaceURI===_l?A.namespaceURI===Ln?D==="svg":A.namespaceURI===Nl?D==="svg"&&(ce==="annotation-xml"||Fy[ce]):!!Uy[D]:E.namespaceURI===Nl?A.namespaceURI===Ln?D==="math":A.namespaceURI===_l?D==="math"&&Hy[ce]:!!zy[D]:E.namespaceURI===Ln?A.namespaceURI===_l&&!Hy[ce]||A.namespaceURI===Nl&&!Fy[ce]?!1:!zy[D]&&(Rk[D]||!Uy[D]):!!(xs==="application/xhtml+xml"&&Af[E.namespaceURI]):!1},io=function(E){fl(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},If=function(E,A){try{fl(t.removed,{attribute:A.getAttributeNode(E),from:A})}catch{fl(t.removed,{attribute:null,from:A})}if(A.removeAttribute(E),E==="is"&&!he[E])if(At||Ol)try{io(A)}catch{}else try{A.setAttribute(E,"")}catch{}},By=function(E){let A=null,D=null;if(it)E="<remove></remove>"+E;else{let Be=tN(E,/^[\r\n\t ]+/);D=Be&&Be[0]}xs==="application/xhtml+xml"&&Jo===Ln&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let ce=S?S.createHTML(E):E;if(Jo===Ln)try{A=new d().parseFromString(ce,xs)}catch{}if(!A||!A.documentElement){A=T.createDocument(Jo,"template",null);try{A.documentElement.innerHTML=Rf?w:ce}catch{}}let ze=A.body||A.documentElement;return E&&D&&ze.insertBefore(n.createTextNode(D),ze.childNodes[0]||null),Jo===Ln?I.call(A,Gt?"html":"body")[0]:Gt?A.documentElement:ze},jy=function(E){return b.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Lk=function(E){return E instanceof p&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof c)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Vy=function(E){return typeof a=="function"&&E instanceof a},In=function(E,A,D){M[E]&&df(M[E],ce=>{ce.call(t,A,D,ei)})},Ky=function(E){let A=null;if(In("beforeSanitizeElements",E,null),Lk(E))return io(E),!0;let D=Oe(E.nodeName);if(In("uponSanitizeElement",E,{tagName:D,allowedTags:Y}),E.hasChildNodes()&&!Vy(E.firstElementChild)&&Tt(/<[/\w]/g,E.innerHTML)&&Tt(/<[/\w]/g,E.textContent))return io(E),!0;if(!Y[D]||mr[D]){if(!mr[D]&&$y(D)&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,D)||q.tagNameCheck instanceof Function&&q.tagNameCheck(D)))return!1;if(kf&&!Zo[D]){let ce=h(E)||E.parentNode,ze=f(E)||E.childNodes;if(ze&&ce){let Be=ze.length;for(let st=Be-1;st>=0;--st)ce.insertBefore(y(ze[st],!0),g(E))}}return io(E),!0}return E instanceof l&&!Ak(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Tt(/<\/no(script|embed|frames)/i,E.innerHTML)?(io(E),!0):(qt&&E.nodeType===3&&(A=E.textContent,df([W,X,ne],ce=>{A=pl(A,ce," ")}),E.textContent!==A&&(fl(t.removed,{element:E.cloneNode()}),E.textContent=A)),In("afterSanitizeElements",E,null),!1)},Wy=function(E,A,D){if(Ly&&(A==="id"||A==="name")&&(D in n||D in Pk))return!1;if(!(oo&&!Al[A]&&Tt(cr,A))){if(!(Yo&&Tt(Pt,A))){if(!he[A]||Al[A]){if(!($y(E)&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,E)||q.tagNameCheck instanceof Function&&q.tagNameCheck(E))&&(q.attributeNameCheck instanceof RegExp&&Tt(q.attributeNameCheck,A)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(A))||A==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Tt(q.tagNameCheck,D)||q.tagNameCheck instanceof Function&&q.tagNameCheck(D))))return!1}else if(!Pf[A]){if(!Tt(H,pl(D,Rt,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&E!=="script"&&nN(D,"data:")===0&&My[E])){if(!(vs&&!Tt(dr,pl(D,Rt,"")))){if(D)return!1}}}}}}return!0},$y=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},qy=function(E){In("beforeSanitizeAttributes",E,null);let{attributes:A}=E;if(!A)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he},ce=A.length;for(;ce--;){let ze=A[ce],{name:Be,namespaceURI:st,value:so}=ze,ws=Oe(Be),at=Be==="value"?so:rN(so);if(D.attrName=ws,D.attrValue=at,D.keepAttr=!0,D.forceKeepAttr=void 0,In("uponSanitizeAttribute",E,D),at=D.attrValue,D.forceKeepAttr||(If(Be,E),!D.keepAttr))continue;if(!Ll&&Tt(/\/>/i,at)){If(Be,E);continue}qt&&df([W,X,ne],Xy=>{at=pl(at,Xy," ")});let Gy=Oe(E.nodeName);if(Wy(Gy,ws,at)){if(Iy&&(ws==="id"||ws==="name")&&(If(Be,E),at=Ck+at),S&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!st)switch(m.getAttributeType(Gy,ws)){case"TrustedHTML":{at=S.createHTML(at);break}case"TrustedScriptURL":{at=S.createScriptURL(at);break}}try{st?E.setAttributeNS(st,Be,at):E.setAttribute(Be,at),aT(t.removed)}catch{}}}In("afterSanitizeAttributes",E,null)},Ik=function U(E){let A=null,D=jy(E);for(In("beforeSanitizeShadowDOM",E,null);A=D.nextNode();)In("uponSanitizeShadowNode",A,null),!Ky(A)&&(A.content instanceof i&&U(A.content),qy(A));In("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(U){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=null,D=null,ce=null,ze=null;if(Rf=!U,Rf&&(U="<!-->"),typeof U!="string"&&!Vy(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw ml("dirty is not a string, aborting")}else throw ml("toString is not a function");if(!t.isSupported)return U;if(Il||Lf(E),t.removed=[],typeof U=="string"&&(Ss=!1),Ss){if(U.nodeName){let so=Oe(U.nodeName);if(!Y[so]||mr[so])throw ml("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof a)A=By("<!---->"),D=A.ownerDocument.importNode(U,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?A=D:A.appendChild(D);else{if(!At&&!qt&&!Gt&&U.indexOf("<")===-1)return S&&Ml?S.createHTML(U):U;if(A=By(U),!A)return At?null:Ml?w:""}A&&it&&io(A.firstChild);let Be=jy(Ss?U:A);for(;ce=Be.nextNode();)Ky(ce)||(ce.content instanceof i&&Ik(ce.content),qy(ce));if(Ss)return U;if(At){if(Ol)for(ze=k.call(A.ownerDocument);A.firstChild;)ze.appendChild(A.firstChild);else ze=A;return(he.shadowroot||he.shadowrootmode)&&(ze=O.call(r,ze,!0)),ze}let st=Gt?A.outerHTML:A.innerHTML;return Gt&&Y["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&Tt(hT,A.ownerDocument.doctype.name)&&(st="<!DOCTYPE "+A.ownerDocument.doctype.name+`>
24
+ `+st),qt&&df([W,X,ne],so=>{st=pl(st,so," ")}),S&&Ml?S.createHTML(st):st},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lf(U),Il=!0},t.clearConfig=function(){ei=null,Il=!1},t.isValidAttribute=function(U,E,A){ei||Lf({});let D=Oe(U),ce=Oe(E);return Wy(D,ce,A)},t.addHook=function(U,E){typeof E=="function"&&(M[U]=M[U]||[],fl(M[U],E))},t.removeHook=function(U){if(M[U])return aT(M[U])},t.removeHooks=function(U){M[U]&&(M[U]=[])},t.removeAllHooks=function(){M={}},t}var vT=yT();var no=x(_());var yN={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function ST(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function gl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function hl(e,t){var n,r,o,i,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],u="",c=t||{},p=0;function d(v){var y=yN[v[1]||""],g=l[l.length-1]==v;return y?y[1]?(g?l.pop():l.push(v),y[0|g]):y[0]:v}function m(){for(var v="";l.length;)v+=d(l[l.length-1]);return v}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(v,y,g){return c[y.toLowerCase()]=g,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(p,o.index),p=a.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((s=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+ST(gl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=hl(ST(o[5].replace(/^\s*[>*+.-]/gm,""))),s==">"?s="blockquote":(s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+i+"</"+s+">"):o[8]?n='<img src="'+gl(o[8])+'" alt="'+gl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+gl(o[11]||c[r.toLowerCase()])+'">'),n=m()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+hl(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+gl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(p)+m()).replace(/^\n+|\n+$/g,"")}var xT={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var Pn=x(C());function vN(e){return`<button type="button" class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function hy(e){let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(n=>n.remove()),t.textContent??""}function SN(e){return e.replace(/\r\n/g,`
25
+ `)}var xN=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=P("Markdown",xT),s=(0,no.useRef)(null),[a,l]=(0,no.useState)(null),u=(0,no.useMemo)(()=>{let y=hl(SN(e));return vT.sanitize(y).replace(/<\/code>/g,`${vN(i.copyIcon)}</code>`)},[e]),c=y=>{var h;let g=y.target,f=!!((h=s.current)!=null&&h.querySelector("code"));a||f&&g.tagName!=="CODE"||!f&&g!==s.current||(g.addEventListener("mouseleave",()=>l(null),{once:!0}),l(g))},p=()=>{if(!a)return;l(null);let y=a.querySelector("button");y&&(ns(y,i.fadeup),r(hy(a)))},d=y=>{y.target.tagName.toLowerCase()==="button"&&(ns(y.target,i.fadeup),r(hy(y.target.parentElement)))},m=()=>{a&&(l(null),o(hy(a)))},v=y=>{if(y===null)return;let g=y.getBoundingClientRect();g.left<0?y.style.transform=`translateX(${-g.left+2}px)`:g.right>window.innerWidth&&(y.style.transform=`translateX(${window.innerWidth-g.right-2}px)`)};return(0,Pn.jsxs)(no.Fragment,{children:[a&&(0,Pn.jsxs)(ps,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,Pn.jsxs)("div",{className:i.options,ref:v,children:[(0,Pn.jsx)("button",{type:"button",className:i.option,onClick:p,children:n}),(0,Pn.jsx)("div",{className:i.divider}),(0,Pn.jsx)("button",{type:"button",className:i.option,onClick:m,children:t})]}),(0,Pn.jsx)("div",{className:i.arrow})]}),(0,Pn.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:u},onMouseOver:c,onClick:d})]})},wT=xN;var yy={};je(yy,{enUS:()=>wN,nlNL:()=>EN});var wN={useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},EN={useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var ET={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l"};var cn=x(C()),CN=({cue:e,onRemove:t,onCopy:n,onUse:r})=>{let o=P("WidgetCue",ET),i=K(yy),s=rs(),a=c=>{n&&n(c,e)},l=c=>{r&&r(c,e)},u=c=>{c.preventDefault(),c.stopPropagation(),t(e)};return(0,CT.useEffect)(()=>{s("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,cn.jsxs)(ee,{"data-testid":"cue",children:[(0,cn.jsx)(pe,{children:(0,cn.jsxs)(pe.Content,{children:[e.title&&(0,cn.jsx)(pe.Title,{className:o.title,"data-testid":"widget-cue-title",children:e.title}),(0,cn.jsx)(wT,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:a,onUse:l})]})}),(0,cn.jsxs)(ee.IconButtonContainer,{children:[(0,cn.jsx)(is,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"}),(0,cn.jsx)(ee.IconButton,{title:i("removeCue"),onClick:u,icon:(0,cn.jsx)(iT,{})})]})]})},bT=CN;var yl=x(C()),bN=({cues:e})=>{let t=$(),n=Bt(),r=rs(),o=a=>{t(zb({id:a.rule.id})),r("Assistant response closed",{name:a.rule.name,group:a.rule.label,description:a.rule.description,cueText:a.text})},i=(a,l)=>{$n(a),r("Assistant response copied",{name:l.rule.name,group:l.rule.label,description:l.rule.description,copiedText:a})},s=(a,l)=>{n.send($r,{text:a,suggestion:{source:"cue",sourceText:a}}),r("Assistant response used",{name:l.rule.name,group:l.rule.label,description:l.rule.description,usedText:a})};return(0,yl.jsx)(yl.Fragment,{children:e.map(a=>(0,yl.jsx)(bT,{cue:a,onRemove:o,onCopy:i,onUse:s},a.rule.id))})},TT=bN;var gf=x(_());var kT={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var dn=x(C());function TN(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var PT=({data:e,schema:t})=>{let n=P("WidgetCustomData",kT),r=o=>{$n(o)};return(0,gf.useEffect)(()=>{F.info("Custom data",e,t)},[e]),(0,dn.jsx)("dl",{className:n.root,children:t.map(o=>{let i=TN(e,o.path);return(0,dn.jsxs)(gf.Fragment,{children:[(0,dn.jsx)("dt",{className:n.label,children:o.label}),(0,dn.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,dn.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,dn.jsx)("span",{className:n.isFalse,children:o.falseValue}):i?(0,dn.jsxs)("button",{type:"button",onClick:()=>r(i),className:n.copyButton,children:[(0,dn.jsx)("span",{children:i}),(0,dn.jsx)(cl,{})]}):"-"})]},o.label)})})};var AT=x(_());var kN=/(https?:\/\/[^\s]+)/,RT=e=>e.split(" ").find(t=>kN.test(t));var Wt=x(C()),PN=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=RT(r),i=K(zo),s=z("showImages"),a=z("fallbackImage"),l=p=>{p.preventDefault(),p.stopPropagation(),n(r)},u=(0,AT.useCallback)(p=>{window.open(o,"_blank"),p.stopPropagation(),p.preventDefault()},[o]);return(0,Wt.jsxs)(ee,{onClick:l,"data-testid":"edit-suggestion",children:[(0,Wt.jsxs)(pe,{children:[s&&e.image&&(0,Wt.jsx)(pe.Image,{src:rf(e,"small",a||void 0),title:e.title}),(0,Wt.jsxs)(pe.Content,{children:[e.title&&(0,Wt.jsx)(pe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,Wt.jsx)(ee.Labels,{labels:e.searchKeywords}),(0,Wt.jsx)(pe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Wt.jsxs)(ee.Actions,{children:[o&&(0,Wt.jsx)(ee.ActionButton,{onClick:u,label:i("visitUrl")}),(0,Wt.jsx)(ee.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},LT=PN;var vl=x(C()),RN=({lines:e,suggestions:t})=>{let n=Bt(),r=(o,i)=>{n.send($r,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,vl.jsx)(vl.Fragment,{children:t.map(o=>(0,vl.jsx)(LT,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},IT=RN;var Sl={};je(Sl,{enUS:()=>AN,nlNL:()=>LN});var AN={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},LN={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xl={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",sectionList:"dd-bF9pF",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",link:"dd-DRo0x"};var V=x(C()),hf=(e,t)=>{let n=L(Je);(0,wl.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},IN=({onLogIn:e})=>{let t=P("Widget",xl),n=z("isEmbedded"),r=z("adminUrl");return(0,V.jsx)("div",{className:t.loginText,children:(0,V.jsx)("div",{children:(0,V.jsx)(Kd,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},OT=({text:e})=>{let t=P("Widget",xl);return(0,V.jsx)("div",{className:t.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:e})})},"notification")},ON=()=>{let e=K(Sl),t=$(),n=P("Widget",xl),r=z("showSearch"),o=z("showSummaryCommand"),i=z("showKnowledgeSearch"),s=L(os("/admin/")),a=Bt(),l=z("productName"),u=r||o||i||s;return hf(()=>(t(Jh()),()=>{t(_b())}),[t]),u?(0,V.jsx)(pn,{title:e("actions"),type:"shortcuts",children:(0,V.jsxs)("div",{className:n.shortcutList,children:[r&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-search","aria-label":e("linkSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0}),children:[(0,V.jsx)(es,{}),e("linkSearch")]}),o&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-summary","aria-label":e("linkSummary"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,V.jsx)(oT,{}),e("linkSummary")]}),i&&(0,V.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-knowledge-assist","aria-label":e("linkKnowledgeSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,V.jsx)(rT,{}),e("linkKnowledgeSearch")]}),s&&(0,V.jsxs)("a",{className:n.shortcut,target:"_blank",href:s,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:l}),rel:"noreferrer",children:[(0,V.jsx)(nT,{}),e("linkStudioLogin",{productName:l})]})]})}):null},MN=()=>{let e=$(),t=z("showCustomMessages"),n=L(kb),r=L(qi);return hf(()=>(e(ul(r)),e(Ib(r)),()=>{e(Ob(r))}),[e,t,r]),!t||n.length===0?null:(0,V.jsx)(pn,{type:"custom-messages","data-testid":"custom-messages",children:(0,V.jsx)(ct,{withDivider:!0,children:n.map(o=>(0,V.jsx)(Jb,{suggestion:o},o.text))})})},NN=()=>{let e=K(Sl),t=$(),n=z("showAutoflows"),r=L(wb),o=L(qi);return hf(()=>(t(sr(o)),t(Eb(o)),()=>{t(Cb(o))}),[t,n,o]),!n||r.length===0?null:(0,V.jsx)(pn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(Qb,{})})})},_N=()=>{let e=$(),t=L(Nd),n=L(sC),r=L(Hb),o=L(I1),i=L(Od),s=L(_d),a=L(er),l=L(Vr);return(0,wl.useEffect)(()=>{!!o&&!n&&F.warn("Custom data provided, but no schema.")},[o,n]),hf(()=>{t.forEach(({type:u})=>{u==="entities"?e(on()):Yl.includes(u)||e(an(u))})},[e,l,a]),(0,V.jsx)(wl.Fragment,{children:t.map(({type:u,title:c,amount:p,lines:d,schema:m})=>{var v,y;switch(u){case"entities":return i&&i.length>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(tT,{entities:i})},u);case"cues":return r&&r.length>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(TT,{cues:r})})},u);case"custom-data":return o&&m&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(PT,{data:o,schema:m})})},u);default:return((y=(v=s[u])==null?void 0:v.suggestions)==null?void 0:y.length)>0&&(0,V.jsx)(pn,{type:u,title:c,"data-testid":`type-${u}`,children:(0,V.jsx)(ct,{withDivider:!0,children:(0,V.jsx)(IT,{lines:d,contentType:u,suggestions:s[u].suggestions.slice(0,p)||[]})})},u)}})})},DN=({onLogIn:e})=>{let t=K(Sl),n=P("Widget",xl),r=L(Gi),o=L(Je),i=L(qi),s=L(er);return r===!1?(0,V.jsx)(OT,{text:t("notSupported")}):o===!1?(0,V.jsx)(IN,{onLogIn:e}):!s||!i||o===null?(0,V.jsx)(OT,{text:t("waiting")}):(0,V.jsx)("div",{className:(0,MT.default)(n.root),"data-testid":"widget",children:(0,V.jsxs)(ql,{className:n.sectionList,children:[(0,V.jsx)(ON,{}),(0,V.jsx)(MN,{}),(0,V.jsx)(NN,{}),(0,V.jsx)(_N,{})]})})},NT=DN;function ms(e){let t=new Range;return t.selectNodeContents(e),t}function _T(e,t,n){try{return ro(e,t,n),!0}catch{return!1}}function yf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function vf(e){return"tagName"in e&&e.tagName==="BR"}var El=/[\u200B-\u200D\uFEFF]/g;function ro(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(El,""),p=o+c.length,d=t>=o&&t<=p,m=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!m?r.setStartBefore(l):r.setStart(l,v)}m&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(vf(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;yf(l)&&u&&!yf(u)&&!vf(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Cl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,m=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(El,"").length),m&&(l=u+v.substring(0,i).replace(El,"").length),u+=v.replace(El,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;vf(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let g=d&&y===r,f=m&&y===i;if(g&&(a=u),f&&(l=u),l!==void 0||((!g||!s)&&c(p.childNodes[y]),m&&y===i-1&&(l=u),l!==void 0))break}!m&&yf(p)&&!v&&u++,m&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function bl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,m=p?i:void 0,v=u.textContent.replace(El,"");d===0&&m===void 0?a+=v:a+=v.substring(d,m);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&vf(u)&&!d&&(a+=`
26
+ `);for(let m=c?r:0;m<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[m]),s!==1);m++);!p&&s===0&&yf(u)&&!d&&(a+=`
27
+ `);break}default:break}p&&s++}return l(e),a}var DT=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(DT||{}),lr=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();jr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(DT).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(t={shouldObserve:!0}){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t!=null&&t.shouldObserve&&n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function FT(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var qo=class extends lr{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),bl(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!FT(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!FT(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Cl(this.element,t);let n=this.lastKnownSelection;if(n&&_T(this.element,n.start,n.end))return n;let r=ms(this.element);return r.collapse(!1),Cl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return bl(this.element,ro(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(t={shouldObserve:!0}){super.listen(t),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),t!=null&&t.shouldObserve&&this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Go=class extends lr{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function HT(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function FN(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var vy=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},Sy=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=HT(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},xy=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),F.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new Sy(t,this.deepdeskUrl,{debug:!0}):new vy(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=FN(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(F.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;F.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},UT=xy;var gs=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var wy=e=>new Promise(t=>{setTimeout(t,e)});var hs=class extends gs{name="ClientError"},Cy=class extends gs{name="ServerError"},Ey=new Map;async function HN(e){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t&&t.includes("application/json"))return e.json();let n=await e.text();return n===""?null:(F.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))}var fn=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",{useCache:u=!1,abortLatest:c=!1,attempts:p=1,retryDelay:d=500,refreshTokenOn401:m=!0,retryOnError:v=b=>b instanceof TypeError,retryOnResponse:y=b=>b.status>=500,version:g="v1",...f}=n;if(u)if(l){if(Ey.has(s)){r(Ey.get(s));return}}else throw new Error(`Can't use 'useCache' for ${n.method}`);let h={credentials:"include",...f,headers:{"Content-Type":"application/json",...f.headers}};!l&&this.csrfToken&&(h.headers={...h.headers,"X-CSRFToken":this.csrfToken}),typeof g=="string"&&(h.headers={...h.headers,"X-Deepdesk-API-Version":g});let S=p,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&c&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let T=async()=>(S--,a(s,h).then(async b=>y(b)&&!i.isAborted&&S>0?(await wy(d),T()):b.status===401&&m===!0&&w===!1?(w=!0,await this.refreshToken(),T()):b).catch(async b=>{if(v(b)&&!i.isAborted&&S>0)return await wy(d),T();throw b}));T().then(async b=>{let k=await HN(b);if(delete this.latestRequestByUrl[s],b.status>=500){o(new Cy("Server Error",k));return}else if(b.status===401){o(new hs("Unauthorized",k));return}else if(b.status===403){o(new hs("Forbidden",k));return}else if(b.status===404){o(new hs("Not Found",k));return}else if(b.status>=400){o(new hs("Bad Request",k));return}u&&Ey.set(s,k),r(k)}).catch(b=>{o(b)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var UN;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(UN||={});function Sf(e){return{...J(e),tags:e.tags}}var ur=class e{constructor(t,n={}){this.options=n;this.client=new fn(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),F.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Re(t),tags:t.tags},{version:"v2"});return Sf(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null,useCache:!0});return J(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null,useCache:!0});return J(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null,useCache:!0});return J(t)}async getAccount(){let t=await this.client.get("/apis/admin/account/",{version:null,useCache:!0});return J(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null,useCache:!0});return J(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),F.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return F.info(`Successfully retrieved conversation ${i.id} for session ${t}`),Sf(i)}async isConversationSupported(t,n={}){F.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=Re(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Sf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Re(o),tags:o.tags})),{version:"v2"})).map(o=>Sf(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",Re({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:Re({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){let r=await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model});return J(r)}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw F.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Re(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,Re(n),{abortLatest:!0})).map(i=>({...J(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,Re(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return J(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",Re(t),{abortLatest:!0});return J(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Re(t),{version:"v2"});return J(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Re({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return J(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return J(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return J(t.token)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return J(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return J(s.cues)}async getRules(){let t=new URLSearchParams,n=await this.client.get(`/apis/admin/rule-engine/rules/?${t.toString()}`,{version:null,useCache:!0});return J(n)}async translateMessages(t){let n=await this.client.post("/api/translate",Re(t),{version:"v2"});return J(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Uv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&F.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Tl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener($g(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,J(o))}catch{F.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var zN;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(zN||={});var kl=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=F;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return J(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Re(n));return J(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Re(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return J(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Re(t));return J(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Tl(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var zT={startTime:null,stopTime:null},BT=G({name:"handlingTime",initialState:zT,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(le,()=>zT)}}),{handlingTimeStart:jT,handlingTimeStop:xf,handlingTimeReset:VT}=BT.actions,KT=BT.reducer;var WT=(e={})=>{let t={onAuthError:$i(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var wf={list:{keywordMatches:[]},fetchState:"idle"};var Xo=B("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return wf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),BN=G({name:"styleSuggestions",initialState:wf,reducers:{},extraReducers:e=>{e.addCase(Xo.pending,t=>{t.fetchState="loading"}).addCase(Xo.rejected,t=>{t.fetchState="error"}).addCase(Xo.fulfilled,(t,n)=>{t.fetchState="done",jr(t.list,n.payload)||(t.list=n.payload)}).addCase(Ro,t=>{t.list=wf.list}).addCase(le,()=>wf)}}),$T=BN.reducer;var qT=(e={})=>{let t,n=!0,r={getStyleSuggestions:Xo,debounce:500,...e};return o=>i=>s=>{var m;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((m=u.conversation.current)==null?void 0:m.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function jN(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var GT=(e={})=>{let t={getTextSuggestions:an,getAutocompleteSuggestions:rl,debounce:200,check:as,...e},n;return r=>o=>i=>{var y;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Dd.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:m}}=l;return jN(m,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=Xi(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var XT=Xo.fulfilled.toString();function VN(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var YT=e=>t=>n=>r=>{var u;if(r.type!==XT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=VN(o,s);r.type===XT&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var KN=hc({answer:rC,auth:i1,autoflows:bb,conversation:m1,contentTypes:pE,customMessages:Mb,passwordlessToken:Db,entities:HE,knowledgeAssistant:eC,handlingTime:KT,info:_1,input:A1,settings:Zw,profile:aC,search:j1,summary:WE,styleSuggestions:$T,ui:DC,rules:Bb,textSuggestions:gC});function QT(e){return ow({reducer:KN,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),WT(),GT({debounce:200}),qT({debounce:500}),YT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var WN=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},$N=e=>t=>n=>r=>{var a,l,u,c,p,d;let o=t.getState(),i=Ug("inlineSuggestions")(o);switch(r.type){case $i.toString():{!r.payload&&e.emit("logout",void 0);break}case on.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case et.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((u=o.conversation.current)==null?void 0:u.id),data:r.payload.data});break;case Jc.toString():e.handleKeyDown(r.payload);break;case Ro.toString():e.logSendMessage(r.payload);break;case ed.toString():e.handleInputChanged(r.payload);break;case Wo.fulfilled.toString():r.isBroadcasted||e.broadcast(Xg,r,!1),(c=r.payload.options)!=null&&c.shouldEmit&&e.emit("cues",r.payload.cues);break;default:break}let s=n(r);switch(r.type){case Ro.toString():e.handleAfterSendMessage(r.payload);break;case il.toString():e.onUpdateShowTabHint(r.payload);break;case xf.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case Cn.toString():{let{start:m,end:v}=o.input.selection;e.emit("select-suggestion",{type:WN(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:m,end:v}:{start:0,end:v}},{mayApplyChanges:!0}),i&&(t.dispatch(En([])),t.dispatch(Wn()));break}case Zc.toString():{let{start:m,end:v}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:m,end:v}:{start:0,end:v}},{mayApplyChanges:!0});break}case Ma.toString():{let m=t.getState(),{text:v,selection:y}=m.input.userCommitted;e.emit("reset",{text:v,selectionAfter:y},{mayApplyChanges:!0});break}case td.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:(p=o.conversation.current)==null?void 0:p.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case En.toString():{i&&r.payload.length>0&&t.dispatch(Wr(0));break}case Qn.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload.summary,model:t.getState().summary.model}});break}default:break}return s},ZT=$N;function by(e){return e.toISOString().replace("T"," ").replace("Z","")}function JT(e,t){var i,s,a,l;let n=(i=e.conversation.current)==null?void 0:i.id;if(!n)return F.warn("No conversationId for handling time metrics"),null;let{startTime:r,stopTime:o}=e.handlingTime;return!r||!o?(F.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:n,clientVersion:t.version,agentId:(s=e.info.agentInfo)==null?void 0:s.agentId,agentName:(a=e.info.agentInfo)==null?void 0:a.agentName,agentEmail:(l=e.info.agentInfo)==null?void 0:l.agentEmail,timeStart:by(r),timeStop:by(o)}}function ek(e,t,n){var I,O,M,W;let r=(I=t.conversation.current)==null?void 0:I.id;if(!r)return F.warn("No conversationId for send message metrics"),null;let{text:o,metrics:{numCharsTyped:i,numCharsPasted:s,numCharsCut:a,numCharsDeleted:l,numPaste:u,agentStartedTypingTimestamp:c,externalTimeTotalSeconds:p,pastes:d,cuts:m,deletions:v,textSuggestions:y,offeredTextSuggestions:g}}=t[e],f=o.length,S=y.reduce((X,{text:ne,searchTerm:cr})=>X+ne.length-(cr?cr.length:0),0),w=c??Date.now(),T=(Date.now()-w)/1e3+(p||0),b=i/T,k=y.reduce((X,{searchTerm:ne})=>X+(ne?ne.length:0),0);return{conversationId:r,source:"agent",text:o,clientVersion:n.version,pastes:d,cuts:m,deletions:v,lenTextTyped:i+k,lenTextTotal:f,lenTextAssisted:S,lenTextPasted:s,lenTextCut:a,lenTextDeleted:l,timeTotalSeconds:T,charsPerSecond:b,numPastes:u,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:g.filter(X=>X.source==="gpt").length}],agentId:(O=t.info.agentInfo)==null?void 0:O.agentId,agentName:(M=t.info.agentInfo)==null?void 0:M.agentName,agentEmail:(W=t.info.agentInfo)==null?void 0:W.agentEmail}}function Ty(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return Ty(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?Ty(o,t):null}function tk(e,t){return Ty(e,t)}function nk(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function qN(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Ef(e){return qN(e)&&(Jr(e)||$d(e))}var ok,Rn=new Map,GN=["bottom","height","left","right","top","width"],rk=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:GN.some(n=>e[n]!==t[n]);function ik(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...ik(t)]:[]}function sk(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var Cf=!1,ak=()=>{Cf=!0;let e=[];if(Rn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Rn.delete(n);return}let r=n.getBoundingClientRect();rk(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(sk,t.rect):t.rect;rk(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Rn.size===0){Cf=!1;return}ok=window.requestAnimationFrame(ak)};function ky(e,t){let n=ik(e),r=[],o=n.map((i,s)=>ky(i,a=>{r[s]=a;let l=Rn.get(e);if(!l)return;let u=r.reduce(sk,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Rn.has(e)){let s=Rn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Rn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!Cf&&ak()},unobserve(){o.forEach(s=>s.unobserve());let i=Rn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Rn.delete(e),Rn.size||(cancelAnimationFrame(ok),Cf=!1)}}}}var lk,An=new Map,uk=()=>{An.forEach((e,t)=>{if(!t.isConnected){An.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),An.size!==0&&(lk=window.requestAnimationFrame(uk))};function ck(e,t){return{observe(){let n=An.size===0;An.has(e)?An.get(e).callbacks.push(t):An.set(e,{visible:void 0,callbacks:[t]}),n&&uk()},unobserve(){let n=An.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||An.delete(e),An.size||cancelAnimationFrame(lk)}}}}var Py=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function Ry(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ys(e){return parseFloat(e)}function bf(e){return Math.round(e*1e6)}function dk(e){return e/1e6}function Ay(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ys(e.width),i=ys(e.borderLeftWidth),s=ys(e.borderRightWidth),a=ys(e.paddingRight),l=dk(bf(o)-bf(i)-bf(s)),u=dk(bf(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function Pl(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",jo(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};Ry(r,n,Py),Ay(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=ck(e,()=>{Ry(r,n,Py),Ay(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=ky(e,p=>{if(p===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),p.height===0&&p.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(Ry(r,n,Py),Ay(r,e,n),i(),n.style.top=`${p.top}px`,n.style.left=`${p.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),m=window.getComputedStyle(t.closestScrollElement),v=ys(m.borderTopWidth),y=ys(m.borderBottomWidth),g=d.top+v-p.top,f=p.top+p.height+-(d.top+d.height-y);n.style.clipPath=`inset(${g}px 0px ${f}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var fk=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{F.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function XN(e){return e.offsetParent!==null}function pk(e){if(!XN(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function Tf(e,t,n=100){let r=pk(e);t({isVisible:r});let o=setInterval(()=>{let i=pk(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Ie=x(C());var mk=fk("showTabHint",!0),Rl=class e{static version="11.6.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new ur(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[ZT({broadcast:(p,d,m)=>{this.broadcastEvents.send(p,d,m)},emit:(p,d,m)=>this.emit(p,d,m),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),onUpdateShowTabHint:p=>mk.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new kl(n)}),this.store=QT(c),this.broadcastEvents=new UT({debug:!0,deepdeskUrl:u,eventMap:V1(this.store),createCustomChannel:l}),this.store.dispatch(il(mk.value())),this.store.dispatch(Wc({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(F.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(F.warn("Profile has not been loaded (yet)"),!0):(F.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch($i(null)),this.store.dispatch(Vn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Je(r)&&Jw(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Vn())).payload}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){F.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Vg({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(qc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Gc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Kg(t))).payload}async postMessages(t){return(await this.store.dispatch(Yc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Xc(t))).payload}resetConversation(){this.store.dispatch(le()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Qn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Wc(t))}setVisitorInfo(t){this.store.dispatch(M1(t))}setCustomData(t){this.store.dispatch(N1(t))}async setAgentInfo(t){await this.store.dispatch(Na(t))}async setAgentSettings(t){await this.store.dispatch(qg(t))}async getAgentSettings(){return(await this.store.dispatch(Gg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Dd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(ed(t))}notifyKeyDown(t){this.store.dispatch(Jc(t))}notifyPaste(t,n){this.store.dispatch(T1({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(C1(t))}notifyExternalSuggestion(t){this.store.dispatch(Cn(t)),this.store.dispatch(Wn())}async evaluateRule(t,n={},r=Fb){let{payload:o,error:i}=await this.store.dispatch(Wo({label:t,params:n,options:r}));if(i)throw new Error(i.message);return o.cues}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Qr({collapse:!1})),this.inputMediator&&this.store.dispatch(v1({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(En([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(b1(g1(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(x1()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(E1()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(Ma()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Wr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Wr(-1)),this.store.dispatch(Ma()),t.preventDefault()):n||(this.store.dispatch(Qr({collapse:!0})),this.store.dispatch(NC(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:m}=this.state.input;this.store.dispatch(il(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&m&&m.text.startsWith(d)&&(this.store.dispatch(Cn({text:m.text,suggestion:m,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Wn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(k1()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(F.info("Start handling time"),this.store.dispatch(jT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(F.info("Stop handling time"),this.store.dispatch(xf()))}logSendMessage(t){let n=ek("input",this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n))}logHandlingTime(){let t=JT(this.state,{version:this.version});t&&(this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(VT()))}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Wn()),this.store.dispatch(Ro(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Cn({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{let i=this.eventListeners[t];i&&i.forEach(s=>{try{s(n)}catch(a){F.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),F.error(a)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=Pl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=Pl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return jo(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),F.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(F.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(R1(r.metrics))):F.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Ef(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:m,inputMediator:v,closestScrollSelector:y,appendOverlayTo:g,inlineSuggestions:f,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:m,isEmbedded:p,inlineSuggestions:f,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),jo(t),this.inputMediator=v||(Jr(t)?new Go(t):new qo(t)),this.inputMediator.on("change",({plainText:T})=>{this.notifyInputChanged(T)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(P1({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",T=>{this.notifyKeyDown(T)}),this.inputMediator.on("paste",({pastedText:T,selectionText:b})=>{this.notifyPaste(T,b)}),this.inputMediator.on("cut",({selectionText:T})=>{this.notifyCut(T)});let S=y&&tk(t,y)||void 0;if(f){let{customStyles:T,appendOverlayTo:b}=n;if(Jr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:T,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(jC,{})})}),k),this.inputMediator.on("caret",O=>{this.store.dispatch(En([])),O?(k.style.display="block",k.style.top=`${O.top}px`,k.style.left=`${O.left}px`):k.style.display="none"});let I=this.overlayContainerFactory("floating-menu",S||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:b},T==null?void 0:T.floatingMenuRootNode);(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:T,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(IC,{onLogIn:()=>this.loginViaPopup().catch(O=>F.warn(O.message))})})}),I)}else{let T=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(vb,{inputElement:t})})}),T),(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(QC,{onLogIn:()=>this.loginViaPopup().catch(k=>F.warn(k.message))})})}),b)}(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(kC,{})})}),this.createContainer("deepdesk-overlays"));let w;this.inputMediator.on("selection",T=>{clearTimeout(w),T===null?w=setTimeout(()=>{T!==null&&this.store.dispatch(Wg(T))},500):this.store.dispatch(Wg(T))}),this.inputMediator.on("disabled",()=>{var T;(T=this.inputMediator)==null||T.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(Dh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Dh(!0))),this.store.dispatch(S1({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Wn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var T;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((T=this.state.conversation.current)==null?void 0:T.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&F.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,$t.render)((0,Ie.jsx)(Ko,{store:this.store,customStyles:r,children:(0,Ie.jsx)(Lo,{broadcastEvents:this.broadcastEvents,children:(0,Ie.jsx)(NT,{onLogIn:()=>this.loginViaPopup().catch(s=>F.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Tf(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){nk(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(nl());let t=er(this.state);t&&(await this.store.dispatch(Ja()),this.store.dispatch(Wc({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",p),clearInterval(d)};i.onmessage=async m=>{var v,y;if((v=m.data)!=null&&v.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((y=m.data)==null?void 0:y.jwt),await this.isLoggedIn(),this.broadcastEvents.send(Da),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let p=async m=>{var v;if(m.origin===a.origin)switch((v=m.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let y=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(y,a.origin,[o.port2])}catch(y){F.error("Error posting message to popup",y),r(y)}break}case"deepdesk-popup-error":{u(),m.data.message==="Timeout"&&F.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(m.data.message));break}}};window.addEventListener("message",p);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(F.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;F.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Nd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(on()):Yl.includes(r)||this.store.dispatch(an(r))})}catch(r){this.handleError(r)}}};async function gk(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function hk(e,t,n={}){let r=n.replace?ro(e,n.replace.start,n.replace.end):ms(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
28
+ `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?ro(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function YN(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function QN(e){let t=document.createDocumentFragment();return e.split(`
29
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function yk(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):yk(n,t)}async function vk(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?YN(t):QN(t);n?yk(l.startContainer,u):(l.insertNode(u),l.collapse(!1))};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function Sk(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function xk(e,t,n){await new ur(e).authenticateWithKey(t,n)}async function wk(e){let n=await new fn(e).get("/platform/config/",{version:null,useCache:!0});return J(n)}async function ZN(e){let n=await(e.fetch??window.fetch)(e.url),r=await n.blob();return new File([r],e.name,{type:e.mimeType??n.headers.get("Content-Type")??"image/jpeg"})}async function Ek(e,t){let n=await ZN(t),r=new Event("change",{bubbles:!0,cancelable:!0});try{Object.defineProperty(e,"files",{configurable:!0,get:()=>[n]}),e.dispatchEvent(r)}finally{Object.hasOwn(e,"files")&&delete e.files}}return Fk(JN);})();
30
30
  /*! Bundled license information:
31
31
 
32
32
  classnames/index.js: