@deepdesk/deepdesk-sdk 10.3.1-beta.2 → 10.3.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +5 -5
- package/dist/index.esm.js +4 -4
- package/dist/index.iife.js +10 -10
- package/package.json +2 -2
package/dist/index.iife.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var pC=Object.create;var $a=Object.defineProperty;var mC=Object.getOwnPropertyDescriptor;var gC=Object.getOwnPropertyNames;var hC=Object.getPrototypeOf,yC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)$a(e,n,{get:t[n],enumerable:!0})},Ph=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gC(t))!yC.call(e,o)&&o!==n&&$a(e,o,{get:()=>t[o],enumerable:!(r=mC(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?pC(hC(e)):{},Ph(t||!e||!e.__esModule?$a(n,"default",{value:e,enumerable:!0}):n,e)),vC=e=>Ph($a({},"__esModule",{value:!0}),e);var X=pe((QL,qa)=>{"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 qa<"u"&&qa.exports?(n.default=n,qa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ga=pe((YL,Ih)=>{"use strict";var Rh=Object.getOwnPropertySymbols,SC=Object.prototype.hasOwnProperty,xC=Object.prototype.propertyIsEnumerable;function _C(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function wC(){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}}Ih.exports=wC()?Object.assign:function(e,t){for(var n,r=_C(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)SC.call(n,s)&&(r[s]=n[s]);if(Rh){o=Rh(n);for(var a=0;a<o.length;a++)xC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var $h=pe(K=>{"use strict";var Ad=Ga(),go=60103,Oh=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var Nh=60109,Mh=60110,Dh=60112;K.Suspense=60113;var Fh=60115,jh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,go=ft("react.element"),Oh=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),Nh=ft("react.provider"),Mh=ft("react.context"),Dh=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Fh=ft("react.memo"),jh=ft("react.lazy"));var ft,Lh=typeof Symbol=="function"&&Symbol.iterator;function EC(e){return e===null||typeof e!="object"?null:(e=Lh&&e[Lh]||e["@@iterator"],typeof e=="function"?e:null)}function Wi(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 Hh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bh={};function ho(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Hh}ho.prototype.isReactComponent={};ho.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Wi(85));this.updater.enqueueSetState(this,e,t,"setState")};ho.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uh(){}Uh.prototype=ho.prototype;function Od(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Hh}var Nd=Od.prototype=new Uh;Nd.constructor=Od;Ad(Nd,ho.prototype);Nd.isPureReactComponent=!0;var Md={current:null},zh=Object.prototype.hasOwnProperty,Vh={key:!0,ref:!0,__self:!0,__source:!0};function Kh(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)zh.call(t,r)&&!Vh.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:go,type:e,key:i,ref:s,props:o,_owner:Md.current}}function CC(e,t){return{$$typeof:go,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Dd(e){return typeof e=="object"&&e!==null&&e.$$typeof===go}function bC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ah=/\/+/g;function Ld(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bC(""+e.key):t.toString(36)}function Qa(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 go:case Oh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Ld(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ah,"$&/")+"/"),Qa(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=CC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ah,"$&/")+"/")+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+Ld(i,a);s+=Qa(i,t,n,l,o)}else if(l=EC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ld(i,a++),s+=Qa(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Wi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Xa(e,t,n){if(e==null)return e;var r=[],o=0;return Qa(e,r,"","",function(i){return t.call(n,i,o++)}),r}function TC(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 Wh={current:null};function fn(){var e=Wh.current;if(e===null)throw Error(Wi(321));return e}var kC={ReactCurrentDispatcher:Wh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Md,IsSomeRendererActing:{current:!1},assign:Ad};K.Children={map:Xa,forEach:function(e,t,n){Xa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xa(e,function(){t++}),t},toArray:function(e){return Xa(e,function(t){return t})||[]},only:function(e){if(!Dd(e))throw Error(Wi(143));return e}};K.Component=ho;K.PureComponent=Od;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kC;K.cloneElement=function(e,t,n){if(e==null)throw Error(Wi(267,e));var r=Ad({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Md.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)zh.call(t,l)&&!Vh.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:go,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Mh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Nh,_context:e},e.Consumer=e};K.createElement=Kh;K.createFactory=function(e){var t=Kh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Dh,render:e}};K.isValidElement=Dd;K.lazy=function(e){return{$$typeof:jh,_payload:{_status:-1,_result:e},_init:TC}};K.memo=function(e,t){return{$$typeof:Fh,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return fn().useCallback(e,t)};K.useContext=function(e,t){return fn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return fn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return fn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return fn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return fn().useMemo(e,t)};K.useReducer=function(e,t,n){return fn().useReducer(e,t,n)};K.useRef=function(e){return fn().useRef(e)};K.useState=function(e){return fn().useState(e)};K.version="17.0.2"});var O=pe((JL,qh)=>{"use strict";qh.exports=$h()});var Zh=pe(qi=>{"use strict";Ga();var PC=O(),Qh=60103;qi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Fd=Symbol.for,Qh=Fd("react.element"),qi.Fragment=Fd("react.fragment"));var Fd,RC=PC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IC=Object.prototype.hasOwnProperty,LC={key:!0,ref:!0,__self:!0,__source:!0};function Yh(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)IC.call(t,r)&&!LC.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:Qh,type:e,key:i,ref:s,props:o,_owner:RC.current}}qi.jsx=Yh;qi.jsxs=Yh});var w=pe((sA,Jh)=>{"use strict";Jh.exports=Zh()});var My=pe($=>{"use strict";var wo,ts,Cl,rf;typeof performance=="object"&&typeof performance.now=="function"?(Iy=performance,$.unstable_now=function(){return Iy.now()}):(Yd=Date,Ly=Yd.now(),$.unstable_now=function(){return Yd.now()-Ly});var Iy,Yd,Ly;typeof window>"u"||typeof MessageChannel!="function"?(_o=null,Zd=null,Jd=function(){if(_o!==null)try{var e=$.unstable_now();_o(!0,e),_o=null}catch(t){throw setTimeout(Jd,0),t}},wo=function(e){_o!==null?setTimeout(wo,0,e):(_o=e,setTimeout(Jd,0))},ts=function(e,t){Zd=setTimeout(e,t)},Cl=function(){clearTimeout(Zd)},$.unstable_shouldYield=function(){return!1},rf=$.unstable_forceFrameRate=function(){}):(Ay=window.setTimeout,Oy=window.clearTimeout,typeof console<"u"&&(Ny=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 Ny!="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")),Ji=!1,es=null,_l=-1,ef=5,tf=0,$.unstable_shouldYield=function(){return $.unstable_now()>=tf},rf=function(){},$.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"):ef=0<e?Math.floor(1e3/e):5},nf=new MessageChannel,wl=nf.port2,nf.port1.onmessage=function(){if(es!==null){var e=$.unstable_now();tf=e+ef;try{es(!0,e)?wl.postMessage(null):(Ji=!1,es=null)}catch(t){throw wl.postMessage(null),t}}else Ji=!1},wo=function(e){es=e,Ji||(Ji=!0,wl.postMessage(null))},ts=function(e,t){_l=Ay(function(){e($.unstable_now())},t)},Cl=function(){Oy(_l),_l=-1});var _o,Zd,Jd,Ay,Oy,Ny,Ji,es,_l,ef,tf,nf,wl;function of(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<El(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Mt(e){return e=e[0],e===void 0?null:e}function bl(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>El(s,n))l!==void 0&&0>El(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>El(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function El(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Qt=[],Kn=[],ab=1,yt=null,Ie=3,Tl=!1,Hr=!1,ns=!1;function sf(e){for(var t=Mt(Kn);t!==null;){if(t.callback===null)bl(Kn);else if(t.startTime<=e)bl(Kn),t.sortIndex=t.expirationTime,of(Qt,t);else break;t=Mt(Kn)}}function af(e){if(ns=!1,sf(e),!Hr)if(Mt(Qt)!==null)Hr=!0,wo(lf);else{var t=Mt(Kn);t!==null&&ts(af,t.startTime-e)}}function lf(e,t){Hr=!1,ns&&(ns=!1,Cl()),Tl=!0;var n=Ie;try{for(sf(t),yt=Mt(Qt);yt!==null&&(!(yt.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=yt.callback;if(typeof r=="function"){yt.callback=null,Ie=yt.priorityLevel;var o=r(yt.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?yt.callback=o:yt===Mt(Qt)&&bl(Qt),sf(t)}else bl(Qt);yt=Mt(Qt)}if(yt!==null)var i=!0;else{var s=Mt(Kn);s!==null&&ts(af,s.startTime-t),i=!1}return i}finally{yt=null,Ie=n,Tl=!1}}var lb=rf;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Hr||Tl||(Hr=!0,wo(lf))};$.unstable_getCurrentPriorityLevel=function(){return Ie};$.unstable_getFirstCallbackNode=function(){return Mt(Qt)};$.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=lb;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.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:ab++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,of(Kn,e),Mt(Qt)===null&&e===Mt(Kn)&&(ns?Cl():ns=!0,ts(af,n-r))):(e.sortIndex=o,of(Qt,e),Hr||Tl||(Hr=!0,wo(lf))),e};$.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Fy=pe((ZO,Dy)=>{"use strict";Dy.exports=My()});var E0=pe(Et=>{"use strict";var Su=O(),ae=Ga(),xe=Fy();function T(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(!Su)throw Error(T(227));var Qv=new Set,As={};function Qr(e,t){Vo(e,t),Vo(e+"Capture",t)}function Vo(e,t){for(As[e]=t,e=0;e<t.length;e++)Qv.add(t[e])}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ub=/^[: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]*$/,jy=Object.prototype.hasOwnProperty,Hy={},By={};function cb(e){return jy.call(By,e)?!0:jy.call(Hy,e)?!1:ub.test(e)?By[e]=!0:(Hy[e]=!0,!1)}function db(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 fb(e,t,n,r){if(t===null||typeof t>"u"||db(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 Ue(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 ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ue(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){ke[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var yp=/[\-:]([a-z])/g;function vp(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(yp,vp);ke[t]=new Ue(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(yp,vp);ke[t]=new Ue(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(yp,vp);ke[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sp(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[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||(fb(t,n,o,r)&&(n=null),r||o===null?cb(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 Yr=Su.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gs=60103,Ur=60106,$n=60107,xp=60108,xs=60114,_p=60109,wp=60110,xu=60112,_s=60113,Ql=60120,_u=60115,Ep=60116,Cp=60121,bp=60128,Yv=60129,Tp=60130,Lf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,gs=ye("react.element"),Ur=ye("react.portal"),$n=ye("react.fragment"),xp=ye("react.strict_mode"),xs=ye("react.profiler"),_p=ye("react.provider"),wp=ye("react.context"),xu=ye("react.forward_ref"),_s=ye("react.suspense"),Ql=ye("react.suspense_list"),_u=ye("react.memo"),Ep=ye("react.lazy"),Cp=ye("react.block"),ye("react.scope"),bp=ye("react.opaque.id"),Yv=ye("react.debug_trace_mode"),Tp=ye("react.offscreen"),Lf=ye("react.legacy_hidden"));var ye,Uy=typeof Symbol=="function"&&Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=Uy&&e[Uy]||e["@@iterator"],typeof e=="function"?e:null)}var uf;function hs(e){if(uf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);uf=t&&t[1]||""}return`
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var mC=Object.create;var $a=Object.defineProperty;var gC=Object.getOwnPropertyDescriptor;var hC=Object.getOwnPropertyNames;var yC=Object.getPrototypeOf,vC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)$a(e,n,{get:t[n],enumerable:!0})},Ph=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of hC(t))!vC.call(e,o)&&o!==n&&$a(e,o,{get:()=>t[o],enumerable:!(r=gC(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?mC(yC(e)):{},Ph(t||!e||!e.__esModule?$a(n,"default",{value:e,enumerable:!0}):n,e)),SC=e=>Ph($a({},"__esModule",{value:!0}),e);var X=pe((QL,qa)=>{"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 qa<"u"&&qa.exports?(n.default=n,qa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ga=pe((YL,Ih)=>{"use strict";var Rh=Object.getOwnPropertySymbols,xC=Object.prototype.hasOwnProperty,_C=Object.prototype.propertyIsEnumerable;function wC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function EC(){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}}Ih.exports=EC()?Object.assign:function(e,t){for(var n,r=wC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)xC.call(n,s)&&(r[s]=n[s]);if(Rh){o=Rh(n);for(var a=0;a<o.length;a++)_C.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var $h=pe(K=>{"use strict";var Ad=Ga(),go=60103,Oh=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var Nh=60109,Mh=60110,Dh=60112;K.Suspense=60113;var Fh=60115,jh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,go=ft("react.element"),Oh=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),Nh=ft("react.provider"),Mh=ft("react.context"),Dh=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Fh=ft("react.memo"),jh=ft("react.lazy"));var ft,Lh=typeof Symbol=="function"&&Symbol.iterator;function CC(e){return e===null||typeof e!="object"?null:(e=Lh&&e[Lh]||e["@@iterator"],typeof e=="function"?e:null)}function Wi(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 Hh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bh={};function ho(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Hh}ho.prototype.isReactComponent={};ho.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Wi(85));this.updater.enqueueSetState(this,e,t,"setState")};ho.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uh(){}Uh.prototype=ho.prototype;function Od(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Hh}var Nd=Od.prototype=new Uh;Nd.constructor=Od;Ad(Nd,ho.prototype);Nd.isPureReactComponent=!0;var Md={current:null},zh=Object.prototype.hasOwnProperty,Vh={key:!0,ref:!0,__self:!0,__source:!0};function Kh(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)zh.call(t,r)&&!Vh.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:go,type:e,key:i,ref:s,props:o,_owner:Md.current}}function bC(e,t){return{$$typeof:go,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Dd(e){return typeof e=="object"&&e!==null&&e.$$typeof===go}function TC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ah=/\/+/g;function Ld(e,t){return typeof e=="object"&&e!==null&&e.key!=null?TC(""+e.key):t.toString(36)}function Qa(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 go:case Oh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Ld(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ah,"$&/")+"/"),Qa(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=bC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ah,"$&/")+"/")+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+Ld(i,a);s+=Qa(i,t,n,l,o)}else if(l=CC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ld(i,a++),s+=Qa(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Wi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Xa(e,t,n){if(e==null)return e;var r=[],o=0;return Qa(e,r,"","",function(i){return t.call(n,i,o++)}),r}function kC(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 Wh={current:null};function pn(){var e=Wh.current;if(e===null)throw Error(Wi(321));return e}var PC={ReactCurrentDispatcher:Wh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Md,IsSomeRendererActing:{current:!1},assign:Ad};K.Children={map:Xa,forEach:function(e,t,n){Xa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xa(e,function(){t++}),t},toArray:function(e){return Xa(e,function(t){return t})||[]},only:function(e){if(!Dd(e))throw Error(Wi(143));return e}};K.Component=ho;K.PureComponent=Od;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PC;K.cloneElement=function(e,t,n){if(e==null)throw Error(Wi(267,e));var r=Ad({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Md.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)zh.call(t,l)&&!Vh.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:go,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Mh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Nh,_context:e},e.Consumer=e};K.createElement=Kh;K.createFactory=function(e){var t=Kh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Dh,render:e}};K.isValidElement=Dd;K.lazy=function(e){return{$$typeof:jh,_payload:{_status:-1,_result:e},_init:kC}};K.memo=function(e,t){return{$$typeof:Fh,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return pn().useCallback(e,t)};K.useContext=function(e,t){return pn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return pn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return pn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return pn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return pn().useMemo(e,t)};K.useReducer=function(e,t,n){return pn().useReducer(e,t,n)};K.useRef=function(e){return pn().useRef(e)};K.useState=function(e){return pn().useState(e)};K.version="17.0.2"});var O=pe((JL,qh)=>{"use strict";qh.exports=$h()});var Zh=pe(qi=>{"use strict";Ga();var RC=O(),Qh=60103;qi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Fd=Symbol.for,Qh=Fd("react.element"),qi.Fragment=Fd("react.fragment"));var Fd,IC=RC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,LC=Object.prototype.hasOwnProperty,AC={key:!0,ref:!0,__self:!0,__source:!0};function Yh(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)LC.call(t,r)&&!AC.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:Qh,type:e,key:i,ref:s,props:o,_owner:IC.current}}qi.jsx=Yh;qi.jsxs=Yh});var w=pe((sA,Jh)=>{"use strict";Jh.exports=Zh()});var My=pe($=>{"use strict";var wo,ts,Cl,rf;typeof performance=="object"&&typeof performance.now=="function"?(Iy=performance,$.unstable_now=function(){return Iy.now()}):(Yd=Date,Ly=Yd.now(),$.unstable_now=function(){return Yd.now()-Ly});var Iy,Yd,Ly;typeof window>"u"||typeof MessageChannel!="function"?(_o=null,Zd=null,Jd=function(){if(_o!==null)try{var e=$.unstable_now();_o(!0,e),_o=null}catch(t){throw setTimeout(Jd,0),t}},wo=function(e){_o!==null?setTimeout(wo,0,e):(_o=e,setTimeout(Jd,0))},ts=function(e,t){Zd=setTimeout(e,t)},Cl=function(){clearTimeout(Zd)},$.unstable_shouldYield=function(){return!1},rf=$.unstable_forceFrameRate=function(){}):(Ay=window.setTimeout,Oy=window.clearTimeout,typeof console<"u"&&(Ny=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 Ny!="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")),Ji=!1,es=null,_l=-1,ef=5,tf=0,$.unstable_shouldYield=function(){return $.unstable_now()>=tf},rf=function(){},$.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"):ef=0<e?Math.floor(1e3/e):5},nf=new MessageChannel,wl=nf.port2,nf.port1.onmessage=function(){if(es!==null){var e=$.unstable_now();tf=e+ef;try{es(!0,e)?wl.postMessage(null):(Ji=!1,es=null)}catch(t){throw wl.postMessage(null),t}}else Ji=!1},wo=function(e){es=e,Ji||(Ji=!0,wl.postMessage(null))},ts=function(e,t){_l=Ay(function(){e($.unstable_now())},t)},Cl=function(){Oy(_l),_l=-1});var _o,Zd,Jd,Ay,Oy,Ny,Ji,es,_l,ef,tf,nf,wl;function of(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<El(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Mt(e){return e=e[0],e===void 0?null:e}function bl(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>El(s,n))l!==void 0&&0>El(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>El(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function El(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Qt=[],Kn=[],lb=1,yt=null,Ie=3,Tl=!1,Hr=!1,ns=!1;function sf(e){for(var t=Mt(Kn);t!==null;){if(t.callback===null)bl(Kn);else if(t.startTime<=e)bl(Kn),t.sortIndex=t.expirationTime,of(Qt,t);else break;t=Mt(Kn)}}function af(e){if(ns=!1,sf(e),!Hr)if(Mt(Qt)!==null)Hr=!0,wo(lf);else{var t=Mt(Kn);t!==null&&ts(af,t.startTime-e)}}function lf(e,t){Hr=!1,ns&&(ns=!1,Cl()),Tl=!0;var n=Ie;try{for(sf(t),yt=Mt(Qt);yt!==null&&(!(yt.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=yt.callback;if(typeof r=="function"){yt.callback=null,Ie=yt.priorityLevel;var o=r(yt.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?yt.callback=o:yt===Mt(Qt)&&bl(Qt),sf(t)}else bl(Qt);yt=Mt(Qt)}if(yt!==null)var i=!0;else{var s=Mt(Kn);s!==null&&ts(af,s.startTime-t),i=!1}return i}finally{yt=null,Ie=n,Tl=!1}}var ub=rf;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Hr||Tl||(Hr=!0,wo(lf))};$.unstable_getCurrentPriorityLevel=function(){return Ie};$.unstable_getFirstCallbackNode=function(){return Mt(Qt)};$.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=ub;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.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:lb++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,of(Kn,e),Mt(Qt)===null&&e===Mt(Kn)&&(ns?Cl():ns=!0,ts(af,n-r))):(e.sortIndex=o,of(Qt,e),Hr||Tl||(Hr=!0,wo(lf))),e};$.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Fy=pe((ZO,Dy)=>{"use strict";Dy.exports=My()});var E0=pe(Et=>{"use strict";var Su=O(),ae=Ga(),xe=Fy();function T(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(!Su)throw Error(T(227));var Qv=new Set,As={};function Qr(e,t){Vo(e,t),Vo(e+"Capture",t)}function Vo(e,t){for(As[e]=t,e=0;e<t.length;e++)Qv.add(t[e])}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cb=/^[: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]*$/,jy=Object.prototype.hasOwnProperty,Hy={},By={};function db(e){return jy.call(By,e)?!0:jy.call(Hy,e)?!1:cb.test(e)?By[e]=!0:(Hy[e]=!0,!1)}function fb(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 pb(e,t,n,r){if(t===null||typeof t>"u"||fb(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 Ue(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 ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ue(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){ke[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var yp=/[\-:]([a-z])/g;function vp(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(yp,vp);ke[t]=new Ue(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(yp,vp);ke[t]=new Ue(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(yp,vp);ke[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sp(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[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||(pb(t,n,o,r)&&(n=null),r||o===null?db(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 Yr=Su.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gs=60103,Ur=60106,$n=60107,xp=60108,xs=60114,_p=60109,wp=60110,xu=60112,_s=60113,Ql=60120,_u=60115,Ep=60116,Cp=60121,bp=60128,Yv=60129,Tp=60130,Lf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,gs=ye("react.element"),Ur=ye("react.portal"),$n=ye("react.fragment"),xp=ye("react.strict_mode"),xs=ye("react.profiler"),_p=ye("react.provider"),wp=ye("react.context"),xu=ye("react.forward_ref"),_s=ye("react.suspense"),Ql=ye("react.suspense_list"),_u=ye("react.memo"),Ep=ye("react.lazy"),Cp=ye("react.block"),ye("react.scope"),bp=ye("react.opaque.id"),Yv=ye("react.debug_trace_mode"),Tp=ye("react.offscreen"),Lf=ye("react.legacy_hidden"));var ye,Uy=typeof Symbol=="function"&&Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=Uy&&e[Uy]||e["@@iterator"],typeof e=="function"?e:null)}var uf;function hs(e){if(uf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);uf=t&&t[1]||""}return`
|
|
2
2
|
`+uf+e}var cf=!1;function kl(e,t){if(!e||cf)return"";cf=!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{cf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hs(e):""}function pb(e){switch(e.tag){case 5:return hs(e.type);case 16:return hs("Lazy");case 13:return hs("Suspense");case 19:return hs("SuspenseList");case 0:case 2:case 15:return e=kl(e.type,!1),e;case 11:return e=kl(e.type.render,!1),e;case 22:return e=kl(e.type._render,!1),e;case 1:return e=kl(e.type,!0),e;default:return""}}function Oo(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 $n:return"Fragment";case Ur:return"Portal";case xs:return"Profiler";case xp:return"StrictMode";case _s:return"Suspense";case Ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wp:return(e.displayName||"Context")+".Consumer";case _p:return(e._context.displayName||"Context")+".Provider";case xu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case _u:return Oo(e.type);case Cp:return Oo(e._render);case Ep:t=e._payload,e=e._init;try{return Oo(e(t))}catch{}}return null}function or(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Zv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mb(e){var t=Zv(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 Pl(e){e._valueTracker||(e._valueTracker=mb(e))}function Jv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yl(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 Af(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(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 eS(e,t){t=t.checked,t!=null&&Sp(e,"checked",t,!1)}function Of(e,t){eS(e,t);var n=or(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")?Nf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nf(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(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 Nf(e,t,n){(t!=="number"||Yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function gb(e){var t="";return Su.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Mf(e,t){return e=ae({children:void 0},t),(t=gb(t.children))&&(e.children=t),e}function No(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=""+or(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 Df(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ky(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function tS(e,t){var n=or(t.value),r=or(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 Wy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Ff={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function nS(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 jf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Rl,rS=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!==Ff.svg||"innerHTML"in e)e.innerHTML=t;else{for(Rl=Rl||document.createElement("div"),Rl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Os(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ws={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},hb=["Webkit","ms","Moz","O"];Object.keys(ws).forEach(function(e){hb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ws[t]=ws[e]})});function oS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ws.hasOwnProperty(e)&&ws[e]?(""+t).trim():t+"px"}function iS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=oS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var yb=ae({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 Hf(e,t){if(t){if(yb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Bf(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 kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uf=null,Mo=null,Do=null;function $y(e){if(e=qs(e)){if(typeof Uf!="function")throw Error(T(280));var t=e.stateNode;t&&(t=ku(t),Uf(e.stateNode,e.type,t))}}function sS(e){Mo?Do?Do.push(e):Do=[e]:Mo=e}function aS(){if(Mo){var e=Mo,t=Do;if(Do=Mo=null,$y(e),t)for(e=0;e<t.length;e++)$y(t[e])}}function Pp(e,t){return e(t)}function lS(e,t,n,r,o){return e(t,n,r,o)}function Rp(){}var uS=Pp,zr=!1,df=!1;function Ip(){(Mo!==null||Do!==null)&&(Rp(),aS())}function vb(e,t,n){if(df)return e(t,n);df=!0;try{return uS(e,t,n)}finally{df=!1,Ip()}}function Ns(e,t){var n=e.stateNode;if(n===null)return null;var r=ku(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(T(231,t,typeof n));return n}var zf=!1;if(vn)try{Eo={},Object.defineProperty(Eo,"passive",{get:function(){zf=!0}}),window.addEventListener("test",Eo,Eo),window.removeEventListener("test",Eo,Eo)}catch{zf=!1}var Eo;function Sb(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 Es=!1,Zl=null,Jl=!1,Vf=null,xb={onError:function(e){Es=!0,Zl=e}};function _b(e,t,n,r,o,i,s,a,l){Es=!1,Zl=null,Sb.apply(xb,arguments)}function wb(e,t,n,r,o,i,s,a,l){if(_b.apply(this,arguments),Es){if(Es){var u=Zl;Es=!1,Zl=null}else throw Error(T(198));Jl||(Jl=!0,Vf=u)}}function Zr(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 cS(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 qy(e){if(Zr(e)!==e)throw Error(T(188))}function Eb(e){var t=e.alternate;if(!t){if(t=Zr(e),t===null)throw Error(T(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 qy(o),e;if(i===r)return qy(o),t;i=i.sibling}throw Error(T(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(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function dS(e){if(e=Eb(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 Gy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var fS,Lp,pS,mS,Kf=!1,Yt=[],Qn=null,Yn=null,Zn=null,Ms=new Map,Ds=new Map,os=[],Xy="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 Wf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Qy(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function is(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Wf(t,n,r,o,i),t!==null&&(t=qs(t),t!==null&&Lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Cb(e,t,n,r,o){switch(t){case"focusin":return Qn=is(Qn,e,t,n,r,o),!0;case"dragenter":return Yn=is(Yn,e,t,n,r,o),!0;case"mouseover":return Zn=is(Zn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ms.set(i,is(Ms.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ds.set(i,is(Ds.get(i)||null,e,t,n,r,o)),!0}return!1}function bb(e){var t=Vr(e.target);if(t!==null){var n=Zr(t);if(n!==null){if(t=n.tag,t===13){if(t=cS(n),t!==null){e.blockedOn=t,mS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){pS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=qs(n),t!==null&&Lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Yy(e,t,n){Bl(e)&&n.delete(t)}function Tb(){for(Kf=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=qs(e.blockedOn),e!==null&&fS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Yt.shift()}Qn!==null&&Bl(Qn)&&(Qn=null),Yn!==null&&Bl(Yn)&&(Yn=null),Zn!==null&&Bl(Zn)&&(Zn=null),Ms.forEach(Yy),Ds.forEach(Yy)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,Tb)))}function gS(e){function t(o){return ss(o,e)}if(0<Yt.length){ss(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qn!==null&&ss(Qn,e),Yn!==null&&ss(Yn,e),Zn!==null&&ss(Zn,e),Ms.forEach(t),Ds.forEach(t),n=0;n<os.length;n++)r=os[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<os.length&&(n=os[0],n.blockedOn===null);)bb(n),n.blockedOn===null&&os.shift()}function Il(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ko={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionend:Il("Transition","TransitionEnd")},ff={},hS={};vn&&(hS=document.createElement("div").style,"AnimationEvent"in window||(delete ko.animationend.animation,delete ko.animationiteration.animation,delete ko.animationstart.animation),"TransitionEvent"in window||delete ko.transitionend.transition);function wu(e){if(ff[e])return ff[e];if(!ko[e])return e;var t=ko[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hS)return ff[e]=t[n];return e}var yS=wu("animationend"),vS=wu("animationiteration"),SS=wu("animationstart"),xS=wu("transitionend"),_S=new Map,Ap=new Map,kb=["abort","abort",yS,"animationEnd",vS,"animationIteration",SS,"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",xS,"transitionEnd","waiting","waiting"];function Op(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)),Ap.set(r,t),_S.set(r,o),Qr(o,[r])}}var Pb=xe.unstable_now;Pb();var ne=8;function bo(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function Rb(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 Ib(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(T(358,e))}}function Fs(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=bo(l),o=ne):(a&=i,a!==0&&(r=bo(a),o=ne))}else i=n&~s,i!==0?(r=bo(i),o=ne):a!==0&&(r=bo(a),o=ne);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(bo(t),o<=ne)return t;ne=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 wS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function eu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=To(24&~t),e===0?eu(10,t):e;case 10:return e=To(192&~t),e===0?eu(8,t):e;case 8:return e=To(3584&~t),e===0&&(e=To(4186112&~t),e===0&&(e=512)),e;case 2:return t=To(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function To(e){return e&-e}function pf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Eu(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:Ob,Lb=Math.log,Ab=Math.LN2;function Ob(e){return e===0?32:31-(Lb(e)/Ab|0)|0}var Nb=xe.unstable_UserBlockingPriority,Mb=xe.unstable_runWithPriority,Ul=!0;function Db(e,t,n,r){zr||Rp();var o=Np,i=zr;zr=!0;try{lS(o,e,t,n,r)}finally{(zr=i)||Ip()}}function Fb(e,t,n,r){Mb(Nb,Np.bind(null,e,t,n,r))}function Np(e,t,n,r){if(Ul){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<Xy.indexOf(e))e=Wf(null,e,t,n,r),Yt.push(e);else{var i=Mp(e,t,n,r);if(i===null)o&&Qy(e,r);else{if(o){if(-1<Xy.indexOf(e)){e=Wf(i,e,t,n,r),Yt.push(e);return}if(Cb(i,e,t,n,r))return;Qy(e,r)}MS(e,t,r,null,n)}}}}function Mp(e,t,n,r){var o=kp(r);if(o=Vr(o),o!==null){var i=Zr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=cS(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 MS(e,t,r,o,n),null}var qn=null,Dp=null,zl=null;function ES(){if(zl)return zl;var e,t=Dp,n=t.length,r,o="value"in qn?qn.value:qn.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 zl=o.slice(e,1<r?1-r:void 0)}function Vl(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 Ll(){return!0}function Zy(){return!1}function rt(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)?Ll:Zy,this.isPropagationStopped=Zy,this}return ae(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=Ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),t}var qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fp=rt(qo),$s=ae({},qo,{view:0,detail:0}),jb=rt($s),mf,gf,as,Cu=ae({},$s,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,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!==as&&(as&&e.type==="mousemove"?(mf=e.screenX-as.screenX,gf=e.screenY-as.screenY):gf=mf=0,as=e),mf)},movementY:function(e){return"movementY"in e?e.movementY:gf}}),Jy=rt(Cu),Hb=ae({},Cu,{dataTransfer:0}),Bb=rt(Hb),Ub=ae({},$s,{relatedTarget:0}),hf=rt(Ub),zb=ae({},qo,{animationName:0,elapsedTime:0,pseudoElement:0}),Vb=rt(zb),Kb=ae({},qo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wb=rt(Kb),$b=ae({},qo,{data:0}),ev=rt($b),qb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gb={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"},Xb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xb[e])?!!t[e]:!1}function jp(){return Qb}var Yb=ae({},$s,{key:function(e){if(e.key){var t=qb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(e){return e.type==="keypress"?Vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zb=rt(Yb),Jb=ae({},Cu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tv=rt(Jb),eT=ae({},$s,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),tT=rt(eT),nT=ae({},qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),rT=rt(nT),oT=ae({},Cu,{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}),iT=rt(oT),sT=[9,13,27,32],Hp=vn&&"CompositionEvent"in window,Cs=null;vn&&"documentMode"in document&&(Cs=document.documentMode);var aT=vn&&"TextEvent"in window&&!Cs,CS=vn&&(!Hp||Cs&&8<Cs&&11>=Cs),nv=String.fromCharCode(32),rv=!1;function bS(e,t){switch(e){case"keyup":return sT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Po=!1;function lT(e,t){switch(e){case"compositionend":return TS(t);case"keypress":return t.which!==32?null:(rv=!0,nv);case"textInput":return e=t.data,e===nv&&rv?null:e;default:return null}}function uT(e,t){if(Po)return e==="compositionend"||!Hp&&bS(e,t)?(e=ES(),zl=Dp=qn=null,Po=!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 CS&&t.locale!=="ko"?null:t.data;default:return null}}var cT={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 ov(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cT[e.type]:t==="textarea"}function kS(e,t,n,r){sS(r),t=tu(t,"onChange"),0<t.length&&(n=new Fp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bs=null,js=null;function dT(e){AS(e,0)}function bu(e){var t=Io(e);if(Jv(t))return e}function fT(e,t){if(e==="change")return t}var PS=!1;vn&&(vn?(Ol="oninput"in document,Ol||(yf=document.createElement("div"),yf.setAttribute("oninput","return;"),Ol=typeof yf.oninput=="function"),Al=Ol):Al=!1,PS=Al&&(!document.documentMode||9<document.documentMode));var Al,Ol,yf;function iv(){bs&&(bs.detachEvent("onpropertychange",RS),js=bs=null)}function RS(e){if(e.propertyName==="value"&&bu(js)){var t=[];if(kS(t,js,e,kp(e)),e=dT,zr)e(t);else{zr=!0;try{Pp(e,t)}finally{zr=!1,Ip()}}}}function pT(e,t,n){e==="focusin"?(iv(),bs=t,js=n,bs.attachEvent("onpropertychange",RS)):e==="focusout"&&iv()}function mT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bu(js)}function gT(e,t){if(e==="click")return bu(t)}function hT(e,t){if(e==="input"||e==="change")return bu(t)}function yT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:yT,vT=Object.prototype.hasOwnProperty;function Hs(e,t){if(vt(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(!vT.call(t,n[r])||!vt(e[n[r]],t[n[r]]))return!1;return!0}function sv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function av(e,t){var n=sv(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=sv(n)}}function IS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?IS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lv(){for(var e=window,t=Yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yl(e.document)}return t}function $f(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 ST=vn&&"documentMode"in document&&11>=document.documentMode,Ro=null,qf=null,Ts=null,Gf=!1;function uv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gf||Ro==null||Ro!==Yl(r)||(r=Ro,"selectionStart"in r&&$f(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}),Ts&&Hs(Ts,r)||(Ts=r,r=tu(qf,"onSelect"),0<r.length&&(t=new Fp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ro)))}Op("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);Op("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);Op(kb,2);for(vf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Nl=0;Nl<vf.length;Nl++)Ap.set(vf[Nl],0);var vf,Nl;Vo("onMouseEnter",["mouseout","mouseover"]);Vo("onMouseLeave",["mouseout","mouseover"]);Vo("onPointerEnter",["pointerout","pointerover"]);Vo("onPointerLeave",["pointerout","pointerover"]);Qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ys="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),LS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ys));function cv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,wb(r,t,void 0,e),e.currentTarget=null}function AS(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;cv(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;cv(o,a,u),i=l}}}if(Jl)throw e=Vf,Jl=!1,Vf=null,e}function ie(e,t){var n=FS(t),r=e+"__bubble";n.has(r)||(NS(t,e,2,!1),n.add(r))}var dv="_reactListening"+Math.random().toString(36).slice(2);function OS(e){e[dv]||(e[dv]=!0,Qv.forEach(function(t){LS.has(t)||fv(t,!1,e,null),fv(t,!0,e,null)}))}function fv(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&&LS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=FS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),NS(i,e,o,t),s.add(a))}function NS(e,t,n,r){var o=Ap.get(t);switch(o===void 0?2:o){case 0:o=Db;break;case 1:o=Fb;break;default:o=Np}n=o.bind(null,t,n,e),o=void 0,!zf||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 MS(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=Vr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}vb(function(){var u=i,c=kp(n),f=[];e:{var d=_S.get(e);if(d!==void 0){var y=Fp,S=e;switch(e){case"keypress":if(Vl(n)===0)break e;case"keydown":case"keyup":y=Zb;break;case"focusin":S="focus",y=hf;break;case"focusout":S="blur",y=hf;break;case"beforeblur":case"afterblur":y=hf;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":y=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Bb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=tT;break;case yS:case vS:case SS:y=Vb;break;case xS:y=rT;break;case"scroll":y=jb;break;case"wheel":y=iT;break;case"copy":case"cut":case"paste":y=Wb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=tv}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ns(p,m),_!=null&&h.push(Bs(p,_,v)))),g)break;p=p.return}0<h.length&&(d=new y(d,S,null,n,c),f.push({event:d,listeners:h}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(S=n.relatedTarget||n.fromElement)&&(Vr(S)||S[Go]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=n.relatedTarget||n.toElement,y=u,S=S?Vr(S):null,S!==null&&(g=Zr(S),S!==g||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=u),y!==S)){if(h=Jy,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=tv,_="onPointerLeave",m="onPointerEnter",p="pointer"),g=y==null?d:Io(y),v=S==null?d:Io(S),d=new h(_,p+"leave",y,n,c),d.target=g,d.relatedTarget=v,_=null,Vr(c)===u&&(h=new h(m,p+"enter",S,n,c),h.target=v,h.relatedTarget=g,_=h),g=_,y&&S)t:{for(h=y,m=S,p=0,v=h;v;v=Co(v))p++;for(v=0,_=m;_;_=Co(_))v++;for(;0<p-v;)h=Co(h),p--;for(;0<v-p;)m=Co(m),v--;for(;p--;){if(h===m||m!==null&&h===m.alternate)break t;h=Co(h),m=Co(m)}h=null}else h=null;y!==null&&pv(f,d,y,h,!1),S!==null&&g!==null&&pv(f,g,S,h,!0)}}e:{if(d=u?Io(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=fT;else if(ov(d))if(PS)C=hT;else{C=mT;var E=pT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=gT);if(C&&(C=C(e,u))){kS(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Nf(d,"number",d.value)}switch(E=u?Io(u):window,e){case"focusin":(ov(E)||E.contentEditable==="true")&&(Ro=E,qf=u,Ts=null);break;case"focusout":Ts=qf=Ro=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,uv(f,n,c);break;case"selectionchange":if(ST)break;case"keydown":case"keyup":uv(f,n,c)}var b;if(Hp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Po?bS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(CS&&n.locale!=="ko"&&(Po||R!=="onCompositionStart"?R==="onCompositionEnd"&&Po&&(b=ES()):(qn=c,Dp="value"in qn?qn.value:qn.textContent,Po=!0)),E=tu(u,R),0<E.length&&(R=new ev(R,e,null,n,c),f.push({event:R,listeners:E}),b?R.data=b:(b=TS(n),b!==null&&(R.data=b)))),(b=aT?lT(e,n):uT(e,n))&&(u=tu(u,"onBeforeInput"),0<u.length&&(c=new ev("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}AS(f,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function tu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ns(e,n),i!=null&&r.unshift(Bs(e,i,o)),i=Ns(e,t),i!=null&&r.push(Bs(e,i,o))),e=e.return}return r}function Co(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pv(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=Ns(n,i),l!=null&&s.unshift(Bs(n,l,a))):o||(l=Ns(n,i),l!=null&&s.push(Bs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function nu(){}var Sf=null,xf=null;function DS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Xf(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 mv=typeof setTimeout=="function"?setTimeout:void 0,xT=typeof clearTimeout=="function"?clearTimeout:void 0;function Bp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Fo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function gv(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 _f=0;function _T(e){return{$$typeof:bp,toString:e,valueOf:e}}var Tu=Math.random().toString(36).slice(2),Gn="__reactFiber$"+Tu,ru="__reactProps$"+Tu,Go="__reactContainer$"+Tu,hv="__reactEvents$"+Tu;function Vr(e){var t=e[Gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Go]||n[Gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gv(e);e!==null;){if(n=e[Gn])return n;e=gv(e)}return t}e=n,n=e.parentNode}return null}function qs(e){return e=e[Gn]||e[Go],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Io(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function ku(e){return e[ru]||null}function FS(e){var t=e[hv];return t===void 0&&(t=e[hv]=new Set),t}var Qf=[],Lo=-1;function ur(e){return{current:e}}function se(e){0>Lo||(e.current=Qf[Lo],Qf[Lo]=null,Lo--)}function de(e,t){Lo++,Qf[Lo]=e.current,e.current=t}var sr={},Ne=ur(sr),qe=ur(!1),qr=sr;function Ko(e,t){var n=e.type.contextTypes;if(!n)return sr;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 Ge(e){return e=e.childContextTypes,e!=null}function ou(){se(qe),se(Ne)}function yv(e,t,n){if(Ne.current!==sr)throw Error(T(168));de(Ne,t),de(qe,n)}function jS(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(T(108,Oo(t)||"Unknown",o));return ae({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,qr=Ne.current,de(Ne,e),de(qe,qe.current),!0}function vv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=jS(e,t,qr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(Ne),de(Ne,e)):se(qe),de(qe,n)}var Up=null,$r=null,wT=xe.unstable_runWithPriority,zp=xe.unstable_scheduleCallback,Yf=xe.unstable_cancelCallback,ET=xe.unstable_shouldYield,Sv=xe.unstable_requestPaint,Zf=xe.unstable_now,CT=xe.unstable_getCurrentPriorityLevel,Pu=xe.unstable_ImmediatePriority,HS=xe.unstable_UserBlockingPriority,BS=xe.unstable_NormalPriority,US=xe.unstable_LowPriority,zS=xe.unstable_IdlePriority,wf={},bT=Sv!==void 0?Sv:function(){},pn=null,Wl=null,Ef=!1,xv=Zf(),Ae=1e4>xv?Zf:function(){return Zf()-xv};function Wo(){switch(CT()){case Pu:return 99;case HS:return 98;case BS:return 97;case US:return 96;case zS:return 95;default:throw Error(T(332))}}function VS(e){switch(e){case 99:return Pu;case 98:return HS;case 97:return BS;case 96:return US;case 95:return zS;default:throw Error(T(332))}}function Gr(e,t){return e=VS(e),wT(e,t)}function Us(e,t,n){return e=VS(e),zp(e,t,n)}function nn(){if(Wl!==null){var e=Wl;Wl=null,Yf(e)}KS()}function KS(){if(!Ef&&pn!==null){Ef=!0;var e=0;try{var t=pn;Gr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),pn=null}catch(n){throw pn!==null&&(pn=pn.slice(e+1)),zp(Pu,nn),n}finally{Ef=!1}}}var TT=Yr.ReactCurrentBatchConfig;function Dt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var iu=ur(null),su=null,Ao=null,au=null;function Vp(){au=Ao=su=null}function Kp(e){var t=iu.current;se(iu),e.type._context._currentValue=t}function WS(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 jo(e,t){su=e,au=Ao=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function _t(e,t){if(au!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(au=e,t=1073741823),t={context:e,observedBits:t,next:null},Ao===null){if(su===null)throw Error(T(308));Ao=t,su.dependencies={lanes:0,firstContext:t,responders:null}}else Ao=Ao.next=t;return e._currentValue}var Wn=!1;function Wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function $S(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 Jn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(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 _v(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 zs(e,t,n,r){var o=e.updateQueue;Wn=!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 f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=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 y=e,S=i;switch(a=t,d=n,S.tag){case 1:if(y=S.payload,typeof y=="function"){f=y.call(d,f,a);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=S.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Wn=!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=f):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=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Xs|=s,e.lanes=s,e.memoizedState=f}}function wv(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(T(191,o));o.call(r)}}}var qS=new Su.Component().refs;function lu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ru={isMounted:function(e){return(e=e._reactInternals)?Zr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),o=tr(e),i=Jn(r,o);i.payload=t,n!=null&&(i.callback=n),er(e,i),nr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),o=tr(e),i=Jn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),er(e,i),nr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=tr(e),o=Jn(n,r);o.tag=2,t!=null&&(o.callback=t),er(e,o),nr(e,r,n)}};function Ev(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?!Hs(n,r)||!Hs(o,i):!0}function GS(e,t,n){var r=!1,o=sr,i=t.contextType;return typeof i=="object"&&i!==null?i=_t(i):(o=Ge(t)?qr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Ko(e,o):sr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ru,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Cv(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&&Ru.enqueueReplaceState(t,t.state,null)}function Jf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=qS,Wp(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=_t(i):(i=Ge(t)?qr:Ne.current,o.context=Ko(e,i)),zs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(lu(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&&Ru.enqueueReplaceState(o,o.state,null),zs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Ml=Array.isArray;function ls(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(T(309));var r=n.stateNode}if(!r)throw Error(T(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===qS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Dl(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function XS(e){function t(g,m){if(e){var p=g.lastEffect;p!==null?(p.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=lr(g,m),g.index=0,g.sibling=null,g}function i(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags=2,m):p):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,p,v){return m===null||m.tag!==6?(m=Pf(p,g.mode,v),m.return=g,m):(m=o(m,p),m.return=g,m)}function l(g,m,p,v){return m!==null&&m.elementType===p.type?(v=o(m,p.props),v.ref=ls(g,m,p),v.return=g,v):(v=Xl(p.type,p.key,p.props,null,g.mode,v),v.ref=ls(g,m,p),v.return=g,v)}function u(g,m,p,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=Rf(p,g.mode,v),m.return=g,m):(m=o(m,p.children||[]),m.return=g,m)}function c(g,m,p,v,_){return m===null||m.tag!==7?(m=zo(p,g.mode,v,_),m.return=g,m):(m=o(m,p),m.return=g,m)}function f(g,m,p){if(typeof m=="string"||typeof m=="number")return m=Pf(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case gs:return p=Xl(m.type,m.key,m.props,null,g.mode,p),p.ref=ls(g,null,m),p.return=g,p;case Ur:return m=Rf(m,g.mode,p),m.return=g,m}if(Ml(m)||rs(m))return m=zo(m,g.mode,p,null),m.return=g,m;Dl(g,m)}return null}function d(g,m,p,v){var _=m!==null?m.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(g,m,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case gs:return p.key===_?p.type===$n?c(g,m,p.props.children,v,_):l(g,m,p,v):null;case Ur:return p.key===_?u(g,m,p,v):null}if(Ml(p)||rs(p))return _!==null?null:c(g,m,p,v,null);Dl(g,p)}return null}function y(g,m,p,v,_){if(typeof v=="string"||typeof v=="number")return g=g.get(p)||null,a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gs:return g=g.get(v.key===null?p:v.key)||null,v.type===$n?c(m,g,v.props.children,_,v.key):l(m,g,v,_);case Ur:return g=g.get(v.key===null?p:v.key)||null,u(m,g,v,_)}if(Ml(v)||rs(v))return g=g.get(p)||null,c(m,g,v,_,null);Dl(m,v)}return null}function S(g,m,p,v){for(var _=null,C=null,E=m,b=m=0,R=null;E!==null&&b<p.length;b++){E.index>b?(R=E,E=null):R=E.sibling;var P=d(g,E,p[b],v);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(g,E),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,E=R}if(b===p.length)return n(g,E),_;if(E===null){for(;b<p.length;b++)E=f(g,p[b],v),E!==null&&(m=i(E,m,b),C===null?_=E:C.sibling=E,C=E);return _}for(E=r(g,E);b<p.length;b++)R=y(E,g,b,p[b],v),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?b:R.key),m=i(R,m,b),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(N){return t(g,N)}),_}function h(g,m,p,v){var _=rs(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,E=m,b=m=0,R=null,P=p.next();E!==null&&!P.done;b++,P=p.next()){E.index>b?(R=E,E=null):R=E.sibling;var N=d(g,E,P.value,v);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,E=R}if(P.done)return n(g,E),_;if(E===null){for(;!P.done;b++,P=p.next())P=f(g,P.value,v),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(E=r(g,E);!P.done;b++,P=p.next())P=y(E,g,b,P.value,v),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&E.forEach(function(G){return t(g,G)}),_}return function(g,m,p,v){var _=typeof p=="object"&&p!==null&&p.type===$n&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case gs:e:{for(C=p.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===$n){n(g,_.sibling),m=o(_,p.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===p.type){n(g,_.sibling),m=o(_,p.props),m.ref=ls(g,_,p),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}p.type===$n?(m=zo(p.props.children,g.mode,v,p.key),m.return=g,g=m):(v=Xl(p.type,p.key,p.props,null,g.mode,v),v.ref=ls(g,m,p),v.return=g,g=v)}return s(g);case Ur:e:{for(_=p.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(g,m.sibling),m=o(m,p.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Rf(p,g.mode,v),m.return=g,g=m}return s(g)}if(typeof p=="string"||typeof p=="number")return p=""+p,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,p),m.return=g,g=m):(n(g,m),m=Pf(p,g.mode,v),m.return=g,g=m),s(g);if(Ml(p))return S(g,m,p,v);if(rs(p))return h(g,m,p,v);if(C&&Dl(g,p),typeof p>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Oo(g.type)||"Component"))}return n(g,m)}}var uu=XS(!0),QS=XS(!1),Gs={},en=ur(Gs),Vs=ur(Gs),Ks=ur(Gs);function Kr(e){if(e===Gs)throw Error(T(174));return e}function ep(e,t){switch(de(Ks,t),de(Vs,e),de(en,Gs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jf(t,e)}se(en),de(en,t)}function $o(){se(en),se(Vs),se(Ks)}function bv(e){Kr(Ks.current);var t=Kr(en.current),n=jf(t,e.type);t!==n&&(de(Vs,e),de(en,n))}function $p(e){Vs.current===e&&(se(en),se(Vs))}var ce=ur(0);function cu(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 gn=null,Xn=null,tn=!1;function YS(e,t){var n=St(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 Tv(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 tp(e){if(tn){var t=Xn;if(t){var n=t;if(!Tv(e,t)){if(t=Fo(n.nextSibling),!t||!Tv(e,t)){e.flags=e.flags&-1025|2,tn=!1,gn=e;return}YS(gn,n)}gn=e,Xn=Fo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,gn=e}}function kv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;gn=e}function Fl(e){if(e!==gn)return!1;if(!tn)return kv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Xf(t,e.memoizedProps))for(t=Xn;t;)YS(e,t),t=Fo(t.nextSibling);if(kv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xn=Fo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xn=null}}else Xn=gn?Fo(e.stateNode.nextSibling):null;return!0}function Cf(){Xn=gn=null,tn=!1}var Ho=[];function qp(){for(var e=0;e<Ho.length;e++)Ho[e]._workInProgressVersionPrimary=null;Ho.length=0}var ks=Yr.ReactCurrentDispatcher,xt=Yr.ReactCurrentBatchConfig,Ws=0,ge=null,Le=null,be=null,du=!1,Ps=!1;function We(){throw Error(T(321))}function Gp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Xp(e,t,n,r,o,i){if(Ws=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ks.current=e===null||e.memoizedState===null?PT:RT,e=n(r,o),Ps){i=0;do{if(Ps=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,ks.current=IT,e=n(r,o)}while(Ps)}if(ks.current=gu,t=Le!==null&&Le.next!==null,Ws=0,be=Le=ge=null,du=!1,t)throw Error(T(300));return e}function Wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Jr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Le=e;else{if(e===null)throw Error(T(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Zt(e,t){return typeof t=="function"?t(e):t}function us(e){var t=Jr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Le,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((Ws&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,ge.lanes|=u,Xs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,vt(r,t.memoizedState)||(Ft=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function cs(e){var t=Jr(),n=t.queue;if(n===null)throw Error(T(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);vt(i,t.memoizedState)||(Ft=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pv(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=(Ws&e)===e)&&(t._workInProgressVersionPrimary=r,Ho.push(t))),e)return n(t._source);throw Ho.push(t),Error(T(350))}function ZS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=ks.current,l=a.useState(function(){return Pv(o,t,n)}),u=l[1],c=l[0];l=be;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,S=f.source;f=f.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!vt(s,g)){g=n(t._source),vt(c,g)||(u(g),g=tr(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,p=g;0<p;){var v=31-ir(p),_=1<<v;m[v]|=g,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var p=tr(h);o.mutableReadLanes|=p&o.pendingLanes}catch(v){m(function(){throw v})}})},[t,r]),vt(y,n)&&vt(S,t)&&vt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Zp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Pv(o,t,n),l.memoizedState=l.baseState=c),c}function JS(e,t,n){var r=Jr();return ZS(r,e,t,n)}function ds(e){var t=Wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Zp.bind(null,ge,e),[t.memoizedState,e]}function fu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.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 Rv(e){var t=Wr();return e={current:e},t.memoizedState=e}function pu(){return Jr().memoizedState}function np(e,t,n,r){var o=Wr();ge.flags|=e,o.memoizedState=fu(1|t,n,void 0,r===void 0?null:r)}function Qp(e,t,n,r){var o=Jr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Gp(r,s.deps)){fu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=fu(1|t,n,i,r)}function Iv(e,t){return np(516,4,e,t)}function mu(e,t){return Qp(516,4,e,t)}function e0(e,t){return Qp(4,2,e,t)}function t0(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 n0(e,t,n){return n=n!=null?n.concat([e]):null,Qp(4,2,t0.bind(null,t,e),n)}function Yp(){}function r0(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function o0(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kT(e,t){var n=Wo();Gr(98>n?98:n,function(){e(!0)}),Gr(97<n?97:n,function(){var r=xt.transition;xt.transition=1;try{e(!1),t()}finally{xt.transition=r}})}function Zp(e,t,n){var r=nt(),o=tr(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===ge||s!==null&&s===ge)Ps=du=!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,vt(l,a))return}catch{}finally{}nr(e,o,r)}}var gu={readContext:_t,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useOpaqueIdentifier:We,unstable_isNewReconciler:!1},PT={readContext:_t,useCallback:function(e,t){return Wr().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Iv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,np(4,2,t0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4,2,e,t)},useMemo:function(e,t){var n=Wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wr();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=Zp.bind(null,ge,e),[r.memoizedState,e]},useRef:Rv,useState:ds,useDebugValue:Yp,useDeferredValue:function(e){var t=ds(e),n=t[0],r=t[1];return Iv(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=ds(!1),t=e[0];return e=kT.bind(null,e[1]),Rv(e),[e,t]},useMutableSource:function(e,t,n){var r=Wr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ZS(r,e,t,n)},useOpaqueIdentifier:function(){if(tn){var e=!1,t=_T(function(){throw e||(e=!0,n("r:"+(_f++).toString(36))),Error(T(355))}),n=ds(t)[1];return!(ge.mode&2)&&(ge.flags|=516,fu(5,function(){n("r:"+(_f++).toString(36))},void 0,null)),t}return t="r:"+(_f++).toString(36),ds(t),t},unstable_isNewReconciler:!1},RT={readContext:_t,useCallback:r0,useContext:_t,useEffect:mu,useImperativeHandle:n0,useLayoutEffect:e0,useMemo:o0,useReducer:us,useRef:pu,useState:function(){return us(Zt)},useDebugValue:Yp,useDeferredValue:function(e){var t=us(Zt),n=t[0],r=t[1];return mu(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=us(Zt)[0];return[pu().current,e]},useMutableSource:JS,useOpaqueIdentifier:function(){return us(Zt)[0]},unstable_isNewReconciler:!1},IT={readContext:_t,useCallback:r0,useContext:_t,useEffect:mu,useImperativeHandle:n0,useLayoutEffect:e0,useMemo:o0,useReducer:cs,useRef:pu,useState:function(){return cs(Zt)},useDebugValue:Yp,useDeferredValue:function(e){var t=cs(Zt),n=t[0],r=t[1];return mu(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=cs(Zt)[0];return[pu().current,e]},useMutableSource:JS,useOpaqueIdentifier:function(){return cs(Zt)[0]},unstable_isNewReconciler:!1},LT=Yr.ReactCurrentOwner,Ft=!1;function $e(e,t,n,r){t.child=e===null?QS(t,null,n,r):uu(t,e.child,n,r)}function Lv(e,t,n,r,o){n=n.render;var i=t.ref;return jo(t,o),r=Xp(e,t,n,r,i,o),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,hn(e,t,o)):(t.flags|=1,$e(e,t,r,o),t.child)}function Av(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!om(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,i0(e,t,s,r,o,i)):(e=Xl(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:Hs,n(o,r)&&e.ref===t.ref)?hn(e,t,i):(t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function i0(e,t,n,r,o,i){if(e!==null&&Hs(e.memoizedProps,r)&&e.ref===t.ref)if(Ft=!1,(i&o)!==0)e.flags&16384&&(Ft=!0);else return t.lanes=e.lanes,hn(e,t,i);return rp(e,t,n,r,i)}function bf(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},Hl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Hl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Hl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Hl(t,r);return $e(e,t,o,n),t.child}function s0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function rp(e,t,n,r,o){var i=Ge(n)?qr:Ne.current;return i=Ko(t,i),jo(t,o),n=Xp(e,t,n,r,i,o),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,hn(e,t,o)):(t.flags|=1,$e(e,t,n,o),t.child)}function Ov(e,t,n,r,o){if(Ge(n)){var i=!0;Kl(t)}else i=!1;if(jo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),GS(t,n,r),Jf(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=_t(u):(u=Ge(n)?qr:Ne.current,u=Ko(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Cv(t,s,r,u),Wn=!1;var d=t.memoizedState;s.state=d,zs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||qe.current||Wn?(typeof c=="function"&&(lu(t,n,c,r),l=t.memoizedState),(a=Wn||Ev(t,n,a,r,d,l,u))?(f||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,$S(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Dt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=Ge(n)?qr:Ne.current,l=Ko(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Cv(t,s,r,l),Wn=!1,d=t.memoizedState,s.state=d,zs(t,r,s,o);var S=t.memoizedState;a!==f||d!==S||qe.current||Wn?(typeof y=="function"&&(lu(t,n,y,r),S=t.memoizedState),(u=Wn||Ev(t,n,u,r,d,S,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,S,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,S,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=S),s.props=r,s.state=S,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 op(e,t,n,r,i,o)}function op(e,t,n,r,o,i){s0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&vv(t,n,!1),hn(e,t,i);r=t.stateNode,LT.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)):$e(e,t,a,i),t.memoizedState=r.state,o&&vv(t,n,!0),t.child}function Nv(e){var t=e.stateNode;t.pendingContext?yv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yv(e,t.context,!1),ep(e,t.containerInfo)}var jl={dehydrated:null,retryLane:0};function Mv(e,t,n){var r=t.pendingProps,o=ce.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),de(ce,o&1),e===null?(r.fallback!==void 0&&tp(t),e=r.children,o=r.fallback,i?(e=Dv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=jl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Dv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=jl,t.lanes=33554432,e):(n=im({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=jv(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=jl,r):(n=Fv(e,t,r.children,n),t.memoizedState=null,n):i?(r=jv(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=jl,r):(n=Fv(e,t,r.children,n),t.memoizedState=null,n)}function Dv(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=im(t,o,0,null),n=zo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Fv(e,t,n,r){var o=e.child;return e=o.sibling,n=lr(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 jv(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=lr(s,a),e!==null?r=lr(e,r):(r=zo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Hv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),WS(e.return,t)}function Tf(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 Bv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=ce.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&&Hv(e,n);else if(e.tag===19)Hv(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(de(ce,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&&cu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Tf(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&&cu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Tf(t,!0,n,null,i,t.lastEffect);break;case"together":Tf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function hn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=lr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=lr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var a0,ip,l0,u0;a0=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}};ip=function(){};l0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Kr(en.current);var i=null;switch(n){case"input":o=Af(e,o),r=Af(e,r),i=[];break;case"option":o=Mf(e,o),r=Mf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Df(e,o),r=Df(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=nu)}Hf(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"&&(As.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"&&(As.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===bp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};u0=function(e,t,n,r){n!==r&&(t.flags|=4)};function fs(e,t){if(!tn)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 AT(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 Ge(t.type)&&ou(),null;case 3:return $o(),se(qe),se(Ne),qp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),ip(t),null;case 5:$p(t);var o=Kr(Ks.current);if(n=t.type,e!==null&&t.stateNode!=null)l0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=Kr(en.current),Fl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Gn]=t,r[ru]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<ys.length;e++)ie(ys[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":zy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ky(r,i),ie("invalid",r)}Hf(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]):As.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Pl(r),Vy(r,i,!0);break;case"textarea":Pl(r),Wy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=nu)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Ff.html&&(e=nS(n)),e===Ff.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[Gn]=t,e[ru]=r,a0(e,t,!1,!1),t.stateNode=e,s=Bf(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<ys.length;o++)ie(ys[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":zy(e,r),o=Af(e,r),ie("invalid",e);break;case"option":o=Mf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ky(e,r),o=Df(e,r),ie("invalid",e);break;default:o=r}Hf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?iS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Os(e,l):typeof l=="number"&&Os(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(As.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&Sp(e,i,l,s))}switch(n){case"input":Pl(e),Vy(e,r,!1);break;case"textarea":Pl(e),Wy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?No(e,!!r.multiple,i,!1):r.defaultValue!=null&&No(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=nu)}DS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)u0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Kr(Ks.current),Kr(en.current),Fl(t)?(r=t.stateNode,n=t.memoizedProps,r[Gn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gn]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Fl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Be===null||!(Xs&134217727)&&!(Qo&134217727)||Bo(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return $o(),ip(t),e===null&&OS(t.stateNode.containerInfo),null;case 10:return Kp(t),null;case 17:return Ge(t.type)&&ou(),null;case 19:if(se(ce),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(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=cu(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 de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ae()>dp&&(t.flags|=64,i=!0,fs(r,!1),t.lanes=33554432)}else{if(!i)if(e=cu(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&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ae()-r.renderingStartTime>dp&&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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return rm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function OT(e){switch(e.tag){case 1:Ge(e.type)&&ou();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if($o(),se(qe),se(Ne),qp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return $p(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return $o(),null;case 10:return Kp(e),null;case 23:case 24:return rm(),null;default:return null}}function Jp(e,t){try{var n="",r=t;do n+=pb(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{cf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hs(e):""}function mb(e){switch(e.tag){case 5:return hs(e.type);case 16:return hs("Lazy");case 13:return hs("Suspense");case 19:return hs("SuspenseList");case 0:case 2:case 15:return e=kl(e.type,!1),e;case 11:return e=kl(e.type.render,!1),e;case 22:return e=kl(e.type._render,!1),e;case 1:return e=kl(e.type,!0),e;default:return""}}function Oo(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 $n:return"Fragment";case Ur:return"Portal";case xs:return"Profiler";case xp:return"StrictMode";case _s:return"Suspense";case Ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wp:return(e.displayName||"Context")+".Consumer";case _p:return(e._context.displayName||"Context")+".Provider";case xu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case _u:return Oo(e.type);case Cp:return Oo(e._render);case Ep:t=e._payload,e=e._init;try{return Oo(e(t))}catch{}}return null}function or(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Zv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gb(e){var t=Zv(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 Pl(e){e._valueTracker||(e._valueTracker=gb(e))}function Jv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yl(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 Af(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(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 eS(e,t){t=t.checked,t!=null&&Sp(e,"checked",t,!1)}function Of(e,t){eS(e,t);var n=or(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")?Nf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nf(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(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 Nf(e,t,n){(t!=="number"||Yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function hb(e){var t="";return Su.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Mf(e,t){return e=ae({children:void 0},t),(t=hb(t.children))&&(e.children=t),e}function No(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=""+or(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 Df(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ky(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function tS(e,t){var n=or(t.value),r=or(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 Wy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Ff={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function nS(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 jf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Rl,rS=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!==Ff.svg||"innerHTML"in e)e.innerHTML=t;else{for(Rl=Rl||document.createElement("div"),Rl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Os(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ws={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},yb=["Webkit","ms","Moz","O"];Object.keys(ws).forEach(function(e){yb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ws[t]=ws[e]})});function oS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ws.hasOwnProperty(e)&&ws[e]?(""+t).trim():t+"px"}function iS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=oS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var vb=ae({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 Hf(e,t){if(t){if(vb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Bf(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 kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uf=null,Mo=null,Do=null;function $y(e){if(e=qs(e)){if(typeof Uf!="function")throw Error(T(280));var t=e.stateNode;t&&(t=ku(t),Uf(e.stateNode,e.type,t))}}function sS(e){Mo?Do?Do.push(e):Do=[e]:Mo=e}function aS(){if(Mo){var e=Mo,t=Do;if(Do=Mo=null,$y(e),t)for(e=0;e<t.length;e++)$y(t[e])}}function Pp(e,t){return e(t)}function lS(e,t,n,r,o){return e(t,n,r,o)}function Rp(){}var uS=Pp,zr=!1,df=!1;function Ip(){(Mo!==null||Do!==null)&&(Rp(),aS())}function Sb(e,t,n){if(df)return e(t,n);df=!0;try{return uS(e,t,n)}finally{df=!1,Ip()}}function Ns(e,t){var n=e.stateNode;if(n===null)return null;var r=ku(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(T(231,t,typeof n));return n}var zf=!1;if(Sn)try{Eo={},Object.defineProperty(Eo,"passive",{get:function(){zf=!0}}),window.addEventListener("test",Eo,Eo),window.removeEventListener("test",Eo,Eo)}catch{zf=!1}var Eo;function xb(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 Es=!1,Zl=null,Jl=!1,Vf=null,_b={onError:function(e){Es=!0,Zl=e}};function wb(e,t,n,r,o,i,s,a,l){Es=!1,Zl=null,xb.apply(_b,arguments)}function Eb(e,t,n,r,o,i,s,a,l){if(wb.apply(this,arguments),Es){if(Es){var u=Zl;Es=!1,Zl=null}else throw Error(T(198));Jl||(Jl=!0,Vf=u)}}function Zr(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 cS(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 qy(e){if(Zr(e)!==e)throw Error(T(188))}function Cb(e){var t=e.alternate;if(!t){if(t=Zr(e),t===null)throw Error(T(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 qy(o),e;if(i===r)return qy(o),t;i=i.sibling}throw Error(T(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(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function dS(e){if(e=Cb(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 Gy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var fS,Lp,pS,mS,Kf=!1,Yt=[],Qn=null,Yn=null,Zn=null,Ms=new Map,Ds=new Map,os=[],Xy="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 Wf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Qy(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function is(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Wf(t,n,r,o,i),t!==null&&(t=qs(t),t!==null&&Lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function bb(e,t,n,r,o){switch(t){case"focusin":return Qn=is(Qn,e,t,n,r,o),!0;case"dragenter":return Yn=is(Yn,e,t,n,r,o),!0;case"mouseover":return Zn=is(Zn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ms.set(i,is(Ms.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ds.set(i,is(Ds.get(i)||null,e,t,n,r,o)),!0}return!1}function Tb(e){var t=Vr(e.target);if(t!==null){var n=Zr(t);if(n!==null){if(t=n.tag,t===13){if(t=cS(n),t!==null){e.blockedOn=t,mS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){pS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=qs(n),t!==null&&Lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Yy(e,t,n){Bl(e)&&n.delete(t)}function kb(){for(Kf=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=qs(e.blockedOn),e!==null&&fS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Yt.shift()}Qn!==null&&Bl(Qn)&&(Qn=null),Yn!==null&&Bl(Yn)&&(Yn=null),Zn!==null&&Bl(Zn)&&(Zn=null),Ms.forEach(Yy),Ds.forEach(Yy)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,kb)))}function gS(e){function t(o){return ss(o,e)}if(0<Yt.length){ss(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qn!==null&&ss(Qn,e),Yn!==null&&ss(Yn,e),Zn!==null&&ss(Zn,e),Ms.forEach(t),Ds.forEach(t),n=0;n<os.length;n++)r=os[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<os.length&&(n=os[0],n.blockedOn===null);)Tb(n),n.blockedOn===null&&os.shift()}function Il(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ko={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionend:Il("Transition","TransitionEnd")},ff={},hS={};Sn&&(hS=document.createElement("div").style,"AnimationEvent"in window||(delete ko.animationend.animation,delete ko.animationiteration.animation,delete ko.animationstart.animation),"TransitionEvent"in window||delete ko.transitionend.transition);function wu(e){if(ff[e])return ff[e];if(!ko[e])return e;var t=ko[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hS)return ff[e]=t[n];return e}var yS=wu("animationend"),vS=wu("animationiteration"),SS=wu("animationstart"),xS=wu("transitionend"),_S=new Map,Ap=new Map,Pb=["abort","abort",yS,"animationEnd",vS,"animationIteration",SS,"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",xS,"transitionEnd","waiting","waiting"];function Op(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)),Ap.set(r,t),_S.set(r,o),Qr(o,[r])}}var Rb=xe.unstable_now;Rb();var ne=8;function bo(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function Ib(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 Lb(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(T(358,e))}}function Fs(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=bo(l),o=ne):(a&=i,a!==0&&(r=bo(a),o=ne))}else i=n&~s,i!==0?(r=bo(i),o=ne):a!==0&&(r=bo(a),o=ne);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(bo(t),o<=ne)return t;ne=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 wS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function eu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=To(24&~t),e===0?eu(10,t):e;case 10:return e=To(192&~t),e===0?eu(8,t):e;case 8:return e=To(3584&~t),e===0&&(e=To(4186112&~t),e===0&&(e=512)),e;case 2:return t=To(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function To(e){return e&-e}function pf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Eu(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:Nb,Ab=Math.log,Ob=Math.LN2;function Nb(e){return e===0?32:31-(Ab(e)/Ob|0)|0}var Mb=xe.unstable_UserBlockingPriority,Db=xe.unstable_runWithPriority,Ul=!0;function Fb(e,t,n,r){zr||Rp();var o=Np,i=zr;zr=!0;try{lS(o,e,t,n,r)}finally{(zr=i)||Ip()}}function jb(e,t,n,r){Db(Mb,Np.bind(null,e,t,n,r))}function Np(e,t,n,r){if(Ul){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<Xy.indexOf(e))e=Wf(null,e,t,n,r),Yt.push(e);else{var i=Mp(e,t,n,r);if(i===null)o&&Qy(e,r);else{if(o){if(-1<Xy.indexOf(e)){e=Wf(i,e,t,n,r),Yt.push(e);return}if(bb(i,e,t,n,r))return;Qy(e,r)}MS(e,t,r,null,n)}}}}function Mp(e,t,n,r){var o=kp(r);if(o=Vr(o),o!==null){var i=Zr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=cS(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 MS(e,t,r,o,n),null}var qn=null,Dp=null,zl=null;function ES(){if(zl)return zl;var e,t=Dp,n=t.length,r,o="value"in qn?qn.value:qn.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 zl=o.slice(e,1<r?1-r:void 0)}function Vl(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 Ll(){return!0}function Zy(){return!1}function rt(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)?Ll:Zy,this.isPropagationStopped=Zy,this}return ae(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=Ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),t}var qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fp=rt(qo),$s=ae({},qo,{view:0,detail:0}),Hb=rt($s),mf,gf,as,Cu=ae({},$s,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,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!==as&&(as&&e.type==="mousemove"?(mf=e.screenX-as.screenX,gf=e.screenY-as.screenY):gf=mf=0,as=e),mf)},movementY:function(e){return"movementY"in e?e.movementY:gf}}),Jy=rt(Cu),Bb=ae({},Cu,{dataTransfer:0}),Ub=rt(Bb),zb=ae({},$s,{relatedTarget:0}),hf=rt(zb),Vb=ae({},qo,{animationName:0,elapsedTime:0,pseudoElement:0}),Kb=rt(Vb),Wb=ae({},qo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$b=rt(Wb),qb=ae({},qo,{data:0}),ev=rt(qb),Gb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xb={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"},Qb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qb[e])?!!t[e]:!1}function jp(){return Yb}var Zb=ae({},$s,{key:function(e){if(e.key){var t=Gb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(e){return e.type==="keypress"?Vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jb=rt(Zb),eT=ae({},Cu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tv=rt(eT),tT=ae({},$s,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),nT=rt(tT),rT=ae({},qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),oT=rt(rT),iT=ae({},Cu,{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}),sT=rt(iT),aT=[9,13,27,32],Hp=Sn&&"CompositionEvent"in window,Cs=null;Sn&&"documentMode"in document&&(Cs=document.documentMode);var lT=Sn&&"TextEvent"in window&&!Cs,CS=Sn&&(!Hp||Cs&&8<Cs&&11>=Cs),nv=String.fromCharCode(32),rv=!1;function bS(e,t){switch(e){case"keyup":return aT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Po=!1;function uT(e,t){switch(e){case"compositionend":return TS(t);case"keypress":return t.which!==32?null:(rv=!0,nv);case"textInput":return e=t.data,e===nv&&rv?null:e;default:return null}}function cT(e,t){if(Po)return e==="compositionend"||!Hp&&bS(e,t)?(e=ES(),zl=Dp=qn=null,Po=!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 CS&&t.locale!=="ko"?null:t.data;default:return null}}var dT={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 ov(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dT[e.type]:t==="textarea"}function kS(e,t,n,r){sS(r),t=tu(t,"onChange"),0<t.length&&(n=new Fp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bs=null,js=null;function fT(e){AS(e,0)}function bu(e){var t=Io(e);if(Jv(t))return e}function pT(e,t){if(e==="change")return t}var PS=!1;Sn&&(Sn?(Ol="oninput"in document,Ol||(yf=document.createElement("div"),yf.setAttribute("oninput","return;"),Ol=typeof yf.oninput=="function"),Al=Ol):Al=!1,PS=Al&&(!document.documentMode||9<document.documentMode));var Al,Ol,yf;function iv(){bs&&(bs.detachEvent("onpropertychange",RS),js=bs=null)}function RS(e){if(e.propertyName==="value"&&bu(js)){var t=[];if(kS(t,js,e,kp(e)),e=fT,zr)e(t);else{zr=!0;try{Pp(e,t)}finally{zr=!1,Ip()}}}}function mT(e,t,n){e==="focusin"?(iv(),bs=t,js=n,bs.attachEvent("onpropertychange",RS)):e==="focusout"&&iv()}function gT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bu(js)}function hT(e,t){if(e==="click")return bu(t)}function yT(e,t){if(e==="input"||e==="change")return bu(t)}function vT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:vT,ST=Object.prototype.hasOwnProperty;function Hs(e,t){if(vt(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(!ST.call(t,n[r])||!vt(e[n[r]],t[n[r]]))return!1;return!0}function sv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function av(e,t){var n=sv(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=sv(n)}}function IS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?IS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lv(){for(var e=window,t=Yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yl(e.document)}return t}function $f(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 xT=Sn&&"documentMode"in document&&11>=document.documentMode,Ro=null,qf=null,Ts=null,Gf=!1;function uv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gf||Ro==null||Ro!==Yl(r)||(r=Ro,"selectionStart"in r&&$f(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}),Ts&&Hs(Ts,r)||(Ts=r,r=tu(qf,"onSelect"),0<r.length&&(t=new Fp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ro)))}Op("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);Op("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);Op(Pb,2);for(vf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Nl=0;Nl<vf.length;Nl++)Ap.set(vf[Nl],0);var vf,Nl;Vo("onMouseEnter",["mouseout","mouseover"]);Vo("onMouseLeave",["mouseout","mouseover"]);Vo("onPointerEnter",["pointerout","pointerover"]);Vo("onPointerLeave",["pointerout","pointerover"]);Qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ys="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),LS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ys));function cv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Eb(r,t,void 0,e),e.currentTarget=null}function AS(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;cv(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;cv(o,a,u),i=l}}}if(Jl)throw e=Vf,Jl=!1,Vf=null,e}function ie(e,t){var n=FS(t),r=e+"__bubble";n.has(r)||(NS(t,e,2,!1),n.add(r))}var dv="_reactListening"+Math.random().toString(36).slice(2);function OS(e){e[dv]||(e[dv]=!0,Qv.forEach(function(t){LS.has(t)||fv(t,!1,e,null),fv(t,!0,e,null)}))}function fv(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&&LS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=FS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),NS(i,e,o,t),s.add(a))}function NS(e,t,n,r){var o=Ap.get(t);switch(o===void 0?2:o){case 0:o=Fb;break;case 1:o=jb;break;default:o=Np}n=o.bind(null,t,n,e),o=void 0,!zf||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 MS(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=Vr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}Sb(function(){var u=i,c=kp(n),f=[];e:{var d=_S.get(e);if(d!==void 0){var y=Fp,S=e;switch(e){case"keypress":if(Vl(n)===0)break e;case"keydown":case"keyup":y=Jb;break;case"focusin":S="focus",y=hf;break;case"focusout":S="blur",y=hf;break;case"beforeblur":case"afterblur":y=hf;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":y=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ub;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=nT;break;case yS:case vS:case SS:y=Kb;break;case xS:y=oT;break;case"scroll":y=Hb;break;case"wheel":y=sT;break;case"copy":case"cut":case"paste":y=$b;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=tv}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ns(p,m),_!=null&&h.push(Bs(p,_,v)))),g)break;p=p.return}0<h.length&&(d=new y(d,S,null,n,c),f.push({event:d,listeners:h}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(S=n.relatedTarget||n.fromElement)&&(Vr(S)||S[Go]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=n.relatedTarget||n.toElement,y=u,S=S?Vr(S):null,S!==null&&(g=Zr(S),S!==g||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=u),y!==S)){if(h=Jy,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=tv,_="onPointerLeave",m="onPointerEnter",p="pointer"),g=y==null?d:Io(y),v=S==null?d:Io(S),d=new h(_,p+"leave",y,n,c),d.target=g,d.relatedTarget=v,_=null,Vr(c)===u&&(h=new h(m,p+"enter",S,n,c),h.target=v,h.relatedTarget=g,_=h),g=_,y&&S)t:{for(h=y,m=S,p=0,v=h;v;v=Co(v))p++;for(v=0,_=m;_;_=Co(_))v++;for(;0<p-v;)h=Co(h),p--;for(;0<v-p;)m=Co(m),v--;for(;p--;){if(h===m||m!==null&&h===m.alternate)break t;h=Co(h),m=Co(m)}h=null}else h=null;y!==null&&pv(f,d,y,h,!1),S!==null&&g!==null&&pv(f,g,S,h,!0)}}e:{if(d=u?Io(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=pT;else if(ov(d))if(PS)C=yT;else{C=gT;var E=mT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=hT);if(C&&(C=C(e,u))){kS(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Nf(d,"number",d.value)}switch(E=u?Io(u):window,e){case"focusin":(ov(E)||E.contentEditable==="true")&&(Ro=E,qf=u,Ts=null);break;case"focusout":Ts=qf=Ro=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,uv(f,n,c);break;case"selectionchange":if(xT)break;case"keydown":case"keyup":uv(f,n,c)}var b;if(Hp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Po?bS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(CS&&n.locale!=="ko"&&(Po||R!=="onCompositionStart"?R==="onCompositionEnd"&&Po&&(b=ES()):(qn=c,Dp="value"in qn?qn.value:qn.textContent,Po=!0)),E=tu(u,R),0<E.length&&(R=new ev(R,e,null,n,c),f.push({event:R,listeners:E}),b?R.data=b:(b=TS(n),b!==null&&(R.data=b)))),(b=lT?uT(e,n):cT(e,n))&&(u=tu(u,"onBeforeInput"),0<u.length&&(c=new ev("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}AS(f,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function tu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ns(e,n),i!=null&&r.unshift(Bs(e,i,o)),i=Ns(e,t),i!=null&&r.push(Bs(e,i,o))),e=e.return}return r}function Co(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pv(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=Ns(n,i),l!=null&&s.unshift(Bs(n,l,a))):o||(l=Ns(n,i),l!=null&&s.push(Bs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function nu(){}var Sf=null,xf=null;function DS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Xf(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 mv=typeof setTimeout=="function"?setTimeout:void 0,_T=typeof clearTimeout=="function"?clearTimeout:void 0;function Bp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Fo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function gv(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 _f=0;function wT(e){return{$$typeof:bp,toString:e,valueOf:e}}var Tu=Math.random().toString(36).slice(2),Gn="__reactFiber$"+Tu,ru="__reactProps$"+Tu,Go="__reactContainer$"+Tu,hv="__reactEvents$"+Tu;function Vr(e){var t=e[Gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Go]||n[Gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gv(e);e!==null;){if(n=e[Gn])return n;e=gv(e)}return t}e=n,n=e.parentNode}return null}function qs(e){return e=e[Gn]||e[Go],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Io(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function ku(e){return e[ru]||null}function FS(e){var t=e[hv];return t===void 0&&(t=e[hv]=new Set),t}var Qf=[],Lo=-1;function ur(e){return{current:e}}function se(e){0>Lo||(e.current=Qf[Lo],Qf[Lo]=null,Lo--)}function de(e,t){Lo++,Qf[Lo]=e.current,e.current=t}var sr={},Ne=ur(sr),qe=ur(!1),qr=sr;function Ko(e,t){var n=e.type.contextTypes;if(!n)return sr;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 Ge(e){return e=e.childContextTypes,e!=null}function ou(){se(qe),se(Ne)}function yv(e,t,n){if(Ne.current!==sr)throw Error(T(168));de(Ne,t),de(qe,n)}function jS(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(T(108,Oo(t)||"Unknown",o));return ae({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,qr=Ne.current,de(Ne,e),de(qe,qe.current),!0}function vv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=jS(e,t,qr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(Ne),de(Ne,e)):se(qe),de(qe,n)}var Up=null,$r=null,ET=xe.unstable_runWithPriority,zp=xe.unstable_scheduleCallback,Yf=xe.unstable_cancelCallback,CT=xe.unstable_shouldYield,Sv=xe.unstable_requestPaint,Zf=xe.unstable_now,bT=xe.unstable_getCurrentPriorityLevel,Pu=xe.unstable_ImmediatePriority,HS=xe.unstable_UserBlockingPriority,BS=xe.unstable_NormalPriority,US=xe.unstable_LowPriority,zS=xe.unstable_IdlePriority,wf={},TT=Sv!==void 0?Sv:function(){},mn=null,Wl=null,Ef=!1,xv=Zf(),Ae=1e4>xv?Zf:function(){return Zf()-xv};function Wo(){switch(bT()){case Pu:return 99;case HS:return 98;case BS:return 97;case US:return 96;case zS:return 95;default:throw Error(T(332))}}function VS(e){switch(e){case 99:return Pu;case 98:return HS;case 97:return BS;case 96:return US;case 95:return zS;default:throw Error(T(332))}}function Gr(e,t){return e=VS(e),ET(e,t)}function Us(e,t,n){return e=VS(e),zp(e,t,n)}function nn(){if(Wl!==null){var e=Wl;Wl=null,Yf(e)}KS()}function KS(){if(!Ef&&mn!==null){Ef=!0;var e=0;try{var t=mn;Gr(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)),zp(Pu,nn),n}finally{Ef=!1}}}var kT=Yr.ReactCurrentBatchConfig;function Dt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var iu=ur(null),su=null,Ao=null,au=null;function Vp(){au=Ao=su=null}function Kp(e){var t=iu.current;se(iu),e.type._context._currentValue=t}function WS(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 jo(e,t){su=e,au=Ao=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function _t(e,t){if(au!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(au=e,t=1073741823),t={context:e,observedBits:t,next:null},Ao===null){if(su===null)throw Error(T(308));Ao=t,su.dependencies={lanes:0,firstContext:t,responders:null}}else Ao=Ao.next=t;return e._currentValue}var Wn=!1;function Wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function $S(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 Jn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(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 _v(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 zs(e,t,n,r){var o=e.updateQueue;Wn=!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 f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=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 y=e,S=i;switch(a=t,d=n,S.tag){case 1:if(y=S.payload,typeof y=="function"){f=y.call(d,f,a);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=S.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Wn=!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=f):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=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Xs|=s,e.lanes=s,e.memoizedState=f}}function wv(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(T(191,o));o.call(r)}}}var qS=new Su.Component().refs;function lu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ru={isMounted:function(e){return(e=e._reactInternals)?Zr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),o=tr(e),i=Jn(r,o);i.payload=t,n!=null&&(i.callback=n),er(e,i),nr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),o=tr(e),i=Jn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),er(e,i),nr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=tr(e),o=Jn(n,r);o.tag=2,t!=null&&(o.callback=t),er(e,o),nr(e,r,n)}};function Ev(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?!Hs(n,r)||!Hs(o,i):!0}function GS(e,t,n){var r=!1,o=sr,i=t.contextType;return typeof i=="object"&&i!==null?i=_t(i):(o=Ge(t)?qr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Ko(e,o):sr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ru,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Cv(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&&Ru.enqueueReplaceState(t,t.state,null)}function Jf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=qS,Wp(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=_t(i):(i=Ge(t)?qr:Ne.current,o.context=Ko(e,i)),zs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(lu(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&&Ru.enqueueReplaceState(o,o.state,null),zs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Ml=Array.isArray;function ls(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(T(309));var r=n.stateNode}if(!r)throw Error(T(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===qS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Dl(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function XS(e){function t(g,m){if(e){var p=g.lastEffect;p!==null?(p.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=lr(g,m),g.index=0,g.sibling=null,g}function i(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags=2,m):p):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,p,v){return m===null||m.tag!==6?(m=Pf(p,g.mode,v),m.return=g,m):(m=o(m,p),m.return=g,m)}function l(g,m,p,v){return m!==null&&m.elementType===p.type?(v=o(m,p.props),v.ref=ls(g,m,p),v.return=g,v):(v=Xl(p.type,p.key,p.props,null,g.mode,v),v.ref=ls(g,m,p),v.return=g,v)}function u(g,m,p,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=Rf(p,g.mode,v),m.return=g,m):(m=o(m,p.children||[]),m.return=g,m)}function c(g,m,p,v,_){return m===null||m.tag!==7?(m=zo(p,g.mode,v,_),m.return=g,m):(m=o(m,p),m.return=g,m)}function f(g,m,p){if(typeof m=="string"||typeof m=="number")return m=Pf(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case gs:return p=Xl(m.type,m.key,m.props,null,g.mode,p),p.ref=ls(g,null,m),p.return=g,p;case Ur:return m=Rf(m,g.mode,p),m.return=g,m}if(Ml(m)||rs(m))return m=zo(m,g.mode,p,null),m.return=g,m;Dl(g,m)}return null}function d(g,m,p,v){var _=m!==null?m.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(g,m,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case gs:return p.key===_?p.type===$n?c(g,m,p.props.children,v,_):l(g,m,p,v):null;case Ur:return p.key===_?u(g,m,p,v):null}if(Ml(p)||rs(p))return _!==null?null:c(g,m,p,v,null);Dl(g,p)}return null}function y(g,m,p,v,_){if(typeof v=="string"||typeof v=="number")return g=g.get(p)||null,a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gs:return g=g.get(v.key===null?p:v.key)||null,v.type===$n?c(m,g,v.props.children,_,v.key):l(m,g,v,_);case Ur:return g=g.get(v.key===null?p:v.key)||null,u(m,g,v,_)}if(Ml(v)||rs(v))return g=g.get(p)||null,c(m,g,v,_,null);Dl(m,v)}return null}function S(g,m,p,v){for(var _=null,C=null,E=m,b=m=0,R=null;E!==null&&b<p.length;b++){E.index>b?(R=E,E=null):R=E.sibling;var P=d(g,E,p[b],v);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(g,E),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,E=R}if(b===p.length)return n(g,E),_;if(E===null){for(;b<p.length;b++)E=f(g,p[b],v),E!==null&&(m=i(E,m,b),C===null?_=E:C.sibling=E,C=E);return _}for(E=r(g,E);b<p.length;b++)R=y(E,g,b,p[b],v),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?b:R.key),m=i(R,m,b),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(N){return t(g,N)}),_}function h(g,m,p,v){var _=rs(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,E=m,b=m=0,R=null,P=p.next();E!==null&&!P.done;b++,P=p.next()){E.index>b?(R=E,E=null):R=E.sibling;var N=d(g,E,P.value,v);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,E=R}if(P.done)return n(g,E),_;if(E===null){for(;!P.done;b++,P=p.next())P=f(g,P.value,v),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(E=r(g,E);!P.done;b++,P=p.next())P=y(E,g,b,P.value,v),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&E.forEach(function(G){return t(g,G)}),_}return function(g,m,p,v){var _=typeof p=="object"&&p!==null&&p.type===$n&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case gs:e:{for(C=p.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===$n){n(g,_.sibling),m=o(_,p.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===p.type){n(g,_.sibling),m=o(_,p.props),m.ref=ls(g,_,p),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}p.type===$n?(m=zo(p.props.children,g.mode,v,p.key),m.return=g,g=m):(v=Xl(p.type,p.key,p.props,null,g.mode,v),v.ref=ls(g,m,p),v.return=g,g=v)}return s(g);case Ur:e:{for(_=p.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(g,m.sibling),m=o(m,p.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Rf(p,g.mode,v),m.return=g,g=m}return s(g)}if(typeof p=="string"||typeof p=="number")return p=""+p,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,p),m.return=g,g=m):(n(g,m),m=Pf(p,g.mode,v),m.return=g,g=m),s(g);if(Ml(p))return S(g,m,p,v);if(rs(p))return h(g,m,p,v);if(C&&Dl(g,p),typeof p>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Oo(g.type)||"Component"))}return n(g,m)}}var uu=XS(!0),QS=XS(!1),Gs={},en=ur(Gs),Vs=ur(Gs),Ks=ur(Gs);function Kr(e){if(e===Gs)throw Error(T(174));return e}function ep(e,t){switch(de(Ks,t),de(Vs,e),de(en,Gs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jf(t,e)}se(en),de(en,t)}function $o(){se(en),se(Vs),se(Ks)}function bv(e){Kr(Ks.current);var t=Kr(en.current),n=jf(t,e.type);t!==n&&(de(Vs,e),de(en,n))}function $p(e){Vs.current===e&&(se(en),se(Vs))}var ce=ur(0);function cu(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 hn=null,Xn=null,tn=!1;function YS(e,t){var n=St(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 Tv(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 tp(e){if(tn){var t=Xn;if(t){var n=t;if(!Tv(e,t)){if(t=Fo(n.nextSibling),!t||!Tv(e,t)){e.flags=e.flags&-1025|2,tn=!1,hn=e;return}YS(hn,n)}hn=e,Xn=Fo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,hn=e}}function kv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function Fl(e){if(e!==hn)return!1;if(!tn)return kv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Xf(t,e.memoizedProps))for(t=Xn;t;)YS(e,t),t=Fo(t.nextSibling);if(kv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xn=Fo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xn=null}}else Xn=hn?Fo(e.stateNode.nextSibling):null;return!0}function Cf(){Xn=hn=null,tn=!1}var Ho=[];function qp(){for(var e=0;e<Ho.length;e++)Ho[e]._workInProgressVersionPrimary=null;Ho.length=0}var ks=Yr.ReactCurrentDispatcher,xt=Yr.ReactCurrentBatchConfig,Ws=0,ge=null,Le=null,be=null,du=!1,Ps=!1;function We(){throw Error(T(321))}function Gp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Xp(e,t,n,r,o,i){if(Ws=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ks.current=e===null||e.memoizedState===null?RT:IT,e=n(r,o),Ps){i=0;do{if(Ps=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,ks.current=LT,e=n(r,o)}while(Ps)}if(ks.current=gu,t=Le!==null&&Le.next!==null,Ws=0,be=Le=ge=null,du=!1,t)throw Error(T(300));return e}function Wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Jr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Le=e;else{if(e===null)throw Error(T(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Zt(e,t){return typeof t=="function"?t(e):t}function us(e){var t=Jr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Le,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((Ws&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,ge.lanes|=u,Xs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,vt(r,t.memoizedState)||(Ft=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function cs(e){var t=Jr(),n=t.queue;if(n===null)throw Error(T(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);vt(i,t.memoizedState)||(Ft=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pv(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=(Ws&e)===e)&&(t._workInProgressVersionPrimary=r,Ho.push(t))),e)return n(t._source);throw Ho.push(t),Error(T(350))}function ZS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=ks.current,l=a.useState(function(){return Pv(o,t,n)}),u=l[1],c=l[0];l=be;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,S=f.source;f=f.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!vt(s,g)){g=n(t._source),vt(c,g)||(u(g),g=tr(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,p=g;0<p;){var v=31-ir(p),_=1<<v;m[v]|=g,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var p=tr(h);o.mutableReadLanes|=p&o.pendingLanes}catch(v){m(function(){throw v})}})},[t,r]),vt(y,n)&&vt(S,t)&&vt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Zp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Pv(o,t,n),l.memoizedState=l.baseState=c),c}function JS(e,t,n){var r=Jr();return ZS(r,e,t,n)}function ds(e){var t=Wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Zp.bind(null,ge,e),[t.memoizedState,e]}function fu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.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 Rv(e){var t=Wr();return e={current:e},t.memoizedState=e}function pu(){return Jr().memoizedState}function np(e,t,n,r){var o=Wr();ge.flags|=e,o.memoizedState=fu(1|t,n,void 0,r===void 0?null:r)}function Qp(e,t,n,r){var o=Jr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Gp(r,s.deps)){fu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=fu(1|t,n,i,r)}function Iv(e,t){return np(516,4,e,t)}function mu(e,t){return Qp(516,4,e,t)}function e0(e,t){return Qp(4,2,e,t)}function t0(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 n0(e,t,n){return n=n!=null?n.concat([e]):null,Qp(4,2,t0.bind(null,t,e),n)}function Yp(){}function r0(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function o0(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function PT(e,t){var n=Wo();Gr(98>n?98:n,function(){e(!0)}),Gr(97<n?97:n,function(){var r=xt.transition;xt.transition=1;try{e(!1),t()}finally{xt.transition=r}})}function Zp(e,t,n){var r=nt(),o=tr(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===ge||s!==null&&s===ge)Ps=du=!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,vt(l,a))return}catch{}finally{}nr(e,o,r)}}var gu={readContext:_t,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useOpaqueIdentifier:We,unstable_isNewReconciler:!1},RT={readContext:_t,useCallback:function(e,t){return Wr().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Iv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,np(4,2,t0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4,2,e,t)},useMemo:function(e,t){var n=Wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wr();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=Zp.bind(null,ge,e),[r.memoizedState,e]},useRef:Rv,useState:ds,useDebugValue:Yp,useDeferredValue:function(e){var t=ds(e),n=t[0],r=t[1];return Iv(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=ds(!1),t=e[0];return e=PT.bind(null,e[1]),Rv(e),[e,t]},useMutableSource:function(e,t,n){var r=Wr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ZS(r,e,t,n)},useOpaqueIdentifier:function(){if(tn){var e=!1,t=wT(function(){throw e||(e=!0,n("r:"+(_f++).toString(36))),Error(T(355))}),n=ds(t)[1];return!(ge.mode&2)&&(ge.flags|=516,fu(5,function(){n("r:"+(_f++).toString(36))},void 0,null)),t}return t="r:"+(_f++).toString(36),ds(t),t},unstable_isNewReconciler:!1},IT={readContext:_t,useCallback:r0,useContext:_t,useEffect:mu,useImperativeHandle:n0,useLayoutEffect:e0,useMemo:o0,useReducer:us,useRef:pu,useState:function(){return us(Zt)},useDebugValue:Yp,useDeferredValue:function(e){var t=us(Zt),n=t[0],r=t[1];return mu(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=us(Zt)[0];return[pu().current,e]},useMutableSource:JS,useOpaqueIdentifier:function(){return us(Zt)[0]},unstable_isNewReconciler:!1},LT={readContext:_t,useCallback:r0,useContext:_t,useEffect:mu,useImperativeHandle:n0,useLayoutEffect:e0,useMemo:o0,useReducer:cs,useRef:pu,useState:function(){return cs(Zt)},useDebugValue:Yp,useDeferredValue:function(e){var t=cs(Zt),n=t[0],r=t[1];return mu(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=cs(Zt)[0];return[pu().current,e]},useMutableSource:JS,useOpaqueIdentifier:function(){return cs(Zt)[0]},unstable_isNewReconciler:!1},AT=Yr.ReactCurrentOwner,Ft=!1;function $e(e,t,n,r){t.child=e===null?QS(t,null,n,r):uu(t,e.child,n,r)}function Lv(e,t,n,r,o){n=n.render;var i=t.ref;return jo(t,o),r=Xp(e,t,n,r,i,o),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,yn(e,t,o)):(t.flags|=1,$e(e,t,r,o),t.child)}function Av(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!om(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,i0(e,t,s,r,o,i)):(e=Xl(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:Hs,n(o,r)&&e.ref===t.ref)?yn(e,t,i):(t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function i0(e,t,n,r,o,i){if(e!==null&&Hs(e.memoizedProps,r)&&e.ref===t.ref)if(Ft=!1,(i&o)!==0)e.flags&16384&&(Ft=!0);else return t.lanes=e.lanes,yn(e,t,i);return rp(e,t,n,r,i)}function bf(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},Hl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Hl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Hl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Hl(t,r);return $e(e,t,o,n),t.child}function s0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function rp(e,t,n,r,o){var i=Ge(n)?qr:Ne.current;return i=Ko(t,i),jo(t,o),n=Xp(e,t,n,r,i,o),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,yn(e,t,o)):(t.flags|=1,$e(e,t,n,o),t.child)}function Ov(e,t,n,r,o){if(Ge(n)){var i=!0;Kl(t)}else i=!1;if(jo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),GS(t,n,r),Jf(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=_t(u):(u=Ge(n)?qr:Ne.current,u=Ko(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Cv(t,s,r,u),Wn=!1;var d=t.memoizedState;s.state=d,zs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||qe.current||Wn?(typeof c=="function"&&(lu(t,n,c,r),l=t.memoizedState),(a=Wn||Ev(t,n,a,r,d,l,u))?(f||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,$S(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Dt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=Ge(n)?qr:Ne.current,l=Ko(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Cv(t,s,r,l),Wn=!1,d=t.memoizedState,s.state=d,zs(t,r,s,o);var S=t.memoizedState;a!==f||d!==S||qe.current||Wn?(typeof y=="function"&&(lu(t,n,y,r),S=t.memoizedState),(u=Wn||Ev(t,n,u,r,d,S,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,S,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,S,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=S),s.props=r,s.state=S,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 op(e,t,n,r,i,o)}function op(e,t,n,r,o,i){s0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&vv(t,n,!1),yn(e,t,i);r=t.stateNode,AT.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)):$e(e,t,a,i),t.memoizedState=r.state,o&&vv(t,n,!0),t.child}function Nv(e){var t=e.stateNode;t.pendingContext?yv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yv(e,t.context,!1),ep(e,t.containerInfo)}var jl={dehydrated:null,retryLane:0};function Mv(e,t,n){var r=t.pendingProps,o=ce.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),de(ce,o&1),e===null?(r.fallback!==void 0&&tp(t),e=r.children,o=r.fallback,i?(e=Dv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=jl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Dv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=jl,t.lanes=33554432,e):(n=im({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=jv(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=jl,r):(n=Fv(e,t,r.children,n),t.memoizedState=null,n):i?(r=jv(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=jl,r):(n=Fv(e,t,r.children,n),t.memoizedState=null,n)}function Dv(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=im(t,o,0,null),n=zo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Fv(e,t,n,r){var o=e.child;return e=o.sibling,n=lr(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 jv(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=lr(s,a),e!==null?r=lr(e,r):(r=zo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Hv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),WS(e.return,t)}function Tf(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 Bv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=ce.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&&Hv(e,n);else if(e.tag===19)Hv(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(de(ce,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&&cu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Tf(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&&cu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Tf(t,!0,n,null,i,t.lastEffect);break;case"together":Tf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function yn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=lr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=lr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var a0,ip,l0,u0;a0=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}};ip=function(){};l0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Kr(en.current);var i=null;switch(n){case"input":o=Af(e,o),r=Af(e,r),i=[];break;case"option":o=Mf(e,o),r=Mf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Df(e,o),r=Df(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=nu)}Hf(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"&&(As.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"&&(As.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===bp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};u0=function(e,t,n,r){n!==r&&(t.flags|=4)};function fs(e,t){if(!tn)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 OT(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 Ge(t.type)&&ou(),null;case 3:return $o(),se(qe),se(Ne),qp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),ip(t),null;case 5:$p(t);var o=Kr(Ks.current);if(n=t.type,e!==null&&t.stateNode!=null)l0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=Kr(en.current),Fl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Gn]=t,r[ru]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<ys.length;e++)ie(ys[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":zy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ky(r,i),ie("invalid",r)}Hf(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]):As.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Pl(r),Vy(r,i,!0);break;case"textarea":Pl(r),Wy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=nu)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Ff.html&&(e=nS(n)),e===Ff.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[Gn]=t,e[ru]=r,a0(e,t,!1,!1),t.stateNode=e,s=Bf(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<ys.length;o++)ie(ys[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":zy(e,r),o=Af(e,r),ie("invalid",e);break;case"option":o=Mf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ky(e,r),o=Df(e,r),ie("invalid",e);break;default:o=r}Hf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?iS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Os(e,l):typeof l=="number"&&Os(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(As.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&Sp(e,i,l,s))}switch(n){case"input":Pl(e),Vy(e,r,!1);break;case"textarea":Pl(e),Wy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?No(e,!!r.multiple,i,!1):r.defaultValue!=null&&No(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=nu)}DS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)u0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Kr(Ks.current),Kr(en.current),Fl(t)?(r=t.stateNode,n=t.memoizedProps,r[Gn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gn]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Fl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Be===null||!(Xs&134217727)&&!(Qo&134217727)||Bo(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return $o(),ip(t),e===null&&OS(t.stateNode.containerInfo),null;case 10:return Kp(t),null;case 17:return Ge(t.type)&&ou(),null;case 19:if(se(ce),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(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=cu(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 de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ae()>dp&&(t.flags|=64,i=!0,fs(r,!1),t.lanes=33554432)}else{if(!i)if(e=cu(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&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ae()-r.renderingStartTime>dp&&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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return rm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function NT(e){switch(e.tag){case 1:Ge(e.type)&&ou();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if($o(),se(qe),se(Ne),qp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return $p(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return $o(),null;case 10:return Kp(e),null;case 23:case 24:return rm(),null;default:return null}}function Jp(e,t){try{var n="",r=t;do n+=mb(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 sp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var NT=typeof WeakMap=="function"?WeakMap:Map;function c0(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yu||(yu=!0,fp=r),sp(e,t)},n}function d0(e,t,n){n=Jn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return sp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this),sp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var MT=typeof WeakSet=="function"?WeakSet:Set;function Uv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){rr(e,n)}else t.current=null}function DT(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:Dt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Bp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function FT(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&&(x0(n,e),WT(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:Dt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&wv(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}wv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&DS(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&&gS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function zv(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=oS("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 Vv(e,t){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(Up,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)x0(t,n);else{r=t;try{o()}catch(i){rr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Uv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){rr(t,i)}break;case 5:Uv(t);break;case 4:f0(e,t)}}function Kv(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 Wv(e){return e.tag===5||e.tag===3||e.tag===4}function $v(e){e:{for(var t=e.return;t!==null;){if(Wv(t))break e;t=t.return}throw Error(T(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(T(161))}n.flags&16&&(Os(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Wv(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?ap(e,n,t):lp(e,n,t)}function ap(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=nu));else if(r!==4&&(e=e.child,e!==null))for(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}function lp(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(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}function f0(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(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(Vv(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(Vv(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 kf(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[ru]=r,e==="input"&&r.type==="radio"&&r.name!=null&&eS(n,r),Bf(e,o),t=Bf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?iS(n,a):s==="dangerouslySetInnerHTML"?rS(n,a):s==="children"?Os(n,a):Sp(n,s,a,t)}switch(e){case"input":Of(n,r);break;case"textarea":tS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?No(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?No(n,!!r.multiple,r.defaultValue,!0):No(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,gS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(nm=Ae(),zv(t.child,!0)),qv(t);return;case 19:qv(t);return;case 17:return;case 23:case 24:zv(t,t.memoizedState!==null);return}throw Error(T(163))}function qv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new MT),t.forEach(function(r){var o=GT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function jT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var HT=Math.ceil,hu=Yr.ReactCurrentDispatcher,em=Yr.ReactCurrentOwner,F=0,Be=null,ve=null,Oe=0,Xr=0,up=ur(0),Te=0,Iu=null,Xo=0,Xs=0,Qo=0,tm=0,cp=null,nm=0,dp=1/0;function Yo(){dp=Ae()+500}var A=null,yu=!1,fp=null,Jt=null,ar=!1,Rs=null,vs=90,pp=[],mp=[],yn=null,Is=0,gp=null,$l=-1,mn=0,ql=0,Ls=null,Gl=!1;function nt(){return F&48?Ae():$l!==-1?$l:$l=Ae()}function tr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Wo()===99?1:2;if(mn===0&&(mn=Xo),TT.transition!==0){ql!==0&&(ql=cp!==null?cp.pendingLanes:0),e=mn;var t=4186112&~ql;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Wo(),F&4&&e===98?e=eu(12,mn):(e=Rb(e),e=eu(e,mn)),e}function nr(e,t,n){if(50<Is)throw Is=0,gp=null,Error(T(185));if(e=Lu(e,t),e===null)return null;Eu(e,t,n),e===Be&&(Qo|=t,Te===4&&Bo(e,Oe));var r=Wo();t===1?F&8&&!(F&48)?hp(e):(wt(e,n),F===0&&(Yo(),nn())):(!(F&4)||r!==98&&r!==99||(yn===null?yn=new Set([e]):yn.add(e)),wt(e,n)),cp=e}function Lu(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 wt(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,bo(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Fs(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==wf&&Yf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==wf&&Yf(n)}t===15?(n=hp.bind(null,e),pn===null?(pn=[n],Wl=zp(Pu,KS)):pn.push(n),n=wf):t===14?n=Us(99,hp.bind(null,e)):(n=Ib(t),n=Us(n,p0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function p0(e){if($l=-1,ql=mn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(cr()&&e.callbackNode!==t)return null;var n=Fs(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=F;F|=16;var i=y0();(Be!==e||Oe!==r)&&(Yo(),Uo(e,r));do try{zT();break}catch(a){h0(e,a)}while(1);if(Vp(),hu.current=i,F=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),Xo&Qo)Uo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bp(e.containerInfo)),n=wS(e),n!==0&&(r=Ss(e,n))),r===1)throw t=Iu,Uo(e,0),Bo(e,n),wt(e,Ae()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Br(e);break;case 3:if(Bo(e,n),(n&62914560)===n&&(r=nm+500-Ae(),10<r)){if(Fs(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){nt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=mv(Br.bind(null,e),r);break}Br(e);break;case 4:if(Bo(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=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*HT(n/1960))-n,10<n){e.timeoutHandle=mv(Br.bind(null,e),n);break}Br(e);break;case 5:Br(e);break;default:throw Error(T(329))}}return wt(e,Ae()),e.callbackNode===t?p0.bind(null,e):null}function Bo(e,t){for(t&=~tm,t&=~Qo,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 hp(e){if(F&48)throw Error(T(327));if(cr(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=Ss(e,t);Xo&Qo&&(t=Fs(e,t),n=Ss(e,t))}else t=Fs(e,0),n=Ss(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bp(e.containerInfo)),t=wS(e),t!==0&&(n=Ss(e,t))),n===1)throw n=Iu,Uo(e,0),Bo(e,t),wt(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Br(e),wt(e,Ae()),null}function BT(){if(yn!==null){var e=yn;yn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,wt(t,Ae())})}nn()}function m0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}}function g0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}}function Hl(e,t){de(up,Xr),Xr|=t,Xo|=t}function rm(){Xr=up.current,se(up)}function Uo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&ou();break;case 3:$o(),se(qe),se(Ne),qp();break;case 5:$p(r);break;case 4:$o();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Kp(r);break;case 23:case 24:rm()}n=n.return}Be=e,ve=lr(e.current,null),Oe=Xr=Xo=t,Te=0,Iu=null,tm=Qo=Xs=0}function h0(e,t){do{var n=ve;try{if(Vp(),ks.current=gu,du){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}du=!1}if(Ws=0,be=Le=ge=null,Ps=!1,em.current=null,n===null||n.return===null){Te=1,Iu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,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 f=(ce.current&1)!==0,d=s;do{var y;if(y=d.tag===13){var S=d.memoizedState;if(S!==null)y=S.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){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 p=Jn(-1,1);p.tag=2,er(a,p)}a.lanes|=1;break e}l=void 0,a=t;var v=i.pingCache;if(v===null?(v=i.pingCache=new NT,l=new Set,v.set(u,l)):(l=v.get(u),l===void 0&&(l=new Set,v.set(u,l))),!l.has(a)){l.add(a);var _=qT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Oo(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 sp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var MT=typeof WeakMap=="function"?WeakMap:Map;function c0(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yu||(yu=!0,fp=r),sp(e,t)},n}function d0(e,t,n){n=Jn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return sp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this),sp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var DT=typeof WeakSet=="function"?WeakSet:Set;function Uv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){rr(e,n)}else t.current=null}function FT(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:Dt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Bp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function jT(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&&(x0(n,e),$T(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:Dt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&wv(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}wv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&DS(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&&gS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function zv(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=oS("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 Vv(e,t){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(Up,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)x0(t,n);else{r=t;try{o()}catch(i){rr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Uv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){rr(t,i)}break;case 5:Uv(t);break;case 4:f0(e,t)}}function Kv(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 Wv(e){return e.tag===5||e.tag===3||e.tag===4}function $v(e){e:{for(var t=e.return;t!==null;){if(Wv(t))break e;t=t.return}throw Error(T(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(T(161))}n.flags&16&&(Os(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Wv(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?ap(e,n,t):lp(e,n,t)}function ap(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=nu));else if(r!==4&&(e=e.child,e!==null))for(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}function lp(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(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}function f0(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(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(Vv(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(Vv(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 kf(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[ru]=r,e==="input"&&r.type==="radio"&&r.name!=null&&eS(n,r),Bf(e,o),t=Bf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?iS(n,a):s==="dangerouslySetInnerHTML"?rS(n,a):s==="children"?Os(n,a):Sp(n,s,a,t)}switch(e){case"input":Of(n,r);break;case"textarea":tS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?No(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?No(n,!!r.multiple,r.defaultValue,!0):No(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,gS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(nm=Ae(),zv(t.child,!0)),qv(t);return;case 19:qv(t);return;case 17:return;case 23:case 24:zv(t,t.memoizedState!==null);return}throw Error(T(163))}function qv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new DT),t.forEach(function(r){var o=XT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function HT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var BT=Math.ceil,hu=Yr.ReactCurrentDispatcher,em=Yr.ReactCurrentOwner,F=0,Be=null,ve=null,Oe=0,Xr=0,up=ur(0),Te=0,Iu=null,Xo=0,Xs=0,Qo=0,tm=0,cp=null,nm=0,dp=1/0;function Yo(){dp=Ae()+500}var A=null,yu=!1,fp=null,Jt=null,ar=!1,Rs=null,vs=90,pp=[],mp=[],vn=null,Is=0,gp=null,$l=-1,gn=0,ql=0,Ls=null,Gl=!1;function nt(){return F&48?Ae():$l!==-1?$l:$l=Ae()}function tr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Wo()===99?1:2;if(gn===0&&(gn=Xo),kT.transition!==0){ql!==0&&(ql=cp!==null?cp.pendingLanes:0),e=gn;var t=4186112&~ql;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Wo(),F&4&&e===98?e=eu(12,gn):(e=Ib(e),e=eu(e,gn)),e}function nr(e,t,n){if(50<Is)throw Is=0,gp=null,Error(T(185));if(e=Lu(e,t),e===null)return null;Eu(e,t,n),e===Be&&(Qo|=t,Te===4&&Bo(e,Oe));var r=Wo();t===1?F&8&&!(F&48)?hp(e):(wt(e,n),F===0&&(Yo(),nn())):(!(F&4)||r!==98&&r!==99||(vn===null?vn=new Set([e]):vn.add(e)),wt(e,n)),cp=e}function Lu(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 wt(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,bo(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Fs(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==wf&&Yf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==wf&&Yf(n)}t===15?(n=hp.bind(null,e),mn===null?(mn=[n],Wl=zp(Pu,KS)):mn.push(n),n=wf):t===14?n=Us(99,hp.bind(null,e)):(n=Lb(t),n=Us(n,p0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function p0(e){if($l=-1,ql=gn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(cr()&&e.callbackNode!==t)return null;var n=Fs(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=F;F|=16;var i=y0();(Be!==e||Oe!==r)&&(Yo(),Uo(e,r));do try{VT();break}catch(a){h0(e,a)}while(1);if(Vp(),hu.current=i,F=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),Xo&Qo)Uo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bp(e.containerInfo)),n=wS(e),n!==0&&(r=Ss(e,n))),r===1)throw t=Iu,Uo(e,0),Bo(e,n),wt(e,Ae()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Br(e);break;case 3:if(Bo(e,n),(n&62914560)===n&&(r=nm+500-Ae(),10<r)){if(Fs(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){nt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=mv(Br.bind(null,e),r);break}Br(e);break;case 4:if(Bo(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=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BT(n/1960))-n,10<n){e.timeoutHandle=mv(Br.bind(null,e),n);break}Br(e);break;case 5:Br(e);break;default:throw Error(T(329))}}return wt(e,Ae()),e.callbackNode===t?p0.bind(null,e):null}function Bo(e,t){for(t&=~tm,t&=~Qo,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 hp(e){if(F&48)throw Error(T(327));if(cr(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=Ss(e,t);Xo&Qo&&(t=Fs(e,t),n=Ss(e,t))}else t=Fs(e,0),n=Ss(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bp(e.containerInfo)),t=wS(e),t!==0&&(n=Ss(e,t))),n===1)throw n=Iu,Uo(e,0),Bo(e,t),wt(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Br(e),wt(e,Ae()),null}function UT(){if(vn!==null){var e=vn;vn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,wt(t,Ae())})}nn()}function m0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}}function g0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}}function Hl(e,t){de(up,Xr),Xr|=t,Xo|=t}function rm(){Xr=up.current,se(up)}function Uo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_T(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&ou();break;case 3:$o(),se(qe),se(Ne),qp();break;case 5:$p(r);break;case 4:$o();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Kp(r);break;case 23:case 24:rm()}n=n.return}Be=e,ve=lr(e.current,null),Oe=Xr=Xo=t,Te=0,Iu=null,tm=Qo=Xs=0}function h0(e,t){do{var n=ve;try{if(Vp(),ks.current=gu,du){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}du=!1}if(Ws=0,be=Le=ge=null,Ps=!1,em.current=null,n===null||n.return===null){Te=1,Iu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,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 f=(ce.current&1)!==0,d=s;do{var y;if(y=d.tag===13){var S=d.memoizedState;if(S!==null)y=S.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){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 p=Jn(-1,1);p.tag=2,er(a,p)}a.lanes|=1;break e}l=void 0,a=t;var v=i.pingCache;if(v===null?(v=i.pingCache=new MT,l=new Set,v.set(u,l)):(l=v.get(u),l===void 0&&(l=new Set,v.set(u,l))),!l.has(a)){l.add(a);var _=GT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Oo(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.`)}Te!==5&&(Te=2),l=Jp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=c0(d,i,t);_v(d,C);break e;case 1:i=l;var E=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Jt===null||!Jt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=d0(d,i,t);_v(d,R);break e}}d=d.return}while(d!==null)}S0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function y0(){var e=hu.current;return hu.current=gu,e===null?gu:e}function Ss(e,t){var n=F;F|=16;var r=y0();Be===e&&Oe===t||Uo(e,t);do try{UT();break}catch(o){h0(e,o)}while(1);if(Vp(),F=n,hu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function UT(){for(;ve!==null;)v0(ve)}function zT(){for(;ve!==null&&!ET();)v0(ve)}function v0(e){var t=_0(e.alternate,e,Xr);e.memoizedProps=e.pendingProps,t===null?S0(e):ve=t,em.current=null}function S0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=OT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=AT(n,t,Xr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Xr&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){ve=t;return}ve=t=e}while(t!==null);Te===0&&(Te=5)}function Br(e){var t=Wo();return Gr(99,VT.bind(null,e,t)),null}function VT(e,t){do cr();while(Rs!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(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(yn!==null&&!(r&24)&&yn.has(e)&&yn.delete(e),e===Be&&(ve=Be=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,em.current=null,Sf=Ul,s=lv(),$f(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,f=-1,d=-1,y=0,S=0,h=s,g=null;t:for(;;){for(var m;h!==a||i!==0&&h.nodeType!==3||(f=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(m=h.firstChild)!==null;)g=h,h=m;for(;;){if(h===s)break t;if(g===a&&++y===i&&(f=c),g===l&&++S===u&&(d=c),(m=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;xf={focusedElem:s,selectionRange:a},Ul=!1,Ls=null,Gl=!1,A=r;do try{KT()}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);Ls=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&Os(A.stateNode,""),p&128){var v=A.alternate;if(v!==null){var _=v.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:$v(A),A.flags&=-3;break;case 6:$v(A),A.flags&=-3,kf(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,kf(A.alternate,A);break;case 4:kf(A.alternate,A);break;case 8:a=A,f0(s,a);var C=a.alternate;Kv(a),C!==null&&Kv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);if(_=xf,v=lv(),p=_.focusedElem,s=_.selectionRange,v!==p&&p&&p.ownerDocument&&IS(p.ownerDocument.documentElement,p)){for(s!==null&&$f(p)&&(v=s.start,_=s.end,_===void 0&&(_=v),"selectionStart"in p?(p.selectionStart=v,p.selectionEnd=Math.min(_,p.value.length)):(_=(v=p.ownerDocument||document)&&v.defaultView||window,_.getSelection&&(_=_.getSelection(),a=p.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!_.extend&&C>s&&(a=s,s=C,C=a),a=av(p,C),i=av(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(v=v.createRange(),v.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(v),_.extend(i.node,i.offset)):(v.setEnd(i.node,i.offset),_.addRange(v)))))),v=[],_=p;_=_.parentNode;)_.nodeType===1&&v.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<v.length;p++)_=v[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Ul=!!Sf,xf=Sf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var E=A.flags;if(E&36&&FT(p,A.alternate,A),E&128){v=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:v=R;break;default:v=R}typeof b=="function"?b(v):b.current=v}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);A=null,bT(),F=o}else e.current=n;if(ar)ar=!1,Rs=e,vs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(E=A,E.sibling=null,E.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Jt=null),r===1?e===gp?Is++:(Is=0,gp=e):Is=0,n=n.stateNode,$r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(Up,n,void 0,(n.current.flags&64)===64)}catch{}if(wt(e,Ae()),yu)throw yu=!1,e=fp,fp=null,e;return F&8||nn(),null}function KT(){for(;A!==null;){var e=A.alternate;Gl||Ls===null||(A.flags&8?Gy(A,Ls)&&(Gl=!0):A.tag===13&&jT(e,A)&&Gy(A,Ls)&&(Gl=!0));var t=A.flags;t&256&&DT(e,A),!(t&512)||ar||(ar=!0,Us(97,function(){return cr(),null})),A=A.nextEffect}}function cr(){if(vs!==90){var e=97<vs?97:vs;return vs=90,Gr(e,$T)}return!1}function WT(e,t){pp.push(t,e),ar||(ar=!0,Us(97,function(){return cr(),null}))}function x0(e,t){mp.push(t,e),ar||(ar=!0,Us(97,function(){return cr(),null}))}function $T(){if(Rs===null)return!1;var e=Rs;if(Rs=null,F&48)throw Error(T(331));var t=F;F|=32;var n=mp;mp=[];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(T(330));rr(i,l)}}for(n=pp,pp=[],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(T(330));rr(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 F=t,nn(),!0}function Gv(e,t,n){t=Jp(n,t),t=c0(e,t,1),er(e,t),t=nt(),e=Lu(e,1),e!==null&&(Eu(e,1,t),wt(e,t))}function rr(e,t){if(e.tag===3)Gv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Gv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=Jp(t,e);var o=d0(n,e,1);if(er(n,o),o=nt(),n=Lu(n,1),n!==null)Eu(n,1,o),wt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function qT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-nm?Uo(e,0):tm|=n),wt(e,t)}function GT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(mn===0&&(mn=Xo),t=To(62914560&~mn),t===0&&(t=4194304)):t=Wo()===99?1:2:t=1),n=nt(),e=Lu(e,t),e!==null&&(Eu(e,t,n),wt(e,n))}var _0;_0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ft=!0;else if(n&r)Ft=!!(e.flags&16384);else{switch(Ft=!1,t.tag){case 3:Nv(t),Cf();break;case 5:bv(t);break;case 1:Ge(t.type)&&Kl(t);break;case 4:ep(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(iu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Mv(e,t,n):(de(ce,ce.current&1),t=hn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Bv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,bf(e,t,n)}return hn(e,t,n)}else Ft=!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=Ko(t,Ne.current),jo(t,n),o=Xp(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,Ge(r)){var i=!0;Kl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Wp(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&lu(t,r,s,e),o.updater=Ru,t.stateNode=o,o._reactInternals=t,Jf(t,r,e,n),t=op(null,t,r,!0,i,n)}else t.tag=0,$e(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=QT(o),e=Dt(o,e),i){case 0:t=rp(null,t,o,e,n);break e;case 1:t=Ov(null,t,o,e,n);break e;case 11:t=Lv(null,t,o,e,n);break e;case 14:t=Av(null,t,o,Dt(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),rp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),Ov(e,t,r,o,n);case 3:if(Nv(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,$S(e,t),zs(t,r,null,n),r=t.memoizedState.element,r===o)Cf(),t=hn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Xn=Fo(t.stateNode.containerInfo.firstChild),gn=t,i=tn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ho.push(i);for(n=QS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else $e(e,t,r,n),Cf();t=t.child}return t;case 5:return bv(t),e===null&&tp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Xf(r,o)?s=null:i!==null&&Xf(r,i)&&(t.flags|=16),s0(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&tp(t),null;case 13:return Mv(e,t,n);case 4:return ep(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uu(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),Lv(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(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(de(iu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=vt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!qe.current){t=hn(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=Jn(-1,n&-n),u.tag=2,er(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),WS(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}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,jo(t,n),o=_t(o,i.unstable_observedBits),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return o=t.type,i=Dt(o,t.pendingProps),i=Dt(o.type,i),Av(e,t,o,i,r,n);case 15:return i0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ge(r)?(e=!0,Kl(t)):e=!1,jo(t,n),GS(t,r,o),Jf(t,r,o,n),op(null,t,r,!0,e,n);case 19:return Bv(e,t,n);case 23:return bf(e,t,n);case 24:return bf(e,t,n)}throw Error(T(156,t.tag))};function XT(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 St(e,t,n,r){return new XT(e,t,n,r)}function om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QT(e){if(typeof e=="function")return om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xu)return 11;if(e===_u)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=St(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 Xl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")om(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case $n:return zo(n.children,o,i,t);case Yv:s=8,o|=16;break;case xp:s=8,o|=1;break;case xs:return e=St(12,n,t,o|8),e.elementType=xs,e.type=xs,e.lanes=i,e;case _s:return e=St(13,n,t,o),e.type=_s,e.elementType=_s,e.lanes=i,e;case Ql:return e=St(19,n,t,o),e.elementType=Ql,e.lanes=i,e;case Tp:return im(n,o,i,t);case Lf:return e=St(24,n,t,o),e.elementType=Lf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _p:s=10;break e;case wp:s=9;break e;case xu:s=11;break e;case _u:s=14;break e;case Ep:s=16,r=null;break e;case Cp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function zo(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function im(e,t,n,r){return e=St(23,e,r,t),e.elementType=Tp,e.lanes=n,e}function Pf(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function Rf(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YT(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=pf(0),this.expirationTimes=pf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pf(0),this.mutableSourceEagerHydrationData=null}function ZT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ur,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vu(e,t,n,r){var o=t.current,i=nt(),s=tr(o);e:if(n){n=n._reactInternals;t:{if(Zr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ge(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ge(l)){n=jS(n,l,a);break e}}n=a}else n=sr;return t.context===null?t.context=n:t.pendingContext=n,t=Jn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),er(o,t),nr(o,s,i),s}function If(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 Xv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sm(e,t){Xv(e,t),(e=e.alternate)&&Xv(e,t)}function JT(){return null}function am(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new YT(e,t,n!=null&&n.hydrate===!0),t=St(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Wp(t),e[Go]=n.current,OS(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}am.prototype.render=function(e){vu(e,this._internalRoot,null,null)};am.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;vu(null,e,null,function(){t[Go]=null})};function Qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ek(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 am(e,0,t?{hydrate:!0}:void 0)}function Au(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=If(s);a.call(u)}}vu(t,s,e,o)}else{if(i=n._reactRootContainer=ek(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=If(s);l.call(u)}}g0(function(){vu(t,s,e,o)})}return If(s)}fS=function(e){if(e.tag===13){var t=nt();nr(e,4,t),sm(e,4)}};Lp=function(e){if(e.tag===13){var t=nt();nr(e,67108864,t),sm(e,67108864)}};pS=function(e){if(e.tag===13){var t=nt(),n=tr(e);nr(e,n,t),sm(e,n)}};mS=function(e,t){return t()};Uf=function(e,t,n){switch(t){case"input":if(Of(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=ku(r);if(!o)throw Error(T(90));Jv(r),Of(r,o)}}}break;case"textarea":tS(e,n);break;case"select":t=n.value,t!=null&&No(e,!!n.multiple,t,!1)}};Pp=m0;lS=function(e,t,n,r,o){var i=F;F|=4;try{return Gr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(Yo(),nn())}};Rp=function(){!(F&49)&&(BT(),cr())};uS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}};function w0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qs(t))throw Error(T(200));return ZT(e,t,null,n)}var tk={Events:[qs,Io,ku,sS,aS,cr,{current:!1}]},ps={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},nk={bundleType:ps.bundleType,version:ps.version,rendererPackageName:ps.rendererPackageName,rendererConfig:ps.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dS(e),e===null?null:e.stateNode},findFiberByHostInstance:ps.findFiberByHostInstance||JT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ms=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ms.isDisabled&&ms.supportsFiber))try{Up=ms.inject(nk),$r=ms}catch{}var ms;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tk;Et.createPortal=w0;Et.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(T(188)):Error(T(268,Object.keys(e)));return e=dS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Gr(99,e.bind(null,t))}finally{F=n,nn()}};Et.hydrate=function(e,t,n){if(!Qs(t))throw Error(T(200));return Au(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Qs(t))throw Error(T(200));return Au(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Qs(e))throw Error(T(40));return e._reactRootContainer?(g0(function(){Au(null,null,e,!1,function(){e._reactRootContainer=null,e[Go]=null})}),!0):!1};Et.unstable_batchedUpdates=m0;Et.unstable_createPortal=function(e,t){return w0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Au(e,t,n,!1,r)};Et.version="17.0.2"});var Ou=pe((eN,b0)=>{"use strict";function C0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C0)}catch(e){console.error(e)}}C0(),b0.exports=E0()});var J0=pe(Z0=>{"use strict";var ri=O();function Bk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uk=typeof Object.is=="function"?Object.is:Bk,zk=ri.useState,Vk=ri.useEffect,Kk=ri.useLayoutEffect,Wk=ri.useDebugValue;function $k(e,t){var n=t(),r=zk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Kk(function(){o.value=n,o.getSnapshot=t,Nm(o)&&i({inst:o})},[e,n,t]),Vk(function(){return Nm(o)&&i({inst:o}),e(function(){Nm(o)&&i({inst:o})})},[e]),Wk(n),n}function Nm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Uk(e,n)}catch{return!0}}function qk(e,t){return t()}var Gk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qk:$k;Z0.useSyncExternalStore=ri.useSyncExternalStore!==void 0?ri.useSyncExternalStore:Gk});var Mm=pe((UN,ex)=>{"use strict";ex.exports=J0()});var nx=pe(tx=>{"use strict";var Uu=O(),Xk=Mm();function Qk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yk=typeof Object.is=="function"?Object.is:Qk,Zk=Xk.useSyncExternalStore,Jk=Uu.useRef,eP=Uu.useEffect,tP=Uu.useMemo,nP=Uu.useDebugValue;tx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Jk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=tP(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var S=s.value;if(o(S,y))return f=S}return f=y}if(S=f,Yk(c,y))return S;var h=r(y);return o!==void 0&&o(S,h)?S:(c=y,f=h)}var u=!1,c,f,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=Zk(e,i[0],i[1]);return eP(function(){s.hasValue=!0,s.value=a},[a]),nP(a),a}});var ox=pe((VN,rx)=>{"use strict";rx.exports=nx()});var gx=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Fm=_e?Symbol.for("react.element"):60103,jm=_e?Symbol.for("react.portal"):60106,Wu=_e?Symbol.for("react.fragment"):60107,$u=_e?Symbol.for("react.strict_mode"):60108,qu=_e?Symbol.for("react.profiler"):60114,Gu=_e?Symbol.for("react.provider"):60109,Xu=_e?Symbol.for("react.context"):60110,Hm=_e?Symbol.for("react.async_mode"):60111,Qu=_e?Symbol.for("react.concurrent_mode"):60111,Yu=_e?Symbol.for("react.forward_ref"):60112,Zu=_e?Symbol.for("react.suspense"):60113,sP=_e?Symbol.for("react.suspense_list"):60120,Ju=_e?Symbol.for("react.memo"):60115,ec=_e?Symbol.for("react.lazy"):60116,aP=_e?Symbol.for("react.block"):60121,lP=_e?Symbol.for("react.fundamental"):60117,uP=_e?Symbol.for("react.responder"):60118,cP=_e?Symbol.for("react.scope"):60119;function it(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fm:switch(e=e.type,e){case Hm:case Qu:case Wu:case qu:case $u:case Zu:return e;default:switch(e=e&&e.$$typeof,e){case Xu:case Yu:case ec:case Ju:case Gu:return e;default:return t}}case jm:return t}}}function mx(e){return it(e)===Qu}Q.AsyncMode=Hm;Q.ConcurrentMode=Qu;Q.ContextConsumer=Xu;Q.ContextProvider=Gu;Q.Element=Fm;Q.ForwardRef=Yu;Q.Fragment=Wu;Q.Lazy=ec;Q.Memo=Ju;Q.Portal=jm;Q.Profiler=qu;Q.StrictMode=$u;Q.Suspense=Zu;Q.isAsyncMode=function(e){return mx(e)||it(e)===Hm};Q.isConcurrentMode=mx;Q.isContextConsumer=function(e){return it(e)===Xu};Q.isContextProvider=function(e){return it(e)===Gu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm};Q.isForwardRef=function(e){return it(e)===Yu};Q.isFragment=function(e){return it(e)===Wu};Q.isLazy=function(e){return it(e)===ec};Q.isMemo=function(e){return it(e)===Ju};Q.isPortal=function(e){return it(e)===jm};Q.isProfiler=function(e){return it(e)===qu};Q.isStrictMode=function(e){return it(e)===$u};Q.isSuspense=function(e){return it(e)===Zu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wu||e===Qu||e===qu||e===$u||e===Zu||e===sP||typeof e=="object"&&e!==null&&(e.$$typeof===ec||e.$$typeof===Ju||e.$$typeof===Gu||e.$$typeof===Xu||e.$$typeof===Yu||e.$$typeof===lP||e.$$typeof===uP||e.$$typeof===cP||e.$$typeof===aP)};Q.typeOf=it});var yx=pe((rM,hx)=>{"use strict";hx.exports=gx()});var Cx=pe((oM,Ex)=>{"use strict";var Bm=yx(),dP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},fP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},pP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_x={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Um={};Um[Bm.ForwardRef]=pP;Um[Bm.Memo]=_x;function vx(e){return Bm.isMemo(e)?_x:Um[e.$$typeof]||dP}var mP=Object.defineProperty,gP=Object.getOwnPropertyNames,Sx=Object.getOwnPropertySymbols,hP=Object.getOwnPropertyDescriptor,yP=Object.getPrototypeOf,xx=Object.prototype;function wx(e,t,n){if(typeof t!="string"){if(xx){var r=yP(t);r&&r!==xx&&wx(e,r,n)}var o=gP(t);Sx&&(o=o.concat(Sx(t)));for(var i=vx(e),s=vx(t),a=0;a<o.length;++a){var l=o[a];if(!fP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=hP(t,l);try{mP(e,l,u)}catch{}}}}return e}Ex.exports=wx});var Tx=pe(Y=>{"use strict";var zm=Symbol.for("react.element"),Vm=Symbol.for("react.portal"),tc=Symbol.for("react.fragment"),nc=Symbol.for("react.strict_mode"),rc=Symbol.for("react.profiler"),oc=Symbol.for("react.provider"),ic=Symbol.for("react.context"),vP=Symbol.for("react.server_context"),sc=Symbol.for("react.forward_ref"),ac=Symbol.for("react.suspense"),lc=Symbol.for("react.suspense_list"),uc=Symbol.for("react.memo"),cc=Symbol.for("react.lazy"),SP=Symbol.for("react.offscreen"),bx;bx=Symbol.for("react.module.reference");function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case zm:switch(e=e.type,e){case tc:case rc:case nc:case ac:case lc:return e;default:switch(e=e&&e.$$typeof,e){case vP:case ic:case sc:case cc:case uc:case oc:return e;default:return t}}case Vm:return t}}}Y.ContextConsumer=ic;Y.ContextProvider=oc;Y.Element=zm;Y.ForwardRef=sc;Y.Fragment=tc;Y.Lazy=cc;Y.Memo=uc;Y.Portal=Vm;Y.Profiler=rc;Y.StrictMode=nc;Y.Suspense=ac;Y.SuspenseList=lc;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return bt(e)===ic};Y.isContextProvider=function(e){return bt(e)===oc};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===zm};Y.isForwardRef=function(e){return bt(e)===sc};Y.isFragment=function(e){return bt(e)===tc};Y.isLazy=function(e){return bt(e)===cc};Y.isMemo=function(e){return bt(e)===uc};Y.isPortal=function(e){return bt(e)===Vm};Y.isProfiler=function(e){return bt(e)===rc};Y.isStrictMode=function(e){return bt(e)===nc};Y.isSuspense=function(e){return bt(e)===ac};Y.isSuspenseList=function(e){return bt(e)===lc};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===tc||e===rc||e===nc||e===ac||e===lc||e===SP||typeof e=="object"&&e!==null&&(e.$$typeof===cc||e.$$typeof===uc||e.$$typeof===oc||e.$$typeof===ic||e.$$typeof===sc||e.$$typeof===bx||e.getModuleId!==void 0)};Y.typeOf=bt});var Px=pe((sM,kx)=>{"use strict";kx.exports=Tx()});var h_=pe((uD,g_)=>{"use strict";var YP=/["'&<>]/;g_.exports=ZP;function ZP(e){var t=""+e,n=YP.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=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";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 Bg=pe((C8,Vw)=>{"use strict";var KR="Expected a function",Uw=NaN,WR="[object Symbol]",$R=/^\s+|\s+$/g,qR=/^[-+]0x[0-9a-f]+$/i,GR=/^0b[01]+$/i,XR=/^0o[0-7]+$/i,QR=parseInt,YR=typeof global=="object"&&global&&global.Object===Object&&global,ZR=typeof self=="object"&&self&&self.Object===Object&&self,JR=YR||ZR||Function("return this")(),eI=Object.prototype,tI=eI.toString,nI=Math.max,rI=Math.min,jg=function(){return JR.Date.now()};function oI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(KR);t=zw(t)||0,Hg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?nI(zw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(E){var b=r,R=o;return r=o=void 0,u=E,s=e.apply(R,b),s}function S(E){return u=E,a=setTimeout(m,t),c?y(E):s}function h(E){var b=E-l,R=E-u,P=t-b;return f?rI(P,i-R):P}function g(E){var b=E-l,R=E-u;return l===void 0||b>=t||b<0||f&&R>=i}function m(){var E=jg();if(g(E))return p(E);a=setTimeout(m,h(E))}function p(E){return a=void 0,d&&r?y(E):(r=o=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(jg())}function C(){var E=jg(),b=g(E);if(r=arguments,o=this,l=E,b){if(a===void 0)return S(l);if(f)return a=setTimeout(m,t),y(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=v,C.flush=_,C}function Hg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function iI(e){return!!e&&typeof e=="object"}function sI(e){return typeof e=="symbol"||iI(e)&&tI.call(e)==WR}function zw(e){if(typeof e=="number")return e;if(sI(e))return Uw;if(Hg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace($R,"");var n=GR.test(e);return n||XR.test(e)?QR(e.slice(2),n?2:8):qR.test(e)?Uw:+e}Vw.exports=oI});var GL={};Ce(GL,{Card:()=>me,Chip:()=>dy,ContentEditableInput:()=>fo,DeepdeskAPI:()=>Bn,DeepdeskSDK:()=>Va,HTTPClient:()=>qt,InputMediator:()=>Tn,InputType:()=>Vn,KeyboardHint:()=>yl,Label:()=>vl,Locale:()=>oa,Section:()=>zn,SectionList:()=>Sl,Sources:()=>Nt,Suggestion:()=>oe,SuggestionList:()=>ht,TextAreaInput:()=>kn,ToggleButton:()=>jr,attachFile:()=>fC,authenticateWithKey:()=>cC,createFullRange:()=>Fi,createOverlayContainer:()=>so,createRangeFromOffsets:()=>Lr,escapeHTML:()=>Ii,fetchPlatformConfig:()=>dC,formatTextMarkup:()=>uC,getRangeOffsets:()=>Ha,getRangeText:()=>Ba,insertCKEditor:()=>lC,isSupportedInputElement:()=>Rd,updateContentEditable:()=>aC,updateTextArea:()=>sC,useStyles:()=>k,waitForElementVisibilityChange:()=>Id});var Ja=x(X()),pt=x(O());var Ya=x(O()),Gh=x(X()),$i=Ya.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Ya.useContext)($i),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Gh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Xh={root:"_root_vr71j_1"};var Mr=x(w()),Za=()=>(0,Mr.jsxs)("svg",{className:Xh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Mr.jsx)("defs",{children:(0,Mr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Mr.jsx)("title",{children:"Failed loading image"}),(0,Mr.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 jd={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Dr=x(w()),el=(0,pt.createContext)(jd),AC=({title:e,src:t})=>{let n=(0,pt.useContext)(el),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Dr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Dr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Dr.jsx)(Za,{})})},OC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(el);return(0,Dr.jsx)("div",{className:(0,Ja.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},NC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(el);return pt.default.createElement(e,{className:(0,Ja.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},tl=({children:e})=>{let t=k("Card",jd);return(0,Dr.jsx)("div",{className:(0,Ja.default)(t.root),children:(0,Dr.jsx)(el.Provider,{value:t,children:e})})};tl.Image=AC;tl.Content=OC;tl.Title=NC;var me=tl;var ey={root:"_root_nkim0_1"};var gl=x(O());var Hd=function(e,t){return Hd=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])},Hd(e,t)};function Gi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tt=function(){return tt=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},tt.apply(this,arguments)};function ty(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 nl(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 rl;(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"})(rl||(rl={}));var ol=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Ot;(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"})(Ot||(Ot={}));var il;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(il||(il={}));function Bd(e){return e.type===Ot.literal}function ny(e){return e.type===Ot.argument}function sl(e){return e.type===Ot.number}function al(e){return e.type===Ot.date}function ll(e){return e.type===Ot.time}function ul(e){return e.type===Ot.select}function cl(e){return e.type===Ot.plural}function ry(e){return e.type===Ot.pound}function dl(e){return e.type===Ot.tag}function fl(e){return!!(e&&typeof e=="object"&&e.type===il.number)}function Xi(e){return!!(e&&typeof e=="object"&&e.type===il.dateTime)}function Ud(e){e.forEach(function(t){if(delete t.location,ul(t)||cl(t))for(var n in t.options)delete t.options[n].location,Ud(t.options[n].value);else sl(t)&&fl(t.style)||(al(t)||ll(t))&&Xi(t.style)?delete t.style.location:dl(t)&&Ud(t.children)})}function oy(e,t){t===void 0&&(t={}),t=tt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ol(e,t).parse();if(n.err){var r=SyntaxError(rl[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ud(n.val),n.val}function pl(e,t){var n=t&&t.cache?t.cache:BC,r=t&&t.serializer?t.serializer:HC,o=t&&t.strategy?t.strategy:DC;return o(e,{cache:n,serializer:r})}function MC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function iy(e,t,n,r){var o=MC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function sy(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 zd(e,t,n,r,o){return n.bind(t,e,r,o)}function DC(e,t){var n=e.length===1?iy:sy;return zd(e,this,n,t.cache.create(),t.serializer)}function FC(e,t){return zd(e,this,sy,t.cache.create(),t.serializer)}function jC(e,t){return zd(e,this,iy,t.cache.create(),t.serializer)}var HC=function(){return JSON.stringify(arguments)};function Vd(){this.cache=Object.create(null)}Vd.prototype.get=function(e){return this.cache[e]};Vd.prototype.set=function(e,t){this.cache[e]=t};var BC={create:function(){return new Vd}},ml={variadic:FC,monadic:jC};var Fr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Fr||(Fr={}));var Qi=function(e){Gi(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 Kd=function(e){Gi(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('", "'),'"'),Fr.INVALID_VALUE,i)||this}return t}(Qi);var ay=function(e){Gi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Fr.INVALID_VALUE,o)||this}return t}(Qi);var ly=function(e){Gi(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,'"'),Fr.MISSING_VALUE,r)||this}return t}(Qi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function UC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function zC(e){return typeof e=="function"}function Yi(e,t,n,r,o,i,s){if(e.length===1&&Bd(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Bd(c)){a.push({type:Re.literal,value:c.value});continue}if(ry(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new ly(f,s);var d=o[f];if(ny(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(al(c)){var y=typeof c.style=="string"?r.date[c.style]:Xi(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(ll(c)){var y=typeof c.style=="string"?r.time[c.style]:Xi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(sl(c)){var y=typeof c.style=="string"?r.number[c.style]:fl(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(dl(c)){var S=c.children,h=c.value,g=o[h];if(!zC(g))throw new ay(h,"function",s);var m=Yi(S,t,n,r,o,i),p=g(m.map(function(C){return C.value}));Array.isArray(p)||(p=[p]),a.push.apply(a,p.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(ul(c)){var v=c.options[d]||c.options.other;if(!v)throw new Kd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Yi(v.value,t,n,r,o));continue}if(cl(c)){var v=c.options["=".concat(d)];if(!v){if(!Intl.PluralRules)throw new Qi(`Intl.PluralRules is not available in this environment.
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=Jp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=c0(d,i,t);_v(d,C);break e;case 1:i=l;var E=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Jt===null||!Jt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=d0(d,i,t);_v(d,R);break e}}d=d.return}while(d!==null)}S0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function y0(){var e=hu.current;return hu.current=gu,e===null?gu:e}function Ss(e,t){var n=F;F|=16;var r=y0();Be===e&&Oe===t||Uo(e,t);do try{zT();break}catch(o){h0(e,o)}while(1);if(Vp(),F=n,hu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function zT(){for(;ve!==null;)v0(ve)}function VT(){for(;ve!==null&&!CT();)v0(ve)}function v0(e){var t=_0(e.alternate,e,Xr);e.memoizedProps=e.pendingProps,t===null?S0(e):ve=t,em.current=null}function S0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=NT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=OT(n,t,Xr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Xr&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){ve=t;return}ve=t=e}while(t!==null);Te===0&&(Te=5)}function Br(e){var t=Wo();return Gr(99,KT.bind(null,e,t)),null}function KT(e,t){do cr();while(Rs!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(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(vn!==null&&!(r&24)&&vn.has(e)&&vn.delete(e),e===Be&&(ve=Be=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,em.current=null,Sf=Ul,s=lv(),$f(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,f=-1,d=-1,y=0,S=0,h=s,g=null;t:for(;;){for(var m;h!==a||i!==0&&h.nodeType!==3||(f=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(m=h.firstChild)!==null;)g=h,h=m;for(;;){if(h===s)break t;if(g===a&&++y===i&&(f=c),g===l&&++S===u&&(d=c),(m=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;xf={focusedElem:s,selectionRange:a},Ul=!1,Ls=null,Gl=!1,A=r;do try{WT()}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);Ls=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&Os(A.stateNode,""),p&128){var v=A.alternate;if(v!==null){var _=v.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:$v(A),A.flags&=-3;break;case 6:$v(A),A.flags&=-3,kf(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,kf(A.alternate,A);break;case 4:kf(A.alternate,A);break;case 8:a=A,f0(s,a);var C=a.alternate;Kv(a),C!==null&&Kv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);if(_=xf,v=lv(),p=_.focusedElem,s=_.selectionRange,v!==p&&p&&p.ownerDocument&&IS(p.ownerDocument.documentElement,p)){for(s!==null&&$f(p)&&(v=s.start,_=s.end,_===void 0&&(_=v),"selectionStart"in p?(p.selectionStart=v,p.selectionEnd=Math.min(_,p.value.length)):(_=(v=p.ownerDocument||document)&&v.defaultView||window,_.getSelection&&(_=_.getSelection(),a=p.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!_.extend&&C>s&&(a=s,s=C,C=a),a=av(p,C),i=av(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(v=v.createRange(),v.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(v),_.extend(i.node,i.offset)):(v.setEnd(i.node,i.offset),_.addRange(v)))))),v=[],_=p;_=_.parentNode;)_.nodeType===1&&v.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<v.length;p++)_=v[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Ul=!!Sf,xf=Sf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var E=A.flags;if(E&36&&jT(p,A.alternate,A),E&128){v=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:v=R;break;default:v=R}typeof b=="function"?b(v):b.current=v}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);A=null,TT(),F=o}else e.current=n;if(ar)ar=!1,Rs=e,vs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(E=A,E.sibling=null,E.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Jt=null),r===1?e===gp?Is++:(Is=0,gp=e):Is=0,n=n.stateNode,$r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(Up,n,void 0,(n.current.flags&64)===64)}catch{}if(wt(e,Ae()),yu)throw yu=!1,e=fp,fp=null,e;return F&8||nn(),null}function WT(){for(;A!==null;){var e=A.alternate;Gl||Ls===null||(A.flags&8?Gy(A,Ls)&&(Gl=!0):A.tag===13&&HT(e,A)&&Gy(A,Ls)&&(Gl=!0));var t=A.flags;t&256&&FT(e,A),!(t&512)||ar||(ar=!0,Us(97,function(){return cr(),null})),A=A.nextEffect}}function cr(){if(vs!==90){var e=97<vs?97:vs;return vs=90,Gr(e,qT)}return!1}function $T(e,t){pp.push(t,e),ar||(ar=!0,Us(97,function(){return cr(),null}))}function x0(e,t){mp.push(t,e),ar||(ar=!0,Us(97,function(){return cr(),null}))}function qT(){if(Rs===null)return!1;var e=Rs;if(Rs=null,F&48)throw Error(T(331));var t=F;F|=32;var n=mp;mp=[];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(T(330));rr(i,l)}}for(n=pp,pp=[],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(T(330));rr(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 F=t,nn(),!0}function Gv(e,t,n){t=Jp(n,t),t=c0(e,t,1),er(e,t),t=nt(),e=Lu(e,1),e!==null&&(Eu(e,1,t),wt(e,t))}function rr(e,t){if(e.tag===3)Gv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Gv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=Jp(t,e);var o=d0(n,e,1);if(er(n,o),o=nt(),n=Lu(n,1),n!==null)Eu(n,1,o),wt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function GT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-nm?Uo(e,0):tm|=n),wt(e,t)}function XT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(gn===0&&(gn=Xo),t=To(62914560&~gn),t===0&&(t=4194304)):t=Wo()===99?1:2:t=1),n=nt(),e=Lu(e,t),e!==null&&(Eu(e,t,n),wt(e,n))}var _0;_0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ft=!0;else if(n&r)Ft=!!(e.flags&16384);else{switch(Ft=!1,t.tag){case 3:Nv(t),Cf();break;case 5:bv(t);break;case 1:Ge(t.type)&&Kl(t);break;case 4:ep(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(iu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Mv(e,t,n):(de(ce,ce.current&1),t=yn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Bv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,bf(e,t,n)}return yn(e,t,n)}else Ft=!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=Ko(t,Ne.current),jo(t,n),o=Xp(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,Ge(r)){var i=!0;Kl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Wp(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&lu(t,r,s,e),o.updater=Ru,t.stateNode=o,o._reactInternals=t,Jf(t,r,e,n),t=op(null,t,r,!0,i,n)}else t.tag=0,$e(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=YT(o),e=Dt(o,e),i){case 0:t=rp(null,t,o,e,n);break e;case 1:t=Ov(null,t,o,e,n);break e;case 11:t=Lv(null,t,o,e,n);break e;case 14:t=Av(null,t,o,Dt(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),rp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),Ov(e,t,r,o,n);case 3:if(Nv(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,$S(e,t),zs(t,r,null,n),r=t.memoizedState.element,r===o)Cf(),t=yn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Xn=Fo(t.stateNode.containerInfo.firstChild),hn=t,i=tn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ho.push(i);for(n=QS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else $e(e,t,r,n),Cf();t=t.child}return t;case 5:return bv(t),e===null&&tp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Xf(r,o)?s=null:i!==null&&Xf(r,i)&&(t.flags|=16),s0(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&tp(t),null;case 13:return Mv(e,t,n);case 4:return ep(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uu(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),Lv(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(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(de(iu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=vt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!qe.current){t=yn(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=Jn(-1,n&-n),u.tag=2,er(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),WS(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}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,jo(t,n),o=_t(o,i.unstable_observedBits),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return o=t.type,i=Dt(o,t.pendingProps),i=Dt(o.type,i),Av(e,t,o,i,r,n);case 15:return i0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Dt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ge(r)?(e=!0,Kl(t)):e=!1,jo(t,n),GS(t,r,o),Jf(t,r,o,n),op(null,t,r,!0,e,n);case 19:return Bv(e,t,n);case 23:return bf(e,t,n);case 24:return bf(e,t,n)}throw Error(T(156,t.tag))};function QT(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 St(e,t,n,r){return new QT(e,t,n,r)}function om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YT(e){if(typeof e=="function")return om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xu)return 11;if(e===_u)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=St(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 Xl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")om(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case $n:return zo(n.children,o,i,t);case Yv:s=8,o|=16;break;case xp:s=8,o|=1;break;case xs:return e=St(12,n,t,o|8),e.elementType=xs,e.type=xs,e.lanes=i,e;case _s:return e=St(13,n,t,o),e.type=_s,e.elementType=_s,e.lanes=i,e;case Ql:return e=St(19,n,t,o),e.elementType=Ql,e.lanes=i,e;case Tp:return im(n,o,i,t);case Lf:return e=St(24,n,t,o),e.elementType=Lf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _p:s=10;break e;case wp:s=9;break e;case xu:s=11;break e;case _u:s=14;break e;case Ep:s=16,r=null;break e;case Cp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function zo(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function im(e,t,n,r){return e=St(23,e,r,t),e.elementType=Tp,e.lanes=n,e}function Pf(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function Rf(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ZT(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=pf(0),this.expirationTimes=pf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pf(0),this.mutableSourceEagerHydrationData=null}function JT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ur,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vu(e,t,n,r){var o=t.current,i=nt(),s=tr(o);e:if(n){n=n._reactInternals;t:{if(Zr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ge(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ge(l)){n=jS(n,l,a);break e}}n=a}else n=sr;return t.context===null?t.context=n:t.pendingContext=n,t=Jn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),er(o,t),nr(o,s,i),s}function If(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 Xv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sm(e,t){Xv(e,t),(e=e.alternate)&&Xv(e,t)}function ek(){return null}function am(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new ZT(e,t,n!=null&&n.hydrate===!0),t=St(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Wp(t),e[Go]=n.current,OS(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}am.prototype.render=function(e){vu(e,this._internalRoot,null,null)};am.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;vu(null,e,null,function(){t[Go]=null})};function Qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tk(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 am(e,0,t?{hydrate:!0}:void 0)}function Au(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=If(s);a.call(u)}}vu(t,s,e,o)}else{if(i=n._reactRootContainer=tk(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=If(s);l.call(u)}}g0(function(){vu(t,s,e,o)})}return If(s)}fS=function(e){if(e.tag===13){var t=nt();nr(e,4,t),sm(e,4)}};Lp=function(e){if(e.tag===13){var t=nt();nr(e,67108864,t),sm(e,67108864)}};pS=function(e){if(e.tag===13){var t=nt(),n=tr(e);nr(e,n,t),sm(e,n)}};mS=function(e,t){return t()};Uf=function(e,t,n){switch(t){case"input":if(Of(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=ku(r);if(!o)throw Error(T(90));Jv(r),Of(r,o)}}}break;case"textarea":tS(e,n);break;case"select":t=n.value,t!=null&&No(e,!!n.multiple,t,!1)}};Pp=m0;lS=function(e,t,n,r,o){var i=F;F|=4;try{return Gr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(Yo(),nn())}};Rp=function(){!(F&49)&&(UT(),cr())};uS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(Yo(),nn())}};function w0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qs(t))throw Error(T(200));return JT(e,t,null,n)}var nk={Events:[qs,Io,ku,sS,aS,cr,{current:!1}]},ps={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},rk={bundleType:ps.bundleType,version:ps.version,rendererPackageName:ps.rendererPackageName,rendererConfig:ps.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dS(e),e===null?null:e.stateNode},findFiberByHostInstance:ps.findFiberByHostInstance||ek,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ms=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ms.isDisabled&&ms.supportsFiber))try{Up=ms.inject(rk),$r=ms}catch{}var ms;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nk;Et.createPortal=w0;Et.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(T(188)):Error(T(268,Object.keys(e)));return e=dS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Gr(99,e.bind(null,t))}finally{F=n,nn()}};Et.hydrate=function(e,t,n){if(!Qs(t))throw Error(T(200));return Au(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Qs(t))throw Error(T(200));return Au(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Qs(e))throw Error(T(40));return e._reactRootContainer?(g0(function(){Au(null,null,e,!1,function(){e._reactRootContainer=null,e[Go]=null})}),!0):!1};Et.unstable_batchedUpdates=m0;Et.unstable_createPortal=function(e,t){return w0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Au(e,t,n,!1,r)};Et.version="17.0.2"});var Ou=pe((eN,b0)=>{"use strict";function C0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C0)}catch(e){console.error(e)}}C0(),b0.exports=E0()});var J0=pe(Z0=>{"use strict";var ri=O();function Uk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zk=typeof Object.is=="function"?Object.is:Uk,Vk=ri.useState,Kk=ri.useEffect,Wk=ri.useLayoutEffect,$k=ri.useDebugValue;function qk(e,t){var n=t(),r=Vk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Wk(function(){o.value=n,o.getSnapshot=t,Nm(o)&&i({inst:o})},[e,n,t]),Kk(function(){return Nm(o)&&i({inst:o}),e(function(){Nm(o)&&i({inst:o})})},[e]),$k(n),n}function Nm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zk(e,n)}catch{return!0}}function Gk(e,t){return t()}var Xk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gk:qk;Z0.useSyncExternalStore=ri.useSyncExternalStore!==void 0?ri.useSyncExternalStore:Xk});var Mm=pe((UN,ex)=>{"use strict";ex.exports=J0()});var nx=pe(tx=>{"use strict";var Uu=O(),Qk=Mm();function Yk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zk=typeof Object.is=="function"?Object.is:Yk,Jk=Qk.useSyncExternalStore,eP=Uu.useRef,tP=Uu.useEffect,nP=Uu.useMemo,rP=Uu.useDebugValue;tx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=eP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=nP(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var S=s.value;if(o(S,y))return f=S}return f=y}if(S=f,Zk(c,y))return S;var h=r(y);return o!==void 0&&o(S,h)?S:(c=y,f=h)}var u=!1,c,f,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=Jk(e,i[0],i[1]);return tP(function(){s.hasValue=!0,s.value=a},[a]),rP(a),a}});var ox=pe((VN,rx)=>{"use strict";rx.exports=nx()});var gx=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Fm=_e?Symbol.for("react.element"):60103,jm=_e?Symbol.for("react.portal"):60106,Wu=_e?Symbol.for("react.fragment"):60107,$u=_e?Symbol.for("react.strict_mode"):60108,qu=_e?Symbol.for("react.profiler"):60114,Gu=_e?Symbol.for("react.provider"):60109,Xu=_e?Symbol.for("react.context"):60110,Hm=_e?Symbol.for("react.async_mode"):60111,Qu=_e?Symbol.for("react.concurrent_mode"):60111,Yu=_e?Symbol.for("react.forward_ref"):60112,Zu=_e?Symbol.for("react.suspense"):60113,aP=_e?Symbol.for("react.suspense_list"):60120,Ju=_e?Symbol.for("react.memo"):60115,ec=_e?Symbol.for("react.lazy"):60116,lP=_e?Symbol.for("react.block"):60121,uP=_e?Symbol.for("react.fundamental"):60117,cP=_e?Symbol.for("react.responder"):60118,dP=_e?Symbol.for("react.scope"):60119;function it(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fm:switch(e=e.type,e){case Hm:case Qu:case Wu:case qu:case $u:case Zu:return e;default:switch(e=e&&e.$$typeof,e){case Xu:case Yu:case ec:case Ju:case Gu:return e;default:return t}}case jm:return t}}}function mx(e){return it(e)===Qu}Q.AsyncMode=Hm;Q.ConcurrentMode=Qu;Q.ContextConsumer=Xu;Q.ContextProvider=Gu;Q.Element=Fm;Q.ForwardRef=Yu;Q.Fragment=Wu;Q.Lazy=ec;Q.Memo=Ju;Q.Portal=jm;Q.Profiler=qu;Q.StrictMode=$u;Q.Suspense=Zu;Q.isAsyncMode=function(e){return mx(e)||it(e)===Hm};Q.isConcurrentMode=mx;Q.isContextConsumer=function(e){return it(e)===Xu};Q.isContextProvider=function(e){return it(e)===Gu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm};Q.isForwardRef=function(e){return it(e)===Yu};Q.isFragment=function(e){return it(e)===Wu};Q.isLazy=function(e){return it(e)===ec};Q.isMemo=function(e){return it(e)===Ju};Q.isPortal=function(e){return it(e)===jm};Q.isProfiler=function(e){return it(e)===qu};Q.isStrictMode=function(e){return it(e)===$u};Q.isSuspense=function(e){return it(e)===Zu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wu||e===Qu||e===qu||e===$u||e===Zu||e===aP||typeof e=="object"&&e!==null&&(e.$$typeof===ec||e.$$typeof===Ju||e.$$typeof===Gu||e.$$typeof===Xu||e.$$typeof===Yu||e.$$typeof===uP||e.$$typeof===cP||e.$$typeof===dP||e.$$typeof===lP)};Q.typeOf=it});var yx=pe((rM,hx)=>{"use strict";hx.exports=gx()});var Cx=pe((oM,Ex)=>{"use strict";var Bm=yx(),fP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_x={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Um={};Um[Bm.ForwardRef]=mP;Um[Bm.Memo]=_x;function vx(e){return Bm.isMemo(e)?_x:Um[e.$$typeof]||fP}var gP=Object.defineProperty,hP=Object.getOwnPropertyNames,Sx=Object.getOwnPropertySymbols,yP=Object.getOwnPropertyDescriptor,vP=Object.getPrototypeOf,xx=Object.prototype;function wx(e,t,n){if(typeof t!="string"){if(xx){var r=vP(t);r&&r!==xx&&wx(e,r,n)}var o=hP(t);Sx&&(o=o.concat(Sx(t)));for(var i=vx(e),s=vx(t),a=0;a<o.length;++a){var l=o[a];if(!pP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=yP(t,l);try{gP(e,l,u)}catch{}}}}return e}Ex.exports=wx});var Tx=pe(Y=>{"use strict";var zm=Symbol.for("react.element"),Vm=Symbol.for("react.portal"),tc=Symbol.for("react.fragment"),nc=Symbol.for("react.strict_mode"),rc=Symbol.for("react.profiler"),oc=Symbol.for("react.provider"),ic=Symbol.for("react.context"),SP=Symbol.for("react.server_context"),sc=Symbol.for("react.forward_ref"),ac=Symbol.for("react.suspense"),lc=Symbol.for("react.suspense_list"),uc=Symbol.for("react.memo"),cc=Symbol.for("react.lazy"),xP=Symbol.for("react.offscreen"),bx;bx=Symbol.for("react.module.reference");function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case zm:switch(e=e.type,e){case tc:case rc:case nc:case ac:case lc:return e;default:switch(e=e&&e.$$typeof,e){case SP:case ic:case sc:case cc:case uc:case oc:return e;default:return t}}case Vm:return t}}}Y.ContextConsumer=ic;Y.ContextProvider=oc;Y.Element=zm;Y.ForwardRef=sc;Y.Fragment=tc;Y.Lazy=cc;Y.Memo=uc;Y.Portal=Vm;Y.Profiler=rc;Y.StrictMode=nc;Y.Suspense=ac;Y.SuspenseList=lc;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return bt(e)===ic};Y.isContextProvider=function(e){return bt(e)===oc};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===zm};Y.isForwardRef=function(e){return bt(e)===sc};Y.isFragment=function(e){return bt(e)===tc};Y.isLazy=function(e){return bt(e)===cc};Y.isMemo=function(e){return bt(e)===uc};Y.isPortal=function(e){return bt(e)===Vm};Y.isProfiler=function(e){return bt(e)===rc};Y.isStrictMode=function(e){return bt(e)===nc};Y.isSuspense=function(e){return bt(e)===ac};Y.isSuspenseList=function(e){return bt(e)===lc};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===tc||e===rc||e===nc||e===ac||e===lc||e===xP||typeof e=="object"&&e!==null&&(e.$$typeof===cc||e.$$typeof===uc||e.$$typeof===oc||e.$$typeof===ic||e.$$typeof===sc||e.$$typeof===bx||e.getModuleId!==void 0)};Y.typeOf=bt});var Px=pe((sM,kx)=>{"use strict";kx.exports=Tx()});var h_=pe((uD,g_)=>{"use strict";var ZP=/["'&<>]/;g_.exports=JP;function JP(e){var t=""+e,n=ZP.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=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";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 Bg=pe((C8,Kw)=>{"use strict";var KR="Expected a function",zw=NaN,WR="[object Symbol]",$R=/^\s+|\s+$/g,qR=/^[-+]0x[0-9a-f]+$/i,GR=/^0b[01]+$/i,XR=/^0o[0-7]+$/i,QR=parseInt,YR=typeof global=="object"&&global&&global.Object===Object&&global,ZR=typeof self=="object"&&self&&self.Object===Object&&self,JR=YR||ZR||Function("return this")(),eI=Object.prototype,tI=eI.toString,nI=Math.max,rI=Math.min,jg=function(){return JR.Date.now()};function oI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(KR);t=Vw(t)||0,Hg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?nI(Vw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(E){var b=r,R=o;return r=o=void 0,u=E,s=e.apply(R,b),s}function S(E){return u=E,a=setTimeout(m,t),c?y(E):s}function h(E){var b=E-l,R=E-u,P=t-b;return f?rI(P,i-R):P}function g(E){var b=E-l,R=E-u;return l===void 0||b>=t||b<0||f&&R>=i}function m(){var E=jg();if(g(E))return p(E);a=setTimeout(m,h(E))}function p(E){return a=void 0,d&&r?y(E):(r=o=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(jg())}function C(){var E=jg(),b=g(E);if(r=arguments,o=this,l=E,b){if(a===void 0)return S(l);if(f)return a=setTimeout(m,t),y(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=v,C.flush=_,C}function Hg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function iI(e){return!!e&&typeof e=="object"}function sI(e){return typeof e=="symbol"||iI(e)&&tI.call(e)==WR}function Vw(e){if(typeof e=="number")return e;if(sI(e))return zw;if(Hg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace($R,"");var n=GR.test(e);return n||XR.test(e)?QR(e.slice(2),n?2:8):qR.test(e)?zw:+e}Kw.exports=oI});var GL={};Ce(GL,{Card:()=>me,Chip:()=>dy,ContentEditableInput:()=>fo,DeepdeskAPI:()=>Bn,DeepdeskSDK:()=>Va,HTTPClient:()=>qt,InputMediator:()=>Tn,InputType:()=>Vn,KeyboardHint:()=>yl,Label:()=>vl,Locale:()=>oa,Section:()=>zn,SectionList:()=>Sl,Sources:()=>Nt,Suggestion:()=>oe,SuggestionList:()=>ht,TextAreaInput:()=>kn,ToggleButton:()=>jr,attachFile:()=>pC,authenticateWithKey:()=>dC,createFullRange:()=>Fi,createOverlayContainer:()=>so,createRangeFromOffsets:()=>Lr,escapeHTML:()=>Ii,fetchPlatformConfig:()=>fC,formatTextMarkup:()=>cC,getRangeOffsets:()=>Ha,getRangeText:()=>Ba,insertCKEditor:()=>uC,isSupportedInputElement:()=>Rd,updateContentEditable:()=>lC,updateTextArea:()=>aC,useStyles:()=>k,waitForElementVisibilityChange:()=>Id});var Ja=x(X()),pt=x(O());var Ya=x(O()),Gh=x(X()),$i=Ya.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Ya.useContext)($i),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Gh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Xh={root:"_root_vr71j_1"};var Mr=x(w()),Za=()=>(0,Mr.jsxs)("svg",{className:Xh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Mr.jsx)("defs",{children:(0,Mr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Mr.jsx)("title",{children:"Failed loading image"}),(0,Mr.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 jd={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Dr=x(w()),el=(0,pt.createContext)(jd),OC=({title:e,src:t})=>{let n=(0,pt.useContext)(el),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Dr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Dr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Dr.jsx)(Za,{})})},NC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(el);return(0,Dr.jsx)("div",{className:(0,Ja.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},MC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(el);return pt.default.createElement(e,{className:(0,Ja.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},tl=({children:e})=>{let t=k("Card",jd);return(0,Dr.jsx)("div",{className:(0,Ja.default)(t.root),children:(0,Dr.jsx)(el.Provider,{value:t,children:e})})};tl.Image=OC;tl.Content=NC;tl.Title=MC;var me=tl;var ey={root:"_root_nkim0_1"};var gl=x(O());var Hd=function(e,t){return Hd=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])},Hd(e,t)};function Gi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tt=function(){return tt=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},tt.apply(this,arguments)};function ty(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 nl(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 rl;(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"})(rl||(rl={}));var ol=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Ot;(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"})(Ot||(Ot={}));var il;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(il||(il={}));function Bd(e){return e.type===Ot.literal}function ny(e){return e.type===Ot.argument}function sl(e){return e.type===Ot.number}function al(e){return e.type===Ot.date}function ll(e){return e.type===Ot.time}function ul(e){return e.type===Ot.select}function cl(e){return e.type===Ot.plural}function ry(e){return e.type===Ot.pound}function dl(e){return e.type===Ot.tag}function fl(e){return!!(e&&typeof e=="object"&&e.type===il.number)}function Xi(e){return!!(e&&typeof e=="object"&&e.type===il.dateTime)}function Ud(e){e.forEach(function(t){if(delete t.location,ul(t)||cl(t))for(var n in t.options)delete t.options[n].location,Ud(t.options[n].value);else sl(t)&&fl(t.style)||(al(t)||ll(t))&&Xi(t.style)?delete t.style.location:dl(t)&&Ud(t.children)})}function oy(e,t){t===void 0&&(t={}),t=tt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ol(e,t).parse();if(n.err){var r=SyntaxError(rl[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ud(n.val),n.val}function pl(e,t){var n=t&&t.cache?t.cache:UC,r=t&&t.serializer?t.serializer:BC,o=t&&t.strategy?t.strategy:FC;return o(e,{cache:n,serializer:r})}function DC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function iy(e,t,n,r){var o=DC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function sy(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 zd(e,t,n,r,o){return n.bind(t,e,r,o)}function FC(e,t){var n=e.length===1?iy:sy;return zd(e,this,n,t.cache.create(),t.serializer)}function jC(e,t){return zd(e,this,sy,t.cache.create(),t.serializer)}function HC(e,t){return zd(e,this,iy,t.cache.create(),t.serializer)}var BC=function(){return JSON.stringify(arguments)};function Vd(){this.cache=Object.create(null)}Vd.prototype.get=function(e){return this.cache[e]};Vd.prototype.set=function(e,t){this.cache[e]=t};var UC={create:function(){return new Vd}},ml={variadic:jC,monadic:HC};var Fr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Fr||(Fr={}));var Qi=function(e){Gi(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 Kd=function(e){Gi(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('", "'),'"'),Fr.INVALID_VALUE,i)||this}return t}(Qi);var ay=function(e){Gi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Fr.INVALID_VALUE,o)||this}return t}(Qi);var ly=function(e){Gi(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,'"'),Fr.MISSING_VALUE,r)||this}return t}(Qi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function zC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function VC(e){return typeof e=="function"}function Yi(e,t,n,r,o,i,s){if(e.length===1&&Bd(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Bd(c)){a.push({type:Re.literal,value:c.value});continue}if(ry(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new ly(f,s);var d=o[f];if(ny(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(al(c)){var y=typeof c.style=="string"?r.date[c.style]:Xi(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(ll(c)){var y=typeof c.style=="string"?r.time[c.style]:Xi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(sl(c)){var y=typeof c.style=="string"?r.number[c.style]:fl(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(dl(c)){var S=c.children,h=c.value,g=o[h];if(!VC(g))throw new ay(h,"function",s);var m=Yi(S,t,n,r,o,i),p=g(m.map(function(C){return C.value}));Array.isArray(p)||(p=[p]),a.push.apply(a,p.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(ul(c)){var v=c.options[d]||c.options.other;if(!v)throw new Kd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Yi(v.value,t,n,r,o));continue}if(cl(c)){var v=c.options["=".concat(d)];if(!v){if(!Intl.PluralRules)throw new Qi(`Intl.PluralRules is not available in this environment.
|
|
10
10
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
11
|
-
`,Fr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));v=c.options[_]||c.options.other}if(!v)throw new Kd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Yi(v.value,t,n,r,o,d-(c.offset||0)));continue}}return UC(a)}function VC(e,t){return t?tt(tt(tt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=tt(tt({},e[r]),t[r]||{}),n},{})):e}function KC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=VC(e[r],t[r]),n},tt({},e)):e}function Wd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function WC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.number),strategy:ml.variadic}),getDateTimeFormat:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.dateTime),strategy:ml.variadic}),getPluralRules:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.pluralRules),strategy:ml.variadic})}}var uy=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 f=c.reduce(function(d,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Yi(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=ty(s,["formatters"]);this.ast=e.__parse(t,tt(tt({},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=KC(e.formats,r),this.formatters=o&&o.formatters||WC(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=oy,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 $C(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var qC="dummy",$d=(0,gl.createContext)(null);function j(e){let t=(0,gl.useContext)($d);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=$C(n,r);return i?new uy(i).format(o):(t!==qC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var qd={};Ce(qd,{enUS:()=>GC,nlNL:()=>XC});var GC={experimental:[{type:0,value:"Experimental"}]},XC={experimental:[{type:0,value:"Experimenteel"}]};var Gd=x(w()),cy=({children:e})=>{let t=k("Chip",ey);return(0,Gd.jsx)("span",{className:t.root,children:e})},hl=()=>{let e=j(qd);return(0,Gd.jsx)(cy,{children:e("experimental")})},dy=cy;var py=x(X());var fy={root:"_root_cq1yq_1"};var my=x(w());var QC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},YC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",fy);return(0,my.jsx)("span",{"data-key":QC[t],className:(0,py.default)(e,r.root),...n})},yl=YC;var hy=x(X());var gy={root:"_root_4a08n_1"};var yy=x(w()),ZC=({className:e,children:t,...n})=>{let r=k("Label",gy);return(0,yy.jsx)("span",{...n,className:(0,hy.default)(e,r.root),children:t})},vl=ZC;var vy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var yo=x(w()),JC=({title:e,children:t,type:n,...r})=>{let o=k("Section",vy);return(0,yo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,yo.jsx)("div",{className:o.subTitleContainer,children:(0,yo.jsx)("span",{className:o.subtitle,children:e})}),(0,yo.jsx)("div",{className:o.suggestions,children:t})]})},zn=JC;var xy=x(X()),_y=x(O());var Sy={root:"_root_19wxp_1"};var wy=x(w()),eb=_y.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",Sy);return(0,wy.jsx)("div",{ref:n,className:(0,xy.default)(r.root,e),children:t})}),Sl=eb;var Zi=x(X()),gt=x(O());var Xd={root:"_root_fsa1k_10",fadein:"_fadein_fsa1k_1",isClickable:"_isClickable_fsa1k_45",isSelected:"_isSelected_fsa1k_50",actions:"_actions_fsa1k_74",actionsIsFixed:"_actionsIsFixed_fsa1k_96",actionButton:"_actionButton_fsa1k_104",dropdownList:"_dropdownList_fsa1k_125",dropdownButton:"_dropdownButton_fsa1k_140",dropdownItem:"_dropdownItem_fsa1k_150",dropdownItemButton:"_dropdownItemButton_fsa1k_159",actionButtonIsPrimary:"_actionButtonIsPrimary_fsa1k_173",actionButtonIsDisabled:"_actionButtonIsDisabled_fsa1k_177",labels:"_labels_fsa1k_185",label:"_label_fsa1k_185"};var mt=x(w()),vo=(0,gt.createContext)(Xd),tb=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(vo);return(0,mt.jsx)("div",{...n,className:(0,Zi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},nb=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(vo);return(0,mt.jsxs)("div",{className:(0,Zi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},rb=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(vo);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},ob=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(vo);return(0,mt.jsx)("button",{type:"button",className:(0,Zi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Qd=({labels:e})=>{let t=(0,gt.useContext)(vo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},So=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Xd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Zi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(vo.Provider,{value:a,children:r})})});So.Labels=Qd;So.Actions=tb;So.ActionButton=ob;So.DropdownButton=nb;So.DropdownItem=rb;var oe=So;var Cy=x(X());var Ey={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var by=x(w()),ib=({withDivider:e,children:t})=>{let n=k("SuggestionList",Ey);return(0,by.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Cy.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=ib;var ky=x(X());var Ty={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var xl=x(w()),sb=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Ty);return(0,xl.jsx)("button",{type:"button",className:(0,ky.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,xl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,xl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},jr=sb;var Py=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,xo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Ry=/x-deepdesk-(([a-z0-9\-_])+-version)/,Nt=(h=>(h.SEARCH="search",h.TEMPLATE="template",h.ELASTIC_SEARCH="search-autocomplete",h.GPT="gpt",h.TRIE="trie",h.TRIE_WITH_TYPOS="trie-with-typos",h.SEMANTIC="semantic",h.TEXT_RECOMMENDATION="text_recommendation",h.URL_RECOMMENDATION="url_recommendation",h.LINK_RECOMMENDATION="link_recommendation",h.PERSONAL_COLLECTION="personal-collection",h.PERSONAL_COLLECTION_SEARCH="personal-collection-search",h.SEARCH_OVERLAY="search-overlay",h.SEARCH_PREVIEW="search-preview",h.SEARCH_URL="search-url",h))(Nt||{}),Vn=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Vn||{});var Gt=x(Ou());var m1=x(O());function Ct(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 Sn(e){return!!e&&!!e[le]}function jt(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)===ck}(e)||Array.isArray(e)||!!e[A0]||!!(!((t=e.constructor)===null||t===void 0)&&t[A0])||hm(e)||ym(e))}function eo(e,t,n){n===void 0&&(n=!1),ei(e)===0?(n?Object.keys:Jo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function ei(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:hm(e)?2:ym(e)?3:0}function Zo(e,t){return ei(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rk(e,t){return ei(e)===2?e.get(t):e[t]}function O0(e,t,n){var r=ei(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function N0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function hm(e){return lk&&e instanceof Map}function ym(e){return uk&&e instanceof Set}function dr(e){return e.o||e.t}function vm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=F0(e);delete t[le];for(var n=Jo(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 Sm(e,t){return t===void 0&&(t=!1),xm(e)||Sn(e)||!jt(e)||(ei(e)>1&&(e.set=e.add=e.clear=e.delete=ok),Object.freeze(e),t&&eo(e,function(n,r){return Sm(r,!0)},!0)),e}function ok(){Ct(2)}function xm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=gm[e];return t||Ct(18,e),t}function ik(e,t){gm[e]||(gm[e]=t)}function fm(){return Zs}function lm(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function Nu(e){pm(e),e.p.forEach(sk),e.p=null}function pm(e){e===Zs&&(Zs=e.l)}function T0(e){return Zs={p:[],l:Zs,h:e,m:!0,_:0}}function sk(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function um(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||rn("ES5").S(t,e,r),r?(n[le].P&&(Nu(t),Ct(4)),jt(e)&&(e=Mu(t,e),t.l||Du(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=Mu(t,n,[]),Nu(t),t.u&&t.v(t.u,t.s),e!==D0?e:void 0}function Mu(e,t,n){if(xm(t))return t;var r=t[le];if(!r)return eo(t,function(a,l){return k0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Du(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=vm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),eo(i,function(a,l){return k0(e,r,o,a,l,n,s)}),Du(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function k0(e,t,n,r,o,i,s){if(Sn(o)){var a=Mu(e,o,i&&t&&t.i!==3&&!Zo(t.R,r)?i.concat(r):void 0);if(O0(n,r,a),!Sn(a))return;e.m=!1}else s&&n.add(o);if(jt(o)&&!xm(o)){if(!e.h.D&&e._<1)return;Mu(e,o),t&&t.A.l||Du(e,o)}}function Du(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Sm(t,n)}function cm(e,t){var n=e[le];return(n?dr(n):e)[t]}function P0(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 fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function dm(e){e.o||(e.o=vm(e.t))}function mm(e,t,n){var r=hm(t)?rn("MapSet").F(t,n):ym(t)?rn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:fm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Js;s&&(l=[a],u=Ys);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):rn("ES5").J(t,n);return(n?n.A:fm()).p.push(r),r}function ak(e){return Sn(e)||Ct(22,e),function t(n){if(!jt(n))return n;var r,o=n[le],i=ei(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=R0(n,i),o.I=!1}else r=R0(n,i);return eo(r,function(s,a){o&&rk(o.t,s)===a||O0(r,s,t(a))}),i===3?new Set(r):r}(e)}function R0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return vm(e)}function M0(){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[le];return Js.get(u,s)},set:function(u){var c=this[le];Js.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&fr(l);break;case 4:n(l)&&fr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Jo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Zo(a,f))return!0;var y=l[f],S=y&&y[le];if(S?S.t!==d:!N0(y,d))return!0}}var h=!!a[le];return u.length!==Jo(a).length+(h?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&&Ct(3,JSON.stringify(dr(s)))}var i={};ik("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),S=0;S<d.length;S++)Object.defineProperty(y,""+S,e(S,!0));return y}var h=F0(d);delete h[le];for(var g=Jo(h),m=0;m<g.length;m++){var p=g[m];h[p]=e(p,f||!!h[p].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:fm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?Sn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[le];if(f){var d=f.t,y=f.k,S=f.R,h=f.i;if(h===4)eo(y,function(_){_!==le&&(d[_]!==void 0||Zo(d,_)?S[_]||u(y[_]):(S[_]=!0,fr(f)))}),eo(d,function(_){y[_]!==void 0||Zo(y,_)||(S[_]=!1,fr(f))});else if(h===5){if(r(f)&&(fr(f),S.length=!0),y.length<d.length)for(var g=y.length;g<d.length;g++)S[g]=!1;else for(var m=d.length;m<y.length;m++)S[m]=!0;for(var p=Math.min(y.length,d.length),v=0;v<p;v++)y.hasOwnProperty(v)||(S[v]=!0),S[v]===void 0&&u(y[v])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var I0,Zs,_m=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",lk=typeof Map<"u",uk=typeof Set<"u",L0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",D0=_m?Symbol.for("immer-nothing"):((I0={})["immer-nothing"]=!0,I0),A0=_m?Symbol.for("immer-draftable"):"__$immer_draftable",le=_m?Symbol.for("immer-state"):"__$immer_state";var ck=""+Object.prototype.constructor,Jo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,F0=Object.getOwnPropertyDescriptors||function(e){var t={};return Jo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},gm={},Js={get:function(e,t){if(t===le)return e;var n=dr(e);if(!Zo(n,t))return function(o,i,s){var a,l=P0(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||!jt(r)?r:r===cm(e.t,t)?(dm(e),e.o[t]=mm(e.A.h,r,e)):r},has:function(e,t){return t in dr(e)},ownKeys:function(e){return Reflect.ownKeys(dr(e))},set:function(e,t,n){var r=P0(dr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=cm(dr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(N0(n,o)&&(n!==void 0||Zo(e.t,t)))return!0;dm(e),fr(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 cm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,dm(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=dr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Ys={};eo(Js,function(e,t){Ys[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ys.deleteProperty=function(e,t){return Ys.set.call(this,e,t,void 0)},Ys.set=function(e,t,n){return Js.set.call(this,e[0],t,n,e[0])};var dk=function(){function e(n){var r=this;this.O=L0,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(h){var g=this;h===void 0&&(h=a);for(var m=arguments.length,p=Array(m>1?m-1:0),v=1;v<m;v++)p[v-1]=arguments[v];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[g,_].concat(p))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),jt(o)){var c=T0(r),f=mm(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Nu(c):pm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return lm(c,s),um(h,c)},function(h){throw Nu(c),h}):(lm(c,s),um(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===D0&&(u=void 0),r.D&&Sm(u,!0),s){var y=[],S=[];rn("Patches").M(o,u,y,S),s(y,S)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(y){return o.apply(void 0,[y].concat(f))})};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){jt(n)||Ct(8),Sn(n)&&(n=ak(n));var r=T0(this),o=mm(this,n,void 0);return o[le].C=!0,pm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return lm(i,r),um(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!L0&&Ct(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=rn("Patches").$;return Sn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),ot=new dk,fk=ot.produce,tN=ot.produceWithPatches.bind(ot),nN=ot.setAutoFreeze.bind(ot),rN=ot.setUseProxies.bind(ot),oN=ot.applyPatches.bind(ot),iN=ot.createDraft.bind(ot),sN=ot.finishDraft.bind(ot),Fu=fk;function pr(e){"@babel/helpers - typeof";return pr=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},pr(e)}function wm(e,t){if(pr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Em(e){var t=wm(e,"string");return pr(t)==="symbol"?t:String(t)}function Cm(e,t,n){return t=Em(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j0(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 ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(n),!0).forEach(function(r){Cm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 H0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),bm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Hu={INIT:"@@redux/INIT"+bm(),REPLACE:"@@redux/REPLACE"+bm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+bm()}};function pk(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 Tm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(Tm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function f(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Me(6));g=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!pk(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var p=g[m];p()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Hu.REPLACE})}function S(){var h,g=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Me(11));function v(){p.next&&p.next(c())}v();var _=g(v);return{unsubscribe:_}}},h[H0]=function(){return this},h}return d({type:Hu.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[H0]=S,r}function mk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Hu.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Hu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Bu(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{mk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,y={},S=0;S<i.length;S++){var h=i[S],g=n[h],m=u[h],p=g(m,c);if(typeof p>"u"){var v=c&&c.type;throw new Error(Me(14))}y[h]=p,d=d||p!==m}return d=d||i.length!==Object.keys(u).length,d?y:u}}function ti(){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 B0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ti.apply(void 0,a)(o.dispatch),ju(ju({},o),{},{dispatch:i})}}}function U0(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 z0=U0();z0.withExtraArgument=U0;var km=z0;var q0=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)}}(),gk=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}}},ni=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},hk=Object.defineProperty,yk=Object.defineProperties,vk=Object.getOwnPropertyDescriptors,V0=Object.getOwnPropertySymbols,Sk=Object.prototype.hasOwnProperty,xk=Object.prototype.propertyIsEnumerable,K0=function(e,t,n){return t in e?hk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},mr=function(e,t){for(var n in t||(t={}))Sk.call(t,n)&&K0(e,n,t[n]);if(V0)for(var r=0,o=V0(t);r<o.length;r++){var n=o[r];xk.call(t,n)&&K0(e,n,t[n])}return e},Pm=function(e,t){return yk(e,vk(t))},_k=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 wk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ti:ti.apply(null,arguments)},CN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ek(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 Ck=function(e){q0(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,ni([void 0],n[0].concat(this)))):new(t.bind.apply(t,ni([void 0],n.concat(this))))},t}(Array),bk=function(e){q0(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,ni([void 0],n[0].concat(this)))):new(t.bind.apply(t,ni([void 0],n.concat(this))))},t}(Array);function Lm(e){return jt(e)?Fu(e,function(){}):e}function Tk(e){return typeof e=="boolean"}function kk(){return function(t){return Pk(t)}}function Pk(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 Ck;if(n&&(Tk(n)?a.push(km):a.push(km.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Rm=!0;function G0(e){var t=kk(),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,f=n.enhancers,d=f===void 0?void 0:f,y;if(typeof o=="function")y=o;else if(Ek(o))y=Bu(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 S=s;if(typeof S=="function"&&(S=S(t),!Rm&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Rm&&S.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=B0.apply(void 0,S),g=ti;l&&(g=wk(mr({trace:!Rm},typeof l=="object"&&l)));var m=new bk(h),p=m;Array.isArray(d)?p=ni([h],d):typeof d=="function"&&(p=d(m));var v=g.apply(void 0,p);return Tm(y,c,v)}function fe(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 mr(mr({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 X0(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 Rk(e){return typeof e=="function"}function Ik(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?X0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Rk(e))l=function(){return Lm(e())};else{var u=Lm(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=ni([i[d.type]],s.filter(function(S){var h=S.matcher;return h(d)}).map(function(S){var h=S.reducer;return h}));return y.filter(function(S){return!!S}).length===0&&(y=[a]),y.reduce(function(S,h){if(h)if(Sn(S)){var g=S,m=h(g,d);return m===void 0?S:m}else{if(jt(S))return Fu(S,function(p){return h(p,d)});var m=h(S,d);if(m===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return S},f)}return c.getInitialState=l,c}function Lk(e,t){return e+"/"+t}function H(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:Lm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=Lk(t,c),y,S;"reducer"in f?(y=f.reducer,S=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=S?fe(d,S):fe(d)});function l(){var c=typeof e.extraReducers=="function"?X0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],S=y===void 0?[]:y,h=c[2],g=h===void 0?void 0:h,m=mr(mr({},d),s);return Ik(n,function(p){for(var v in m)p.addCase(v,m[v]);for(var _=0,C=S;_<C.length;_++){var E=C[_];p.addMatcher(E.matcher,E.reducer)}g&&p.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var Ak="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ok=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Ak[Math.random()*64|0];return t},Nk=["name","message","stack","code"],Im=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),W0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Mk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Nk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,f,d,y){return{payload:c,meta:Pm(mr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:Pm(mr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,S){return{payload:y,error:(r&&r.serializeError||Mk)(c||"Rejected"),meta:Pm(mr({},S||{}),{arg:d,requestId:f,rejectedWithValue:!!y,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(f,d,y){var S=r!=null&&r.idGenerator?r.idGenerator(c):Ok(),h=new l,g,m=!1;function p(_){g=_,h.abort()}var v=function(){return _k(this,null,function(){var _,C,E,b,R,P,N;return gk(this,function(G){switch(G.label){case 0:return G.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),Fk(b)?[4,b]:[3,2];case 1:b=G.sent(),G.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(V,He){return h.signal.addEventListener("abort",function(){return He({name:"AbortError",message:g||"Aborted"})})}),f(i(S,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:S,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:S,signal:h.signal,abort:p,rejectWithValue:function(V,He){return new Im(V,He)},fulfillWithValue:function(V,He){return new W0(V,He)}})).then(function(V){if(V instanceof Im)throw V;return V instanceof W0?o(V.payload,S,c,V.meta):o(V,S,c)})])];case 3:return E=G.sent(),[3,5];case 4:return P=G.sent(),E=P instanceof Im?s(null,S,c,P.payload,P.meta):s(P,S,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||f(E),[2,E]}})})}();return Object.assign(v,{abort:p,requestId:S,arg:c,unwrap:function(){return v.then(Dk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Dk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Fk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jk="task",Q0="listener",Y0="completed",Am="cancelled",PN="task-"+Am,RN="task-"+Y0,IN=Q0+"-"+Am,LN=Q0+"-"+Y0,AN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=jk+" "+Am+" (reason: "+t+")"}return e}();var Om="listenerMiddleware";var ON=fe(Om+"/add"),NN=fe(Om+"/removeAll"),MN=fe(Om+"/remove");var $0,DN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return($0||($0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Hk=function(e){return function(t){setTimeout(t,e)}},FN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Hk(10);M0();var Hx=x(Mm()),Bx=x(ox());var Dm=x(Ou());function rP(e){e()}var ix=rP,sx=e=>ix=e,ax=()=>ix;var oi=x(O());var cx=x(O());var zu=x(O()),lx=Symbol.for(`react-redux-context-${zu.version}`),ux=globalThis;function oP(){let e=ux[lx];return e||(e=(0,zu.createContext)(null),ux[lx]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=oP();return(r,...o)=>Reflect[t](n,...o)}}));function ea(e=De){return function(){return(0,cx.useContext)(e)}}var Vu=ea();var Ku=()=>{throw new Error("uSES not initialized!")};var dx=Ku,fx=e=>{dx=e},iP=(e,t)=>e===t;function px(e=De){let t=e===De?Vu:ea(e);return function(r,o={}){let{equalityFn:i=iP,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),y=(0,oi.useRef)(!0),S=(0,oi.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=dx(u.addNestedSub,l.getState,c||l.getState,S,i);return(0,oi.useDebugValue)(h),h}}var L=px();function xn(){return xn=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},xn.apply(this,arguments)}function ta(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 $m=x(Cx()),Z=x(O()),Mx=x(Px());var _P=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function wP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,v){return l=p,u=v,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function S(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function h(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let p=e(l,u),v=!s(p,c);return c=p,v&&(d=n(c,f,u)),d}function m(p,v){let _=!i(v,u),C=!o(p,l,v,u);return l=p,u=v,_&&C?S():_?h():C?g():d}return function(v,_){return a?m(v,_):y(v,_)}}function Km(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=ta(t,_P),s=n(e,i),a=r(e,i),l=o(e,i);return wP(s,a,l,e,i)}function Wm(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 na(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Rx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function dc(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=Rx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Rx(u),u=i(a,l)),u},i}}function ii(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Ix(e){return e&&typeof e=="object"?na(t=>Wm(e,t)):e?typeof e=="function"?dc(e,"mapDispatchToProps"):ii(e,"mapDispatchToProps"):na(t=>({dispatch:t}))}function Lx(e){return e?typeof e=="function"?dc(e,"mapStateToProps"):ii(e,"mapStateToProps"):na(()=>({}))}function EP(e,t,n){return xn({},n,e,t)}function CP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function Ax(e){return e?typeof e=="function"?CP(e):ii(e,"mergeProps"):()=>EP}function bP(){let e=ax(),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 Ox={notify(){},get:()=>[]};function fc(e,t){let n,r=Ox;function o(f){return l(),r.subscribe(f)}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=bP())}function u(){n&&(n(),n=void 0,r.clear(),r=Ox)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var pc=x(O()),TP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",si=TP?pc.useLayoutEffect:pc.useEffect;function Nx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ai(e,t){if(Nx(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])||!Nx(e[n[o]],t[n[o]]))return!1;return!0}var kP=["reactReduxForwardedRef"],Dx=Ku,Fx=e=>{Dx=e};var PP=[null,null];function RP(e,t,n){si(()=>e(...t),n)}function IP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function LP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,y=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(p){m=p,d=p}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function AP(e,t){return e===t}function OP(e,t,n,{pure:r,areStatesEqual:o=AP,areOwnPropsEqual:i=ai,areStatePropsEqual:s=ai,areMergedPropsEqual:a=ai,forwardRef:l=!1,context:u=De}={}){let c=u,f=Lx(e),d=Ix(t),y=Ax(n),S=!!e;return g=>{let m=g.displayName||g.name||"Component",p=`Connect(${m})`,v={shouldHandleStateChanges:S,displayName:p,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Nr=ta(b,kP);return[b.context,dt,Nr]},[b]),G=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Mx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),V=(0,Z.useContext)(G),He=!!b.store&&!!b.store.getState&&!!b.store.dispatch,un=!!V&&!!V.store,Xt=He?b.store:V.store,mo=un?V.getServerState:Xt.getState,Bi=(0,Z.useMemo)(()=>Km(Xt.dispatch,v),[Xt]),[Ar,Ka]=(0,Z.useMemo)(()=>{if(!S)return PP;let dt=fc(Xt,He?void 0:V.subscription),Nr=dt.notifyNestedSubs.bind(dt);return[dt,Nr]},[Xt,He,V]),Wa=(0,Z.useMemo)(()=>He?V:xn({},V,{subscription:Ar}),[He,V,Ar]),Ui=(0,Z.useRef)(),zi=(0,Z.useRef)(N),cn=(0,Z.useRef)(),Vi=(0,Z.useRef)(!1),Or=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),W=(0,Z.useRef)();si(()=>(I.current=!0,()=>{I.current=!1}),[]);let At=(0,Z.useMemo)(()=>()=>cn.current&&N===zi.current?cn.current:Bi(Xt.getState(),N),[Xt,N]),Un=(0,Z.useMemo)(()=>Nr=>Ar?LP(S,Xt,Ar,Bi,zi,Ui,Vi,I,cn,Ka,Nr):()=>{},[Ar]);RP(IP,[zi,Ui,Vi,N,cn,Ka]);let dn;try{dn=Dx(Un,At,mo?()=>Bi(mo(),N):At)}catch(dt){throw W.current&&(dt.message+=`
|
|
11
|
+
`,Fr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));v=c.options[_]||c.options.other}if(!v)throw new Kd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Yi(v.value,t,n,r,o,d-(c.offset||0)));continue}}return zC(a)}function KC(e,t){return t?tt(tt(tt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=tt(tt({},e[r]),t[r]||{}),n},{})):e}function WC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=KC(e[r],t[r]),n},tt({},e)):e}function Wd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function $C(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.number),strategy:ml.variadic}),getDateTimeFormat:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.dateTime),strategy:ml.variadic}),getPluralRules:pl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,nl([void 0],n,!1)))},{cache:Wd(e.pluralRules),strategy:ml.variadic})}}var uy=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 f=c.reduce(function(d,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Yi(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=ty(s,["formatters"]);this.ast=e.__parse(t,tt(tt({},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=WC(e.formats,r),this.formatters=o&&o.formatters||$C(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=oy,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 qC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var GC="dummy",$d=(0,gl.createContext)(null);function j(e){let t=(0,gl.useContext)($d);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=qC(n,r);return i?new uy(i).format(o):(t!==GC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var qd={};Ce(qd,{enUS:()=>XC,nlNL:()=>QC});var XC={experimental:[{type:0,value:"Experimental"}]},QC={experimental:[{type:0,value:"Experimenteel"}]};var Gd=x(w()),cy=({children:e})=>{let t=k("Chip",ey);return(0,Gd.jsx)("span",{className:t.root,children:e})},hl=()=>{let e=j(qd);return(0,Gd.jsx)(cy,{children:e("experimental")})},dy=cy;var py=x(X());var fy={root:"_root_cq1yq_1"};var my=x(w());var YC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},ZC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",fy);return(0,my.jsx)("span",{"data-key":YC[t],className:(0,py.default)(e,r.root),...n})},yl=ZC;var hy=x(X());var gy={root:"_root_4a08n_1"};var yy=x(w()),JC=({className:e,children:t,...n})=>{let r=k("Label",gy);return(0,yy.jsx)("span",{...n,className:(0,hy.default)(e,r.root),children:t})},vl=JC;var vy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var yo=x(w()),eb=({title:e,children:t,type:n,...r})=>{let o=k("Section",vy);return(0,yo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,yo.jsx)("div",{className:o.subTitleContainer,children:(0,yo.jsx)("span",{className:o.subtitle,children:e})}),(0,yo.jsx)("div",{className:o.suggestions,children:t})]})},zn=eb;var xy=x(X()),_y=x(O());var Sy={root:"_root_19wxp_1"};var wy=x(w()),tb=_y.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",Sy);return(0,wy.jsx)("div",{ref:n,className:(0,xy.default)(r.root,e),children:t})}),Sl=tb;var Zi=x(X()),gt=x(O());var Xd={root:"_root_fsa1k_10",fadein:"_fadein_fsa1k_1",isClickable:"_isClickable_fsa1k_45",isSelected:"_isSelected_fsa1k_50",actions:"_actions_fsa1k_74",actionsIsFixed:"_actionsIsFixed_fsa1k_96",actionButton:"_actionButton_fsa1k_104",dropdownList:"_dropdownList_fsa1k_125",dropdownButton:"_dropdownButton_fsa1k_140",dropdownItem:"_dropdownItem_fsa1k_150",dropdownItemButton:"_dropdownItemButton_fsa1k_159",actionButtonIsPrimary:"_actionButtonIsPrimary_fsa1k_173",actionButtonIsDisabled:"_actionButtonIsDisabled_fsa1k_177",labels:"_labels_fsa1k_185",label:"_label_fsa1k_185"};var mt=x(w()),vo=(0,gt.createContext)(Xd),nb=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(vo);return(0,mt.jsx)("div",{...n,className:(0,Zi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},rb=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(vo);return(0,mt.jsxs)("div",{className:(0,Zi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},ob=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(vo);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},ib=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(vo);return(0,mt.jsx)("button",{type:"button",className:(0,Zi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Qd=({labels:e})=>{let t=(0,gt.useContext)(vo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},So=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Xd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Zi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(vo.Provider,{value:a,children:r})})});So.Labels=Qd;So.Actions=nb;So.ActionButton=ib;So.DropdownButton=rb;So.DropdownItem=ob;var oe=So;var Cy=x(X());var Ey={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var by=x(w()),sb=({withDivider:e,children:t})=>{let n=k("SuggestionList",Ey);return(0,by.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Cy.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=sb;var ky=x(X());var Ty={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var xl=x(w()),ab=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Ty);return(0,xl.jsx)("button",{type:"button",className:(0,ky.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,xl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,xl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},jr=ab;var Py=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,xo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Ry=/x-deepdesk-(([a-z0-9\-_])+-version)/,Nt=(h=>(h.SEARCH="search",h.TEMPLATE="template",h.ELASTIC_SEARCH="search-autocomplete",h.GPT="gpt",h.TRIE="trie",h.TRIE_WITH_TYPOS="trie-with-typos",h.SEMANTIC="semantic",h.TEXT_RECOMMENDATION="text_recommendation",h.URL_RECOMMENDATION="url_recommendation",h.LINK_RECOMMENDATION="link_recommendation",h.PERSONAL_COLLECTION="personal-collection",h.PERSONAL_COLLECTION_SEARCH="personal-collection-search",h.SEARCH_OVERLAY="search-overlay",h.SEARCH_PREVIEW="search-preview",h.SEARCH_URL="search-url",h))(Nt||{}),Vn=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Vn||{});var Gt=x(Ou());var g1=x(O());function Ct(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 xn(e){return!!e&&!!e[le]}function jt(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)===dk}(e)||Array.isArray(e)||!!e[A0]||!!(!((t=e.constructor)===null||t===void 0)&&t[A0])||hm(e)||ym(e))}function eo(e,t,n){n===void 0&&(n=!1),ei(e)===0?(n?Object.keys:Jo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function ei(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:hm(e)?2:ym(e)?3:0}function Zo(e,t){return ei(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ok(e,t){return ei(e)===2?e.get(t):e[t]}function O0(e,t,n){var r=ei(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function N0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function hm(e){return uk&&e instanceof Map}function ym(e){return ck&&e instanceof Set}function dr(e){return e.o||e.t}function vm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=F0(e);delete t[le];for(var n=Jo(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 Sm(e,t){return t===void 0&&(t=!1),xm(e)||xn(e)||!jt(e)||(ei(e)>1&&(e.set=e.add=e.clear=e.delete=ik),Object.freeze(e),t&&eo(e,function(n,r){return Sm(r,!0)},!0)),e}function ik(){Ct(2)}function xm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=gm[e];return t||Ct(18,e),t}function sk(e,t){gm[e]||(gm[e]=t)}function fm(){return Zs}function lm(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function Nu(e){pm(e),e.p.forEach(ak),e.p=null}function pm(e){e===Zs&&(Zs=e.l)}function T0(e){return Zs={p:[],l:Zs,h:e,m:!0,_:0}}function ak(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function um(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||rn("ES5").S(t,e,r),r?(n[le].P&&(Nu(t),Ct(4)),jt(e)&&(e=Mu(t,e),t.l||Du(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=Mu(t,n,[]),Nu(t),t.u&&t.v(t.u,t.s),e!==D0?e:void 0}function Mu(e,t,n){if(xm(t))return t;var r=t[le];if(!r)return eo(t,function(a,l){return k0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Du(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=vm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),eo(i,function(a,l){return k0(e,r,o,a,l,n,s)}),Du(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function k0(e,t,n,r,o,i,s){if(xn(o)){var a=Mu(e,o,i&&t&&t.i!==3&&!Zo(t.R,r)?i.concat(r):void 0);if(O0(n,r,a),!xn(a))return;e.m=!1}else s&&n.add(o);if(jt(o)&&!xm(o)){if(!e.h.D&&e._<1)return;Mu(e,o),t&&t.A.l||Du(e,o)}}function Du(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Sm(t,n)}function cm(e,t){var n=e[le];return(n?dr(n):e)[t]}function P0(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 fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function dm(e){e.o||(e.o=vm(e.t))}function mm(e,t,n){var r=hm(t)?rn("MapSet").F(t,n):ym(t)?rn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:fm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Js;s&&(l=[a],u=Ys);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):rn("ES5").J(t,n);return(n?n.A:fm()).p.push(r),r}function lk(e){return xn(e)||Ct(22,e),function t(n){if(!jt(n))return n;var r,o=n[le],i=ei(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=R0(n,i),o.I=!1}else r=R0(n,i);return eo(r,function(s,a){o&&ok(o.t,s)===a||O0(r,s,t(a))}),i===3?new Set(r):r}(e)}function R0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return vm(e)}function M0(){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[le];return Js.get(u,s)},set:function(u){var c=this[le];Js.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&fr(l);break;case 4:n(l)&&fr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Jo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Zo(a,f))return!0;var y=l[f],S=y&&y[le];if(S?S.t!==d:!N0(y,d))return!0}}var h=!!a[le];return u.length!==Jo(a).length+(h?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&&Ct(3,JSON.stringify(dr(s)))}var i={};sk("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),S=0;S<d.length;S++)Object.defineProperty(y,""+S,e(S,!0));return y}var h=F0(d);delete h[le];for(var g=Jo(h),m=0;m<g.length;m++){var p=g[m];h[p]=e(p,f||!!h[p].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:fm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?xn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[le];if(f){var d=f.t,y=f.k,S=f.R,h=f.i;if(h===4)eo(y,function(_){_!==le&&(d[_]!==void 0||Zo(d,_)?S[_]||u(y[_]):(S[_]=!0,fr(f)))}),eo(d,function(_){y[_]!==void 0||Zo(y,_)||(S[_]=!1,fr(f))});else if(h===5){if(r(f)&&(fr(f),S.length=!0),y.length<d.length)for(var g=y.length;g<d.length;g++)S[g]=!1;else for(var m=d.length;m<y.length;m++)S[m]=!0;for(var p=Math.min(y.length,d.length),v=0;v<p;v++)y.hasOwnProperty(v)||(S[v]=!0),S[v]===void 0&&u(y[v])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var I0,Zs,_m=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",uk=typeof Map<"u",ck=typeof Set<"u",L0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",D0=_m?Symbol.for("immer-nothing"):((I0={})["immer-nothing"]=!0,I0),A0=_m?Symbol.for("immer-draftable"):"__$immer_draftable",le=_m?Symbol.for("immer-state"):"__$immer_state";var dk=""+Object.prototype.constructor,Jo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,F0=Object.getOwnPropertyDescriptors||function(e){var t={};return Jo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},gm={},Js={get:function(e,t){if(t===le)return e;var n=dr(e);if(!Zo(n,t))return function(o,i,s){var a,l=P0(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||!jt(r)?r:r===cm(e.t,t)?(dm(e),e.o[t]=mm(e.A.h,r,e)):r},has:function(e,t){return t in dr(e)},ownKeys:function(e){return Reflect.ownKeys(dr(e))},set:function(e,t,n){var r=P0(dr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=cm(dr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(N0(n,o)&&(n!==void 0||Zo(e.t,t)))return!0;dm(e),fr(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 cm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,dm(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=dr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Ys={};eo(Js,function(e,t){Ys[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ys.deleteProperty=function(e,t){return Ys.set.call(this,e,t,void 0)},Ys.set=function(e,t,n){return Js.set.call(this,e[0],t,n,e[0])};var fk=function(){function e(n){var r=this;this.O=L0,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(h){var g=this;h===void 0&&(h=a);for(var m=arguments.length,p=Array(m>1?m-1:0),v=1;v<m;v++)p[v-1]=arguments[v];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[g,_].concat(p))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),jt(o)){var c=T0(r),f=mm(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Nu(c):pm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return lm(c,s),um(h,c)},function(h){throw Nu(c),h}):(lm(c,s),um(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===D0&&(u=void 0),r.D&&Sm(u,!0),s){var y=[],S=[];rn("Patches").M(o,u,y,S),s(y,S)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(y){return o.apply(void 0,[y].concat(f))})};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){jt(n)||Ct(8),xn(n)&&(n=lk(n));var r=T0(this),o=mm(this,n,void 0);return o[le].C=!0,pm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return lm(i,r),um(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!L0&&Ct(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=rn("Patches").$;return xn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),ot=new fk,pk=ot.produce,tN=ot.produceWithPatches.bind(ot),nN=ot.setAutoFreeze.bind(ot),rN=ot.setUseProxies.bind(ot),oN=ot.applyPatches.bind(ot),iN=ot.createDraft.bind(ot),sN=ot.finishDraft.bind(ot),Fu=pk;function pr(e){"@babel/helpers - typeof";return pr=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},pr(e)}function wm(e,t){if(pr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Em(e){var t=wm(e,"string");return pr(t)==="symbol"?t:String(t)}function Cm(e,t,n){return t=Em(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j0(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 ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(n),!0).forEach(function(r){Cm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 H0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),bm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Hu={INIT:"@@redux/INIT"+bm(),REPLACE:"@@redux/REPLACE"+bm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+bm()}};function mk(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 Tm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(Tm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function f(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Me(6));g=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!mk(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var p=g[m];p()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Hu.REPLACE})}function S(){var h,g=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Me(11));function v(){p.next&&p.next(c())}v();var _=g(v);return{unsubscribe:_}}},h[H0]=function(){return this},h}return d({type:Hu.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[H0]=S,r}function gk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Hu.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Hu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Bu(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{gk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,y={},S=0;S<i.length;S++){var h=i[S],g=n[h],m=u[h],p=g(m,c);if(typeof p>"u"){var v=c&&c.type;throw new Error(Me(14))}y[h]=p,d=d||p!==m}return d=d||i.length!==Object.keys(u).length,d?y:u}}function ti(){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 B0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ti.apply(void 0,a)(o.dispatch),ju(ju({},o),{},{dispatch:i})}}}function U0(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 z0=U0();z0.withExtraArgument=U0;var km=z0;var q0=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)}}(),hk=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}}},ni=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},yk=Object.defineProperty,vk=Object.defineProperties,Sk=Object.getOwnPropertyDescriptors,V0=Object.getOwnPropertySymbols,xk=Object.prototype.hasOwnProperty,_k=Object.prototype.propertyIsEnumerable,K0=function(e,t,n){return t in e?yk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},mr=function(e,t){for(var n in t||(t={}))xk.call(t,n)&&K0(e,n,t[n]);if(V0)for(var r=0,o=V0(t);r<o.length;r++){var n=o[r];_k.call(t,n)&&K0(e,n,t[n])}return e},Pm=function(e,t){return vk(e,Sk(t))},wk=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 Ek=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ti:ti.apply(null,arguments)},CN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ck(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 bk=function(e){q0(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,ni([void 0],n[0].concat(this)))):new(t.bind.apply(t,ni([void 0],n.concat(this))))},t}(Array),Tk=function(e){q0(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,ni([void 0],n[0].concat(this)))):new(t.bind.apply(t,ni([void 0],n.concat(this))))},t}(Array);function Lm(e){return jt(e)?Fu(e,function(){}):e}function kk(e){return typeof e=="boolean"}function Pk(){return function(t){return Rk(t)}}function Rk(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 bk;if(n&&(kk(n)?a.push(km):a.push(km.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Rm=!0;function G0(e){var t=Pk(),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,f=n.enhancers,d=f===void 0?void 0:f,y;if(typeof o=="function")y=o;else if(Ck(o))y=Bu(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 S=s;if(typeof S=="function"&&(S=S(t),!Rm&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Rm&&S.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=B0.apply(void 0,S),g=ti;l&&(g=Ek(mr({trace:!Rm},typeof l=="object"&&l)));var m=new Tk(h),p=m;Array.isArray(d)?p=ni([h],d):typeof d=="function"&&(p=d(m));var v=g.apply(void 0,p);return Tm(y,c,v)}function fe(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 mr(mr({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 X0(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 Ik(e){return typeof e=="function"}function Lk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?X0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Ik(e))l=function(){return Lm(e())};else{var u=Lm(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=ni([i[d.type]],s.filter(function(S){var h=S.matcher;return h(d)}).map(function(S){var h=S.reducer;return h}));return y.filter(function(S){return!!S}).length===0&&(y=[a]),y.reduce(function(S,h){if(h)if(xn(S)){var g=S,m=h(g,d);return m===void 0?S:m}else{if(jt(S))return Fu(S,function(p){return h(p,d)});var m=h(S,d);if(m===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return S},f)}return c.getInitialState=l,c}function Ak(e,t){return e+"/"+t}function H(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:Lm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=Ak(t,c),y,S;"reducer"in f?(y=f.reducer,S=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=S?fe(d,S):fe(d)});function l(){var c=typeof e.extraReducers=="function"?X0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],S=y===void 0?[]:y,h=c[2],g=h===void 0?void 0:h,m=mr(mr({},d),s);return Lk(n,function(p){for(var v in m)p.addCase(v,m[v]);for(var _=0,C=S;_<C.length;_++){var E=C[_];p.addMatcher(E.matcher,E.reducer)}g&&p.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var Ok="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Ok[Math.random()*64|0];return t},Mk=["name","message","stack","code"],Im=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),W0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Dk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Mk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,f,d,y){return{payload:c,meta:Pm(mr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:Pm(mr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,S){return{payload:y,error:(r&&r.serializeError||Dk)(c||"Rejected"),meta:Pm(mr({},S||{}),{arg:d,requestId:f,rejectedWithValue:!!y,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(f,d,y){var S=r!=null&&r.idGenerator?r.idGenerator(c):Nk(),h=new l,g,m=!1;function p(_){g=_,h.abort()}var v=function(){return wk(this,null,function(){var _,C,E,b,R,P,N;return hk(this,function(G){switch(G.label){case 0:return G.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),jk(b)?[4,b]:[3,2];case 1:b=G.sent(),G.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(V,He){return h.signal.addEventListener("abort",function(){return He({name:"AbortError",message:g||"Aborted"})})}),f(i(S,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:S,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:S,signal:h.signal,abort:p,rejectWithValue:function(V,He){return new Im(V,He)},fulfillWithValue:function(V,He){return new W0(V,He)}})).then(function(V){if(V instanceof Im)throw V;return V instanceof W0?o(V.payload,S,c,V.meta):o(V,S,c)})])];case 3:return E=G.sent(),[3,5];case 4:return P=G.sent(),E=P instanceof Im?s(null,S,c,P.payload,P.meta):s(P,S,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||f(E),[2,E]}})})}();return Object.assign(v,{abort:p,requestId:S,arg:c,unwrap:function(){return v.then(Fk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Fk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function jk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hk="task",Q0="listener",Y0="completed",Am="cancelled",PN="task-"+Am,RN="task-"+Y0,IN=Q0+"-"+Am,LN=Q0+"-"+Y0,AN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Hk+" "+Am+" (reason: "+t+")"}return e}();var Om="listenerMiddleware";var ON=fe(Om+"/add"),NN=fe(Om+"/removeAll"),MN=fe(Om+"/remove");var $0,DN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return($0||($0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Bk=function(e){return function(t){setTimeout(t,e)}},FN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bk(10);M0();var Hx=x(Mm()),Bx=x(ox());var Dm=x(Ou());function oP(e){e()}var ix=oP,sx=e=>ix=e,ax=()=>ix;var oi=x(O());var cx=x(O());var zu=x(O()),lx=Symbol.for(`react-redux-context-${zu.version}`),ux=globalThis;function iP(){let e=ux[lx];return e||(e=(0,zu.createContext)(null),ux[lx]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=iP();return(r,...o)=>Reflect[t](n,...o)}}));function ea(e=De){return function(){return(0,cx.useContext)(e)}}var Vu=ea();var Ku=()=>{throw new Error("uSES not initialized!")};var dx=Ku,fx=e=>{dx=e},sP=(e,t)=>e===t;function px(e=De){let t=e===De?Vu:ea(e);return function(r,o={}){let{equalityFn:i=sP,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),y=(0,oi.useRef)(!0),S=(0,oi.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=dx(u.addNestedSub,l.getState,c||l.getState,S,i);return(0,oi.useDebugValue)(h),h}}var L=px();function _n(){return _n=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},_n.apply(this,arguments)}function ta(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 $m=x(Cx()),Z=x(O()),Mx=x(Px());var wP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function EP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,v){return l=p,u=v,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function S(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function h(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let p=e(l,u),v=!s(p,c);return c=p,v&&(d=n(c,f,u)),d}function m(p,v){let _=!i(v,u),C=!o(p,l,v,u);return l=p,u=v,_&&C?S():_?h():C?g():d}return function(v,_){return a?m(v,_):y(v,_)}}function Km(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=ta(t,wP),s=n(e,i),a=r(e,i),l=o(e,i);return EP(s,a,l,e,i)}function Wm(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 na(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Rx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function dc(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=Rx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Rx(u),u=i(a,l)),u},i}}function ii(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Ix(e){return e&&typeof e=="object"?na(t=>Wm(e,t)):e?typeof e=="function"?dc(e,"mapDispatchToProps"):ii(e,"mapDispatchToProps"):na(t=>({dispatch:t}))}function Lx(e){return e?typeof e=="function"?dc(e,"mapStateToProps"):ii(e,"mapStateToProps"):na(()=>({}))}function CP(e,t,n){return _n({},n,e,t)}function bP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function Ax(e){return e?typeof e=="function"?bP(e):ii(e,"mergeProps"):()=>CP}function TP(){let e=ax(),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 Ox={notify(){},get:()=>[]};function fc(e,t){let n,r=Ox;function o(f){return l(),r.subscribe(f)}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=TP())}function u(){n&&(n(),n=void 0,r.clear(),r=Ox)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var pc=x(O()),kP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",si=kP?pc.useLayoutEffect:pc.useEffect;function Nx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ai(e,t){if(Nx(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])||!Nx(e[n[o]],t[n[o]]))return!1;return!0}var PP=["reactReduxForwardedRef"],Dx=Ku,Fx=e=>{Dx=e};var RP=[null,null];function IP(e,t,n){si(()=>e(...t),n)}function LP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function AP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,y=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(p){m=p,d=p}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function OP(e,t){return e===t}function NP(e,t,n,{pure:r,areStatesEqual:o=OP,areOwnPropsEqual:i=ai,areStatePropsEqual:s=ai,areMergedPropsEqual:a=ai,forwardRef:l=!1,context:u=De}={}){let c=u,f=Lx(e),d=Ix(t),y=Ax(n),S=!!e;return g=>{let m=g.displayName||g.name||"Component",p=`Connect(${m})`,v={shouldHandleStateChanges:S,displayName:p,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Nr=ta(b,PP);return[b.context,dt,Nr]},[b]),G=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Mx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),V=(0,Z.useContext)(G),He=!!b.store&&!!b.store.getState&&!!b.store.dispatch,cn=!!V&&!!V.store,Xt=He?b.store:V.store,mo=cn?V.getServerState:Xt.getState,Bi=(0,Z.useMemo)(()=>Km(Xt.dispatch,v),[Xt]),[Ar,Ka]=(0,Z.useMemo)(()=>{if(!S)return RP;let dt=fc(Xt,He?void 0:V.subscription),Nr=dt.notifyNestedSubs.bind(dt);return[dt,Nr]},[Xt,He,V]),Wa=(0,Z.useMemo)(()=>He?V:_n({},V,{subscription:Ar}),[He,V,Ar]),Ui=(0,Z.useRef)(),zi=(0,Z.useRef)(N),dn=(0,Z.useRef)(),Vi=(0,Z.useRef)(!1),Or=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),W=(0,Z.useRef)();si(()=>(I.current=!0,()=>{I.current=!1}),[]);let At=(0,Z.useMemo)(()=>()=>dn.current&&N===zi.current?dn.current:Bi(Xt.getState(),N),[Xt,N]),Un=(0,Z.useMemo)(()=>Nr=>Ar?AP(S,Xt,Ar,Bi,zi,Ui,Vi,I,dn,Ka,Nr):()=>{},[Ar]);IP(LP,[zi,Ui,Vi,N,dn,Ka]);let fn;try{fn=Dx(Un,At,mo?()=>Bi(mo(),N):At)}catch(dt){throw W.current&&(dt.message+=`
|
|
12
12
|
The error may be correlated with this previous error:
|
|
13
13
|
${W.current.stack}
|
|
14
14
|
|
|
15
|
-
`),dt}si(()=>{W.current=void 0,cn.current=void 0,Ui.current=dn});let Ki=(0,Z.useMemo)(()=>Z.default.createElement(g,xn({},dn,{ref:P})),[P,g,dn]);return(0,Z.useMemo)(()=>S?Z.default.createElement(G.Provider,{value:Wa},Ki):Ki,[G,Ki,Wa])}let E=Z.default.memo(_);if(E.WrappedComponent=g,E.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,G){return Z.default.createElement(E,xn({},N,{reactReduxForwardedRef:G}))});return R.displayName=p,R.WrappedComponent=g,(0,$m.default)(R,g)}return(0,$m.default)(E,g)}}var _n=OP;var ra=x(O());function NP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ra.useMemo)(()=>{let u=fc(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]);si(()=>{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||De;return ra.default.createElement(l.Provider,{value:s},n)}var qm=NP;function mc(e=De){let t=e===De?Vu:ea(e);return function(){let{store:r}=t();return r}}var Gm=mc();function jx(e=De){let t=e===De?Gm:mc(e);return function(){return t().dispatch}}var B=jx();fx(Bx.useSyncExternalStoreWithSelector);Fx(Hx.useSyncExternalStore);sx(Dm.unstable_batchedUpdates);var oa=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(oa||{});var MP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!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,adminUrl:void 0,productName:"Deepdesk"},Ux=H({name:"settings",initialState:MP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ia}=Ux.actions,Xm=e=>t=>t.settings[e],D=e=>L(Xm(e)),zx=Ux.reducer;var Aw=x(O());function wn(){}wn.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(h){return o?(setTimeout(function(){o(void 0,h)},0),!0):h}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 f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function y(){for(var h=-1*u;h<=u;h+=2){var g=void 0,m=f[h-1],p=f[h+1],v=(p?p.newPos:0)-h;m&&(f[h-1]=void 0);var _=m&&m.newPos+1<a,C=p&&0<=v&&v<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&m.newPos<p.newPos?(g=FP(p),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),v=i.extractCommon(g,n,t,h),g.newPos+1>=a&&v+1>=l)return s(DP(i,g.components,n,t,i.useLongestToken));f[h]=g}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var S=y();if(S)return S}},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 DP(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 f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(y,S){var h=r[l+S];return h.length>y.length?h:y}),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 FP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var jP=new wn;function Wx(e,t,n){return jP.diff(e,t,n)}var Vx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Kx=/\S/,$x=new wn;$x.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Kx.test(e)&&!Kx.test(t)};$x.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]&&Vx.test(t[n])&&Vx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var qx=new wn;qx.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 HP=new wn;HP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var BP=new wn;BP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function gc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gc=function(t){return typeof t}:gc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}var UP=Object.prototype.toString,sa=new wn;sa.useLongestToken=!0;sa.tokenize=qx.tokenize;sa.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(Qm(e,null,null,o),o," ")};sa.equals=function(e,t){return wn.prototype.equals.call(sa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Qm(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(UP.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]=Qm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),gc(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]=Qm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Ym=new wn;Ym.tokenize=function(e){return e.slice()};Ym.join=Ym.removeEmpty=function(e){return e};function Gx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function gr(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)=>gr(i,t[s],n-1)):Gx(e)&&Gx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>gr(e[s],t[s],n-1)):!1}function zP(e){return Math.max(...e.map(t=>t.length))}function VP(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 Xx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<zP(r);o++){let i=VP(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 KP=2;function Zm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Xx(e,KP);return n&&n.text!==t?n:e[0]}var Qx={current:null,isSupported:null},J=fe("resetConversation"),hc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},yc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},li=e=>e.conversation.isSupported,Jm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),vc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Sc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),xc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=yc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),eg=M("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})})}),_c=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=yc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),WP=[vc.rejected,Sc.rejected,xc.rejected,_c.rejected].map(e=>e==null?void 0:e.toString()),$P=H({name:"conversation",initialState:Qx,reducers:{},extraReducers:e=>{e.addCase(Jm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(vc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Sc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(eg.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(_c.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Qx).addMatcher(t=>WP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Yx=$P.reducer;var hr={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 Ec(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 Cc=fe("input/replaceText"),bc=fe("input/keyDown"),to=fe("input/sendMessage"),Tc=fe("input/sendEditSuggestionMessage"),kc=fe("input/uiInputChange"),Pc=fe("input/applyImageSuggestion"),st=fe("input/sendEvent");function wc(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,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||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:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Zx=e=>H({name:e,initialState:hr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...hr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Zm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(gr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&wc(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:f,ctrlKey:d,metaKey:y,altKey:S}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:g}=n.payload,m=Wx(h,g);h.length-g.length>1&&t.metrics.deletions.push(...m.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-g.length;break}case"C":case"V":case"X":if(!d&&!y){t.metrics.numCharsTyped+=1;let h=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}break;case"Shift":break;default:if(!d&&!y&&!S){t.metrics.numCharsTyped+=1;let h=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=hr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&wc(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&wc(t)},commitSuggestion(t){wc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Zm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=hr.tabCompletionSuggestion,n.previousKeyDownEvent=hr.previousKeyDownEvent,n.textSuggestions=hr.textSuggestions,n.selectedSuggestionIndex=hr.selectedSuggestionIndex,n.metrics=hr.metrics})}}),tg=Zx("input"),ui=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),qP=e=>e.input.selection,Jx=()=>L(qP),{userInput:e_,changeSelection:ng,initialInput:t_,mergeMetrics:n_,nextTextSuggestionIndex:r_,offeredTextSuggestion:o_,previousTextSuggestionIndex:i_,registerCut:s_,registerKeyDown:a_,registerPaste:l_,reset:u_,resetToCommitted:aa,platformInput:c_,setSelectedTextSuggestionIndex:la,setTextSuggestions:En,stageSuggestion:Ht,commitSuggestion:yr}=tg.actions,Xe=Zx("overlay");var ci=x(O());var d_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var rg=x(w()),GP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ci.useRef)(null),l=(0,ci.useRef)(null),u=k("Dialog",d_);return(0,ci.useEffect)(()=>{var d,y;let c=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),o())},f=S=>{let h=window.getSelection();h!=null&&h.toString()||S.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var S,h;(S=a.current)==null||S.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ci.useEffect)(()=>{var c,f;!a.current||!e||!t||(f=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||f.focus()},[e,t,a]),e?(0,rg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,rg.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},di=GP;var Ig=x(O());var og={};Ce(og,{enUS:()=>XP,nlNL:()=>QP});var XP={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},QP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var f_={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var ua=x(w()),Rc=()=>(0,ua.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ua.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ua.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 ca=x(w()),p_=()=>(0,ca.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ca.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ca.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var kt=x(O());var Ic=x(O());function da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,sg=2,ag=4,Se=8,Lc=16,fa=32,Bt=64,ig={a:{content:q|Se,self:!1,type:q|Se|fa|Bt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|sg|ag|Se|Lc|fa|Bt},button:{content:Se,type:q|Se|fa|Bt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|fa|Bt},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|Lc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,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:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function ro(e){return t=>{ig[t]={...e,...ig[t]}}}["address","main","div","figure","p","pre"].forEach(ro({content:q,type:q|Bt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(ro({content:Se,type:q|Se|Bt}));["p","pre"].forEach(ro({content:Se,type:q|Bt}));["s","small","span","del","ins"].forEach(ro({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(ro({content:q,type:q|sg|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(ro({content:Se,type:q|ag|Bt}));["audio","canvas","iframe","img","video"].forEach(ro({type:q|Se|Lc|Bt}));var ma=Object.freeze(ig),lg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ug=Object.keys(ma).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,cg=2,no=3,vr=4,Oc=5,Nc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:no,controls:vr,datetime:ee,default:vr,disabled:vr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:vr,media:ee,muted:vr,poster:ee,rel:ee,role:ee,rowspan:no,scope:ee,sizes:ee,span:no,start:no,style:Oc,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),dg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Ac(){return Ac=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},Ac.apply(this,arguments)}function Mc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ic.default.createElement(i,Ac({className:t},e)):Ic.default.createElement(i,Ac({className:t},e),n)}var pa=class{attribute(t,n){return n}node(t,n){return n}};function m_(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 Ut=class{constructor(t,n,r){da(this,"greedy",!1),da(this,"options",void 0),da(this,"propName",void 0),da(this,"inverseName",void 0),da(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?Ic.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return m_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var oo=x(O()),v_=x(h_());function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JP=/(url|image|image-set)\(/i,fg=class extends pa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(JP)&&delete n[r]}),n}},y_=1,eR=3,tR=/^<(!doctype|(html|head|body)(\s|>))/i,nR=/^(aria-|data-|\w+:)/iu,rR=/{{{(\w+)\/?}}}/;function oR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Dc=class{constructor(t,n={},r=[],o=[]){var i;Cn(this,"allowed",void 0),Cn(this,"banned",void 0),Cn(this,"blocked",void 0),Cn(this,"container",void 0),Cn(this,"content",[]),Cn(this,"props",void 0),Cn(this,"matchers",void 0),Cn(this,"filters",void 0),Cn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new fg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ug),this.banned=new Set(lg),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 f="";for(;i&&(a=l.match(i));){let{index:d,length:y,match:S,valid:h,void:g,...m}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=g?`{{{${p}/}}}`:`{{{${p}}}}${S}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:S,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=S,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||S.length))}l.greedy||(i=f+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
|
+
`),dt}si(()=>{W.current=void 0,dn.current=void 0,Ui.current=fn});let Ki=(0,Z.useMemo)(()=>Z.default.createElement(g,_n({},fn,{ref:P})),[P,g,fn]);return(0,Z.useMemo)(()=>S?Z.default.createElement(G.Provider,{value:Wa},Ki):Ki,[G,Ki,Wa])}let E=Z.default.memo(_);if(E.WrappedComponent=g,E.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,G){return Z.default.createElement(E,_n({},N,{reactReduxForwardedRef:G}))});return R.displayName=p,R.WrappedComponent=g,(0,$m.default)(R,g)}return(0,$m.default)(E,g)}}var wn=NP;var ra=x(O());function MP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ra.useMemo)(()=>{let u=fc(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]);si(()=>{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||De;return ra.default.createElement(l.Provider,{value:s},n)}var qm=MP;function mc(e=De){let t=e===De?Vu:ea(e);return function(){let{store:r}=t();return r}}var Gm=mc();function jx(e=De){let t=e===De?Gm:mc(e);return function(){return t().dispatch}}var B=jx();fx(Bx.useSyncExternalStoreWithSelector);Fx(Hx.useSyncExternalStore);sx(Dm.unstable_batchedUpdates);var oa=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(oa||{});var DP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!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,adminUrl:void 0,productName:"Deepdesk"},Ux=H({name:"settings",initialState:DP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ia}=Ux.actions,Xm=e=>t=>t.settings[e],D=e=>L(Xm(e)),zx=Ux.reducer;var Ow=x(O());function En(){}En.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(h){return o?(setTimeout(function(){o(void 0,h)},0),!0):h}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 f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function y(){for(var h=-1*u;h<=u;h+=2){var g=void 0,m=f[h-1],p=f[h+1],v=(p?p.newPos:0)-h;m&&(f[h-1]=void 0);var _=m&&m.newPos+1<a,C=p&&0<=v&&v<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&m.newPos<p.newPos?(g=jP(p),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),v=i.extractCommon(g,n,t,h),g.newPos+1>=a&&v+1>=l)return s(FP(i,g.components,n,t,i.useLongestToken));f[h]=g}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var S=y();if(S)return S}},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 FP(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 f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(y,S){var h=r[l+S];return h.length>y.length?h:y}),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 jP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var HP=new En;function Wx(e,t,n){return HP.diff(e,t,n)}var Vx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Kx=/\S/,$x=new En;$x.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Kx.test(e)&&!Kx.test(t)};$x.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]&&Vx.test(t[n])&&Vx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var qx=new En;qx.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 BP=new En;BP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var UP=new En;UP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function gc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gc=function(t){return typeof t}:gc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}var zP=Object.prototype.toString,sa=new En;sa.useLongestToken=!0;sa.tokenize=qx.tokenize;sa.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(Qm(e,null,null,o),o," ")};sa.equals=function(e,t){return En.prototype.equals.call(sa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Qm(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(zP.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]=Qm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),gc(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]=Qm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Ym=new En;Ym.tokenize=function(e){return e.slice()};Ym.join=Ym.removeEmpty=function(e){return e};function Gx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function gr(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)=>gr(i,t[s],n-1)):Gx(e)&&Gx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>gr(e[s],t[s],n-1)):!1}function VP(e){return Math.max(...e.map(t=>t.length))}function KP(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 Xx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<VP(r);o++){let i=KP(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 WP=2;function Zm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Xx(e,WP);return n&&n.text!==t?n:e[0]}var Qx={current:null,isSupported:null},J=fe("resetConversation"),hc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},yc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},li=e=>e.conversation.isSupported,Jm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),vc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Sc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),xc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=yc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),eg=M("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})})}),_c=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=yc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),$P=[vc.rejected,Sc.rejected,xc.rejected,_c.rejected].map(e=>e==null?void 0:e.toString()),qP=H({name:"conversation",initialState:Qx,reducers:{},extraReducers:e=>{e.addCase(Jm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(vc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Sc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(eg.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(_c.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Qx).addMatcher(t=>$P.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Yx=qP.reducer;var hr={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 Ec(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 Cc=fe("input/replaceText"),bc=fe("input/keyDown"),to=fe("input/sendMessage"),Tc=fe("input/sendEditSuggestionMessage"),kc=fe("input/uiInputChange"),Pc=fe("input/applyImageSuggestion"),st=fe("input/sendEvent");function wc(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,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||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:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Zx=e=>H({name:e,initialState:hr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...hr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Zm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(gr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&wc(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:f,ctrlKey:d,metaKey:y,altKey:S}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:g}=n.payload,m=Wx(h,g);h.length-g.length>1&&t.metrics.deletions.push(...m.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-g.length;break}case"C":case"V":case"X":if(!d&&!y){t.metrics.numCharsTyped+=1;let h=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}break;case"Shift":break;default:if(!d&&!y&&!S){t.metrics.numCharsTyped+=1;let h=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=hr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&wc(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&wc(t)},commitSuggestion(t){wc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Zm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=hr.tabCompletionSuggestion,n.previousKeyDownEvent=hr.previousKeyDownEvent,n.textSuggestions=hr.textSuggestions,n.selectedSuggestionIndex=hr.selectedSuggestionIndex,n.metrics=hr.metrics})}}),tg=Zx("input"),ui=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),GP=e=>e.input.selection,Jx=()=>L(GP),{userInput:e_,changeSelection:ng,initialInput:t_,mergeMetrics:n_,nextTextSuggestionIndex:r_,offeredTextSuggestion:o_,previousTextSuggestionIndex:i_,registerCut:s_,registerKeyDown:a_,registerPaste:l_,reset:u_,resetToCommitted:aa,platformInput:c_,setSelectedTextSuggestionIndex:la,setTextSuggestions:Cn,stageSuggestion:Ht,commitSuggestion:yr}=tg.actions,Xe=Zx("overlay");var ci=x(O());var d_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var rg=x(w()),XP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ci.useRef)(null),l=(0,ci.useRef)(null),u=k("Dialog",d_);return(0,ci.useEffect)(()=>{var d,y;let c=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),o())},f=S=>{let h=window.getSelection();h!=null&&h.toString()||S.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var S,h;(S=a.current)==null||S.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ci.useEffect)(()=>{var c,f;!a.current||!e||!t||(f=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||f.focus()},[e,t,a]),e?(0,rg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,rg.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},di=XP;var Ig=x(O());var og={};Ce(og,{enUS:()=>QP,nlNL:()=>YP});var QP={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},YP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var f_={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var ua=x(w()),Rc=()=>(0,ua.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ua.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ua.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 ca=x(w()),p_=()=>(0,ca.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ca.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ca.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var kt=x(O());var Ic=x(O());function da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,sg=2,ag=4,Se=8,Lc=16,fa=32,Bt=64,ig={a:{content:q|Se,self:!1,type:q|Se|fa|Bt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|sg|ag|Se|Lc|fa|Bt},button:{content:Se,type:q|Se|fa|Bt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|fa|Bt},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|Lc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,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:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function ro(e){return t=>{ig[t]={...e,...ig[t]}}}["address","main","div","figure","p","pre"].forEach(ro({content:q,type:q|Bt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(ro({content:Se,type:q|Se|Bt}));["p","pre"].forEach(ro({content:Se,type:q|Bt}));["s","small","span","del","ins"].forEach(ro({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(ro({content:q,type:q|sg|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(ro({content:Se,type:q|ag|Bt}));["audio","canvas","iframe","img","video"].forEach(ro({type:q|Se|Lc|Bt}));var ma=Object.freeze(ig),lg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ug=Object.keys(ma).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,cg=2,no=3,vr=4,Oc=5,Nc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:no,controls:vr,datetime:ee,default:vr,disabled:vr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:vr,media:ee,muted:vr,poster:ee,rel:ee,role:ee,rowspan:no,scope:ee,sizes:ee,span:no,start:no,style:Oc,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),dg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Ac(){return Ac=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},Ac.apply(this,arguments)}function Mc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ic.default.createElement(i,Ac({className:t},e)):Ic.default.createElement(i,Ac({className:t},e),n)}var pa=class{attribute(t,n){return n}node(t,n){return n}};function m_(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 Ut=class{constructor(t,n,r){da(this,"greedy",!1),da(this,"options",void 0),da(this,"propName",void 0),da(this,"inverseName",void 0),da(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?Ic.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return m_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var oo=x(O()),v_=x(h_());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eR=/(url|image|image-set)\(/i,fg=class extends pa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(eR)&&delete n[r]}),n}},y_=1,tR=3,nR=/^<(!doctype|(html|head|body)(\s|>))/i,rR=/^(aria-|data-|\w+:)/iu,oR=/{{{(\w+)\/?}}}/;function iR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Dc=class{constructor(t,n={},r=[],o=[]){var i;bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new fg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ug),this.banned=new Set(lg),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 f="";for(;i&&(a=l.match(i));){let{index:d,length:y,match:S,valid:h,void:g,...m}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=g?`{{{${p}/}}}`:`{{{${p}}}}${S}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:S,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=S,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||S.length))}l.greedy||(i=f+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||oR)();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(tR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,v_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==y_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Nc[l]||Nc[s];if(!this.isSafe(t)||!l.match(nR)&&(!n&&(!u||u===cg)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===vr?c=!0:u===no?c=Number.parseFloat(String(c)):u!==Oc&&(c=String(c)),r[dg[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 ma[t]?{...n,...ma[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===y_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let S=this.applyNodeFilters(d,c);if(!S)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(S,y);let m=s(S,h,y);if(m===null)return;if(typeof m<"u"){l.push(oo.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,y))){var f;this.keyIndex+=1;let g=this.extractAttributes(S),m={tagName:d};g&&(m.attributes=g),y.void&&(m.selfClose=y.void),l.push(oo.default.createElement(Mc,{...m,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(S,y)))}else l=[...l,...this.parseNode(S,y.tagName?y:n)]}else if(c.nodeType===eR){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(rR);){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:f,props:d}=n[a],y;if(u)y=s.length,r.push(f.createElement(c,d));else{let S=o.match(new RegExp(`{{{/${a}}}}`));y=S.index+S[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,S.index),n),d))}o=o.slice(y)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function iR(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",f=c==="fragment"?!0:u,d;if(a)d=a;else{let y=new Dc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?oo.default.createElement(oo.default.Fragment,null,d):oo.default.createElement(Mc,{attributes:n,className:r,tagName:c},d)}function fi(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:f="span",noWrap:d=!1,...y}=e,S=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];S.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let p=g.reduce((C,E)=>E(C,e),r??""),v=new Dc(p,y,S,h),_=m.reduce((C,E)=>E(C,e),v.parse());return oo.default.createElement(iR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var wg=x(X());var pg={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var x_=x(X());var pi=x(O());function S_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Fc(e){let t=(0,pi.useRef)(null),[n,r]=(0,pi.useState)(!1);return(0,pi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=S_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,S=f/i,h=d.getBoundingClientRect(),g=y>h.x&&y<h.x+h.width&&S>h.y&&S<h.y+h.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=S_(()=>{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]}var Tt={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var mg=x(w()),sR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Tt),[r,o]=Fc(e);return(0,mg.jsx)("mark",{ref:r,className:(0,x_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},mi=class extends Ut{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,mg.jsx)(sR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var gi=x(O());function jc(e){return e.contentEditable==="true"}function aR(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 __(e){let{selectionStart:t,selectionEnd:n}=jc(e)?aR(e):e;return[t,n]}function Hc(e){let[,t]=(0,gi.useState)(),n=(0,gi.useRef)(null);return n.current=__(e),(0,gi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=__(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 Bc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(xo);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 w_=x(O());function Sr(e){(0,w_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function io(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var E_,bn=new Map,lR=["bottom","height","left","right","top","width"],uR=(e={},t={})=>lR.some(n=>e[n]!==t[n]);function C_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...C_(t)]:[]}function cR(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var gg=!1,b_=()=>{gg=!0;let e=[];bn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),bn.delete(n);return}let r=n.getBoundingClientRect();uR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(cR,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),bn.size!==0&&(E_=window.requestAnimationFrame(b_))};function hg(e,t){let n=C_(e),r=[],o=n.map((i,s)=>hg(i,a=>{r[s]=a}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),bn.has(e)){let s=bn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else bn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!gg&&b_()},unobserve(){o.forEach(s=>s.unobserve());let i=bn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||bn.delete(e),bn.size||(cancelAnimationFrame(E_),gg=!1)}}}}var T_,on=new Map,k_=()=>{on.forEach((e,t)=>{if(!t.isConnected){on.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)))}),on.size!==0&&(T_=window.requestAnimationFrame(k_))};function P_(e,t){return{observe(){let n=on.size===0;on.has(e)?on.get(e).callbacks.push(t):on.set(e,{visible:void 0,callbacks:[t]}),n&&k_()},unobserve(){let n=on.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||on.delete(e),on.size||cancelAnimationFrame(T_)}}}}var yg=["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 vg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function hi(e){return parseFloat(e)}function Uc(e){return Math.round(e*1e6)}function R_(e){return e/1e6}function Sg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=hi(e.width),i=hi(e.borderLeftWidth),s=hi(e.borderRightWidth),a=hi(e.paddingRight),l=R_(Uc(o)-Uc(i)-Uc(s)),u=R_(Uc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function so(e,t={}){var l;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",io(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};vg(r,n,yg),Sg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=P_(e,()=>{vg(r,n,yg),Sg(r,e,n),i(),setTimeout(i,0)}),a=hg(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(vg(r,n,yg),Sg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),d=hi(f.borderTopWidth),y=hi(f.borderBottomWidth),S=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${S}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var xg={};Ce(xg,{enUS:()=>dR,nlNL:()=>fR});var dR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},fR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var ga=x(w()),I_=()=>(0,ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ga.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ga.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var _g=x(w()),L_=()=>(0,_g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,_g.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});function pR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function zc(e){return e?e instanceof ShadowRoot?zc(e.host):e===e.ownerDocument.body?e.ownerDocument:pR(e)?e:zc(e.parentNode):document.body}var A_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(A_||{}),Tn=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();gr(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(A_).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(){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 t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()});let n=zc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}}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}};var kn=class extends Tn{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())}};var Qe=x(w()),mR=({value:e,onUse:t,...n})=>{var c;let r=j(xg),o=B(),i=k("EditSuggestionTextInput",pg),[s,a]=(0,kt.useState)(null),l=(0,kt.useRef)(null),u=((c=e.match(xo))==null?void 0:c.length)||0;return(0,kt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new kn(l.current),f.on("change",({plainText:d})=>{o(Xe.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Xe.actions.registerKeyDown(Ec(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Xe.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Xe.actions.registerCut(d))})),()=>{o(Xe.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,kt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,kt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let f=l.current.value.length;l.current.setSelectionRange(f,f),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(gR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,wg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(I_,{}):(0,Qe.jsx)(L_,{})]})]})},gR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",pg),r=(0,kt.useRef)(null),o=Hc(e);return(0,kt.useEffect)(()=>{Bc(e,o)},[o,e]),(0,Qe.jsx)(hR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,wg.default)(n.root,n.agentText),children:[(0,Qe.jsx)(fi,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new mi("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},hR=({inputElement:e,children:t})=>{let n=(0,kt.useRef)(null);return(0,kt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=so(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},O_=mR;var Si=x(O());var N_=x(O()),Vc=x(X());var Ye={root:"_root_185k9_1",list:"_list_185k9_2",listWrapper:"_listWrapper_185k9_6",listHorizontal:"_listHorizontal_185k9_10",page:"_page_185k9_19",search:"_search_185k9_25",pageNav:"_pageNav_185k9_33",pageTitle:"_pageTitle_185k9_41",pageBackButton:"_pageBackButton_185k9_48",listHeading:"_listHeading_185k9_62",listItem:"_listItem_185k9_70",listItemContent:"_listItemContent_185k9_79",listItemText:"_listItemText_185k9_97",listItemDescription:"_listItemDescription_185k9_105",truncate:"_truncate_185k9_112",lineClamp:"_lineClamp_185k9_118",listItemTitle:"_listItemTitle_185k9_125",listItemAction:"_listItemAction_185k9_132",listItemPrimaryAction:"_listItemPrimaryAction_185k9_146",listItemSelected:"_listItemSelected_185k9_151",sources:"_sources_185k9_155",sourcesTitle:"_sourcesTitle_185k9_162",source:"_source_185k9_155",icon:"_icon_185k9_177",searchIcon:"_searchIcon_185k9_194",searchInputWrapper:"_searchInputWrapper_185k9_199",searchInput:"_searchInput_185k9_199",select:"_select_185k9_220",selectType:"_selectType_185k9_237",selectWrapper:"_selectWrapper_185k9_241",image:"_image_185k9_271",imageSrc:"_imageSrc_185k9_278",imageSrcHidden:"_imageSrcHidden_185k9_289",imageSrcStatus:"_imageSrcStatus_185k9_293",imageTitle:"_imageTitle_185k9_303",actions:"_actions_185k9_308",actionsWrapper:"_actionsWrapper_185k9_312",actionsBar:"_actionsBar_185k9_318",actionButton:"_actionButton_185k9_327",actionShortcut:"_actionShortcut_185k9_345",actionShortcutFixKerning:"_actionShortcutFixKerning_185k9_352"};var ao={};Ce(ao,{enUS:()=>yR,nlNL:()=>vR});var yR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},vR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var xr=x(w()),SR=({src:e,title:t})=>{let n=k("CommandPalette",Ye),[r,o]=(0,N_.useState)("loading"),i=j(ao);return(0,xr.jsxs)("div",{className:n.image,children:[(0,xr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Vc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,Vc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,Vc.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(Za,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},M_=SR;var D_=x(O()),F_=x(X());var ha=x(w());function Eg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Ye);return D_.default.Children.count(e)===0?null:(0,ha.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ha.jsx)("h4",{className:r.listHeading,children:t}),(0,ha.jsx)("div",{className:(0,F_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ya=x(X());var Kc=x(O()),B_=x(w()),j_=Kc.default.createContext(void 0);function _r(){let e=Kc.default.useContext(j_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var H_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Kc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,B_.jsx)(j_.Provider,{value:s,children:e})};var Pt=x(w());function Cg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=_r(),y=k("CommandPalette",Ye);function S(h){r(h),e&&d(!1)}return(0,Pt.jsxs)("div",{className:(0,ya.default)(y.listItem,f===i&&y.listItemSelected),children:[(0,Pt.jsxs)("button",{type:"button",className:(0,ya.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:S,...c,children:[(0,Pt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,Pt.jsx)("p",{className:(0,ya.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,Pt.jsx)("p",{className:(0,ya.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,Pt.jsx)(hl,{})]}),l&&(0,Pt.jsxs)("div",{className:y.sources,children:[(0,Pt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,Pt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,Pt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var wr=x(w());function bg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ao),s=k("CommandPalette",Ye),{page:a}=_r();return a!==n?null:(0,wr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,wr.jsxs)("div",{className:s.pageNav,children:[(0,wr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,wr.jsx)(Rc,{}),i("back")]}),t&&(0,wr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,wr.jsx)(hl,{})]}),e]})}var Er=x(O());var Wc=()=>/Mac/i.test(navigator.platform);var xR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=xR;function _R(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[_R(n)]:re(e[n])}),{}):e}function Tg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function we(e){return Array.isArray(e)?e.map(we):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Tg(n)]:we(e[n])}),{}):e}var wR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Sa=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)||""}},va=M("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?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),kg=M("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}),Pg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),U_=e=>e.info.agentInfo,z_=H({name:"info",initialState:wR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(va.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(va.rejected,t=>{t.fetchState="error"}).addCase(va.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(kg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Pg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:V_}=z_.actions,K_=z_.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search"},W_=e=>e.search.isOpen,$_=e=>e.search.page,q_=e=>e.search.list;function G_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var lo=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:Sa(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),X_=H({name:"search",initialState:$c,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=$c.fetchState,e.list=$c.list}},extraReducers:e=>{e.addCase(lo.pending,t=>{t.fetchState="loading"}).addCase(lo.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(lo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>$c)}}),{resetSearch:qc,setIsOpen:at,setPage:ze}=X_.actions,Q_=X_.reducer;var ER=/(https?:\/\/[^\s]+)/,Gc=e=>e.split(" ").find(t=>ER.test(t));var Rg=x(X());var Xc=x(w()),CR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ye);return(0,Xc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Rg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Xc.jsx)("span",{className:(0,Rg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},yi=CR;var Pn=x(w()),bR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Ye),a=j(ao),{selected:l,setSelected:u}=_r(),c=i[l],f=c&&typeof c.text=="string"&&Gc(c.text),d=(0,Er.useRef)(null);function y(v){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,E=0;v==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C===_.length-1?0:C+1):v==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C?C-1:_.length-1):u(0);let b=_[E];b&&typeof E=="number"&&(u(E),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function S(){if(!d.current)return;let v=d.current.querySelectorAll(".command-palette-list-item"),_=0;v.forEach((E,b)=>{b===l&&(_=b)});let C=v[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,Er.useCallback)(v=>{if(v.key==="Enter"&&v.altKey&&f){h();return}if(v.key==="Enter"&&v.shiftKey){m();return}if(v.key==="ArrowDown"){v.preventDefault(),v.stopPropagation(),y("down");return}if(v.key==="ArrowUp"){v.preventDefault(),v.stopPropagation(),y("up");return}v.key==="Enter"&&l!==-1&&(v.preventDefault(),v.stopPropagation(),S())},[l]);return(0,Er.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,Pn.jsxs)("div",{className:s.actions,children:[(0,Pn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,Pn.jsxs)("div",{className:s.actionsBar,children:[f&&(0,Pn.jsx)(yi,{onClick:h,shortKeys:[Wc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Pn.jsxs)(Er.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Pn.jsx)(yi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,Pn.jsx)(yi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},Z_=bR;var J_=x(O());var xa=x(w()),vi=()=>(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 zt=x(w());function TR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ye);return(0,zt.jsxs)("div",{className:l.search,children:[(0,zt.jsx)("div",{className:l.searchIcon,children:(0,zt.jsx)(vi,{})}),(0,zt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,zt.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,zt.jsx)("div",{className:l.selectWrapper,children:(0,zt.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,zt.jsx)("option",{children:r}),o.map(u=>(0,zt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var ew=(0,J_.forwardRef)(TR);var _a=x(w());function uo({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:f,search:d}){let[y,S]=(0,Si.useState)(0),h=(0,Si.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var p;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(p=h.current)==null||p.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Si.useEffect)(()=>{S(0)},[d,r]),(0,_a.jsx)(di,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,children:(0,_a.jsxs)(H_,{selected:y,setSelected:S,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,_a.jsx)(ew,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}uo.Page=bg;uo.List=Eg;uo.Image=M_;uo.ListItem=Cg;uo.ActionsBar=Z_;uo.Button=yi;var te=uo;var Fe=x(w()),kR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",f_),l=B(),u=j(og),c=L(S=>S.overlayInput.text);(0,Ig.useEffect)(()=>{e&&(l(Xe.actions.reset()),l(Xe.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Xe.actions.commitSuggestion()))},[e]);let f=S=>{S.preventDefault(),d(c)},d=S=>{l(Tc(S)),t(S)},y=S=>h=>{c!==s?window.confirm(u("warning"))&&S(h):S(h)};return(0,Ig.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)(Qd,{labels:e.searchKeywords}),(0,Fe.jsx)(O_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:f,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&y(i),children:(0,Fe.jsx)(Rc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(p_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:y(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Qc=kR;var PR=["{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}"],RR=new RegExp(PR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function tw(e,t){let n=e.split(RR),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 f=a.charAt(0),d=0;do u=f?t.indexOf(f,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 nw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var ow={suggestions:[],fetchState:"idle",isInitialRequest:null},rw={default:ow},iw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},sw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},aw=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},xi=e=>e.textSuggestions,lw=e=>t=>t.text.startsWith(e),Yc=fe("textSuggestions/refresh"),Rn=M("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=ui(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Sa(r),e);if(e==="default"){let c=s?l.filter(lw(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),wa=M("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,{...Sa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(lw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?tw(c.text,e):c.text}))),l=nw(l,i),t.dispatch(En(l)),l}),uw=H({name:"textSuggestions",initialState:rw,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(Rn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||ow;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Rn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Rn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(wa.pending,t=>{t.default.fetchState="loading"}).addCase(wa.rejected,t=>{t.default.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>rw)}}),{setTextSuggestions:cw,setSuggestionState:dw}=uw.actions,fw=uw.reducer;var pw={contentType:null,suggestion:null},mw=e=>e.activeSuggestion.suggestion,gw=e=>e.activeSuggestion.contentType,hw=H({name:"activeSuggestion",initialState:pw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>pw)}}),{setActiveSuggestion:In,resetActiveSuggestion:Lg}=hw.actions,yw=hw.reducer;var Ag={};Ce(Ag,{enUS:()=>IR,nlNL:()=>LR});var IR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},LR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var AR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Zc=({ui:e})=>e.overlayCollapsed;var vw=H({name:"ui",initialState:AR,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:Ea,setInputHasFocus:_i,setOverlayCollapsed:Cr,setOpenOverlayWhenTyping:Sw,setOverlayCollapsedUserOverwrite:xw}=vw.actions,_w=vw.reducer;var Ca=x(O()),Ew=x(w()),ww=Ca.default.createContext(null),wi=({broadcastEvents:e,children:t})=>{let n=Ca.default.useMemo(()=>e,[]);return(0,Ew.jsx)(ww.Provider,{value:n,children:t})},Rt=()=>{let e=(0,Ca.useContext)(ww);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var OR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Vt=e=>e.auth.isLoggedIn,Cw=e=>e.auth.loginFetchState,bw=e=>e.auth.verifyFetchState,Tw=e=>e.auth.showLoginOverlay,br=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),kw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),ba=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Pw=H({name:"auth",initialState:OR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(br.pending,t=>{t.loginFetchState="loading"}),e.addCase(br.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(br.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ba.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ba.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ba.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ei,setShowLoginOverlay:Rw}=Pw.actions,Iw=Pw.reducer;var Og="SetActiveSuggestion",Ci="ShowLoginOverlay",Ng="UserLoggedIn",NR="UserLoggedOut",Ln="ApplySuggestion",Mg="ApplyImageSuggestion",MR="ShowCommandPalette",DR=e=>({[Og]:t=>{e.dispatch(dw(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[MR]:t=>{e.dispatch(at(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Ci]:t=>{e.dispatch(Rw(t))},[Ng]:()=>{e.dispatch(br())},[NR]:()=>{e.dispatch(br())},[Mg]:t=>{e.dispatch(Pc({suggestion:t.suggestion}))},[Ln]:t=>{e.dispatch(Ht({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(yr())}}),Lw=DR;var Dg=x(w()),FR=()=>{var S;let[e,t]=(0,Aw.useState)(!1),n=L(mw),r=L(gw),o=L(xi),i=B(),s=Rt(),a=j(Ag),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Lg()),i(_i(!0)),i(Xe.actions.reset())},c=(h,g)=>{i(Lg()),i(_i(!0)),s.send(Ln,{text:h,suggestion:{...g,source:`${g.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(S=o[r])==null?void 0:S.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Dg.jsx)(di,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Dg.jsx)(Qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},Ow=FR;var Jc=x(X()),Kt=x(O());var Mw=x(X());var Nw={root:"_root_1ukx5_1"};var Dw=x(w()),jR=({className:e,value:t,...n})=>{let r=k("TextInput",Nw);return(0,Dw.jsx)("input",{className:(0,Mw.default)(e,r.root),type:"text",value:t,...n})},Ta=jR;var Fg={};Ce(Fg,{enUS:()=>HR,nlNL:()=>BR});var HR={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"}]},BR={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 Fw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(w());var UR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},zR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Fg),s=k("LoginTokenDialog",Fw),a=L(bw),l=B(),u=D("productName"),[c,f]=(0,Kt.useState)(e||""),[d,y]=(0,Kt.useState)(0),[S,h]=(0,Kt.useState)(""),g=(0,Kt.useCallback)(async _=>{_.preventDefault(),l(kw({email:c})),y(1)},[n,c]),m=()=>{h(""),y(0)},p=(0,Kt.useCallback)(async _=>{_.preventDefault();let C=UR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:v}));return}l(ba({token:C}))},[n]),v=(0,Kt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:_},"back-button"),[]);return(0,Kt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:v})),a==="done"&&r()},[a]),(0,he.jsx)(di,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Ta,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>f(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:p,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Ta,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),S&&(0,he.jsx)("div",{className:s.errorMessage,children:S}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Jc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},jw=zR;var Bw=x(w()),VR=()=>{let e=L(Tw),t=L(U_),n=D("adminUrl"),r=Rt(),o=()=>r.send(Ci,!1),i=()=>{r.send(Ci,!1),r.send(Ng)};return(0,Bw.jsx)(jw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Hw=VR;var f1=x(Bg()),Je=x(O());var aI={data:null,fetchState:"idle"},Kw=e=>e.contentTypes.data,ka=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),lI=H({name:"contentTypes",initialState:aI,reducers:{},extraReducers:e=>{e.addCase(ka.pending,t=>{t.fetchState="loading"}).addCase(ka.rejected,t=>{t.fetchState="error"}).addCase(ka.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Ww=lI.reducer;function Pa(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 $w=x(O());function qw(e,t){(0,$w.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 Ra=x(O());var Gw={data:null,fetchState:"idle"},ed=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},Wt=M("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)}),uI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),cI=H({name:"entities",initialState:Gw,reducers:{},extraReducers:e=>{e.addCase(Wt.pending,t=>{t.fetchState="loading"}).addCase(Wt.rejected,t=>{t.fetchState="error"}).addCase(Wt.fulfilled,(t,n)=>{t.fetchState="done",t.data=uI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Gw)}}),Xw=cI.reducer;var Ug={};Ce(Ug,{enUS:()=>dI,nlNL:()=>fI});var dI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},fI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Qw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var co=x(w()),pI=({onCopy:e,onUse:t})=>{let n=(0,Ra.useRef)(null),r=k("EntitiesList",Qw),o=j(Ug),i=L(ed),s=B();return(0,Ra.useEffect)(()=>{s(Wt())},[]),(0,Ra.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,co.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,co.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,co.jsx)(te.List,{children:i.map((a,l)=>(0,co.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,co.jsx)("p",{className:r.empty,children:o("noResults")})]})},Yw=pI;var $t=x(O());var Zw={data:null,fetchState:"idle"},Jw=e=>e.summary.data,e1=e=>e.summary.fetchState==="error",An=M("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),mI=H({name:"summary",initialState:Zw,reducers:{},extraReducers:e=>{e.addCase(An.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(An.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(An.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Zw)}}),t1=mI.reducer;var zg={};Ce(zg,{enUS:()=>gI,nlNL:()=>hI});var gI={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."}]},hI={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 n1={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var On=x(w()),yI=({onCopy:e})=>{let t=(0,$t.useRef)(null),n=k("SummaryForm",n1),[r,o]=(0,$t.useState)(""),i=j(zg),s=L(Jw),a=L(e1),l=B(),u=()=>{l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,$t.useEffect)(()=>{l(An())},[]),(0,$t.useEffect)(()=>{o(s||"")},[s]),(0,$t.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,$t.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,On.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,On.jsx)("p",{className:n.error,children:i("error")}):(0,On.jsxs)($t.Fragment,{children:[(0,On.jsx)("div",{className:n.main,children:(0,On.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,On.jsx)("div",{className:n.actions,children:(0,On.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},r1=yI;var Vg={};Ce(Vg,{enUS:()=>vI,nlNL:()=>SI});var vI={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?"}]},SI={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 Tr=x(O());var Kg={};Ce(Kg,{enUS:()=>xI,nlNL:()=>_I});var xI={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"}]},_I={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 o1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var Wg={data:[],fetchState:"idle"},i1=e=>{var t;return(t=e.answer)==null?void 0:t.data},s1=e=>e.answer.fetchState,Ti=fe("answer/resetKnowledgeSearch"),bi=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),wI=H({name:"answer",initialState:Wg,reducers:{},extraReducers:e=>{e.addCase(bi.pending,t=>{t.fetchState="loading"}).addCase(bi.rejected,t=>{t.fetchState="error"}).addCase(bi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Wg).addCase(Ti,()=>Wg)}}),a1=wI.reducer;var Ia=x(w()),l1=()=>(0,Ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ia.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ia.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 Ze=x(w()),EI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Tr.default.useState(""),{setSelected:s}=_r(),a=(0,Tr.useRef)(null),l=k("EntitiesList",o1),u=j(Kg),c=B(),f=L(i1),d=L(s1),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(bi({question:o,promptInstruction:r}))},S=(h,g)=>{c(st({name:"knowledge assist source viewed",data:{question:g,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,Tr.useEffect)(()=>{var h;n&&d==="idle"?c(bi({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,Tr.useEffect)(()=>{d==="done"&&(c(st({name:"knowledge assist question answered",data:{question:o||n,sources:f[f.length-1].answer.sources,answer:f[f.length-1].answer.answer,isFollowUpQuestion:f.length>1},options:{includeConversationData:!0}})),s(f.length-1),i(""))},[d,f]),(0,Tr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ze.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ze.jsx)("div",{className:l.alignRight,children:(0,Ze.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ze.jsxs)(te.ActionsBar,{list:f.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[f.map(({question:h,answer:g},m)=>(0,Ze.jsx)(te.List,{children:(0,Ze.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:p=>S(p,h),sources:g.sources,styles:{title:l.question,description:l.answer},children:h})},`${g.answer}_${m}`)),d==="loading"&&(0,Ze.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ze.jsx)("p",{className:l.status,children:u("error")}),(0,Ze.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ze.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:h=>{s(-1),i(h.target.value)}}),(0,Ze.jsx)("button",{type:"submit",className:l.submit,children:(0,Ze.jsx)(l1,{})})]})]})]})},u1=EI;var CI={data:null,fetchState:"idle"},ki=e=>e.profile.data,td=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],La=M("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)}),bI=H({name:"profile",initialState:CI,reducers:{},extraReducers:e=>{e.addCase(La.pending,t=>{t.fetchState="loading"}).addCase(La.rejected,t=>{t.fetchState="error"}).addCase(La.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),c1=bI.reducer;var Ee=x(w()),TI=200,kI=5,PI=4,RI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),d1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),II=()=>{let e=B(),t=Rt(),n=j(Vg),[r,o]=(0,Je.useState)(!1),[i,s]=(0,Je.useState)(""),a=L($_),l=L(ki),[u,c]=(0,Je.useState)(null),[f,d]=(0,Je.useState)([]),[y,S]=(0,Je.useState)(),h=L(Vt),g=D("showSearch"),m=D("showEntitiesCommand"),p=D("showSummaryCommand"),v=D("showKnowledgeSearch"),_=D("showImageSearch"),C=D("searchTriggerKey"),E=L(Kw),b=L(q_),R=L(W_),P=I=>cn(b.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(I=>I.shouldShow),G=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&d1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:p&&d1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(ze("knowledgeAssist")),shouldShow:v,experimental:!0}].filter(I=>I.shouldShow),V=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],He=(0,Je.useCallback)((0,f1.default)((I,W)=>{e(lo({query:I,type:W,tags:["search-overlay"]}))},TI),[]),un=RI([...V,...N]),Xt=(0,Je.useCallback)((I,W)=>{if(!W)return;let At=[...N,...V].find(({value:Un})=>Un===W);At&&(e(ze("edit")),c({...I,searchTerm:void 0}),d(At.list))},[e,u,V]),mo=(0,Je.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Mg,{suggestion:W});break;default:t.send(Ln,{text:I,suggestion:W})}e(at(!1))},[e]),Bi=I=>{Pa(I.text),e(st({name:"entity copied",data:{entity:I,type:"copy"}})),e(at(!1))},Ar=I=>{t.send(Ln,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(st({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(Ti()),e(at(!1))},Ka=I=>{Pa(I),e(at(!1))},Wa=I=>{t.send(Ln,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(at(!1))},Ui=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),zi=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function cn(I,W){return I.slice(0,y?10:W.toLowerCase()==="image"?PI:kI)}function Vi(I,W,At){return W.reduce((Un,dn)=>At&&y===At?dn.length+Un:cn(dn,At).length+Un,I)}function Or(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,Je.useEffect)(()=>{i?He(i,y):e(qc())},[i,y]),(0,Je.useEffect)(()=>{a==="search"&&e(Ti())},[a]),(0,Je.useEffect)(()=>{h&&e(ka())},[h]),qw(C,()=>e(at(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Or(I=>e(at(I))),onChangeType:I=>S(I),onChangePage:Or(I=>e(ze(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...V,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...G.map(I=>({text:I.label,type:"command"})),...un.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>mo(I,un[W]),onSecondary:(I,W)=>{Xt(un[W-G.length],un[W-G.length].type)},children:[G.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:G.map((I,W)=>(0,Ee.jsx)(te.ListItem,{index:Vi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...V,...N].map(({value:I,label:W,list:At,lineClamp:Un,listOrientation:dn},Ki)=>(0,Ee.jsx)(te.List,{heading:W,orientation:dn==="horizontal"?"horizontal":"vertical",children:cn(At,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Vi(G.length+dt,[...V,...N].slice(0,Ki).map(({list:Nr})=>Nr),I),closeOnSelect:!1,lineClamp:Un,onClick:()=>mo(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Or(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)(Qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:zi,onPrevious:Ui,onUse:I=>{e(ze("search")),mo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(at(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Or(()=>{e(ze("search"))}),children:(0,Ee.jsx)(Yw,{onUse:Wa,onCopy:Bi})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Or(()=>{e(ze("search"))}),children:(0,Ee.jsx)(r1,{onCopy:Ka})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Or(()=>{e(Ti()),e(ze("search"))}),children:(0,Ee.jsx)(u1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ar,onResetQuestion:()=>{e(Ti()),s("")}})})]})},p1=II;var Pi=x(w()),LI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,Pi.jsxs)(m1.Fragment,{children:[e&&(0,Pi.jsx)(p1,{}),(0,Pi.jsx)(Ow,{}),t&&(0,Pi.jsx)(Hw,{})]})},g1=LI;function Ri(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 nd=x(O());var Li=x(O());var h1=x(O());function y1(e,t,n){(0,h1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var AI=/[.*+?^${}()|[\]\\]/g,OI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function NI(e){return e.replace(AI,"\\$&")}function MI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function $g(e){return e.search(OI)}function v1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${NI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function S1(e){return e.replace(xo,'<mark data-type="placeholder">$1</mark>')}function Ii(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function DI(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 qg(e,t,n={}){if(t){let r=MI(t.toLowerCase(),e.toLowerCase()),o=Ii(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=$g(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Py).length>3||t.length>30?DI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ii(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var x1={badge:"_badge_1syy2_1",formattedText:"_formattedText_1syy2_5"};var Gg=x(w()),jI=["search","personal-collection-search","search-autocomplete"];function HI(e,t,n,r={}){let o="";return jI.includes(t)?o=v1(qg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=qg(e,n,r),r.placeholders===!0&&(o=S1(o)),o}var BI=()=>{},UI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=L(ui),i=B(),s=k("TextSuggestion",x1),a=(0,Li.useRef)(null);(0,Li.useEffect)(()=>{let u=setTimeout(()=>{i(o_({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),y1(a,"click",()=>{i(la(e)),i(Ht({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Li.useMemo)(()=>HI(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,Gg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:BI,children:(0,Gg.jsx)(fi,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},_1=UI;var Xg=x(w()),zI=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,nd.useMemo)(()=>{let o=e.map((i,s)=>(0,Xg.jsx)(_1,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Xg.jsx)(nd.Fragment,{children:r})},rd=zI;var w1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Aa=x(w()),VI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",w1),r=L(Ri),o=B(),i=L(Vt),s=L(li),a=L(Zc),l=D("showTextSuggestions");return Sr(()=>{o(Cr({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Aa.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Aa.jsx)("div",{className:n.paper,children:(0,Aa.jsx)(ht,{children:(0,Aa.jsx)(rd,{suggestions:e,selectedIndex:t})})})})},KI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),E1=_n(KI)(VI);var id=x(X()),Ai=x(O());var C1=x(O());function b1(e,t){let[n,r]=(0,C1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return U.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){U.error(s)}}]}var k1=x(X()),Nn=x(O());var Qg={};Ce(Qg,{enUS:()=>WI,nlNL:()=>$I});var WI={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"}]}]},$I={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 T1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var kr=x(w()),Yg=(e,t,n)=>r=>(0,kr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),qI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Qg),i=Rt(),s=k("Login",T1),a=D("productName"),l=(0,Nn.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,Nn.useCallback)(h=>{h.preventDefault(),i.send(Ci,!0)},[t]),c=(0,Nn.useMemo)(()=>h=>(0,kr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,Nn.useCallback)(h=>(0,kr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:S}=(0,Nn.useMemo)(()=>({min:Yg(s,60*10,l),hour:Yg(s,60*60,l),day:Yg(s,60*60*12,l)}),[]);return(0,kr.jsxs)("div",{className:(0,k1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,kr.jsxs)(Nn.Fragment,{children:[(0,kr.jsx)("br",{}),o("snooze",{min:d,hour:y,day:S})]})]})},od=qI;var P1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Oa=x(w()),GI=({title:e})=>{let t=k("SearchTrigger",P1),n=B();return(0,Oa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(at(!0)),children:[(0,Oa.jsx)(vi,{}),(0,Oa.jsx)("span",{className:t.text,children:e})]})},R1=GI;var Zg={};Ce(Zg,{enUS:()=>XI,nlNL:()=>QI});var XI={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"}]},QI={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 I1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),YI=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",I1),r=j(Zg),o=L(Ri),i=Jx(),s=B(),a=(0,Ai.useRef)(null),l=D("searchTriggerKey"),u=D("productName"),c=L(Zc),f=L(Vt),d=L(li),[y,S]=(0,Ai.useState)(null),h=D("showSearch"),g=D("showTextSuggestions"),m=D("adminUrl"),p=D("isEmbedded"),[v,_]=b1("dd-snooze-until-ms",0),C=c||v>Date.now(),E=e.filter(P=>P.source!=="gpt").length,b=()=>{C&&_(0),s(xw(!C))},R=P=>{let N=Date.now()+P*1e3;_(N),U.info(`Snooze until: ${new Date(N)}`),s(Cr({collapse:!0}))};return(0,Ai.useEffect)(()=>{E===0&&S(null)},[e,E]),Sr(()=>{s(Cr({collapse:!0,skipWhenInputFocus:!0}))}),f===null||d===!1?null:f===!1?(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(od,{loginUrl:m,isEmbedded:p,onSnooze:R})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:h&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>S(r(Wc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>S(null),children:(0,ue.jsx)(R1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,id.default)(!y&&n.hintsHidden,n.hints),children:y}),(0,ue.jsx)(jr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),E>0&&g&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(ht,{children:(0,ue.jsx)(rd,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},ZI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),sd=_n(ZI)(YI);var Na=x(w()),JI=({children:e})=>{let n=D("locale").replace("-","");return(0,Na.jsx)($d.Provider,{value:n,children:e})},eL=({store:e,customStyles:t={},children:n})=>(0,Na.jsx)(qm,{store:e,children:(0,Na.jsx)(JI,{children:(0,Na.jsx)($i.Provider,{value:t,children:n})})}),Oi=eL;var Sd=x(X());var Fn=x(O());var L1=x(O()),tL=["div","span","mark","strong","b","i","u","em"];function Jg(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(tL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,L1.cloneElement)(r,{children:Jg(s,t,n+1)})]}return[...e,...t]}function sn(e){return e.tagName.toLowerCase()==="textarea"}var A1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var cd=x(O());var th=x(X()),It=x(O());var ad=x(O()),nL=["bottom","height","left","right","top","width"],rL=(e={},t={})=>nL.some(n=>e[n]!==t[n]),Mn=new Map,O1,N1=()=>{let e=[],t=[];Mn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();rL(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Mn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),O1=window.requestAnimationFrame(N1)};function oL(e,t){return{observe(){let n=Mn.size===0;if(Mn.has(e)){let r=Mn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Mn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&N1()},unobserve(){let n=Mn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Mn.delete(e),Mn.size||cancelAnimationFrame(O1)}}}}function eh(e){let[t,n]=(0,ad.useState)(null);return(0,ad.useLayoutEffect)(()=>{if(!e.current)return;let r=oL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ni=x(O()),D1=x(Ou());var M1={root:"_root_1jq08_1"};var F1=({children:e})=>{let[t,n]=(0,Ni.useState)(null),r=(0,Ni.useContext)($i);return(0,Ni.useLayoutEffect)(()=>{let o=document.createElement("div");return io(o),o.classList.add(M1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,D1.createPortal)(e,t):null};var an={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var ld=x(w()),Mi=(e=!1)=>{let[t,n]=(0,It.useState)(e),r=(0,It.useCallback)(()=>n(!0),[]),o=(0,It.useCallback)(()=>n(!1),[]),i=(0,It.useCallback)(()=>n(a=>!a),[]),s=(0,It.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function nh(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 Di=({className:e,triggerRef:t,boundaryRef:n=(0,It.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=nh,...a})=>{let l=eh(t),u=eh(n),c=(0,It.useMemo)(()=>s(l,u,0),[l,u]);return(0,ld.jsx)(F1,{children:(0,ld.jsx)("div",{className:(0,th.default)(an.ref,{[an.positionAbove]:r==="above",[an.positionBelow]:r==="below",[an.positionLeft]:r==="left",[an.positionRight]:r==="right",[an.alignStart]:o==="start",[an.alignCenter]:o==="center",[an.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,ld.jsx)("div",{className:(0,th.default)(e,an.root),children:i})})})};var Pr=x(w()),iL=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",Tt),r=Mi(document.activeElement===t);return Sr(()=>r.close()),(0,cd.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Pr.jsxs)(cd.Fragment,{children:[(0,Pr.jsx)("mark",{className:Tt.caret,ref:r.triggerRef}),r.opened&&(0,Pr.jsx)(Di,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Pr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Pr.jsx)(sd,{inline:!0})})})]})},ud=class extends Ut{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(sn(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:$g(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Pr.jsx)(iL,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var U1=x(X());var gd=x(O());function j1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function dd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function H1(e){return e!=null}var B1=x(X()),fd=x(O());var rh=x(w()),pd=(0,fd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,fd.useRef)(null),i=k("TabCompletion",Tt);return(0,rh.jsx)("div",{ref:dd([o,r]),className:(0,B1.default)(e,i.popoverContentContainer),...n,children:(0,rh.jsx)("div",{className:i.popoverContent,children:t})})});var Rr=x(w()),sL=e=>t=>{let n=nh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},aL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Tt),s=Mi(),a=(0,gd.useMemo)(()=>sL(e.getBoundingClientRect()),[e]),[l,u]=Fc(e);return(0,gd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Rr.jsxs)("span",{children:[(0,Rr.jsx)("mark",{ref:dd([l,s.triggerRef]),className:(0,U1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Rr.jsx)(Di,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Rr.jsx)(pd,{style:n,children:(0,Rr.jsx)("div",{className:i.hintText,children:o})})})]})},md=class extends Ut{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${j1(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(H1);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,Rr.jsx)(aL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var yd=x(X());var Ke=x(O());var oh=x(w()),z1=()=>(0,oh.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,oh.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 Ir=x(O());var K1=x(Bg());var V1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function hd(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 ih(e){return e.replace("https://www.","").replace("https://","")}var Lt=x(w()),lL=3,uL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),cL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=lL})=>{let i=k("LinkSearch",V1),[s,a]=(0,Ir.useState)(""),l=B(),u=L(iw("url")),c=L(G_("URL",uL)),[f,d]=(0,Ir.useState)(c.length-1),y=D("fallbackImage"),S=p=>{let v=p.target;a(v.value)},h=(p,v)=>{p.stopPropagation(),p.preventDefault(),window.open(v,"_blank")},g=p=>{var C;let v=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(v),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Ir.useCallback)((0,K1.default)(p=>{l(lo({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,Ir.useEffect)(()=>{s&&m(s)},[s]),(0,Ir.useEffect)(()=>()=>{l(qc())},[]),(0,Lt.jsxs)("div",{className:i.root,children:[(0,Lt.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,v)=>(0,Lt.jsx)(oe,{selected:f===v,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,Lt.jsxs)(me,{children:[(0,Lt.jsx)(me.Image,{src:hd(p,"small",y||void 0),title:p.title||p.text}),(0,Lt.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,Lt.jsx)(me.Title,{children:p.title||ih(p.text)}),p.title&&ih(p.text)]}),(0,Lt.jsx)(oe.Actions,{children:(0,Lt.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,Lt.jsx)(Ta,{value:s,onChange:S,autoFocus:!0,placeholder:n,onKeyUp:g})]})},W1=cL;var sh={};Ce(sh,{enUS:()=>dL,nlNL:()=>fL});var dL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},fL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ve=x(w()),pL=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",Tt);return(0,Ve.jsx)("mark",{ref:t,className:(0,yd.default)(n.matchSelection)},"selection-start")}),mL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(sh),s=k("TabCompletion",Tt),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),f=B(),d=Mi(document.activeElement===r),[y]=(0,Ke.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ke.useEffect)(()=>()=>y.detach(),[]),(0,Ke.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(y.setStart(h,0),y.setEnd(g,0))},[e.current,a.current]),Sr(()=>{d.close()});let S=(0,Ke.useCallback)(h=>{let g=y.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(Cc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("mark",{ref:a,className:(0,yd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ve.jsx)(Di,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ve.jsxs)(pd,{style:n,ref:l,children:[(0,Ve.jsx)("div",{className:(0,yd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ve.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ve.jsx)(z1,{}),(0,Ve.jsx)("span",{children:"\xA0"}),(0,Ve.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ve.jsx)(W1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:S,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},vd=class extends Ut{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ke.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,Ve.jsx)(pL,{ref:this.startRef}):(0,Ve.jsx)(mL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Dn=x(w()),gL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",A1),c=D("insertLink"),f=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),y=Hc(a),S=(0,Fn.useRef)(null);(0,Fn.useEffect)(()=>{sn(a)&&y&&Bc(a,y)},[y]);let h=(0,Fn.useCallback)(p=>{if(!o||!n)return p;let v=[(0,Dn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Dn.jsx)("span",{"data-testid":"tab-completion",className:(0,Sd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&v.push((0,Dn.jsx)("span",{className:(0,Sd.default)(u.hint,u.resetIndent),children:(0,Dn.jsx)(yl,{keyCode:"tab"},"tabHint")})),Jg(p,v)},[o,n,r]),g=(0,Fn.useMemo)(()=>{let p=[];return d&&p.push(new ud("inline")),c&&p.push(new vd("selection")),p.push(new mi("placeholders")),i&&p.push(new md("keywords")),p},[d,c,i]),m=(0,Fn.useMemo)(()=>{let p=window.getComputedStyle(a);return{"--dd-color":p.color,"--dd-font-size":p.fontSize,"--dd-font-family":p.fontFamily,"--dd-font-variant":p.fontVariant}},[]);return e?(0,Dn.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(S.current=p==null?void 0:p.parentElement)},className:u.root,style:m,children:[(0,Dn.jsx)(fi,{tagName:"span",containerTagName:"div",className:(0,Sd.default)(u.container,u.agentText),disableLineBreaks:sn(a),content:t||"\u200B",onAfterParse:h,matchers:g,selection:y,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:S,inlineSuggestionsOnlyAtEnd:!f}),(0,Dn.jsx)("br",{})]}):null},hL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var h;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ii(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:S}=n;return{showTabHint:c,showStyleSuggestions:S,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},$1=_n(hL)(gL);var NE=x(X()),ME=x(O());var q1={list:[],fetchState:"idle",isInitialRequest:null},X1=e=>e.autoflows.list||[],G1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},jn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),ah=M("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(jn(e.platformSessionId))}),lh=M("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(jn(e.platformSessionId))}),yL=H({name:"autoflows",initialState:q1,reducers:{},extraReducers:e=>{e.addCase(ah.pending,(t,n)=>{let r=G1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(lh.pending,(t,n)=>{let r=G1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(jn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(jn.rejected,t=>{t.fetchState="error"}),e.addCase(jn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>q1)}}),Q1=M("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(jn(e))}),o.on("sessionCompleted",()=>{n(jn(e))})}),Y1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Z1=yL.reducer;var J1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},eE=e=>e.customMessages.list,tE=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),nE=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),rE=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ma=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),xd=M("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)}),_d=M("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)}),oE=H({name:"customMessages",initialState:J1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ma.rejected,t=>{t.fetchState="error"}).addCase(Ma.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(xd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(_d.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(_d.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(J,()=>J1)}}),iE=M("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(oE.actions.onCustomMessage(i))})}),sE=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),aE=oE.reducer;var vL={jwt:null,accountUrl:null,interval:null},lE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},uh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ch=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(uh()),setInterval(()=>r(uh()),n)}),uE=H({name:"exchangeToken",initialState:vL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(uh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(ch.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:cE}=uE.actions,dE=uE.reducer;function fE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var _E=x(O());var vE=x(X()),SE=x(O());var mE=x(X());var pE={root:"_root_838fd_1"};var hE=x(w()),SL=({className:e,children:t})=>{let n=k("Unicode",pE);return(0,hE.jsx)("span",{className:(0,mE.default)(e,n.root),children:t})},gE=SL;var yE={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var dh={};Ce(dh,{enUS:()=>xL,nlNL:()=>_L});var xL={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"}]},_L={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 lt=x(w()),EL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",yE),a=j(dh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,lt.jsxs)(oe,{className:(0,vE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,lt.jsx)(me,{children:(0,lt.jsxs)(me.Content,{children:[(0,lt.jsxs)(me.Title,{children:[t&&(0,lt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,lt.jsx)("span",{children:r})]})}),(0,lt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,lt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,lt.jsxs)(SE.Fragment,{children:[(0,lt.jsx)(gE,{children:u})," ",(0,lt.jsx)("span",{children:a(l)})]})})})]})},xE=EL;var fh=x(w()),CL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},bL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,fh.jsx)(_E.Fragment,{children:e.map(o=>(0,fh.jsx)(xE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||CL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),TL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},kL={onStartAutoflow:ah,onStopAutoflow:lh},wE=_n(TL,kL)(bL);var wd=x(O());var gh=x(X());var ph=x(w()),mh=()=>(0,ph.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,ph.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 EE={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var ln=x(w()),PL=({entities:e})=>{let t=k("EntitiesWidgetList",EE),[n,r]=(0,wd.useState)(void 0),o=B(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Pa(a.text),o(st({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,wd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,ln.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,ln.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,ln.jsx)("span",{className:t.entityText,children:a.text}),(0,ln.jsxs)("span",{className:t.iconWrapper,children:[(0,ln.jsx)("span",{className:(0,gh.default)(t.icon),children:(0,ln.jsx)(mh,{})}),(0,ln.jsx)("span",{className:(0,gh.default)(t.icon,n===l&&t.iconClicked),children:(0,ln.jsx)(mh,{})})]})]},a.text))})},CE=PL;var bE=x(X()),hh=x(O());var Da={};Ce(Da,{enUS:()=>RL,nlNL:()=>IL});var RL={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"}],answer:[{type:0,value:"Answer"}]},IL={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"}],answer:[{type:0,value:"Antwoord"}]};var Hn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var et=x(w()),LL=({suggestion:e})=>{let t=j(Da),n=B(),r=L(tE(e.text)),o=L(nE(e.text)),i=L(rE(e.text)),s=L(hc),{replyOptions:a}=e,l=(0,hh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(xd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,hh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(_d({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,et.jsxs)(oe,{onClick:l,className:(0,bE.default)(Hn.root,{[Hn.isUsed]:r,[Hn.hasError]:i}),children:[(0,et.jsx)(me,{children:(0,et.jsxs)(me.Content,{children:[(0,et.jsxs)(me.Title,{className:Hn.title,children:[e.text," ",(0,et.jsx)(vl,{className:Hn.label,children:"analyse tool"})," ",i&&(0,et.jsx)("span",{className:Hn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,et.jsx)("ul",{className:Hn.quickReplies,children:a.map(c=>(0,et.jsx)("li",{className:Hn.quickReply,children:c.title},c.title))})]})}),(0,et.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,et.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,et.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,et.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},TE=LL;var yh=x(w()),kE=()=>(0,yh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,yh.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 PE=x(O());var ut=x(w()),AL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Gc(o),s=j(Da),a=D("showImages"),l=D("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,PE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,ut.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,ut.jsxs)(me,{children:[a&&e.image&&(0,ut.jsx)(me.Image,{src:hd(e,"small",l||void 0),title:e.title}),(0,ut.jsxs)(me.Content,{children:[e.title&&(0,ut.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,ut.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,ut.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,ut.jsxs)(oe.Actions,{children:[i&&(0,ut.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},RE=AL;var Fa=x(w()),OL=({contentType:e,lines:t,suggestions:n})=>{let r=Rt(),o=L(xi),i=a=>{r.send(Og,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Ln,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Fa.jsx)(Fa.Fragment,{children:n.map(a=>(0,Fa.jsx)(RE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},IE=OL;var vh={};Ce(vh,{enUS:()=>NL,nlNL:()=>ML});var NL={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"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},ML={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"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var LE={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var Sh=x(w()),AE=()=>(0,Sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Sh.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 xh=x(w()),OE=()=>(0,xh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,xh.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 z=x(w()),Ed=(e,t)=>{let n=L(Vt);(0,ME.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},DL=()=>{let e=j(vh),t=B(),n=D("isEmbedded"),r=k("Widget",LE),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=L(ki),f=L(td),d=L(X1),y=L(ed),S=L(eE),h=L(yc),g=L(li),m=L(Vt),p=L(hc),v=L(fE),_=L(xi),C=Rt(),E=L(aw),b=L(lE("/admin/personal-collection")),R=D("adminUrl");if(Ed(()=>(t(Ma(p)),t(iE(p)),()=>{t(sE(p))}),[t,g,i,p]),Ed(()=>(t(jn(p)),t(Q1(p)),()=>{t(Y1(p))}),[t,g,o,p]),Ed(()=>{f.forEach(({type:N})=>{t(N==="entities"?Wt():Rn(N))})},[t,g,h,c]),Ed(()=>(t(ch()),()=>{t(cE())}),[t,g,s,h]),g===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(od,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||m===null||E||v)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||b;return(0,z.jsx)("div",{className:(0,NE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(Sl,{className:r.sectionList,children:[P&&(0,z.jsx)(zn,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(vi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(OE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,z.jsx)(AE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,z.jsx)(kE,{}),e("linkPersonalcollection")]})]})}),i&&S.length>0&&(0,z.jsx)(zn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(ht,{withDivider:!0,children:S.map(N=>(0,z.jsx)(TE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(zn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(wE,{})})}),f.map(({type:N,title:G,amount:V,lines:He})=>{var un;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(zn,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(CE,{entities:y})},N);default:return((un=_[N])==null?void 0:un.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(zn,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(IE,{lines:He,contentType:N,suggestions:_[N].suggestions.slice(0,V)||[]})})},N)}})]})})},DE=DL;function Fi(e){let t=new Range;return t.selectNodeContents(e),t}function FE(e,t,n){try{return Lr(e,t,n),!0}catch{return!1}}function Cd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function bd(e){return"tagName"in e&&e.tagName==="BR"}var ja=/[\u200B-\u200D\uFEFF]/g;function Lr(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,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.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(ja,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let S=s(u,t-o);S===0&&!y?r.setStartBefore(l):r.setStart(l,S)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(bd(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;Cd(l)&&u&&!Cd(u)&&!bd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ha(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(f){let d=f===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let S=f.textContent;d&&(a=u+S.substring(0,r).replace(ja,"").length),y&&(l=u+S.substring(0,i).replace(ja,"").length),u+=S.replace(ja,"").length;break}case Node.ELEMENT_NODE:{let S=f.nextSibling===null;bd(f)&&!S&&u++;for(let h=0;h<f.childNodes.length;h++){let g=d&&h===r,m=y&&h===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[h]),y&&h===i-1&&(l=u),l!==void 0))break}!y&&Cd(f)&&!S&&u++,y&&(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 Ba(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,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,y=f?i:void 0,S=u.textContent.replace(ja,"");d===0&&y===void 0?a+=S:a+=S.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&bd(u)&&!d&&(a+=`
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||iR)();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(nR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,v_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==y_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Nc[l]||Nc[s];if(!this.isSafe(t)||!l.match(rR)&&(!n&&(!u||u===cg)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===vr?c=!0:u===no?c=Number.parseFloat(String(c)):u!==Oc&&(c=String(c)),r[dg[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 ma[t]?{...n,...ma[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===y_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let S=this.applyNodeFilters(d,c);if(!S)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(S,y);let m=s(S,h,y);if(m===null)return;if(typeof m<"u"){l.push(oo.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,y))){var f;this.keyIndex+=1;let g=this.extractAttributes(S),m={tagName:d};g&&(m.attributes=g),y.void&&(m.selfClose=y.void),l.push(oo.default.createElement(Mc,{...m,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(S,y)))}else l=[...l,...this.parseNode(S,y.tagName?y:n)]}else if(c.nodeType===tR){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(oR);){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:f,props:d}=n[a],y;if(u)y=s.length,r.push(f.createElement(c,d));else{let S=o.match(new RegExp(`{{{/${a}}}}`));y=S.index+S[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,S.index),n),d))}o=o.slice(y)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function sR(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",f=c==="fragment"?!0:u,d;if(a)d=a;else{let y=new Dc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?oo.default.createElement(oo.default.Fragment,null,d):oo.default.createElement(Mc,{attributes:n,className:r,tagName:c},d)}function fi(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:f="span",noWrap:d=!1,...y}=e,S=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];S.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let p=g.reduce((C,E)=>E(C,e),r??""),v=new Dc(p,y,S,h),_=m.reduce((C,E)=>E(C,e),v.parse());return oo.default.createElement(sR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var wg=x(X());var pg={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var x_=x(X());var pi=x(O());function S_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Fc(e){let t=(0,pi.useRef)(null),[n,r]=(0,pi.useState)(!1);return(0,pi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=S_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,S=f/i,h=d.getBoundingClientRect(),g=y>h.x&&y<h.x+h.width&&S>h.y&&S<h.y+h.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=S_(()=>{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]}var Tt={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var mg=x(w()),aR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Tt),[r,o]=Fc(e);return(0,mg.jsx)("mark",{ref:r,className:(0,x_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},mi=class extends Ut{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,mg.jsx)(aR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var gi=x(O());function jc(e){return e.contentEditable==="true"}function lR(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 __(e){let{selectionStart:t,selectionEnd:n}=jc(e)?lR(e):e;return[t,n]}function Hc(e){let[,t]=(0,gi.useState)(),n=(0,gi.useRef)(null);return n.current=__(e),(0,gi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=__(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 Bc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(xo);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 w_=x(O());function Sr(e){(0,w_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function io(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var E_,on=new Map,uR=["bottom","height","left","right","top","width"],cR=(e={},t={})=>uR.some(n=>e[n]!==t[n]);function C_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...C_(t)]:[]}function b_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var gg=!1,T_=()=>{gg=!0;let e=[];on.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),on.delete(n);return}let r=n.getBoundingClientRect();cR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(b_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),on.size!==0&&(E_=window.requestAnimationFrame(T_))};function hg(e,t){let n=C_(e),r=[],o=n.map((i,s)=>hg(i,a=>{r[s]=a;let l=on.get(e);if(!l)return;let u=r.reduce(b_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),on.has(e)){let s=on.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else on.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!gg&&T_()},unobserve(){o.forEach(s=>s.unobserve());let i=on.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||on.delete(e),on.size||(cancelAnimationFrame(E_),gg=!1)}}}}var k_,sn=new Map,P_=()=>{sn.forEach((e,t)=>{if(!t.isConnected){sn.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)))}),sn.size!==0&&(k_=window.requestAnimationFrame(P_))};function R_(e,t){return{observe(){let n=sn.size===0;sn.has(e)?sn.get(e).callbacks.push(t):sn.set(e,{visible:void 0,callbacks:[t]}),n&&P_()},unobserve(){let n=sn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||sn.delete(e),sn.size||cancelAnimationFrame(k_)}}}}var yg=["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 vg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function hi(e){return parseFloat(e)}function Uc(e){return Math.round(e*1e6)}function I_(e){return e/1e6}function Sg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=hi(e.width),i=hi(e.borderLeftWidth),s=hi(e.borderRightWidth),a=hi(e.paddingRight),l=I_(Uc(o)-Uc(i)-Uc(s)),u=I_(Uc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function so(e,t={}){var l;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",io(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};vg(r,n,yg),Sg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=R_(e,()=>{vg(r,n,yg),Sg(r,e,n),i(),setTimeout(i,0)}),a=hg(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(vg(r,n,yg),Sg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),d=hi(f.borderTopWidth),y=hi(f.borderBottomWidth),S=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${S}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var xg={};Ce(xg,{enUS:()=>dR,nlNL:()=>fR});var dR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},fR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var ga=x(w()),L_=()=>(0,ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ga.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ga.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var _g=x(w()),A_=()=>(0,_g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,_g.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});function pR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function zc(e){return e?e instanceof ShadowRoot?zc(e.host):e===e.ownerDocument.body?e.ownerDocument:pR(e)?e:zc(e.parentNode):document.body}var O_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(O_||{}),Tn=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();gr(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(O_).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(){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 t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()});let n=zc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}}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}};var kn=class extends Tn{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())}};var Qe=x(w()),mR=({value:e,onUse:t,...n})=>{var c;let r=j(xg),o=B(),i=k("EditSuggestionTextInput",pg),[s,a]=(0,kt.useState)(null),l=(0,kt.useRef)(null),u=((c=e.match(xo))==null?void 0:c.length)||0;return(0,kt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new kn(l.current),f.on("change",({plainText:d})=>{o(Xe.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Xe.actions.registerKeyDown(Ec(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Xe.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Xe.actions.registerCut(d))})),()=>{o(Xe.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,kt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,kt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let f=l.current.value.length;l.current.setSelectionRange(f,f),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(gR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,wg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(L_,{}):(0,Qe.jsx)(A_,{})]})]})},gR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",pg),r=(0,kt.useRef)(null),o=Hc(e);return(0,kt.useEffect)(()=>{Bc(e,o)},[o,e]),(0,Qe.jsx)(hR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,wg.default)(n.root,n.agentText),children:[(0,Qe.jsx)(fi,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new mi("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},hR=({inputElement:e,children:t})=>{let n=(0,kt.useRef)(null);return(0,kt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=so(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},N_=mR;var Si=x(O());var M_=x(O()),Vc=x(X());var Ye={root:"_root_185k9_1",list:"_list_185k9_2",listWrapper:"_listWrapper_185k9_6",listHorizontal:"_listHorizontal_185k9_10",page:"_page_185k9_19",search:"_search_185k9_25",pageNav:"_pageNav_185k9_33",pageTitle:"_pageTitle_185k9_41",pageBackButton:"_pageBackButton_185k9_48",listHeading:"_listHeading_185k9_62",listItem:"_listItem_185k9_70",listItemContent:"_listItemContent_185k9_79",listItemText:"_listItemText_185k9_97",listItemDescription:"_listItemDescription_185k9_105",truncate:"_truncate_185k9_112",lineClamp:"_lineClamp_185k9_118",listItemTitle:"_listItemTitle_185k9_125",listItemAction:"_listItemAction_185k9_132",listItemPrimaryAction:"_listItemPrimaryAction_185k9_146",listItemSelected:"_listItemSelected_185k9_151",sources:"_sources_185k9_155",sourcesTitle:"_sourcesTitle_185k9_162",source:"_source_185k9_155",icon:"_icon_185k9_177",searchIcon:"_searchIcon_185k9_194",searchInputWrapper:"_searchInputWrapper_185k9_199",searchInput:"_searchInput_185k9_199",select:"_select_185k9_220",selectType:"_selectType_185k9_237",selectWrapper:"_selectWrapper_185k9_241",image:"_image_185k9_271",imageSrc:"_imageSrc_185k9_278",imageSrcHidden:"_imageSrcHidden_185k9_289",imageSrcStatus:"_imageSrcStatus_185k9_293",imageTitle:"_imageTitle_185k9_303",actions:"_actions_185k9_308",actionsWrapper:"_actionsWrapper_185k9_312",actionsBar:"_actionsBar_185k9_318",actionButton:"_actionButton_185k9_327",actionShortcut:"_actionShortcut_185k9_345",actionShortcutFixKerning:"_actionShortcutFixKerning_185k9_352"};var ao={};Ce(ao,{enUS:()=>yR,nlNL:()=>vR});var yR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},vR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var xr=x(w()),SR=({src:e,title:t})=>{let n=k("CommandPalette",Ye),[r,o]=(0,M_.useState)("loading"),i=j(ao);return(0,xr.jsxs)("div",{className:n.image,children:[(0,xr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Vc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,Vc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,Vc.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(Za,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},D_=SR;var F_=x(O()),j_=x(X());var ha=x(w());function Eg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Ye);return F_.default.Children.count(e)===0?null:(0,ha.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ha.jsx)("h4",{className:r.listHeading,children:t}),(0,ha.jsx)("div",{className:(0,j_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ya=x(X());var Kc=x(O()),U_=x(w()),H_=Kc.default.createContext(void 0);function _r(){let e=Kc.default.useContext(H_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var B_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Kc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,U_.jsx)(H_.Provider,{value:s,children:e})};var Pt=x(w());function Cg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=_r(),y=k("CommandPalette",Ye);function S(h){r(h),e&&d(!1)}return(0,Pt.jsxs)("div",{className:(0,ya.default)(y.listItem,f===i&&y.listItemSelected),children:[(0,Pt.jsxs)("button",{type:"button",className:(0,ya.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:S,...c,children:[(0,Pt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,Pt.jsx)("p",{className:(0,ya.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,Pt.jsx)("p",{className:(0,ya.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,Pt.jsx)(hl,{})]}),l&&(0,Pt.jsxs)("div",{className:y.sources,children:[(0,Pt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,Pt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,Pt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var wr=x(w());function bg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ao),s=k("CommandPalette",Ye),{page:a}=_r();return a!==n?null:(0,wr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,wr.jsxs)("div",{className:s.pageNav,children:[(0,wr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,wr.jsx)(Rc,{}),i("back")]}),t&&(0,wr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,wr.jsx)(hl,{})]}),e]})}var Er=x(O());var Wc=()=>/Mac/i.test(navigator.platform);var xR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=xR;function _R(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[_R(n)]:re(e[n])}),{}):e}function Tg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function we(e){return Array.isArray(e)?e.map(we):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Tg(n)]:we(e[n])}),{}):e}var wR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Sa=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)||""}},va=M("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?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),kg=M("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}),Pg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),z_=e=>e.info.agentInfo,V_=H({name:"info",initialState:wR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(va.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(va.rejected,t=>{t.fetchState="error"}).addCase(va.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(kg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Pg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:K_}=V_.actions,W_=V_.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search"},$_=e=>e.search.isOpen,q_=e=>e.search.page,G_=e=>e.search.list;function X_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var lo=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:Sa(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),Q_=H({name:"search",initialState:$c,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=$c.fetchState,e.list=$c.list}},extraReducers:e=>{e.addCase(lo.pending,t=>{t.fetchState="loading"}).addCase(lo.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(lo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>$c)}}),{resetSearch:qc,setIsOpen:at,setPage:ze}=Q_.actions,Y_=Q_.reducer;var ER=/(https?:\/\/[^\s]+)/,Gc=e=>e.split(" ").find(t=>ER.test(t));var Rg=x(X());var Xc=x(w()),CR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ye);return(0,Xc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Rg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Xc.jsx)("span",{className:(0,Rg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},yi=CR;var Pn=x(w()),bR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Ye),a=j(ao),{selected:l,setSelected:u}=_r(),c=i[l],f=c&&typeof c.text=="string"&&Gc(c.text),d=(0,Er.useRef)(null);function y(v){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,E=0;v==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C===_.length-1?0:C+1):v==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C?C-1:_.length-1):u(0);let b=_[E];b&&typeof E=="number"&&(u(E),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function S(){if(!d.current)return;let v=d.current.querySelectorAll(".command-palette-list-item"),_=0;v.forEach((E,b)=>{b===l&&(_=b)});let C=v[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,Er.useCallback)(v=>{if(v.key==="Enter"&&v.altKey&&f){h();return}if(v.key==="Enter"&&v.shiftKey){m();return}if(v.key==="ArrowDown"){v.preventDefault(),v.stopPropagation(),y("down");return}if(v.key==="ArrowUp"){v.preventDefault(),v.stopPropagation(),y("up");return}v.key==="Enter"&&l!==-1&&(v.preventDefault(),v.stopPropagation(),S())},[l]);return(0,Er.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,Pn.jsxs)("div",{className:s.actions,children:[(0,Pn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,Pn.jsxs)("div",{className:s.actionsBar,children:[f&&(0,Pn.jsx)(yi,{onClick:h,shortKeys:[Wc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Pn.jsxs)(Er.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Pn.jsx)(yi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,Pn.jsx)(yi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},J_=bR;var ew=x(O());var xa=x(w()),vi=()=>(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 zt=x(w());function TR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ye);return(0,zt.jsxs)("div",{className:l.search,children:[(0,zt.jsx)("div",{className:l.searchIcon,children:(0,zt.jsx)(vi,{})}),(0,zt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,zt.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,zt.jsx)("div",{className:l.selectWrapper,children:(0,zt.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,zt.jsx)("option",{children:r}),o.map(u=>(0,zt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var tw=(0,ew.forwardRef)(TR);var _a=x(w());function uo({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:f,search:d}){let[y,S]=(0,Si.useState)(0),h=(0,Si.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var p;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(p=h.current)==null||p.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Si.useEffect)(()=>{S(0)},[d,r]),(0,_a.jsx)(di,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,children:(0,_a.jsxs)(B_,{selected:y,setSelected:S,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,_a.jsx)(tw,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}uo.Page=bg;uo.List=Eg;uo.Image=D_;uo.ListItem=Cg;uo.ActionsBar=J_;uo.Button=yi;var te=uo;var Fe=x(w()),kR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",f_),l=B(),u=j(og),c=L(S=>S.overlayInput.text);(0,Ig.useEffect)(()=>{e&&(l(Xe.actions.reset()),l(Xe.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Xe.actions.commitSuggestion()))},[e]);let f=S=>{S.preventDefault(),d(c)},d=S=>{l(Tc(S)),t(S)},y=S=>h=>{c!==s?window.confirm(u("warning"))&&S(h):S(h)};return(0,Ig.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)(Qd,{labels:e.searchKeywords}),(0,Fe.jsx)(N_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:f,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&y(i),children:(0,Fe.jsx)(Rc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(p_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:y(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Qc=kR;var PR=["{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}"],RR=new RegExp(PR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function nw(e,t){let n=e.split(RR),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 f=a.charAt(0),d=0;do u=f?t.indexOf(f,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 rw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var iw={suggestions:[],fetchState:"idle",isInitialRequest:null},ow={default:iw},sw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},aw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},lw=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},xi=e=>e.textSuggestions,uw=e=>t=>t.text.startsWith(e),Yc=fe("textSuggestions/refresh"),Rn=M("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=ui(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Sa(r),e);if(e==="default"){let c=s?l.filter(uw(a)):l;t.dispatch(Cn(c.slice(0,i)))}return l}),wa=M("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,{...Sa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(uw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?nw(c.text,e):c.text}))),l=rw(l,i),t.dispatch(Cn(l)),l}),cw=H({name:"textSuggestions",initialState:ow,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(Rn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||iw;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Rn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Rn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(wa.pending,t=>{t.default.fetchState="loading"}).addCase(wa.rejected,t=>{t.default.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>ow)}}),{setTextSuggestions:dw,setSuggestionState:fw}=cw.actions,pw=cw.reducer;var mw={contentType:null,suggestion:null},gw=e=>e.activeSuggestion.suggestion,hw=e=>e.activeSuggestion.contentType,yw=H({name:"activeSuggestion",initialState:mw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>mw)}}),{setActiveSuggestion:In,resetActiveSuggestion:Lg}=yw.actions,vw=yw.reducer;var Ag={};Ce(Ag,{enUS:()=>IR,nlNL:()=>LR});var IR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},LR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var AR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Zc=({ui:e})=>e.overlayCollapsed;var Sw=H({name:"ui",initialState:AR,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:Ea,setInputHasFocus:_i,setOverlayCollapsed:Cr,setOpenOverlayWhenTyping:xw,setOverlayCollapsedUserOverwrite:_w}=Sw.actions,ww=Sw.reducer;var Ca=x(O()),Cw=x(w()),Ew=Ca.default.createContext(null),wi=({broadcastEvents:e,children:t})=>{let n=Ca.default.useMemo(()=>e,[]);return(0,Cw.jsx)(Ew.Provider,{value:n,children:t})},Rt=()=>{let e=(0,Ca.useContext)(Ew);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var OR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Vt=e=>e.auth.isLoggedIn,bw=e=>e.auth.loginFetchState,Tw=e=>e.auth.verifyFetchState,kw=e=>e.auth.showLoginOverlay,br=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Pw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),ba=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Rw=H({name:"auth",initialState:OR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(br.pending,t=>{t.loginFetchState="loading"}),e.addCase(br.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(br.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ba.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ba.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ba.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ei,setShowLoginOverlay:Iw}=Rw.actions,Lw=Rw.reducer;var Og="SetActiveSuggestion",Ci="ShowLoginOverlay",Ng="UserLoggedIn",NR="UserLoggedOut",Ln="ApplySuggestion",Mg="ApplyImageSuggestion",MR="ShowCommandPalette",DR=e=>({[Og]:t=>{e.dispatch(fw(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[MR]:t=>{e.dispatch(at(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Ci]:t=>{e.dispatch(Iw(t))},[Ng]:()=>{e.dispatch(br())},[NR]:()=>{e.dispatch(br())},[Mg]:t=>{e.dispatch(Pc({suggestion:t.suggestion}))},[Ln]:t=>{e.dispatch(Ht({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(yr())}}),Aw=DR;var Dg=x(w()),FR=()=>{var S;let[e,t]=(0,Ow.useState)(!1),n=L(gw),r=L(hw),o=L(xi),i=B(),s=Rt(),a=j(Ag),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Lg()),i(_i(!0)),i(Xe.actions.reset())},c=(h,g)=>{i(Lg()),i(_i(!0)),s.send(Ln,{text:h,suggestion:{...g,source:`${g.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(S=o[r])==null?void 0:S.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Dg.jsx)(di,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Dg.jsx)(Qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},Nw=FR;var Jc=x(X()),Kt=x(O());var Dw=x(X());var Mw={root:"_root_1ukx5_1"};var Fw=x(w()),jR=({className:e,value:t,...n})=>{let r=k("TextInput",Mw);return(0,Fw.jsx)("input",{className:(0,Dw.default)(e,r.root),type:"text",value:t,...n})},Ta=jR;var Fg={};Ce(Fg,{enUS:()=>HR,nlNL:()=>BR});var HR={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"}]},BR={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 jw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(w());var UR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},zR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Fg),s=k("LoginTokenDialog",jw),a=L(Tw),l=B(),u=D("productName"),[c,f]=(0,Kt.useState)(e||""),[d,y]=(0,Kt.useState)(0),[S,h]=(0,Kt.useState)(""),g=(0,Kt.useCallback)(async _=>{_.preventDefault(),l(Pw({email:c})),y(1)},[n,c]),m=()=>{h(""),y(0)},p=(0,Kt.useCallback)(async _=>{_.preventDefault();let C=UR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:v}));return}l(ba({token:C}))},[n]),v=(0,Kt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:_},"back-button"),[]);return(0,Kt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:v})),a==="done"&&r()},[a]),(0,he.jsx)(di,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Ta,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>f(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:p,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Ta,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),S&&(0,he.jsx)("div",{className:s.errorMessage,children:S}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Jc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Hw=zR;var Uw=x(w()),VR=()=>{let e=L(kw),t=L(z_),n=D("adminUrl"),r=Rt(),o=()=>r.send(Ci,!1),i=()=>{r.send(Ci,!1),r.send(Ng)};return(0,Uw.jsx)(Hw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Bw=VR;var p1=x(Bg()),Je=x(O());var aI={data:null,fetchState:"idle"},Ww=e=>e.contentTypes.data,ka=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),lI=H({name:"contentTypes",initialState:aI,reducers:{},extraReducers:e=>{e.addCase(ka.pending,t=>{t.fetchState="loading"}).addCase(ka.rejected,t=>{t.fetchState="error"}).addCase(ka.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),$w=lI.reducer;function Pa(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 qw=x(O());function Gw(e,t){(0,qw.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 Ra=x(O());var Xw={data:null,fetchState:"idle"},ed=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},Wt=M("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)}),uI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),cI=H({name:"entities",initialState:Xw,reducers:{},extraReducers:e=>{e.addCase(Wt.pending,t=>{t.fetchState="loading"}).addCase(Wt.rejected,t=>{t.fetchState="error"}).addCase(Wt.fulfilled,(t,n)=>{t.fetchState="done",t.data=uI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Xw)}}),Qw=cI.reducer;var Ug={};Ce(Ug,{enUS:()=>dI,nlNL:()=>fI});var dI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},fI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Yw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var co=x(w()),pI=({onCopy:e,onUse:t})=>{let n=(0,Ra.useRef)(null),r=k("EntitiesList",Yw),o=j(Ug),i=L(ed),s=B();return(0,Ra.useEffect)(()=>{s(Wt())},[]),(0,Ra.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,co.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,co.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,co.jsx)(te.List,{children:i.map((a,l)=>(0,co.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,co.jsx)("p",{className:r.empty,children:o("noResults")})]})},Zw=pI;var $t=x(O());var Jw={data:null,fetchState:"idle"},e1=e=>e.summary.data,t1=e=>e.summary.fetchState==="error",An=M("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),mI=H({name:"summary",initialState:Jw,reducers:{},extraReducers:e=>{e.addCase(An.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(An.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(An.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Jw)}}),n1=mI.reducer;var zg={};Ce(zg,{enUS:()=>gI,nlNL:()=>hI});var gI={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."}]},hI={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 r1={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var On=x(w()),yI=({onCopy:e})=>{let t=(0,$t.useRef)(null),n=k("SummaryForm",r1),[r,o]=(0,$t.useState)(""),i=j(zg),s=L(e1),a=L(t1),l=B(),u=()=>{l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,$t.useEffect)(()=>{l(An())},[]),(0,$t.useEffect)(()=>{o(s||"")},[s]),(0,$t.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,$t.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,On.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,On.jsx)("p",{className:n.error,children:i("error")}):(0,On.jsxs)($t.Fragment,{children:[(0,On.jsx)("div",{className:n.main,children:(0,On.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,On.jsx)("div",{className:n.actions,children:(0,On.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},o1=yI;var Vg={};Ce(Vg,{enUS:()=>vI,nlNL:()=>SI});var vI={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?"}]},SI={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 Tr=x(O());var Kg={};Ce(Kg,{enUS:()=>xI,nlNL:()=>_I});var xI={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"}]},_I={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 i1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var Wg={data:[],fetchState:"idle"},s1=e=>{var t;return(t=e.answer)==null?void 0:t.data},a1=e=>e.answer.fetchState,Ti=fe("answer/resetKnowledgeSearch"),bi=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),wI=H({name:"answer",initialState:Wg,reducers:{},extraReducers:e=>{e.addCase(bi.pending,t=>{t.fetchState="loading"}).addCase(bi.rejected,t=>{t.fetchState="error"}).addCase(bi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Wg).addCase(Ti,()=>Wg)}}),l1=wI.reducer;var Ia=x(w()),u1=()=>(0,Ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ia.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ia.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 Ze=x(w()),EI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Tr.default.useState(""),{setSelected:s}=_r(),a=(0,Tr.useRef)(null),l=k("EntitiesList",i1),u=j(Kg),c=B(),f=L(s1),d=L(a1),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(bi({question:o,promptInstruction:r}))},S=(h,g)=>{c(st({name:"knowledge assist source viewed",data:{question:g,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,Tr.useEffect)(()=>{var h;n&&d==="idle"?c(bi({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,Tr.useEffect)(()=>{d==="done"&&(c(st({name:"knowledge assist question answered",data:{question:o||n,sources:f[f.length-1].answer.sources,answer:f[f.length-1].answer.answer,isFollowUpQuestion:f.length>1},options:{includeConversationData:!0}})),s(f.length-1),i(""))},[d,f]),(0,Tr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ze.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ze.jsx)("div",{className:l.alignRight,children:(0,Ze.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ze.jsxs)(te.ActionsBar,{list:f.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[f.map(({question:h,answer:g},m)=>(0,Ze.jsx)(te.List,{children:(0,Ze.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:p=>S(p,h),sources:g.sources,styles:{title:l.question,description:l.answer},children:h})},`${g.answer}_${m}`)),d==="loading"&&(0,Ze.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ze.jsx)("p",{className:l.status,children:u("error")}),(0,Ze.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ze.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:h=>{s(-1),i(h.target.value)}}),(0,Ze.jsx)("button",{type:"submit",className:l.submit,children:(0,Ze.jsx)(u1,{})})]})]})]})},c1=EI;var CI={data:null,fetchState:"idle"},ki=e=>e.profile.data,td=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],La=M("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)}),bI=H({name:"profile",initialState:CI,reducers:{},extraReducers:e=>{e.addCase(La.pending,t=>{t.fetchState="loading"}).addCase(La.rejected,t=>{t.fetchState="error"}).addCase(La.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),d1=bI.reducer;var Ee=x(w()),TI=200,kI=5,PI=4,RI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),f1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),II=()=>{let e=B(),t=Rt(),n=j(Vg),[r,o]=(0,Je.useState)(!1),[i,s]=(0,Je.useState)(""),a=L(q_),l=L(ki),[u,c]=(0,Je.useState)(null),[f,d]=(0,Je.useState)([]),[y,S]=(0,Je.useState)(),h=L(Vt),g=D("showSearch"),m=D("showEntitiesCommand"),p=D("showSummaryCommand"),v=D("showKnowledgeSearch"),_=D("showImageSearch"),C=D("searchTriggerKey"),E=L(Ww),b=L(G_),R=L($_),P=I=>dn(b.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(I=>I.shouldShow),G=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&f1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:p&&f1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(ze("knowledgeAssist")),shouldShow:v,experimental:!0}].filter(I=>I.shouldShow),V=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],He=(0,Je.useCallback)((0,p1.default)((I,W)=>{e(lo({query:I,type:W,tags:["search-overlay"]}))},TI),[]),cn=RI([...V,...N]),Xt=(0,Je.useCallback)((I,W)=>{if(!W)return;let At=[...N,...V].find(({value:Un})=>Un===W);At&&(e(ze("edit")),c({...I,searchTerm:void 0}),d(At.list))},[e,u,V]),mo=(0,Je.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Mg,{suggestion:W});break;default:t.send(Ln,{text:I,suggestion:W})}e(at(!1))},[e]),Bi=I=>{Pa(I.text),e(st({name:"entity copied",data:{entity:I,type:"copy"}})),e(at(!1))},Ar=I=>{t.send(Ln,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(st({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(Ti()),e(at(!1))},Ka=I=>{Pa(I),e(at(!1))},Wa=I=>{t.send(Ln,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(at(!1))},Ui=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),zi=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function dn(I,W){return I.slice(0,y?10:W.toLowerCase()==="image"?PI:kI)}function Vi(I,W,At){return W.reduce((Un,fn)=>At&&y===At?fn.length+Un:dn(fn,At).length+Un,I)}function Or(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,Je.useEffect)(()=>{i?He(i,y):e(qc())},[i,y]),(0,Je.useEffect)(()=>{a==="search"&&e(Ti())},[a]),(0,Je.useEffect)(()=>{h&&e(ka())},[h]),Gw(C,()=>e(at(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Or(I=>e(at(I))),onChangeType:I=>S(I),onChangePage:Or(I=>e(ze(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...V,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...G.map(I=>({text:I.label,type:"command"})),...cn.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>mo(I,cn[W]),onSecondary:(I,W)=>{Xt(cn[W-G.length],cn[W-G.length].type)},children:[G.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:G.map((I,W)=>(0,Ee.jsx)(te.ListItem,{index:Vi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...V,...N].map(({value:I,label:W,list:At,lineClamp:Un,listOrientation:fn},Ki)=>(0,Ee.jsx)(te.List,{heading:W,orientation:fn==="horizontal"?"horizontal":"vertical",children:dn(At,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Vi(G.length+dt,[...V,...N].slice(0,Ki).map(({list:Nr})=>Nr),I),closeOnSelect:!1,lineClamp:Un,onClick:()=>mo(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Or(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)(Qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:zi,onPrevious:Ui,onUse:I=>{e(ze("search")),mo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(at(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Or(()=>{e(ze("search"))}),children:(0,Ee.jsx)(Zw,{onUse:Wa,onCopy:Bi})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Or(()=>{e(ze("search"))}),children:(0,Ee.jsx)(o1,{onCopy:Ka})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Or(()=>{e(Ti()),e(ze("search"))}),children:(0,Ee.jsx)(c1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ar,onResetQuestion:()=>{e(Ti()),s("")}})})]})},m1=II;var Pi=x(w()),LI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,Pi.jsxs)(g1.Fragment,{children:[e&&(0,Pi.jsx)(m1,{}),(0,Pi.jsx)(Nw,{}),t&&(0,Pi.jsx)(Bw,{})]})},h1=LI;function Ri(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 nd=x(O());var Li=x(O());var y1=x(O());function v1(e,t,n){(0,y1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var AI=/[.*+?^${}()|[\]\\]/g,OI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function NI(e){return e.replace(AI,"\\$&")}function MI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function $g(e){return e.search(OI)}function S1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${NI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function x1(e){return e.replace(xo,'<mark data-type="placeholder">$1</mark>')}function Ii(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function DI(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 qg(e,t,n={}){if(t){let r=MI(t.toLowerCase(),e.toLowerCase()),o=Ii(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=$g(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Py).length>3||t.length>30?DI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ii(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var _1={badge:"_badge_1syy2_1",formattedText:"_formattedText_1syy2_5"};var Gg=x(w()),jI=["search","personal-collection-search","search-autocomplete"];function HI(e,t,n,r={}){let o="";return jI.includes(t)?o=S1(qg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=qg(e,n,r),r.placeholders===!0&&(o=x1(o)),o}var BI=()=>{},UI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=L(ui),i=B(),s=k("TextSuggestion",_1),a=(0,Li.useRef)(null);(0,Li.useEffect)(()=>{let u=setTimeout(()=>{i(o_({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),v1(a,"click",()=>{i(la(e)),i(Ht({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Li.useMemo)(()=>HI(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,Gg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:BI,children:(0,Gg.jsx)(fi,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},w1=UI;var Xg=x(w()),zI=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,nd.useMemo)(()=>{let o=e.map((i,s)=>(0,Xg.jsx)(w1,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Xg.jsx)(nd.Fragment,{children:r})},rd=zI;var E1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Aa=x(w()),VI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",E1),r=L(Ri),o=B(),i=L(Vt),s=L(li),a=L(Zc),l=D("showTextSuggestions");return Sr(()=>{o(Cr({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Aa.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Aa.jsx)("div",{className:n.paper,children:(0,Aa.jsx)(ht,{children:(0,Aa.jsx)(rd,{suggestions:e,selectedIndex:t})})})})},KI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),C1=wn(KI)(VI);var id=x(X()),Ai=x(O());var b1=x(O());function T1(e,t){let[n,r]=(0,b1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return U.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){U.error(s)}}]}var P1=x(X()),Nn=x(O());var Qg={};Ce(Qg,{enUS:()=>WI,nlNL:()=>$I});var WI={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"}]}]},$I={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 k1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var kr=x(w()),Yg=(e,t,n)=>r=>(0,kr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),qI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Qg),i=Rt(),s=k("Login",k1),a=D("productName"),l=(0,Nn.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,Nn.useCallback)(h=>{h.preventDefault(),i.send(Ci,!0)},[t]),c=(0,Nn.useMemo)(()=>h=>(0,kr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,Nn.useCallback)(h=>(0,kr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:S}=(0,Nn.useMemo)(()=>({min:Yg(s,60*10,l),hour:Yg(s,60*60,l),day:Yg(s,60*60*12,l)}),[]);return(0,kr.jsxs)("div",{className:(0,P1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,kr.jsxs)(Nn.Fragment,{children:[(0,kr.jsx)("br",{}),o("snooze",{min:d,hour:y,day:S})]})]})},od=qI;var R1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Oa=x(w()),GI=({title:e})=>{let t=k("SearchTrigger",R1),n=B();return(0,Oa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(at(!0)),children:[(0,Oa.jsx)(vi,{}),(0,Oa.jsx)("span",{className:t.text,children:e})]})},I1=GI;var Zg={};Ce(Zg,{enUS:()=>XI,nlNL:()=>QI});var XI={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"}]},QI={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 L1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),YI=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",L1),r=j(Zg),o=L(Ri),i=Jx(),s=B(),a=(0,Ai.useRef)(null),l=D("searchTriggerKey"),u=D("productName"),c=L(Zc),f=L(Vt),d=L(li),[y,S]=(0,Ai.useState)(null),h=D("showSearch"),g=D("showTextSuggestions"),m=D("adminUrl"),p=D("isEmbedded"),[v,_]=T1("dd-snooze-until-ms",0),C=c||v>Date.now(),E=e.filter(P=>P.source!=="gpt").length,b=()=>{C&&_(0),s(_w(!C))},R=P=>{let N=Date.now()+P*1e3;_(N),U.info(`Snooze until: ${new Date(N)}`),s(Cr({collapse:!0}))};return(0,Ai.useEffect)(()=>{E===0&&S(null)},[e,E]),Sr(()=>{s(Cr({collapse:!0,skipWhenInputFocus:!0}))}),f===null||d===!1?null:f===!1?(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(od,{loginUrl:m,isEmbedded:p,onSnooze:R})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:h&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>S(r(Wc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>S(null),children:(0,ue.jsx)(I1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,id.default)(!y&&n.hintsHidden,n.hints),children:y}),(0,ue.jsx)(jr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(jr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),E>0&&g&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(ht,{children:(0,ue.jsx)(rd,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},ZI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),sd=wn(ZI)(YI);var Na=x(w()),JI=({children:e})=>{let n=D("locale").replace("-","");return(0,Na.jsx)($d.Provider,{value:n,children:e})},eL=({store:e,customStyles:t={},children:n})=>(0,Na.jsx)(qm,{store:e,children:(0,Na.jsx)(JI,{children:(0,Na.jsx)($i.Provider,{value:t,children:n})})}),Oi=eL;var Sd=x(X());var Fn=x(O());var A1=x(O()),tL=["div","span","mark","strong","b","i","u","em"];function Jg(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(tL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,A1.cloneElement)(r,{children:Jg(s,t,n+1)})]}return[...e,...t]}function an(e){return e.tagName.toLowerCase()==="textarea"}var O1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var cd=x(O());var th=x(X()),It=x(O());var ad=x(O()),nL=["bottom","height","left","right","top","width"],rL=(e={},t={})=>nL.some(n=>e[n]!==t[n]),Mn=new Map,N1,M1=()=>{let e=[],t=[];Mn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();rL(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Mn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),N1=window.requestAnimationFrame(M1)};function oL(e,t){return{observe(){let n=Mn.size===0;if(Mn.has(e)){let r=Mn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Mn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&M1()},unobserve(){let n=Mn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Mn.delete(e),Mn.size||cancelAnimationFrame(N1)}}}}function eh(e){let[t,n]=(0,ad.useState)(null);return(0,ad.useLayoutEffect)(()=>{if(!e.current)return;let r=oL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ni=x(O()),F1=x(Ou());var D1={root:"_root_1jq08_1"};var j1=({children:e})=>{let[t,n]=(0,Ni.useState)(null),r=(0,Ni.useContext)($i);return(0,Ni.useLayoutEffect)(()=>{let o=document.createElement("div");return io(o),o.classList.add(D1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,F1.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var ld=x(w()),Mi=(e=!1)=>{let[t,n]=(0,It.useState)(e),r=(0,It.useCallback)(()=>n(!0),[]),o=(0,It.useCallback)(()=>n(!1),[]),i=(0,It.useCallback)(()=>n(a=>!a),[]),s=(0,It.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function nh(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 Di=({className:e,triggerRef:t,boundaryRef:n=(0,It.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=nh,...a})=>{let l=eh(t),u=eh(n),c=(0,It.useMemo)(()=>s(l,u,0),[l,u]);return(0,ld.jsx)(j1,{children:(0,ld.jsx)("div",{className:(0,th.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,ld.jsx)("div",{className:(0,th.default)(e,ln.root),children:i})})})};var Pr=x(w()),iL=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",Tt),r=Mi(document.activeElement===t);return Sr(()=>r.close()),(0,cd.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Pr.jsxs)(cd.Fragment,{children:[(0,Pr.jsx)("mark",{className:Tt.caret,ref:r.triggerRef}),r.opened&&(0,Pr.jsx)(Di,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Pr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Pr.jsx)(sd,{inline:!0})})})]})},ud=class extends Ut{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(an(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:$g(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Pr.jsx)(iL,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var z1=x(X());var gd=x(O());function H1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function dd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function B1(e){return e!=null}var U1=x(X()),fd=x(O());var rh=x(w()),pd=(0,fd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,fd.useRef)(null),i=k("TabCompletion",Tt);return(0,rh.jsx)("div",{ref:dd([o,r]),className:(0,U1.default)(e,i.popoverContentContainer),...n,children:(0,rh.jsx)("div",{className:i.popoverContent,children:t})})});var Rr=x(w()),sL=e=>t=>{let n=nh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},aL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Tt),s=Mi(),a=(0,gd.useMemo)(()=>sL(e.getBoundingClientRect()),[e]),[l,u]=Fc(e);return(0,gd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Rr.jsxs)("span",{children:[(0,Rr.jsx)("mark",{ref:dd([l,s.triggerRef]),className:(0,z1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Rr.jsx)(Di,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Rr.jsx)(pd,{style:n,children:(0,Rr.jsx)("div",{className:i.hintText,children:o})})})]})},md=class extends Ut{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${H1(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(B1);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,Rr.jsx)(aL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var yd=x(X());var Ke=x(O());var oh=x(w()),V1=()=>(0,oh.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,oh.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 Ir=x(O());var W1=x(Bg());var K1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function hd(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 ih(e){return e.replace("https://www.","").replace("https://","")}var Lt=x(w()),lL=3,uL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),cL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=lL})=>{let i=k("LinkSearch",K1),[s,a]=(0,Ir.useState)(""),l=B(),u=L(sw("url")),c=L(X_("URL",uL)),[f,d]=(0,Ir.useState)(c.length-1),y=D("fallbackImage"),S=p=>{let v=p.target;a(v.value)},h=(p,v)=>{p.stopPropagation(),p.preventDefault(),window.open(v,"_blank")},g=p=>{var C;let v=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(v),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Ir.useCallback)((0,W1.default)(p=>{l(lo({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,Ir.useEffect)(()=>{s&&m(s)},[s]),(0,Ir.useEffect)(()=>()=>{l(qc())},[]),(0,Lt.jsxs)("div",{className:i.root,children:[(0,Lt.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,v)=>(0,Lt.jsx)(oe,{selected:f===v,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,Lt.jsxs)(me,{children:[(0,Lt.jsx)(me.Image,{src:hd(p,"small",y||void 0),title:p.title||p.text}),(0,Lt.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,Lt.jsx)(me.Title,{children:p.title||ih(p.text)}),p.title&&ih(p.text)]}),(0,Lt.jsx)(oe.Actions,{children:(0,Lt.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,Lt.jsx)(Ta,{value:s,onChange:S,autoFocus:!0,placeholder:n,onKeyUp:g})]})},$1=cL;var sh={};Ce(sh,{enUS:()=>dL,nlNL:()=>fL});var dL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},fL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ve=x(w()),pL=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",Tt);return(0,Ve.jsx)("mark",{ref:t,className:(0,yd.default)(n.matchSelection)},"selection-start")}),mL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(sh),s=k("TabCompletion",Tt),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),f=B(),d=Mi(document.activeElement===r),[y]=(0,Ke.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ke.useEffect)(()=>()=>y.detach(),[]),(0,Ke.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(y.setStart(h,0),y.setEnd(g,0))},[e.current,a.current]),Sr(()=>{d.close()});let S=(0,Ke.useCallback)(h=>{let g=y.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(Cc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("mark",{ref:a,className:(0,yd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ve.jsx)(Di,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ve.jsxs)(pd,{style:n,ref:l,children:[(0,Ve.jsx)("div",{className:(0,yd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ve.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ve.jsx)(V1,{}),(0,Ve.jsx)("span",{children:"\xA0"}),(0,Ve.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ve.jsx)($1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:S,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},vd=class extends Ut{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ke.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,Ve.jsx)(pL,{ref:this.startRef}):(0,Ve.jsx)(mL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Dn=x(w()),gL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",O1),c=D("insertLink"),f=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),y=Hc(a),S=(0,Fn.useRef)(null);(0,Fn.useEffect)(()=>{an(a)&&y&&Bc(a,y)},[y]);let h=(0,Fn.useCallback)(p=>{if(!o||!n)return p;let v=[(0,Dn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Dn.jsx)("span",{"data-testid":"tab-completion",className:(0,Sd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&v.push((0,Dn.jsx)("span",{className:(0,Sd.default)(u.hint,u.resetIndent),children:(0,Dn.jsx)(yl,{keyCode:"tab"},"tabHint")})),Jg(p,v)},[o,n,r]),g=(0,Fn.useMemo)(()=>{let p=[];return d&&p.push(new ud("inline")),c&&p.push(new vd("selection")),p.push(new mi("placeholders")),i&&p.push(new md("keywords")),p},[d,c,i]),m=(0,Fn.useMemo)(()=>{let p=window.getComputedStyle(a);return{"--dd-color":p.color,"--dd-font-size":p.fontSize,"--dd-font-family":p.fontFamily,"--dd-font-variant":p.fontVariant}},[]);return e?(0,Dn.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(S.current=p==null?void 0:p.parentElement)},className:u.root,style:m,children:[(0,Dn.jsx)(fi,{tagName:"span",containerTagName:"div",className:(0,Sd.default)(u.container,u.agentText),disableLineBreaks:an(a),content:t||"\u200B",onAfterParse:h,matchers:g,selection:y,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:S,inlineSuggestionsOnlyAtEnd:!f}),(0,Dn.jsx)("br",{})]}):null},hL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var h;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ii(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:S}=n;return{showTabHint:c,showStyleSuggestions:S,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},q1=wn(hL)(gL);var ME=x(X()),DE=x(O());var G1={list:[],fetchState:"idle",isInitialRequest:null},Q1=e=>e.autoflows.list||[],X1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},jn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),ah=M("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(jn(e.platformSessionId))}),lh=M("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(jn(e.platformSessionId))}),yL=H({name:"autoflows",initialState:G1,reducers:{},extraReducers:e=>{e.addCase(ah.pending,(t,n)=>{let r=X1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(lh.pending,(t,n)=>{let r=X1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(jn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(jn.rejected,t=>{t.fetchState="error"}),e.addCase(jn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>G1)}}),Y1=M("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(jn(e))}),o.on("sessionCompleted",()=>{n(jn(e))})}),Z1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),J1=yL.reducer;var eE={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},tE=e=>e.customMessages.list,nE=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),rE=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),oE=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ma=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),xd=M("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)}),_d=M("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)}),iE=H({name:"customMessages",initialState:eE,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ma.rejected,t=>{t.fetchState="error"}).addCase(Ma.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(xd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(_d.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(_d.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(J,()=>eE)}}),sE=M("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(iE.actions.onCustomMessage(i))})}),aE=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),lE=iE.reducer;var vL={jwt:null,accountUrl:null,interval:null},uE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},uh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ch=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(uh()),setInterval(()=>r(uh()),n)}),cE=H({name:"exchangeToken",initialState:vL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(uh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(ch.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:dE}=cE.actions,fE=cE.reducer;function pE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var wE=x(O());var SE=x(X()),xE=x(O());var gE=x(X());var mE={root:"_root_838fd_1"};var yE=x(w()),SL=({className:e,children:t})=>{let n=k("Unicode",mE);return(0,yE.jsx)("span",{className:(0,gE.default)(e,n.root),children:t})},hE=SL;var vE={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var dh={};Ce(dh,{enUS:()=>xL,nlNL:()=>_L});var xL={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"}]},_L={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 lt=x(w()),EL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",vE),a=j(dh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,lt.jsxs)(oe,{className:(0,SE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,lt.jsx)(me,{children:(0,lt.jsxs)(me.Content,{children:[(0,lt.jsxs)(me.Title,{children:[t&&(0,lt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,lt.jsx)("span",{children:r})]})}),(0,lt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,lt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,lt.jsxs)(xE.Fragment,{children:[(0,lt.jsx)(hE,{children:u})," ",(0,lt.jsx)("span",{children:a(l)})]})})})]})},_E=EL;var fh=x(w()),CL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},bL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,fh.jsx)(wE.Fragment,{children:e.map(o=>(0,fh.jsx)(_E,{displayName:o.displayName,description:o.description,disabled:o.isBusy||CL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),TL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},kL={onStartAutoflow:ah,onStopAutoflow:lh},EE=wn(TL,kL)(bL);var wd=x(O());var gh=x(X());var ph=x(w()),mh=()=>(0,ph.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,ph.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 CE={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=x(w()),PL=({entities:e})=>{let t=k("EntitiesWidgetList",CE),[n,r]=(0,wd.useState)(void 0),o=B(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Pa(a.text),o(st({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,wd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,gh.default)(t.icon),children:(0,un.jsx)(mh,{})}),(0,un.jsx)("span",{className:(0,gh.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(mh,{})})]})]},a.text))})},bE=PL;var TE=x(X()),hh=x(O());var Da={};Ce(Da,{enUS:()=>RL,nlNL:()=>IL});var RL={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"}],answer:[{type:0,value:"Answer"}]},IL={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"}],answer:[{type:0,value:"Antwoord"}]};var Hn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var et=x(w()),LL=({suggestion:e})=>{let t=j(Da),n=B(),r=L(nE(e.text)),o=L(rE(e.text)),i=L(oE(e.text)),s=L(hc),{replyOptions:a}=e,l=(0,hh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(xd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,hh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(_d({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,et.jsxs)(oe,{onClick:l,className:(0,TE.default)(Hn.root,{[Hn.isUsed]:r,[Hn.hasError]:i}),children:[(0,et.jsx)(me,{children:(0,et.jsxs)(me.Content,{children:[(0,et.jsxs)(me.Title,{className:Hn.title,children:[e.text," ",(0,et.jsx)(vl,{className:Hn.label,children:"analyse tool"})," ",i&&(0,et.jsx)("span",{className:Hn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,et.jsx)("ul",{className:Hn.quickReplies,children:a.map(c=>(0,et.jsx)("li",{className:Hn.quickReply,children:c.title},c.title))})]})}),(0,et.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,et.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,et.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,et.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},kE=LL;var yh=x(w()),PE=()=>(0,yh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,yh.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 RE=x(O());var ut=x(w()),AL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Gc(o),s=j(Da),a=D("showImages"),l=D("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,RE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,ut.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,ut.jsxs)(me,{children:[a&&e.image&&(0,ut.jsx)(me.Image,{src:hd(e,"small",l||void 0),title:e.title}),(0,ut.jsxs)(me.Content,{children:[e.title&&(0,ut.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,ut.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,ut.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,ut.jsxs)(oe.Actions,{children:[i&&(0,ut.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},IE=AL;var Fa=x(w()),OL=({contentType:e,lines:t,suggestions:n})=>{let r=Rt(),o=L(xi),i=a=>{r.send(Og,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Ln,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Fa.jsx)(Fa.Fragment,{children:n.map(a=>(0,Fa.jsx)(IE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},LE=OL;var vh={};Ce(vh,{enUS:()=>NL,nlNL:()=>ML});var NL={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"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},ML={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"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var AE={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var Sh=x(w()),OE=()=>(0,Sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Sh.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 xh=x(w()),NE=()=>(0,xh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,xh.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 z=x(w()),Ed=(e,t)=>{let n=L(Vt);(0,DE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},DL=()=>{let e=j(vh),t=B(),n=D("isEmbedded"),r=k("Widget",AE),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=L(ki),f=L(td),d=L(Q1),y=L(ed),S=L(tE),h=L(yc),g=L(li),m=L(Vt),p=L(hc),v=L(pE),_=L(xi),C=Rt(),E=L(lw),b=L(uE("/admin/personal-collection")),R=D("adminUrl");if(Ed(()=>(t(Ma(p)),t(sE(p)),()=>{t(aE(p))}),[t,g,i,p]),Ed(()=>(t(jn(p)),t(Y1(p)),()=>{t(Z1(p))}),[t,g,o,p]),Ed(()=>{f.forEach(({type:N})=>{t(N==="entities"?Wt():Rn(N))})},[t,g,h,c]),Ed(()=>(t(ch()),()=>{t(dE())}),[t,g,s,h]),g===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(od,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||m===null||E||v)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||b;return(0,z.jsx)("div",{className:(0,ME.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(Sl,{className:r.sectionList,children:[P&&(0,z.jsx)(zn,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(vi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(NE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,z.jsx)(OE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,z.jsx)(PE,{}),e("linkPersonalcollection")]})]})}),i&&S.length>0&&(0,z.jsx)(zn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(ht,{withDivider:!0,children:S.map(N=>(0,z.jsx)(kE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(zn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(EE,{})})}),f.map(({type:N,title:G,amount:V,lines:He})=>{var cn;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(zn,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(bE,{entities:y})},N);default:return((cn=_[N])==null?void 0:cn.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(zn,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(LE,{lines:He,contentType:N,suggestions:_[N].suggestions.slice(0,V)||[]})})},N)}})]})})},FE=DL;function Fi(e){let t=new Range;return t.selectNodeContents(e),t}function jE(e,t,n){try{return Lr(e,t,n),!0}catch{return!1}}function Cd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function bd(e){return"tagName"in e&&e.tagName==="BR"}var ja=/[\u200B-\u200D\uFEFF]/g;function Lr(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,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.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(ja,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let S=s(u,t-o);S===0&&!y?r.setStartBefore(l):r.setStart(l,S)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(bd(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;Cd(l)&&u&&!Cd(u)&&!bd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ha(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(f){let d=f===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let S=f.textContent;d&&(a=u+S.substring(0,r).replace(ja,"").length),y&&(l=u+S.substring(0,i).replace(ja,"").length),u+=S.replace(ja,"").length;break}case Node.ELEMENT_NODE:{let S=f.nextSibling===null;bd(f)&&!S&&u++;for(let h=0;h<f.childNodes.length;h++){let g=d&&h===r,m=y&&h===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[h]),y&&h===i-1&&(l=u),l!==void 0))break}!y&&Cd(f)&&!S&&u++,y&&(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 Ba(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,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,y=f?i:void 0,S=u.textContent.replace(ja,"");d===0&&y===void 0?a+=S:a+=S.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&bd(u)&&!d&&(a+=`
|
|
20
20
|
`);for(let y=c?r:0;y<(f?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[y]),s!==1);y++);!f&&s===0&&Cd(u)&&!d&&(a+=`
|
|
21
|
-
`);break}default:break}f&&s++}return l(e),a}function jE(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var fo=class extends Tn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Ba(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!jE(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!jE(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Ha(this.element,t);let n=this.lastKnownSelection;if(n&&FE(this.element,n.start,n.end))return n;let r=Fi(this.element);return r.collapse(!1),Ha(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Ba(this.element,Lr(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(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var _h=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(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},wh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},Eh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,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(),U.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 wh(t,this.deepdeskUrl,{debug:!0}):new _h(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(U.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;U.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,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)}},HE=Eh;var ji=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Ch=e=>new Promise(t=>{setTimeout(t,e)});var Hi=class extends ji{name="ClientError"},bh=class extends ji{name="ServerError"},qt=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,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:y=_=>_.status>=500,version:S="v1",...h}=n,g={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof S=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":S});let m=u,p=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let v=async()=>(m--,a(s,g).then(async _=>y(_)&&!i.isAborted&&m>0?(await Ch(c),v()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),v()):_).catch(async _=>{if(d(_)&&!i.isAborted&&m>0)return await Ch(c),v();throw _}));v().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new bh("Server Error",C)):_.status===401?o(new Hi("Unauthorized",C)):_.status===403?o(new Hi("Forbidden",C)):_.status===404?o(new Hi("Not Found",C)):_.status>=400&&o(new Hi("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(_=>{o(_)})})}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 FL;(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||={})})(FL||={});function Td(e){return{...re(e),tags:e.tags}}var Bn=class e{constructor(t,n={}){this.options=n;this.client=new qt(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(),U.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...we(t),tags:t.tags},{version:"v2"});return Td(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(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(),U.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 Td(i)}async isConversationSupported(t,n={}){U.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=we(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Td(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...we(o),tags:o.tags})),{version:"v2"})).map(o=>Td(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",we({...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:we({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}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 U.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",we(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}`,we(n),{abortLatest:!0})).map(i=>({...re(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`,we(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 re(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",we(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,we(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",we({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}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 re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Ry);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&U.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ua=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Tg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{U.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 jL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(jL||={});var za=class{constructor(t,n={}){this.apiUrl=t;this.client=new qt(t,n)}client;streams={};logger=U;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,we(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,we(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",we(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Ua(`${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 BE={startTime:null,stopTime:null},UE=H({name:"handlingTime",initialState:BE,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(J,()=>BE)}}),{handlingTimeStart:zE,handlingTimeStop:kd,handlingTimeReset:VE}=UE.actions,KE=UE.reducer;var WE=(e={})=>{let t={onAuthError:Ei(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Pd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var po=M("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 Pd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),HL=H({name:"styleSuggestions",initialState:Pd,reducers:{},extraReducers:e=>{e.addCase(po.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(po.rejected,t=>{t.fetchState="error"}).addCase(po.fulfilled,(t,n)=>{t.fetchState="done",gr(t.list,n.payload)||(t.list=n.payload)}).addCase(to,t=>{t.list=Pd.list}).addCase(J,()=>Pd)}}),$E=HL.reducer;var qE=(e={})=>{let t,n=!0,r={getStyleSuggestions:po,debounce:500,...e};return o=>i=>s=>{var y;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(!((y=u.conversation.current)==null?void 0:y.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 BL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var GE=(e={})=>{let t={getTextSuggestions:Rn,getAutocompleteSuggestions:wa,debounce:200,check:Ri,...e},n;return r=>o=>i=>{var h;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,f=(h=l.conversation.current)==null?void 0:h.id,d=i.type===Yc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return BL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ui(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var XE=po.fulfilled.toString();function UL(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 QE=e=>t=>n=>r=>{var u;if(r.type!==XE){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=UL(o,s);r.type===XE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var zL=Bu({activeSuggestion:yw,answer:a1,auth:Iw,autoflows:Z1,conversation:Yx,contentTypes:Ww,customMessages:aE,exchangeToken:dE,entities:Xw,handlingTime:KE,info:K_,input:tg.reducer,overlayInput:Xe.reducer,settings:zx,profile:c1,search:Q_,summary:t1,styleSuggestions:$E,ui:_w,textSuggestions:fw});function YE(e){return G0({reducer:zL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),WE(),GE({debounce:200}),qE({debounce:500}),QE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var VL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},KL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Xm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=sw(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case Ei.toString():{!r.payload&&e.emit("logout",void 0);break}case Ht.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:VL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case Cc.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case aa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Pc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Wt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case An.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case st.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case bc.toString():e.handleKeyDown(r.payload);break;case to.toString():e.logSendMessage(r.payload);break;case Tc.toString():e.logSendEditSuggestionMessage(r.payload);break;case kc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case to.toString():e.handleAfterSendMessage(r.payload);break;case Ea.toString():e.onUpdateShowTabHint(r.payload);break;case kd.toString():e.logHandlingTime();break;case Ht.toString():{i&&(t.dispatch(En([])),t.dispatch(yr()));break}default:break}return s},ZE=KL;function Th(e){return e.toISOString().replace("T"," ").replace("Z","")}function JE(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:Th(n),timeStop:Th(r)}}function kh(e,t,n){var b,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:y,textSuggestions:S,offeredTextSuggestions:h}}=t[e],g=r.length,p=S.reduce((N,{text:G,searchTerm:V})=>N+G.length-(V?V.length:0),0),v=u??Date.now(),_=(Date.now()-v)/1e3+(c||0),C=o/_,E=S.reduce((N,{searchTerm:G})=>N+(G?G.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+E,lenTextTotal:g,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:S,suggestionsCounters:[{source:"gpt",countOffered:h.filter(N=>N.source==="gpt").length}],agentId:(b=t.info.agentInfo)==null?void 0:b.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function eC(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?eC(r,t):null}function tC(e,t){return eC(e,t)}function nC(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function WL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Rd(e){return WL(e)&&(sn(e)||jc(e))}var rC=(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{U.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function $L(e){return e.offsetParent!==null}function oC(e){if(!$L(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 Id(e,t,n=100){let r=oC(e);t({isVisible:r});let o=setInterval(()=>{let i=oC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var je=x(w()),iC=rC("showTabHint",!0),Va=class e{static version="10.3.1-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 Bn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[ZE({emit:(f,d,y)=>this.emit(f,d,y),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),logSendEditSuggestionMessage:f=>this.logSendEditMessage(f),onUpdateShowTabHint:f=>iC.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new za(n)}),this.store=YE(c),this.broadcastEvents=new HE({debug:!0,deepdeskUrl:u,eventMap:Lw(this.store),createCustomChannel:l}),this.store.dispatch(ia),this.store.dispatch(Ea(iC.value())),this.store.dispatch(ia({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?(U.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(U.warn("Profile has not been loaded (yet)"),!0):(U.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ei(null)),this.store.dispatch(br()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Vt(r)&&Cw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}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){U.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Jm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(vc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Sc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(eg(t))).payload}async postMessages(t){return(await this.store.dispatch(_c(t))).payload}async updateConversation(t){return(await this.store.dispatch(xc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(An());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ia(t))}setVisitorInfo(t){this.store.dispatch(V_(t))}async setAgentInfo(t){await this.store.dispatch(va(t))}async setAgentSettings(t){await this.store.dispatch(kg(t))}async getAgentSettings(){return(await this.store.dispatch(Pg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Yc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(kc(t))}notifyKeyDown(t){this.store.dispatch(bc(t))}notifyPaste(t,n){this.store.dispatch(l_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(s_(t))}notifyExternalSuggestion(t){this.store.dispatch(Ht(t)),this.store.dispatch(yr())}notifyEditSuggestion(t){this.store.dispatch(cw(t.contentType,t.suggestions)),this.store.dispatch(In({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Cr({collapse:!1})),this.inputMediator&&this.store.dispatch(e_({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(a_(Ec(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(r_()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(i_());let{selectedSuggestionIndex:f}=this.state.input;f===-1?this.store.dispatch(aa()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()};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(la(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(la(-1)),this.store.dispatch(aa()),t.preventDefault()):n||(this.store.dispatch(Cr({collapse:!0})),this.store.dispatch(Sw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:y}=this.state.input;this.store.dispatch(Ea(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&y&&y.text.startsWith(d)&&(this.store.dispatch(Ht({text:y.text,suggestion:y,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(yr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(u_()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(zE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(kd()))}logSendMessage(t){let n=kh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=kh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(n_(this.state.overlayInput.metrics))}logHandlingTime(){let t=JE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(VE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(yr()),this.store.dispatch(to(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ht({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){U.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),U.error(s)}})};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]=so(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Gt.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]=so(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Gt.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 io(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,Gt.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Rd(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:f,detectSubmit:d,insertLink:y,inputMediator:S,closestScrollSelector:h,appendOverlayTo:g,inlineSuggestions:m}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:m}),n.automaticHandlingTime&&this.setupHandlingTime(t),io(t),this.inputMediator=S||(sn(t)?new kn(t):new fo(t)),this.inputMediator.on("change",({plainText:v})=>{this.notifyInputChanged(v)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(c_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",v=>{this.notifyKeyDown(v)}),this.inputMediator.on("paste",({pastedText:v,selectionText:_})=>{this.notifyPaste(v,_)}),this.inputMediator.on("cut",({selectionText:v})=>{this.notifyCut(v)}),m){if(sn(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let v=this.createInlineContainer(t,"deepdesk-caret");(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(E1,{})})}),v),this.inputMediator.on("caret",_=>{this.store.dispatch(En([])),_?(v.style.display="block",v.style.top=`${_.top}px`,v.style.left=`${_.left}px`):v.style.display="none"})}else{let v=h&&tC(t,h)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",v||t,{appendTo:g,closestScrollElement:v,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",v||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)($1,{inputElement:t})})}),_),(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(sd,{})})}),C)}(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(g1,{})})}),this.createContainer("deepdesk-overlays"));let p;this.inputMediator.on("selection",v=>{clearTimeout(p),v===null?p=setTimeout(()=>{v!==null&&this.store.dispatch(ng(v))},500):this.store.dispatch(ng(v))}),this.inputMediator.on("disabled",()=>{var v;(v=this.inputMediator)==null||v.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(_i(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(_i(!0))),this.store.dispatch(t_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var v;this.refresh(),this.broadcastEvents.setSessionId((v=this.state.conversation.current)==null?void 0:v.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&&U.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(DE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Gt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Id(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){nC(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(La());let t=ki(this.state);t&&this.store.dispatch(ia({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(U.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;U.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=td(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Wt()):this.store.dispatch(Rn(r))})}catch(r){this.handleError(r)}}};async function sC(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 aC(e,t,n={}){let r=n.replace?Lr(e,n.replace.start,n.replace.end):Fi(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(`
|
|
22
|
-
`).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?Lr(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()}})}async function
|
|
23
|
-
`).reverse().forEach((a,l)=>{l>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(a))}),s.collapse(!1))};return Promise.resolve(r()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!n)try{n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}finally{n&&n.remove()}})}function
|
|
21
|
+
`);break}default:break}f&&s++}return l(e),a}function HE(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var fo=class extends Tn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Ba(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!HE(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!HE(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Ha(this.element,t);let n=this.lastKnownSelection;if(n&&jE(this.element,n.start,n.end))return n;let r=Fi(this.element);return r.collapse(!1),Ha(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Ba(this.element,Lr(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(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var _h=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(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},wh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},Eh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,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(),U.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 wh(t,this.deepdeskUrl,{debug:!0}):new _h(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(U.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;U.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,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)}},BE=Eh;var ji=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Ch=e=>new Promise(t=>{setTimeout(t,e)});var Hi=class extends ji{name="ClientError"},bh=class extends ji{name="ServerError"},qt=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,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:y=_=>_.status>=500,version:S="v1",...h}=n,g={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof S=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":S});let m=u,p=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let v=async()=>(m--,a(s,g).then(async _=>y(_)&&!i.isAborted&&m>0?(await Ch(c),v()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),v()):_).catch(async _=>{if(d(_)&&!i.isAborted&&m>0)return await Ch(c),v();throw _}));v().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new bh("Server Error",C)):_.status===401?o(new Hi("Unauthorized",C)):_.status===403?o(new Hi("Forbidden",C)):_.status===404?o(new Hi("Not Found",C)):_.status>=400&&o(new Hi("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(_=>{o(_)})})}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 FL;(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||={})})(FL||={});function Td(e){return{...re(e),tags:e.tags}}var Bn=class e{constructor(t,n={}){this.options=n;this.client=new qt(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(),U.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...we(t),tags:t.tags},{version:"v2"});return Td(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(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(),U.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 Td(i)}async isConversationSupported(t,n={}){U.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=we(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Td(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...we(o),tags:o.tags})),{version:"v2"})).map(o=>Td(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",we({...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:we({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}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 U.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",we(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}`,we(n),{abortLatest:!0})).map(i=>({...re(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`,we(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 re(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",we(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,we(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",we({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}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 re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Ry);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&U.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ua=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Tg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{U.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 jL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(jL||={});var za=class{constructor(t,n={}){this.apiUrl=t;this.client=new qt(t,n)}client;streams={};logger=U;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,we(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,we(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",we(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Ua(`${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 UE={startTime:null,stopTime:null},zE=H({name:"handlingTime",initialState:UE,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(J,()=>UE)}}),{handlingTimeStart:VE,handlingTimeStop:kd,handlingTimeReset:KE}=zE.actions,WE=zE.reducer;var $E=(e={})=>{let t={onAuthError:Ei(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Pd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var po=M("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 Pd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),HL=H({name:"styleSuggestions",initialState:Pd,reducers:{},extraReducers:e=>{e.addCase(po.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(po.rejected,t=>{t.fetchState="error"}).addCase(po.fulfilled,(t,n)=>{t.fetchState="done",gr(t.list,n.payload)||(t.list=n.payload)}).addCase(to,t=>{t.list=Pd.list}).addCase(J,()=>Pd)}}),qE=HL.reducer;var GE=(e={})=>{let t,n=!0,r={getStyleSuggestions:po,debounce:500,...e};return o=>i=>s=>{var y;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(!((y=u.conversation.current)==null?void 0:y.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 BL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var XE=(e={})=>{let t={getTextSuggestions:Rn,getAutocompleteSuggestions:wa,debounce:200,check:Ri,...e},n;return r=>o=>i=>{var h;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,f=(h=l.conversation.current)==null?void 0:h.id,d=i.type===Yc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return BL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ui(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var QE=po.fulfilled.toString();function UL(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 YE=e=>t=>n=>r=>{var u;if(r.type!==QE){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=UL(o,s);r.type===QE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var zL=Bu({activeSuggestion:vw,answer:l1,auth:Lw,autoflows:J1,conversation:Yx,contentTypes:$w,customMessages:lE,exchangeToken:fE,entities:Qw,handlingTime:WE,info:W_,input:tg.reducer,overlayInput:Xe.reducer,settings:zx,profile:d1,search:Y_,summary:n1,styleSuggestions:qE,ui:ww,textSuggestions:pw});function ZE(e){return G0({reducer:zL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),$E(),XE({debounce:200}),GE({debounce:500}),YE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var VL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},KL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Xm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=aw(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case Ei.toString():{!r.payload&&e.emit("logout",void 0);break}case Ht.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:VL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case Cc.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case aa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Pc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Wt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case An.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case st.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case bc.toString():e.handleKeyDown(r.payload);break;case to.toString():e.logSendMessage(r.payload);break;case Tc.toString():e.logSendEditSuggestionMessage(r.payload);break;case kc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case to.toString():e.handleAfterSendMessage(r.payload);break;case Ea.toString():e.onUpdateShowTabHint(r.payload);break;case kd.toString():e.logHandlingTime();break;case Ht.toString():{i&&(t.dispatch(Cn([])),t.dispatch(yr()));break}default:break}return s},JE=KL;function Th(e){return e.toISOString().replace("T"," ").replace("Z","")}function eC(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:Th(n),timeStop:Th(r)}}function kh(e,t,n){var b,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:y,textSuggestions:S,offeredTextSuggestions:h}}=t[e],g=r.length,p=S.reduce((N,{text:G,searchTerm:V})=>N+G.length-(V?V.length:0),0),v=u??Date.now(),_=(Date.now()-v)/1e3+(c||0),C=o/_,E=S.reduce((N,{searchTerm:G})=>N+(G?G.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+E,lenTextTotal:g,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:S,suggestionsCounters:[{source:"gpt",countOffered:h.filter(N=>N.source==="gpt").length}],agentId:(b=t.info.agentInfo)==null?void 0:b.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function tC(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?tC(r,t):null}function nC(e,t){return tC(e,t)}function rC(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function WL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Rd(e){return WL(e)&&(an(e)||jc(e))}var oC=(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{U.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function $L(e){return e.offsetParent!==null}function iC(e){if(!$L(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 Id(e,t,n=100){let r=iC(e);t({isVisible:r});let o=setInterval(()=>{let i=iC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var je=x(w()),sC=oC("showTabHint",!0),Va=class e{static version="10.3.1-beta.3";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 Bn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[JE({emit:(f,d,y)=>this.emit(f,d,y),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),logSendEditSuggestionMessage:f=>this.logSendEditMessage(f),onUpdateShowTabHint:f=>sC.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new za(n)}),this.store=ZE(c),this.broadcastEvents=new BE({debug:!0,deepdeskUrl:u,eventMap:Aw(this.store),createCustomChannel:l}),this.store.dispatch(ia),this.store.dispatch(Ea(sC.value())),this.store.dispatch(ia({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?(U.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(U.warn("Profile has not been loaded (yet)"),!0):(U.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ei(null)),this.store.dispatch(br()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Vt(r)&&bw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}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){U.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Jm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(vc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Sc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(eg(t))).payload}async postMessages(t){return(await this.store.dispatch(_c(t))).payload}async updateConversation(t){return(await this.store.dispatch(xc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(An());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ia(t))}setVisitorInfo(t){this.store.dispatch(K_(t))}async setAgentInfo(t){await this.store.dispatch(va(t))}async setAgentSettings(t){await this.store.dispatch(kg(t))}async getAgentSettings(){return(await this.store.dispatch(Pg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Yc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(kc(t))}notifyKeyDown(t){this.store.dispatch(bc(t))}notifyPaste(t,n){this.store.dispatch(l_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(s_(t))}notifyExternalSuggestion(t){this.store.dispatch(Ht(t)),this.store.dispatch(yr())}notifyEditSuggestion(t){this.store.dispatch(dw(t.contentType,t.suggestions)),this.store.dispatch(In({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Cr({collapse:!1})),this.inputMediator&&this.store.dispatch(e_({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(Cn([])))}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(a_(Ec(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(r_()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(i_());let{selectedSuggestionIndex:f}=this.state.input;f===-1?this.store.dispatch(aa()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()};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(la(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(la(-1)),this.store.dispatch(aa()),t.preventDefault()):n||(this.store.dispatch(Cr({collapse:!0})),this.store.dispatch(xw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:y}=this.state.input;this.store.dispatch(Ea(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&y&&y.text.startsWith(d)&&(this.store.dispatch(Ht({text:y.text,suggestion:y,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(yr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(u_()),this.store.dispatch(Cn([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(VE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(kd()))}logSendMessage(t){let n=kh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=kh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(n_(this.state.overlayInput.metrics))}logHandlingTime(){let t=eC(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(KE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(yr()),this.store.dispatch(to(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ht({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){U.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),U.error(s)}})};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]=so(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Gt.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]=so(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Gt.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 io(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,Gt.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Rd(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:f,detectSubmit:d,insertLink:y,inputMediator:S,closestScrollSelector:h,appendOverlayTo:g,inlineSuggestions:m}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:m}),n.automaticHandlingTime&&this.setupHandlingTime(t),io(t),this.inputMediator=S||(an(t)?new kn(t):new fo(t)),this.inputMediator.on("change",({plainText:v})=>{this.notifyInputChanged(v)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(c_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",v=>{this.notifyKeyDown(v)}),this.inputMediator.on("paste",({pastedText:v,selectionText:_})=>{this.notifyPaste(v,_)}),this.inputMediator.on("cut",({selectionText:v})=>{this.notifyCut(v)}),m){if(an(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let v=this.createInlineContainer(t,"deepdesk-caret");(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(C1,{})})}),v),this.inputMediator.on("caret",_=>{this.store.dispatch(Cn([])),_?(v.style.display="block",v.style.top=`${_.top}px`,v.style.left=`${_.left}px`):v.style.display="none"})}else{let v=h&&nC(t,h)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",v||t,{appendTo:g,closestScrollElement:v,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",v||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(q1,{inputElement:t})})}),_),(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(sd,{})})}),C)}(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(h1,{})})}),this.createContainer("deepdesk-overlays"));let p;this.inputMediator.on("selection",v=>{clearTimeout(p),v===null?p=setTimeout(()=>{v!==null&&this.store.dispatch(ng(v))},500):this.store.dispatch(ng(v))}),this.inputMediator.on("disabled",()=>{var v;(v=this.inputMediator)==null||v.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(_i(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(_i(!0))),this.store.dispatch(t_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var v;this.refresh(),this.broadcastEvents.setSessionId((v=this.state.conversation.current)==null?void 0:v.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&&U.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,Gt.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(FE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Gt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Id(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){rC(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(La());let t=ki(this.state);t&&this.store.dispatch(ia({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(U.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;U.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=td(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Wt()):this.store.dispatch(Rn(r))})}catch(r){this.handleError(r)}}};async function aC(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 lC(e,t,n={}){let r=n.replace?Lr(e,n.replace.start,n.replace.end):Fi(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(`
|
|
22
|
+
`).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?Lr(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()}})}async function uC(e,t){let n;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let r=()=>{let i=(e.ownerDocument.defaultView??window).getSelection();if(!i)return;let s=i.getRangeAt(0);s&&(s.deleteContents(),n=document.createElement("span"),s.insertNode(n),t.split(`
|
|
23
|
+
`).reverse().forEach((a,l)=>{l>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(a))}),s.collapse(!1))};return Promise.resolve(r()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!n)try{n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}finally{n&&n.remove()}})}function cC(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function dC(e,t,n){await new Bn(e).authenticateWithKey(t,n)}async function fC(e){let n=await new qt(e).get("/platform/config/",{version:null});return re(n)}async function qL(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 pC(e,t){let n=await qL(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 SC(GL);})();
|
|
24
24
|
/*! Bundled license information:
|
|
25
25
|
|
|
26
26
|
classnames/index.js:
|