@deepdesk/deepdesk-sdk 10.3.1-beta.0 → 10.3.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,26 @@
1
- "use strict";var Deepdesk=(()=>{var iC=Object.create;var za=Object.defineProperty;var sC=Object.getOwnPropertyDescriptor;var aC=Object.getOwnPropertyNames;var lC=Object.getPrototypeOf,uC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)za(e,n,{get:t[n],enumerable:!0})},_h=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of aC(t))!uC.call(e,o)&&o!==n&&za(e,o,{get:()=>t[o],enumerable:!(r=sC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?iC(lC(e)):{},_h(t||!e||!e.__esModule?za(n,"default",{value:e,enumerable:!0}):n,e)),cC=e=>_h(za({},"__esModule",{value:!0}),e);var X=pe((FA,Va)=>{"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 Va<"u"&&Va.exports?(n.default=n,Va.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ka=pe((jA,Eh)=>{"use strict";var wh=Object.getOwnPropertySymbols,dC=Object.prototype.hasOwnProperty,fC=Object.prototype.propertyIsEnumerable;function pC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function mC(){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}}Eh.exports=mC()?Object.assign:function(e,t){for(var n,r=pC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)dC.call(n,s)&&(r[s]=n[s]);if(wh){o=wh(n);for(var a=0;a<o.length;a++)fC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Bh=pe(K=>{"use strict";var kd=Ka(),co=60103,Th=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var kh=60109,Ph=60110,Rh=60112;K.Suspense=60113;var Ih=60115,Ah=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,co=ft("react.element"),Th=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),kh=ft("react.provider"),Ph=ft("react.context"),Rh=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Ih=ft("react.memo"),Ah=ft("react.lazy"));var ft,Ch=typeof Symbol=="function"&&Symbol.iterator;function gC(e){return e===null||typeof e!="object"?null:(e=Ch&&e[Ch]||e["@@iterator"],typeof e=="function"?e:null)}function Ui(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 Lh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oh={};function fo(e,t,n){this.props=e,this.context=t,this.refs=Oh,this.updater=n||Lh}fo.prototype.isReactComponent={};fo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Ui(85));this.updater.enqueueSetState(this,e,t,"setState")};fo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=fo.prototype;function Pd(e,t,n){this.props=e,this.context=t,this.refs=Oh,this.updater=n||Lh}var Rd=Pd.prototype=new Nh;Rd.constructor=Pd;kd(Rd,fo.prototype);Rd.isPureReactComponent=!0;var Id={current:null},Mh=Object.prototype.hasOwnProperty,Dh={key:!0,ref:!0,__self:!0,__source:!0};function Fh(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)Mh.call(t,r)&&!Dh.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:co,type:e,key:i,ref:s,props:o,_owner:Id.current}}function hC(e,t){return{$$typeof:co,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ad(e){return typeof e=="object"&&e!==null&&e.$$typeof===co}function yC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var bh=/\/+/g;function Td(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yC(""+e.key):t.toString(36)}function $a(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 co:case Th:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Td(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(bh,"$&/")+"/"),$a(o,t,n,"",function(u){return u})):o!=null&&(Ad(o)&&(o=hC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(bh,"$&/")+"/")+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+Td(i,a);s+=$a(i,t,n,l,o)}else if(l=gC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Td(i,a++),s+=$a(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Ui(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Wa(e,t,n){if(e==null)return e;var r=[],o=0;return $a(e,r,"","",function(i){return t.call(n,i,o++)}),r}function vC(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 jh={current:null};function cn(){var e=jh.current;if(e===null)throw Error(Ui(321));return e}var SC={ReactCurrentDispatcher:jh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Id,IsSomeRendererActing:{current:!1},assign:kd};K.Children={map:Wa,forEach:function(e,t,n){Wa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wa(e,function(){t++}),t},toArray:function(e){return Wa(e,function(t){return t})||[]},only:function(e){if(!Ad(e))throw Error(Ui(143));return e}};K.Component=fo;K.PureComponent=Pd;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SC;K.cloneElement=function(e,t,n){if(e==null)throw Error(Ui(267,e));var r=kd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Id.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Mh.call(t,l)&&!Dh.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:co,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Ph,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:kh,_context:e},e.Consumer=e};K.createElement=Fh;K.createFactory=function(e){var t=Fh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Rh,render:e}};K.isValidElement=Ad;K.lazy=function(e){return{$$typeof:Ah,_payload:{_status:-1,_result:e},_init:vC}};K.memo=function(e,t){return{$$typeof:Ih,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return cn().useCallback(e,t)};K.useContext=function(e,t){return cn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return cn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return cn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return cn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return cn().useMemo(e,t)};K.useReducer=function(e,t,n){return cn().useReducer(e,t,n)};K.useRef=function(e){return cn().useRef(e)};K.useState=function(e){return cn().useState(e)};K.version="17.0.2"});var O=pe((HA,Hh)=>{"use strict";Hh.exports=Bh()});var Wh=pe(Vi=>{"use strict";Ka();var xC=O(),Vh=60103;Vi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Ld=Symbol.for,Vh=Ld("react.element"),Vi.Fragment=Ld("react.fragment"));var Ld,_C=xC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wC=Object.prototype.hasOwnProperty,EC={key:!0,ref:!0,__self:!0,__source:!0};function Kh(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)wC.call(t,r)&&!EC.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:Vh,type:e,key:i,ref:s,props:o,_owner:_C.current}}Vi.jsx=Kh;Vi.jsxs=Kh});var E=pe((qA,$h)=>{"use strict";$h.exports=Wh()});var Py=pe(q=>{"use strict";var vo,Yi,xl,Zd;typeof performance=="object"&&typeof performance.now=="function"?(Ey=performance,q.unstable_now=function(){return Ey.now()}):($d=Date,Cy=$d.now(),q.unstable_now=function(){return $d.now()-Cy});var Ey,$d,Cy;typeof window>"u"||typeof MessageChannel!="function"?(yo=null,qd=null,Gd=function(){if(yo!==null)try{var e=q.unstable_now();yo(!0,e),yo=null}catch(t){throw setTimeout(Gd,0),t}},vo=function(e){yo!==null?setTimeout(vo,0,e):(yo=e,setTimeout(Gd,0))},Yi=function(e,t){qd=setTimeout(e,t)},xl=function(){clearTimeout(qd)},q.unstable_shouldYield=function(){return!1},Zd=q.unstable_forceFrameRate=function(){}):(by=window.setTimeout,Ty=window.clearTimeout,typeof console<"u"&&(ky=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 ky!="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")),Xi=!1,Qi=null,yl=-1,Xd=5,Qd=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Qd},Zd=function(){},q.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"):Xd=0<e?Math.floor(1e3/e):5},Yd=new MessageChannel,vl=Yd.port2,Yd.port1.onmessage=function(){if(Qi!==null){var e=q.unstable_now();Qd=e+Xd;try{Qi(!0,e)?vl.postMessage(null):(Xi=!1,Qi=null)}catch(t){throw vl.postMessage(null),t}}else Xi=!1},vo=function(e){Qi=e,Xi||(Xi=!0,vl.postMessage(null))},Yi=function(e,t){yl=by(function(){e(q.unstable_now())},t)},xl=function(){Ty(yl),yl=-1});var yo,qd,Gd,by,Ty,ky,Xi,Qi,yl,Xd,Qd,Yd,vl;function Jd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Sl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Nt(e){return e=e[0],e===void 0?null:e}function _l(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>Sl(s,n))l!==void 0&&0>Sl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Sl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Sl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Gt=[],zn=[],JC=1,ht=null,Ie=3,wl=!1,Mr=!1,Zi=!1;function ef(e){for(var t=Nt(zn);t!==null;){if(t.callback===null)_l(zn);else if(t.startTime<=e)_l(zn),t.sortIndex=t.expirationTime,Jd(Gt,t);else break;t=Nt(zn)}}function tf(e){if(Zi=!1,ef(e),!Mr)if(Nt(Gt)!==null)Mr=!0,vo(nf);else{var t=Nt(zn);t!==null&&Yi(tf,t.startTime-e)}}function nf(e,t){Mr=!1,Zi&&(Zi=!1,xl()),wl=!0;var n=Ie;try{for(ef(t),ht=Nt(Gt);ht!==null&&(!(ht.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Ie=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?ht.callback=o:ht===Nt(Gt)&&_l(Gt),ef(t)}else _l(Gt);ht=Nt(Gt)}if(ht!==null)var i=!0;else{var s=Nt(zn);s!==null&&Yi(tf,s.startTime-t),i=!1}return i}finally{ht=null,Ie=n,wl=!1}}var eb=Zd;q.unstable_IdlePriority=5;q.unstable_ImmediatePriority=1;q.unstable_LowPriority=4;q.unstable_NormalPriority=3;q.unstable_Profiling=null;q.unstable_UserBlockingPriority=2;q.unstable_cancelCallback=function(e){e.callback=null};q.unstable_continueExecution=function(){Mr||wl||(Mr=!0,vo(nf))};q.unstable_getCurrentPriorityLevel=function(){return Ie};q.unstable_getFirstCallbackNode=function(){return Nt(Gt)};q.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}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=eb;q.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}};q.unstable_scheduleCallback=function(e,t,n){var r=q.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:JC++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Jd(zn,e),Nt(Gt)===null&&e===Nt(zn)&&(Zi?xl():Zi=!0,Yi(tf,n-r))):(e.sortIndex=o,Jd(Gt,e),Mr||wl||(Mr=!0,vo(nf))),e};q.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Iy=pe((BO,Ry)=>{"use strict";Ry.exports=Py()});var h0=pe(wt=>{"use strict";var gu=O(),ae=Ka(),xe=Iy();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(!gu)throw Error(T(227));var Vv=new Set,Ps={};function $r(e,t){Bo(e,t),Bo(e+"Capture",t)}function Bo(e,t){for(Ps[e]=t,e=0;e<t.length;e++)Vv.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tb=/^[: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]*$/,Ay=Object.prototype.hasOwnProperty,Ly={},Oy={};function nb(e){return Ay.call(Oy,e)?!0:Ay.call(Ly,e)?!1:tb.test(e)?Oy[e]=!0:(Ly[e]=!0,!1)}function rb(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 ob(e,t,n,r){if(t===null||typeof t>"u"||rb(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 He(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 He(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 He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new He(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 He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var fp=/[\-:]([a-z])/g;function pp(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(fp,pp);ke[t]=new He(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(fp,pp);ke[t]=new He(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(fp,pp);ke[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function mp(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||(ob(t,n,o,r)&&(n=null),r||o===null?nb(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 qr=gu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ds=60103,Fr=60106,Kn=60107,gp=60108,hs=60114,hp=60109,yp=60110,hu=60112,ys=60113,$l=60120,yu=60115,vp=60116,Sp=60121,xp=60128,Kv=60129,_p=60130,Tf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,ds=ye("react.element"),Fr=ye("react.portal"),Kn=ye("react.fragment"),gp=ye("react.strict_mode"),hs=ye("react.profiler"),hp=ye("react.provider"),yp=ye("react.context"),hu=ye("react.forward_ref"),ys=ye("react.suspense"),$l=ye("react.suspense_list"),yu=ye("react.memo"),vp=ye("react.lazy"),Sp=ye("react.block"),ye("react.scope"),xp=ye("react.opaque.id"),Kv=ye("react.debug_trace_mode"),_p=ye("react.offscreen"),Tf=ye("react.legacy_hidden"));var ye,Ny=typeof Symbol=="function"&&Symbol.iterator;function Ji(e){return e===null||typeof e!="object"?null:(e=Ny&&e[Ny]||e["@@iterator"],typeof e=="function"?e:null)}var rf;function fs(e){if(rf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rf=t&&t[1]||""}return`
2
- `+rf+e}var of=!1;function El(e,t){if(!e||of)return"";of=!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(`
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`
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{of=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fs(e):""}function ib(e){switch(e.tag){case 5:return fs(e.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 22:return e=El(e.type._render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function Ro(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 Kn:return"Fragment";case Fr:return"Portal";case hs:return"Profiler";case gp:return"StrictMode";case ys:return"Suspense";case $l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yp:return(e.displayName||"Context")+".Consumer";case hp:return(e._context.displayName||"Context")+".Provider";case hu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case yu:return Ro(e.type);case Sp:return Ro(e._render);case vp:t=e._payload,e=e._init;try{return Ro(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sb(e){var t=Wv(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 Cl(e){e._valueTracker||(e._valueTracker=sb(e))}function $v(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ql(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 kf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function My(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(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 qv(e,t){t=t.checked,t!=null&&mp(e,"checked",t,!1)}function Pf(e,t){qv(e,t);var n=nr(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")?Rf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rf(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dy(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 Rf(e,t,n){(t!=="number"||ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ab(e){var t="";return gu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function If(e,t){return e=ae({children:void 0},t),(t=ab(t.children))&&(e.children=t),e}function Io(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=""+nr(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 Af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fy(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:nr(n)}}function Gv(e,t){var n=nr(t.value),r=nr(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 jy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Lf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Xv(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 Of(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Xv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bl,Qv=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!==Lf.svg||"innerHTML"in e)e.innerHTML=t;else{for(bl=bl||document.createElement("div"),bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vs={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},lb=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(e){lb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vs[t]=vs[e]})});function Yv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vs.hasOwnProperty(e)&&vs[e]?(""+t).trim():t+"px"}function Zv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Yv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ub=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 Nf(e,t){if(t){if(ub[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 Mf(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 wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Df=null,Ao=null,Lo=null;function By(e){if(e=Vs(e)){if(typeof Df!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Eu(t),Df(e.stateNode,e.type,t))}}function Jv(e){Ao?Lo?Lo.push(e):Lo=[e]:Ao=e}function eS(){if(Ao){var e=Ao,t=Lo;if(Lo=Ao=null,By(e),t)for(e=0;e<t.length;e++)By(t[e])}}function Ep(e,t){return e(t)}function tS(e,t,n,r,o){return e(t,n,r,o)}function Cp(){}var nS=Ep,jr=!1,sf=!1;function bp(){(Ao!==null||Lo!==null)&&(Cp(),eS())}function cb(e,t,n){if(sf)return e(t,n);sf=!0;try{return nS(e,t,n)}finally{sf=!1,bp()}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var r=Eu(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 Ff=!1;if(hn)try{So={},Object.defineProperty(So,"passive",{get:function(){Ff=!0}}),window.addEventListener("test",So,So),window.removeEventListener("test",So,So)}catch{Ff=!1}var So;function db(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 Ss=!1,Gl=null,Xl=!1,jf=null,fb={onError:function(e){Ss=!0,Gl=e}};function pb(e,t,n,r,o,i,s,a,l){Ss=!1,Gl=null,db.apply(fb,arguments)}function mb(e,t,n,r,o,i,s,a,l){if(pb.apply(this,arguments),Ss){if(Ss){var u=Gl;Ss=!1,Gl=null}else throw Error(T(198));Xl||(Xl=!0,jf=u)}}function Gr(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 rS(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 Hy(e){if(Gr(e)!==e)throw Error(T(188))}function gb(e){var t=e.alternate;if(!t){if(t=Gr(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 Hy(o),e;if(i===r)return Hy(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 oS(e){if(e=gb(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 Uy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var iS,Tp,sS,aS,Bf=!1,Xt=[],Gn=null,Xn=null,Qn=null,As=new Map,Ls=new Map,es=[],zy="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 Hf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Vy(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":As.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ls.delete(t.pointerId)}}function ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Hf(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&Tp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function hb(e,t,n,r,o){switch(t){case"focusin":return Gn=ts(Gn,e,t,n,r,o),!0;case"dragenter":return Xn=ts(Xn,e,t,n,r,o),!0;case"mouseover":return Qn=ts(Qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return As.set(i,ts(As.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ls.set(i,ts(Ls.get(i)||null,e,t,n,r,o)),!0}return!1}function yb(e){var t=Br(e.target);if(t!==null){var n=Gr(t);if(n!==null){if(t=n.tag,t===13){if(t=rS(n),t!==null){e.blockedOn=t,aS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){sS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ip(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&Tp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ky(e,t,n){Dl(e)&&n.delete(t)}function vb(){for(Bf=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&iS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Ip(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Gn!==null&&Dl(Gn)&&(Gn=null),Xn!==null&&Dl(Xn)&&(Xn=null),Qn!==null&&Dl(Qn)&&(Qn=null),As.forEach(Ky),Ls.forEach(Ky)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Bf||(Bf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,vb)))}function lS(e){function t(o){return ns(o,e)}if(0<Xt.length){ns(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&ns(Gn,e),Xn!==null&&ns(Xn,e),Qn!==null&&ns(Qn,e),As.forEach(t),Ls.forEach(t),n=0;n<es.length;n++)r=es[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<es.length&&(n=es[0],n.blockedOn===null);)yb(n),n.blockedOn===null&&es.shift()}function Tl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Eo={animationend:Tl("Animation","AnimationEnd"),animationiteration:Tl("Animation","AnimationIteration"),animationstart:Tl("Animation","AnimationStart"),transitionend:Tl("Transition","TransitionEnd")},af={},uS={};hn&&(uS=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function vu(e){if(af[e])return af[e];if(!Eo[e])return e;var t=Eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in uS)return af[e]=t[n];return e}var cS=vu("animationend"),dS=vu("animationiteration"),fS=vu("animationstart"),pS=vu("transitionend"),mS=new Map,kp=new Map,Sb=["abort","abort",cS,"animationEnd",dS,"animationIteration",fS,"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",pS,"transitionEnd","waiting","waiting"];function Pp(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)),kp.set(r,t),mS.set(r,o),$r(o,[r])}}var xb=xe.unstable_now;xb();var ne=8;function _o(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 _b(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 wb(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 Os(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=_o(l),o=ne):(a&=i,a!==0&&(r=_o(a),o=ne))}else i=n&~s,i!==0?(r=_o(i),o=ne):a!==0&&(r=_o(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(_o(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function gS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ql(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=wo(24&~t),e===0?Ql(10,t):e;case 10:return e=wo(192&~t),e===0?Ql(8,t):e;case 8:return e=wo(3584&~t),e===0&&(e=wo(4186112&~t),e===0&&(e=512)),e;case 2:return t=wo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function wo(e){return e&-e}function lf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Su(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:bb,Eb=Math.log,Cb=Math.LN2;function bb(e){return e===0?32:31-(Eb(e)/Cb|0)|0}var Tb=xe.unstable_UserBlockingPriority,kb=xe.unstable_runWithPriority,Fl=!0;function Pb(e,t,n,r){jr||Cp();var o=Rp,i=jr;jr=!0;try{tS(o,e,t,n,r)}finally{(jr=i)||bp()}}function Rb(e,t,n,r){kb(Tb,Rp.bind(null,e,t,n,r))}function Rp(e,t,n,r){if(Fl){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<zy.indexOf(e))e=Hf(null,e,t,n,r),Xt.push(e);else{var i=Ip(e,t,n,r);if(i===null)o&&Vy(e,r);else{if(o){if(-1<zy.indexOf(e)){e=Hf(i,e,t,n,r),Xt.push(e);return}if(hb(i,e,t,n,r))return;Vy(e,r)}PS(e,t,r,null,n)}}}}function Ip(e,t,n,r){var o=wp(r);if(o=Br(o),o!==null){var i=Gr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=rS(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 PS(e,t,r,o,n),null}var Wn=null,Ap=null,jl=null;function hS(){if(jl)return jl;var e,t=Ap,n=t.length,r,o="value"in Wn?Wn.value:Wn.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 jl=o.slice(e,1<r?1-r:void 0)}function Bl(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 kl(){return!0}function Wy(){return!1}function nt(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)?kl:Wy,this.isPropagationStopped=Wy,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=kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var Vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=nt(Vo),zs=ae({},Vo,{view:0,detail:0}),Ib=nt(zs),uf,cf,rs,xu=ae({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Op,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!==rs&&(rs&&e.type==="mousemove"?(uf=e.screenX-rs.screenX,cf=e.screenY-rs.screenY):cf=uf=0,rs=e),uf)},movementY:function(e){return"movementY"in e?e.movementY:cf}}),$y=nt(xu),Ab=ae({},xu,{dataTransfer:0}),Lb=nt(Ab),Ob=ae({},zs,{relatedTarget:0}),df=nt(Ob),Nb=ae({},Vo,{animationName:0,elapsedTime:0,pseudoElement:0}),Mb=nt(Nb),Db=ae({},Vo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fb=nt(Db),jb=ae({},Vo,{data:0}),qy=nt(jb),Bb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hb={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"},Ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ub[e])?!!t[e]:!1}function Op(){return zb}var Vb=ae({},zs,{key:function(e){if(e.key){var t=Bb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Op,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kb=nt(Vb),Wb=ae({},xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gy=nt(Wb),$b=ae({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),qb=nt($b),Gb=ae({},Vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xb=nt(Gb),Qb=ae({},xu,{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}),Yb=nt(Qb),Zb=[9,13,27,32],Np=hn&&"CompositionEvent"in window,xs=null;hn&&"documentMode"in document&&(xs=document.documentMode);var Jb=hn&&"TextEvent"in window&&!xs,yS=hn&&(!Np||xs&&8<xs&&11>=xs),Xy=String.fromCharCode(32),Qy=!1;function vS(e,t){switch(e){case"keyup":return Zb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Co=!1;function eT(e,t){switch(e){case"compositionend":return SS(t);case"keypress":return t.which!==32?null:(Qy=!0,Xy);case"textInput":return e=t.data,e===Xy&&Qy?null:e;default:return null}}function tT(e,t){if(Co)return e==="compositionend"||!Np&&vS(e,t)?(e=hS(),jl=Ap=Wn=null,Co=!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 yS&&t.locale!=="ko"?null:t.data;default:return null}}var nT={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 Yy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nT[e.type]:t==="textarea"}function xS(e,t,n,r){Jv(r),t=Yl(t,"onChange"),0<t.length&&(n=new Lp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _s=null,Ns=null;function rT(e){bS(e,0)}function _u(e){var t=To(e);if($v(t))return e}function oT(e,t){if(e==="change")return t}var _S=!1;hn&&(hn?(Rl="oninput"in document,Rl||(ff=document.createElement("div"),ff.setAttribute("oninput","return;"),Rl=typeof ff.oninput=="function"),Pl=Rl):Pl=!1,_S=Pl&&(!document.documentMode||9<document.documentMode));var Pl,Rl,ff;function Zy(){_s&&(_s.detachEvent("onpropertychange",wS),Ns=_s=null)}function wS(e){if(e.propertyName==="value"&&_u(Ns)){var t=[];if(xS(t,Ns,e,wp(e)),e=rT,jr)e(t);else{jr=!0;try{Ep(e,t)}finally{jr=!1,bp()}}}}function iT(e,t,n){e==="focusin"?(Zy(),_s=t,Ns=n,_s.attachEvent("onpropertychange",wS)):e==="focusout"&&Zy()}function sT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(Ns)}function aT(e,t){if(e==="click")return _u(t)}function lT(e,t){if(e==="input"||e==="change")return _u(t)}function uT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:uT,cT=Object.prototype.hasOwnProperty;function Ms(e,t){if(yt(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(!cT.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Jy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ev(e,t){var n=Jy(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=Jy(n)}}function ES(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ES(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tv(){for(var e=window,t=ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ql(e.document)}return t}function Uf(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 dT=hn&&"documentMode"in document&&11>=document.documentMode,bo=null,zf=null,ws=null,Vf=!1;function nv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vf||bo==null||bo!==ql(r)||(r=bo,"selectionStart"in r&&Uf(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}),ws&&Ms(ws,r)||(ws=r,r=Yl(zf,"onSelect"),0<r.length&&(t=new Lp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bo)))}Pp("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);Pp("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);Pp(Sb,2);for(pf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Il=0;Il<pf.length;Il++)kp.set(pf[Il],0);var pf,Il;Bo("onMouseEnter",["mouseout","mouseover"]);Bo("onMouseLeave",["mouseout","mouseover"]);Bo("onPointerEnter",["pointerout","pointerover"]);Bo("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ps="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),CS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ps));function rv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mb(r,t,void 0,e),e.currentTarget=null}function bS(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;rv(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;rv(o,a,u),i=l}}}if(Xl)throw e=jf,Xl=!1,jf=null,e}function ie(e,t){var n=IS(t),r=e+"__bubble";n.has(r)||(kS(t,e,2,!1),n.add(r))}var ov="_reactListening"+Math.random().toString(36).slice(2);function TS(e){e[ov]||(e[ov]=!0,Vv.forEach(function(t){CS.has(t)||iv(t,!1,e,null),iv(t,!0,e,null)}))}function iv(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&&CS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=IS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),kS(i,e,o,t),s.add(a))}function kS(e,t,n,r){var o=kp.get(t);switch(o===void 0?2:o){case 0:o=Pb;break;case 1:o=Rb;break;default:o=Rp}n=o.bind(null,t,n,e),o=void 0,!Ff||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 PS(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=Br(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}cb(function(){var u=i,c=wp(n),f=[];e:{var d=mS.get(e);if(d!==void 0){var y=Lp,v=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":y=Kb;break;case"focusin":v="focus",y=df;break;case"focusout":v="blur",y=df;break;case"beforeblur":case"afterblur":y=df;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=$y;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=qb;break;case cS:case dS:case fS:y=Mb;break;case pS:y=Xb;break;case"scroll":y=Ib;break;case"wheel":y=Yb;break;case"copy":case"cut":case"paste":y=Fb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Gy}var h=(t&4)!==0,m=!h&&e==="scroll",g=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,x;p!==null;){x=p;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,g!==null&&(_=Is(p,g),_!=null&&h.push(Ds(p,_,x)))),m)break;p=p.return}0<h.length&&(d=new y(d,v,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)&&(v=n.relatedTarget||n.fromElement)&&(Br(v)||v[Ko]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(v=n.relatedTarget||n.toElement,y=u,v=v?Br(v):null,v!==null&&(m=Gr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=u),y!==v)){if(h=$y,_="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=Gy,_="onPointerLeave",g="onPointerEnter",p="pointer"),m=y==null?d:To(y),x=v==null?d:To(v),d=new h(_,p+"leave",y,n,c),d.target=m,d.relatedTarget=x,_=null,Br(c)===u&&(h=new h(g,p+"enter",v,n,c),h.target=x,h.relatedTarget=m,_=h),m=_,y&&v)t:{for(h=y,g=v,p=0,x=h;x;x=xo(x))p++;for(x=0,_=g;_;_=xo(_))x++;for(;0<p-x;)h=xo(h),p--;for(;0<x-p;)g=xo(g),x--;for(;p--;){if(h===g||g!==null&&h===g.alternate)break t;h=xo(h),g=xo(g)}h=null}else h=null;y!==null&&sv(f,d,y,h,!1),v!==null&&m!==null&&sv(f,m,v,h,!0)}}e:{if(d=u?To(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=oT;else if(Yy(d))if(_S)C=lT;else{C=sT;var w=iT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=aT);if(C&&(C=C(e,u))){xS(f,C,n,c);break e}w&&w(e,d,u),e==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&Rf(d,"number",d.value)}switch(w=u?To(u):window,e){case"focusin":(Yy(w)||w.contentEditable==="true")&&(bo=w,zf=u,ws=null);break;case"focusout":ws=zf=bo=null;break;case"mousedown":Vf=!0;break;case"contextmenu":case"mouseup":case"dragend":Vf=!1,nv(f,n,c);break;case"selectionchange":if(dT)break;case"keydown":case"keyup":nv(f,n,c)}var b;if(Np)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 Co?vS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(yS&&n.locale!=="ko"&&(Co||R!=="onCompositionStart"?R==="onCompositionEnd"&&Co&&(b=hS()):(Wn=c,Ap="value"in Wn?Wn.value:Wn.textContent,Co=!0)),w=Yl(u,R),0<w.length&&(R=new qy(R,e,null,n,c),f.push({event:R,listeners:w}),b?R.data=b:(b=SS(n),b!==null&&(R.data=b)))),(b=Jb?eT(e,n):tT(e,n))&&(u=Yl(u,"onBeforeInput"),0<u.length&&(c=new qy("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}bS(f,t)})}function Ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Is(e,n),i!=null&&r.unshift(Ds(e,i,o)),i=Is(e,t),i!=null&&r.push(Ds(e,i,o))),e=e.return}return r}function xo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sv(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=Is(n,i),l!=null&&s.unshift(Ds(n,l,a))):o||(l=Is(n,i),l!=null&&s.push(Ds(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Zl(){}var mf=null,gf=null;function RS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Kf(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 av=typeof setTimeout=="function"?setTimeout:void 0,fT=typeof clearTimeout=="function"?clearTimeout:void 0;function Mp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Oo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function lv(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 hf=0;function pT(e){return{$$typeof:xp,toString:e,valueOf:e}}var wu=Math.random().toString(36).slice(2),$n="__reactFiber$"+wu,Jl="__reactProps$"+wu,Ko="__reactContainer$"+wu,uv="__reactEvents$"+wu;function Br(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ko]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lv(e);e!==null;){if(n=e[$n])return n;e=lv(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[$n]||e[Ko],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Eu(e){return e[Jl]||null}function IS(e){var t=e[uv];return t===void 0&&(t=e[uv]=new Set),t}var Wf=[],ko=-1;function ar(e){return{current:e}}function se(e){0>ko||(e.current=Wf[ko],Wf[ko]=null,ko--)}function de(e,t){ko++,Wf[ko]=e.current,e.current=t}var or={},Ne=ar(or),$e=ar(!1),Vr=or;function Ho(e,t){var n=e.type.contextTypes;if(!n)return or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function eu(){se($e),se(Ne)}function cv(e,t,n){if(Ne.current!==or)throw Error(T(168));de(Ne,t),de($e,n)}function AS(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,Ro(t)||"Unknown",o));return ae({},n,r)}function Hl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Vr=Ne.current,de(Ne,e),de($e,$e.current),!0}function dv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=AS(e,t,Vr),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Ne),de(Ne,e)):se($e),de($e,n)}var Dp=null,zr=null,mT=xe.unstable_runWithPriority,Fp=xe.unstable_scheduleCallback,$f=xe.unstable_cancelCallback,gT=xe.unstable_shouldYield,fv=xe.unstable_requestPaint,qf=xe.unstable_now,hT=xe.unstable_getCurrentPriorityLevel,Cu=xe.unstable_ImmediatePriority,LS=xe.unstable_UserBlockingPriority,OS=xe.unstable_NormalPriority,NS=xe.unstable_LowPriority,MS=xe.unstable_IdlePriority,yf={},yT=fv!==void 0?fv:function(){},dn=null,Ul=null,vf=!1,pv=qf(),Le=1e4>pv?qf:function(){return qf()-pv};function Uo(){switch(hT()){case Cu:return 99;case LS:return 98;case OS:return 97;case NS:return 96;case MS:return 95;default:throw Error(T(332))}}function DS(e){switch(e){case 99:return Cu;case 98:return LS;case 97:return OS;case 96:return NS;case 95:return MS;default:throw Error(T(332))}}function Kr(e,t){return e=DS(e),mT(e,t)}function Fs(e,t,n){return e=DS(e),Fp(e,t,n)}function en(){if(Ul!==null){var e=Ul;Ul=null,$f(e)}FS()}function FS(){if(!vf&&dn!==null){vf=!0;var e=0;try{var t=dn;Kr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),Fp(Cu,en),n}finally{vf=!1}}}var vT=qr.ReactCurrentBatchConfig;function Mt(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 tu=ar(null),nu=null,Po=null,ru=null;function jp(){ru=Po=nu=null}function Bp(e){var t=tu.current;se(tu),e.type._context._currentValue=t}function jS(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 No(e,t){nu=e,ru=Po=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function xt(e,t){if(ru!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(ru=e,t=1073741823),t={context:e,observedBits:t,next:null},Po===null){if(nu===null)throw Error(T(308));Po=t,nu.dependencies={lanes:0,firstContext:t,responders:null}}else Po=Po.next=t;return e._currentValue}var Vn=!1;function Hp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function BS(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 Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(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 mv(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 js(e,t,n,r){var o=e.updateQueue;Vn=!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,v=i;switch(a=t,d=n,v.tag){case 1:if(y=v.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=v.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Vn=!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,Ws|=s,e.lanes=s,e.memoizedState=f}}function gv(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 HS=new gu.Component().refs;function ou(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 bu={isMounted:function(e){return(e=e._reactInternals)?Gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(e,r,n)}};function hv(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?!Ms(n,r)||!Ms(o,i):!0}function US(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=xt(i):(o=qe(t)?Vr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Ho(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function yv(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&&bu.enqueueReplaceState(t,t.state,null)}function Gf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=HS,Hp(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=xt(i):(i=qe(t)?Vr:Ne.current,o.context=Ho(e,i)),js(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ou(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&&bu.enqueueReplaceState(o,o.state,null),js(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Al=Array.isArray;function os(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===HS&&(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 Ll(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 zS(e){function t(m,g){if(e){var p=m.lastEffect;p!==null?(p.nextEffect=g,m.lastEffect=g):m.firstEffect=m.lastEffect=g,g.nextEffect=null,g.flags=8}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=sr(m,g),m.index=0,m.sibling=null,m}function i(m,g,p){return m.index=p,e?(p=m.alternate,p!==null?(p=p.index,p<g?(m.flags=2,g):p):(m.flags=2,g)):g}function s(m){return e&&m.alternate===null&&(m.flags=2),m}function a(m,g,p,x){return g===null||g.tag!==6?(g=Ef(p,m.mode,x),g.return=m,g):(g=o(g,p),g.return=m,g)}function l(m,g,p,x){return g!==null&&g.elementType===p.type?(x=o(g,p.props),x.ref=os(m,g,p),x.return=m,x):(x=Wl(p.type,p.key,p.props,null,m.mode,x),x.ref=os(m,g,p),x.return=m,x)}function u(m,g,p,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==p.containerInfo||g.stateNode.implementation!==p.implementation?(g=Cf(p,m.mode,x),g.return=m,g):(g=o(g,p.children||[]),g.return=m,g)}function c(m,g,p,x,_){return g===null||g.tag!==7?(g=jo(p,m.mode,x,_),g.return=m,g):(g=o(g,p),g.return=m,g)}function f(m,g,p){if(typeof g=="string"||typeof g=="number")return g=Ef(""+g,m.mode,p),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ds:return p=Wl(g.type,g.key,g.props,null,m.mode,p),p.ref=os(m,null,g),p.return=m,p;case Fr:return g=Cf(g,m.mode,p),g.return=m,g}if(Al(g)||Ji(g))return g=jo(g,m.mode,p,null),g.return=m,g;Ll(m,g)}return null}function d(m,g,p,x){var _=g!==null?g.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(m,g,""+p,x);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ds:return p.key===_?p.type===Kn?c(m,g,p.props.children,x,_):l(m,g,p,x):null;case Fr:return p.key===_?u(m,g,p,x):null}if(Al(p)||Ji(p))return _!==null?null:c(m,g,p,x,null);Ll(m,p)}return null}function y(m,g,p,x,_){if(typeof x=="string"||typeof x=="number")return m=m.get(p)||null,a(g,m,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ds:return m=m.get(x.key===null?p:x.key)||null,x.type===Kn?c(g,m,x.props.children,_,x.key):l(g,m,x,_);case Fr:return m=m.get(x.key===null?p:x.key)||null,u(g,m,x,_)}if(Al(x)||Ji(x))return m=m.get(p)||null,c(g,m,x,_,null);Ll(g,x)}return null}function v(m,g,p,x){for(var _=null,C=null,w=g,b=g=0,R=null;w!==null&&b<p.length;b++){w.index>b?(R=w,w=null):R=w.sibling;var P=d(m,w,p[b],x);if(P===null){w===null&&(w=R);break}e&&w&&P.alternate===null&&t(m,w),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P,w=R}if(b===p.length)return n(m,w),_;if(w===null){for(;b<p.length;b++)w=f(m,p[b],x),w!==null&&(g=i(w,g,b),C===null?_=w:C.sibling=w,C=w);return _}for(w=r(m,w);b<p.length;b++)R=y(w,m,b,p[b],x),R!==null&&(e&&R.alternate!==null&&w.delete(R.key===null?b:R.key),g=i(R,g,b),C===null?_=R:C.sibling=R,C=R);return e&&w.forEach(function(N){return t(m,N)}),_}function h(m,g,p,x){var _=Ji(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,w=g,b=g=0,R=null,P=p.next();w!==null&&!P.done;b++,P=p.next()){w.index>b?(R=w,w=null):R=w.sibling;var N=d(m,w,P.value,x);if(N===null){w===null&&(w=R);break}e&&w&&N.alternate===null&&t(m,w),g=i(N,g,b),C===null?_=N:C.sibling=N,C=N,w=R}if(P.done)return n(m,w),_;if(w===null){for(;!P.done;b++,P=p.next())P=f(m,P.value,x),P!==null&&(g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return _}for(w=r(m,w);!P.done;b++,P=p.next())P=y(w,m,b,P.value,x),P!==null&&(e&&P.alternate!==null&&w.delete(P.key===null?b:P.key),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return e&&w.forEach(function(V){return t(m,V)}),_}return function(m,g,p,x){var _=typeof p=="object"&&p!==null&&p.type===Kn&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case ds:e:{for(C=p.key,_=g;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===Kn){n(m,_.sibling),g=o(_,p.props.children),g.return=m,m=g;break e}break;default:if(_.elementType===p.type){n(m,_.sibling),g=o(_,p.props),g.ref=os(m,_,p),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}p.type===Kn?(g=jo(p.props.children,m.mode,x,p.key),g.return=m,m=g):(x=Wl(p.type,p.key,p.props,null,m.mode,x),x.ref=os(m,g,p),x.return=m,m=x)}return s(m);case Fr:e:{for(_=p.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===p.containerInfo&&g.stateNode.implementation===p.implementation){n(m,g.sibling),g=o(g,p.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Cf(p,m.mode,x),g.return=m,m=g}return s(m)}if(typeof p=="string"||typeof p=="number")return p=""+p,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,p),g.return=m,m=g):(n(m,g),g=Ef(p,m.mode,x),g.return=m,m=g),s(m);if(Al(p))return v(m,g,p,x);if(Ji(p))return h(m,g,p,x);if(C&&Ll(m,p),typeof p>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ro(m.type)||"Component"))}return n(m,g)}}var iu=zS(!0),VS=zS(!1),Ks={},Zt=ar(Ks),Bs=ar(Ks),Hs=ar(Ks);function Hr(e){if(e===Ks)throw Error(T(174));return e}function Xf(e,t){switch(de(Hs,t),de(Bs,e),de(Zt,Ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Of(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Of(t,e)}se(Zt),de(Zt,t)}function zo(){se(Zt),se(Bs),se(Hs)}function vv(e){Hr(Hs.current);var t=Hr(Zt.current),n=Of(t,e.type);t!==n&&(de(Bs,e),de(Zt,n))}function Up(e){Bs.current===e&&(se(Zt),se(Bs))}var ce=ar(0);function su(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 pn=null,qn=null,Jt=!1;function KS(e,t){var n=vt(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 Sv(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 Qf(e){if(Jt){var t=qn;if(t){var n=t;if(!Sv(e,t)){if(t=Oo(n.nextSibling),!t||!Sv(e,t)){e.flags=e.flags&-1025|2,Jt=!1,pn=e;return}KS(pn,n)}pn=e,qn=Oo(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,pn=e}}function xv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pn=e}function Ol(e){if(e!==pn)return!1;if(!Jt)return xv(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Kf(t,e.memoizedProps))for(t=qn;t;)KS(e,t),t=Oo(t.nextSibling);if(xv(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){qn=Oo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=pn?Oo(e.stateNode.nextSibling):null;return!0}function Sf(){qn=pn=null,Jt=!1}var Mo=[];function zp(){for(var e=0;e<Mo.length;e++)Mo[e]._workInProgressVersionPrimary=null;Mo.length=0}var Es=qr.ReactCurrentDispatcher,St=qr.ReactCurrentBatchConfig,Us=0,ge=null,Ae=null,be=null,au=!1,Cs=!1;function Ke(){throw Error(T(321))}function Vp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function Kp(e,t,n,r,o,i){if(Us=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Es.current=e===null||e.memoizedState===null?xT:_T,e=n(r,o),Cs){i=0;do{if(Cs=!1,!(25>i))throw Error(T(301));i+=1,be=Ae=null,t.updateQueue=null,Es.current=wT,e=n(r,o)}while(Cs)}if(Es.current=du,t=Ae!==null&&Ae.next!==null,Us=0,be=Ae=ge=null,au=!1,t)throw Error(T(300));return e}function Ur(){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 Xr(){if(Ae===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Ae=e;else{if(e===null)throw Error(T(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Qt(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Xr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Ae,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((Us&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,Ws|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ss(e){var t=Xr(),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);yt(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function _v(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=(Us&e)===e)&&(t._workInProgressVersionPrimary=r,Mo.push(t))),e)return n(t._source);throw Mo.push(t),Error(T(350))}function WS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Es.current,l=a.useState(function(){return _v(o,t,n)}),u=l[1],c=l[0];l=be;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,v=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 m=i(t._source);if(!yt(s,m)){m=n(t._source),yt(c,m)||(u(m),m=Jn(h),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,p=m;0<p;){var x=31-rr(p),_=1<<x;g[x]|=m,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var m=d.getSnapshot,g=d.setSnapshot;try{g(m(t._source));var p=Jn(h);o.mutableReadLanes|=p&o.pendingLanes}catch(x){g(function(){throw x})}})},[t,r]),yt(y,n)&&yt(v,t)&&yt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=qp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=_v(o,t,n),l.memoizedState=l.baseState=c),c}function $S(e,t,n){var r=Xr();return WS(r,e,t,n)}function as(e){var t=Ur();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},e=e.dispatch=qp.bind(null,ge,e),[t.memoizedState,e]}function lu(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 wv(e){var t=Ur();return e={current:e},t.memoizedState=e}function uu(){return Xr().memoizedState}function Yf(e,t,n,r){var o=Ur();ge.flags|=e,o.memoizedState=lu(1|t,n,void 0,r===void 0?null:r)}function Wp(e,t,n,r){var o=Xr();r=r===void 0?null:r;var i=void 0;if(Ae!==null){var s=Ae.memoizedState;if(i=s.destroy,r!==null&&Vp(r,s.deps)){lu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=lu(1|t,n,i,r)}function Ev(e,t){return Yf(516,4,e,t)}function cu(e,t){return Wp(516,4,e,t)}function qS(e,t){return Wp(4,2,e,t)}function GS(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 XS(e,t,n){return n=n!=null?n.concat([e]):null,Wp(4,2,GS.bind(null,t,e),n)}function $p(){}function QS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function YS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ST(e,t){var n=Uo();Kr(98>n?98:n,function(){e(!0)}),Kr(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function qp(e,t,n){var r=tt(),o=Jn(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)Cs=au=!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,yt(l,a))return}catch{}finally{}er(e,o,r)}}var du={readContext:xt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},xT={readContext:xt,useCallback:function(e,t){return Ur().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:Ev,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yf(4,2,GS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yf(4,2,e,t)},useMemo:function(e,t){var n=Ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ur();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=qp.bind(null,ge,e),[r.memoizedState,e]},useRef:wv,useState:as,useDebugValue:$p,useDeferredValue:function(e){var t=as(e),n=t[0],r=t[1];return Ev(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=as(!1),t=e[0];return e=ST.bind(null,e[1]),wv(e),[e,t]},useMutableSource:function(e,t,n){var r=Ur();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},WS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=pT(function(){throw e||(e=!0,n("r:"+(hf++).toString(36))),Error(T(355))}),n=as(t)[1];return!(ge.mode&2)&&(ge.flags|=516,lu(5,function(){n("r:"+(hf++).toString(36))},void 0,null)),t}return t="r:"+(hf++).toString(36),as(t),t},unstable_isNewReconciler:!1},_T={readContext:xt,useCallback:QS,useContext:xt,useEffect:cu,useImperativeHandle:XS,useLayoutEffect:qS,useMemo:YS,useReducer:is,useRef:uu,useState:function(){return is(Qt)},useDebugValue:$p,useDeferredValue:function(e){var t=is(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=is(Qt)[0];return[uu().current,e]},useMutableSource:$S,useOpaqueIdentifier:function(){return is(Qt)[0]},unstable_isNewReconciler:!1},wT={readContext:xt,useCallback:QS,useContext:xt,useEffect:cu,useImperativeHandle:XS,useLayoutEffect:qS,useMemo:YS,useReducer:ss,useRef:uu,useState:function(){return ss(Qt)},useDebugValue:$p,useDeferredValue:function(e){var t=ss(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ss(Qt)[0];return[uu().current,e]},useMutableSource:$S,useOpaqueIdentifier:function(){return ss(Qt)[0]},unstable_isNewReconciler:!1},ET=qr.ReactCurrentOwner,Dt=!1;function We(e,t,n,r){t.child=e===null?VS(t,null,n,r):iu(t,e.child,n,r)}function Cv(e,t,n,r,o){n=n.render;var i=t.ref;return No(t,o),r=Kp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function bv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Jp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,ZS(e,t,s,r,o,i)):(e=Wl(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:Ms,n(o,r)&&e.ref===t.ref)?mn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function ZS(e,t,n,r,o,i){if(e!==null&&Ms(e.memoizedProps,r)&&e.ref===t.ref)if(Dt=!1,(i&o)!==0)e.flags&16384&&(Dt=!0);else return t.lanes=e.lanes,mn(e,t,i);return Zf(e,t,n,r,i)}function xf(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},Ml(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Ml(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ml(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ml(t,r);return We(e,t,o,n),t.child}function JS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Zf(e,t,n,r,o){var i=qe(n)?Vr:Ne.current;return i=Ho(t,i),No(t,o),n=Kp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Tv(e,t,n,r,o){if(qe(n)){var i=!0;Hl(t)}else i=!1;if(No(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),US(t,n,r),Gf(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=xt(u):(u=qe(n)?Vr:Ne.current,u=Ho(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)&&yv(t,s,r,u),Vn=!1;var d=t.memoizedState;s.state=d,js(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Vn?(typeof c=="function"&&(ou(t,n,c,r),l=t.memoizedState),(a=Vn||hv(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,BS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Mt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=xt(l):(l=qe(n)?Vr:Ne.current,l=Ho(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)&&yv(t,s,r,l),Vn=!1,d=t.memoizedState,s.state=d,js(t,r,s,o);var v=t.memoizedState;a!==f||d!==v||$e.current||Vn?(typeof y=="function"&&(ou(t,n,y,r),v=t.memoizedState),(u=Vn||hv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Jf(e,t,n,r,i,o)}function Jf(e,t,n,r,o,i){JS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&dv(t,n,!1),mn(e,t,i);r=t.stateNode,ET.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=iu(t,e.child,null,i),t.child=iu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&dv(t,n,!0),t.child}function kv(e){var t=e.stateNode;t.pendingContext?cv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cv(e,t.context,!1),Xf(e,t.containerInfo)}var Nl={dehydrated:null,retryLane:0};function Pv(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&&Qf(t),e=r.children,o=r.fallback,i?(e=Rv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Rv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,t.lanes=33554432,e):(n=em({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Av(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=Nl,r):(n=Iv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Av(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=Nl,r):(n=Iv(e,t,r.children,n),t.memoizedState=null,n)}function Rv(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=em(t,o,0,null),n=jo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Iv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(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 Av(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=sr(s,a),e!==null?r=sr(e,r):(r=jo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Lv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),jS(e.return,t)}function _f(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 Ov(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(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&&Lv(e,n);else if(e.tag===19)Lv(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&&su(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),_f(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&&su(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}_f(t,!0,n,null,i,t.lastEffect);break;case"together":_f(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ws|=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=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var e0,ep,t0,n0;e0=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}};ep=function(){};t0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Hr(Zt.current);var i=null;switch(n){case"input":o=kf(e,o),r=kf(e,r),i=[];break;case"option":o=If(e,o),r=If(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Af(e,o),r=Af(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Nf(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"&&(Ps.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"&&(Ps.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===xp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};n0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ls(e,t){if(!Jt)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 CT(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 qe(t.type)&&eu(),null;case 3:return zo(),se($e),se(Ne),zp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?t.flags|=4:r.hydrate||(t.flags|=256)),ep(t),null;case 5:Up(t);var o=Hr(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)t0(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=Hr(Zt.current),Ol(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Jl]=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<ps.length;e++)ie(ps[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":My(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Fy(r,i),ie("invalid",r)}Nf(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]):Ps.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Cl(r),Dy(r,i,!0);break;case"textarea":Cl(r),jy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Lf.html&&(e=Xv(n)),e===Lf.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[$n]=t,e[Jl]=r,e0(e,t,!1,!1),t.stateNode=e,s=Mf(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<ps.length;o++)ie(ps[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":My(e,r),o=kf(e,r),ie("invalid",e);break;case"option":o=If(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Fy(e,r),o=Af(e,r),ie("invalid",e);break;default:o=r}Nf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Zv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Qv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Rs(e,l):typeof l=="number"&&Rs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ps.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&mp(e,i,l,s))}switch(n){case"input":Cl(e),Dy(e,r,!1);break;case"textarea":Cl(e),jy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Io(e,!!r.multiple,i,!1):r.defaultValue!=null&&Io(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zl)}RS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)n0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Hr(Hs.current),Hr(Zt.current),Ol(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=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&&Ol(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||!(Ws&134217727)&&!($o&134217727)||Do(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return zo(),ep(t),e===null&&TS(t.stateNode.containerInfo),null;case 10:return Bp(t),null;case 17:return qe(t.type)&&eu(),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)ls(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=su(e),s!==null){for(t.flags|=64,ls(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&&Le()>sp&&(t.flags|=64,i=!0,ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=su(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Jt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>sp&&n!==1073741824&&(t.flags|=64,i=!0,ls(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=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Zp(),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 bT(e){switch(e.tag){case 1:qe(e.type)&&eu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(zo(),se($e),se(Ne),zp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Up(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 zo(),null;case 10:return Bp(e),null;case 23:case 24:return Zp(),null;default:return null}}function Gp(e,t){try{var n="",r=t;do n+=ib(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 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=`
6
6
  Error generating stack: `+i.message+`
7
- `+i.stack}return{value:e,source:t,stack:o}}function tp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var TT=typeof WeakMap=="function"?WeakMap:Map;function r0(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pu||(pu=!0,ap=r),tp(e,t)},n}function o0(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return tp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this),tp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var kT=typeof WeakSet=="function"?WeakSet:Set;function Nv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function PT(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:Mt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Mp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function RT(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&&(p0(n,e),FT(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:Mt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&gv(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}gv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&RS(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&&lS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Mv(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=Yv("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 Dv(e,t){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Dp,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)p0(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Nv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Nv(t);break;case 4:i0(e,t)}}function Fv(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 jv(e){return e.tag===5||e.tag===3||e.tag===4}function Bv(e){e:{for(var t=e.return;t!==null;){if(jv(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&&(Rs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||jv(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?np(e,n,t):rp(e,n,t)}function np(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=Zl));else if(r!==4&&(e=e.child,e!==null))for(np(e,t,n),e=e.sibling;e!==null;)np(e,t,n),e=e.sibling}function rp(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(rp(e,t,n),e=e.sibling;e!==null;)rp(e,t,n),e=e.sibling}function i0(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(Dv(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(Dv(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 wf(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[Jl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&qv(n,r),Mf(e,o),t=Mf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Zv(n,a):s==="dangerouslySetInnerHTML"?Qv(n,a):s==="children"?Rs(n,a):mp(n,s,a,t)}switch(e){case"input":Pf(n,r);break;case"textarea":Gv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Io(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Io(n,!!r.multiple,r.defaultValue,!0):Io(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,lS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Yp=Le(),Mv(t.child,!0)),Hv(t);return;case 19:Hv(t);return;case 17:return;case 23:case 24:Mv(t,t.memoizedState!==null);return}throw Error(T(163))}function Hv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kT),t.forEach(function(r){var o=HT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function IT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var AT=Math.ceil,fu=qr.ReactCurrentDispatcher,Xp=qr.ReactCurrentOwner,D=0,Be=null,ve=null,Oe=0,Wr=0,op=ar(0),Te=0,Tu=null,Wo=0,Ws=0,$o=0,Qp=0,ip=null,Yp=0,sp=1/0;function qo(){sp=Le()+500}var A=null,pu=!1,ap=null,Yt=null,ir=!1,bs=null,ms=90,lp=[],up=[],gn=null,Ts=0,cp=null,zl=-1,fn=0,Vl=0,ks=null,Kl=!1;function tt(){return D&48?Le():zl!==-1?zl:zl=Le()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Uo()===99?1:2;if(fn===0&&(fn=Wo),vT.transition!==0){Vl!==0&&(Vl=ip!==null?ip.pendingLanes:0),e=fn;var t=4186112&~Vl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Uo(),D&4&&e===98?e=Ql(12,fn):(e=_b(e),e=Ql(e,fn)),e}function er(e,t,n){if(50<Ts)throw Ts=0,cp=null,Error(T(185));if(e=ku(e,t),e===null)return null;Su(e,t,n),e===Be&&($o|=t,Te===4&&Do(e,Oe));var r=Uo();t===1?D&8&&!(D&48)?dp(e):(_t(e,n),D===0&&(qo(),en())):(!(D&4)||r!==98&&r!==99||(gn===null?gn=new Set([e]):gn.add(e)),_t(e,n)),ip=e}function ku(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 _t(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,_o(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=Os(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==yf&&$f(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==yf&&$f(n)}t===15?(n=dp.bind(null,e),dn===null?(dn=[n],Ul=Fp(Cu,FS)):dn.push(n),n=yf):t===14?n=Fs(99,dp.bind(null,e)):(n=wb(t),n=Fs(n,s0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function s0(e){if(zl=-1,Vl=fn=0,D&48)throw Error(T(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Os(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=D;D|=16;var i=c0();(Be!==e||Oe!==r)&&(qo(),Fo(e,r));do try{NT();break}catch(a){u0(e,a)}while(1);if(jp(),fu.current=i,D=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),Wo&$o)Fo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Mp(e.containerInfo)),n=gS(e),n!==0&&(r=gs(e,n))),r===1)throw t=Tu,Fo(e,0),Do(e,n),_t(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Dr(e);break;case 3:if(Do(e,n),(n&62914560)===n&&(r=Yp+500-Le(),10<r)){if(Os(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=av(Dr.bind(null,e),r);break}Dr(e);break;case 4:if(Do(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*AT(n/1960))-n,10<n){e.timeoutHandle=av(Dr.bind(null,e),n);break}Dr(e);break;case 5:Dr(e);break;default:throw Error(T(329))}}return _t(e,Le()),e.callbackNode===t?s0.bind(null,e):null}function Do(e,t){for(t&=~Qp,t&=~$o,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function dp(e){if(D&48)throw Error(T(327));if(lr(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=gs(e,t);Wo&$o&&(t=Os(e,t),n=gs(e,t))}else t=Os(e,0),n=gs(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Mp(e.containerInfo)),t=gS(e),t!==0&&(n=gs(e,t))),n===1)throw n=Tu,Fo(e,0),Do(e,t),_t(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dr(e),_t(e,Le()),null}function LT(){if(gn!==null){var e=gn;gn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,_t(t,Le())})}en()}function a0(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function l0(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function Ml(e,t){de(op,Wr),Wr|=t,Wo|=t}function Zp(){Wr=op.current,se(op)}function Fo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,fT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:zo(),se($e),se(Ne),zp();break;case 5:Up(r);break;case 4:zo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Bp(r);break;case 23:case 24:Zp()}n=n.return}Be=e,ve=sr(e.current,null),Oe=Wr=Wo=t,Te=0,Tu=null,Qp=$o=Ws=0}function u0(e,t){do{var n=ve;try{if(jp(),Es.current=du,au){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}au=!1}if(Us=0,be=Ae=ge=null,Cs=!1,Xp.current=null,n===null||n.return===null){Te=1,Tu=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 v=d.memoizedState;if(v!==null)y=v.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){var m=d.updateQueue;if(m===null){var g=new Set;g.add(u),d.updateQueue=g}else m.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=Yn(-1,1);p.tag=2,Zn(a,p)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new TT,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var _=BT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ro(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 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.
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=Gp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=r0(d,i,t);mv(d,C);break e;case 1:i=l;var w=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=o0(d,i,t);mv(d,R);break e}}d=d.return}while(d!==null)}f0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function c0(){var e=fu.current;return fu.current=du,e===null?du:e}function gs(e,t){var n=D;D|=16;var r=c0();Be===e&&Oe===t||Fo(e,t);do try{OT();break}catch(o){u0(e,o)}while(1);if(jp(),D=n,fu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function OT(){for(;ve!==null;)d0(ve)}function NT(){for(;ve!==null&&!gT();)d0(ve)}function d0(e){var t=m0(e.alternate,e,Wr);e.memoizedProps=e.pendingProps,t===null?f0(e):ve=t,Xp.current=null}function f0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=bT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=CT(n,t,Wr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Wr&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 Dr(e){var t=Uo();return Kr(99,MT.bind(null,e,t)),null}function MT(e,t){do lr();while(bs!==null);if(D&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-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(gn!==null&&!(r&24)&&gn.has(e)&&gn.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=D,D|=32,Xp.current=null,mf=Fl,s=tv(),Uf(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,v=0,h=s,m=null;t:for(;;){for(var g;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),(g=h.firstChild)!==null;)m=h,h=g;for(;;){if(h===s)break t;if(m===a&&++y===i&&(f=c),m===l&&++v===u&&(d=c),(g=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=g}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;gf={focusedElem:s,selectionRange:a},Fl=!1,ks=null,Kl=!1,A=r;do try{DT()}catch(P){if(A===null)throw Error(T(330));tr(A,P),A=A.nextEffect}while(A!==null);ks=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&Rs(A.stateNode,""),p&128){var x=A.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:Bv(A),A.flags&=-3;break;case 6:Bv(A),A.flags&=-3,wf(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,wf(A.alternate,A);break;case 4:wf(A.alternate,A);break;case 8:a=A,i0(s,a);var C=a.alternate;Fv(a),C!==null&&Fv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));tr(A,P),A=A.nextEffect}while(A!==null);if(_=gf,x=tv(),p=_.focusedElem,s=_.selectionRange,x!==p&&p&&p.ownerDocument&&ES(p.ownerDocument.documentElement,p)){for(s!==null&&Uf(p)&&(x=s.start,_=s.end,_===void 0&&(_=x),"selectionStart"in p?(p.selectionStart=x,p.selectionEnd=Math.min(_,p.value.length)):(_=(x=p.ownerDocument||document)&&x.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=ev(p,C),i=ev(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(x),_.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),_.addRange(x)))))),x=[],_=p;_=_.parentNode;)_.nodeType===1&&x.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<x.length;p++)_=x[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Fl=!!mf,gf=mf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var w=A.flags;if(w&36&&RT(p,A.alternate,A),w&128){x=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:x=R;break;default:x=R}typeof b=="function"?b(x):b.current=x}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));tr(A,P),A=A.nextEffect}while(A!==null);A=null,yT(),D=o}else e.current=n;if(ir)ir=!1,bs=e,ms=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(w=A,w.sibling=null,w.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===cp?Ts++:(Ts=0,cp=e):Ts=0,n=n.stateNode,zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(Dp,n,void 0,(n.current.flags&64)===64)}catch{}if(_t(e,Le()),pu)throw pu=!1,e=ap,ap=null,e;return D&8||en(),null}function DT(){for(;A!==null;){var e=A.alternate;Kl||ks===null||(A.flags&8?Uy(A,ks)&&(Kl=!0):A.tag===13&&IT(e,A)&&Uy(A,ks)&&(Kl=!0));var t=A.flags;t&256&&PT(e,A),!(t&512)||ir||(ir=!0,Fs(97,function(){return lr(),null})),A=A.nextEffect}}function lr(){if(ms!==90){var e=97<ms?97:ms;return ms=90,Kr(e,jT)}return!1}function FT(e,t){lp.push(t,e),ir||(ir=!0,Fs(97,function(){return lr(),null}))}function p0(e,t){up.push(t,e),ir||(ir=!0,Fs(97,function(){return lr(),null}))}function jT(){if(bs===null)return!1;var e=bs;if(bs=null,D&48)throw Error(T(331));var t=D;D|=32;var n=up;up=[];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));tr(i,l)}}for(n=lp,lp=[],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));tr(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 D=t,en(),!0}function Uv(e,t,n){t=Gp(n,t),t=r0(e,t,1),Zn(e,t),t=tt(),e=ku(e,1),e!==null&&(Su(e,1,t),_t(e,t))}function tr(e,t){if(e.tag===3)Uv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Uv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Gp(t,e);var o=o0(n,e,1);if(Zn(n,o),o=tt(),n=ku(n,1),n!==null)Su(n,1,o),_t(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function BT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Le()-Yp?Fo(e,0):Qp|=n),_t(e,t)}function HT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=Wo),t=wo(62914560&~fn),t===0&&(t=4194304)):t=Uo()===99?1:2:t=1),n=tt(),e=ku(e,t),e!==null&&(Su(e,t,n),_t(e,n))}var m0;m0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Dt=!0;else if(n&r)Dt=!!(e.flags&16384);else{switch(Dt=!1,t.tag){case 3:kv(t),Sf();break;case 5:vv(t);break;case 1:qe(t.type)&&Hl(t);break;case 4:Xf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(tu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Pv(e,t,n):(de(ce,ce.current&1),t=mn(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 Ov(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,xf(e,t,n)}return mn(e,t,n)}else Dt=!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=Ho(t,Ne.current),No(t,n),o=Kp(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,qe(r)){var i=!0;Hl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Hp(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&ou(t,r,s,e),o.updater=bu,t.stateNode=o,o._reactInternals=t,Gf(t,r,e,n),t=Jf(null,t,r,!0,i,n)}else t.tag=0,We(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=zT(o),e=Mt(o,e),i){case 0:t=Zf(null,t,o,e,n);break e;case 1:t=Tv(null,t,o,e,n);break e;case 11:t=Cv(null,t,o,e,n);break e;case 14:t=bv(null,t,o,Mt(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:Mt(r,o),Zf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Tv(e,t,r,o,n);case 3:if(kv(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,BS(e,t),js(t,r,null,n),r=t.memoizedState.element,r===o)Sf(),t=mn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Oo(t.stateNode.containerInfo.firstChild),pn=t,i=Jt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Mo.push(i);for(n=VS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),Sf();t=t.child}return t;case 5:return vv(t),e===null&&Qf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Kf(r,o)?s=null:i!==null&&Kf(r,i)&&(t.flags|=16),JS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&Qf(t),null;case 13:return Pv(e,t,n);case 4:return Xf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=iu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Cv(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(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(tu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=mn(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=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),jS(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}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,No(t,n),o=xt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Mt(o,t.pendingProps),i=Mt(o.type,i),bv(e,t,o,i,r,n);case 15:return ZS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,Hl(t)):e=!1,No(t,n),US(t,r,o),Gf(t,r,o,n),Jf(null,t,r,!0,e,n);case 19:return Ov(e,t,n);case 23:return xf(e,t,n);case 24:return xf(e,t,n)}throw Error(T(156,t.tag))};function UT(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 vt(e,t,n,r){return new UT(e,t,n,r)}function Jp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zT(e){if(typeof e=="function")return Jp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hu)return 11;if(e===yu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(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 Wl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Jp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Kn:return jo(n.children,o,i,t);case Kv:s=8,o|=16;break;case gp:s=8,o|=1;break;case hs:return e=vt(12,n,t,o|8),e.elementType=hs,e.type=hs,e.lanes=i,e;case ys:return e=vt(13,n,t,o),e.type=ys,e.elementType=ys,e.lanes=i,e;case $l:return e=vt(19,n,t,o),e.elementType=$l,e.lanes=i,e;case _p:return em(n,o,i,t);case Tf:return e=vt(24,n,t,o),e.elementType=Tf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hp:s=10;break e;case yp:s=9;break e;case hu:s=11;break e;case yu:s=14;break e;case vp:s=16,r=null;break e;case Sp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function jo(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function em(e,t,n,r){return e=vt(23,e,r,t),e.elementType=_p,e.lanes=n,e}function Ef(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function Cf(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function VT(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=lf(0),this.expirationTimes=lf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lf(0),this.mutableSourceEagerHydrationData=null}function KT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function mu(e,t,n,r){var o=t.current,i=tt(),s=Jn(o);e:if(n){n=n._reactInternals;t:{if(Gr(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(qe(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(qe(l)){n=AS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function bf(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 zv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function tm(e,t){zv(e,t),(e=e.alternate)&&zv(e,t)}function WT(){return null}function nm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new VT(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Hp(t),e[Ko]=n.current,TS(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}nm.prototype.render=function(e){mu(e,this._internalRoot,null,null)};nm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;mu(null,e,null,function(){t[Ko]=null})};function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $T(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 nm(e,0,t?{hydrate:!0}:void 0)}function Pu(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=bf(s);a.call(u)}}mu(t,s,e,o)}else{if(i=n._reactRootContainer=$T(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=bf(s);l.call(u)}}l0(function(){mu(t,s,e,o)})}return bf(s)}iS=function(e){if(e.tag===13){var t=tt();er(e,4,t),tm(e,4)}};Tp=function(e){if(e.tag===13){var t=tt();er(e,67108864,t),tm(e,67108864)}};sS=function(e){if(e.tag===13){var t=tt(),n=Jn(e);er(e,n,t),tm(e,n)}};aS=function(e,t){return t()};Df=function(e,t,n){switch(t){case"input":if(Pf(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=Eu(r);if(!o)throw Error(T(90));$v(r),Pf(r,o)}}}break;case"textarea":Gv(e,n);break;case"select":t=n.value,t!=null&&Io(e,!!n.multiple,t,!1)}};Ep=a0;tS=function(e,t,n,r,o){var i=D;D|=4;try{return Kr(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(qo(),en())}};Cp=function(){!(D&49)&&(LT(),lr())};nS=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(qo(),en())}};function g0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$s(t))throw Error(T(200));return KT(e,t,null,n)}var qT={Events:[Vs,To,Eu,Jv,eS,lr,{current:!1}]},us={findFiberByHostInstance:Br,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},GT={bundleType:us.bundleType,version:us.version,rendererPackageName:us.rendererPackageName,rendererConfig:us.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=oS(e),e===null?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||WT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(cs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!cs.isDisabled&&cs.supportsFiber))try{Dp=cs.inject(GT),zr=cs}catch{}var cs;wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qT;wt.createPortal=g0;wt.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=oS(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Kr(99,e.bind(null,t))}finally{D=n,en()}};wt.hydrate=function(e,t,n){if(!$s(t))throw Error(T(200));return Pu(null,e,t,!0,n)};wt.render=function(e,t,n){if(!$s(t))throw Error(T(200));return Pu(null,e,t,!1,n)};wt.unmountComponentAtNode=function(e){if(!$s(e))throw Error(T(40));return e._reactRootContainer?(l0(function(){Pu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ko]=null})}),!0):!1};wt.unstable_batchedUpdates=a0;wt.unstable_createPortal=function(e,t){return g0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$s(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Pu(e,t,n,!1,r)};wt.version="17.0.2"});var Ru=pe((UO,v0)=>{"use strict";function y0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y0)}catch(e){console.error(e)}}y0(),v0.exports=h0()});var $0=pe(W0=>{"use strict";var Jo=O();function Lk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ok=typeof Object.is=="function"?Object.is:Lk,Nk=Jo.useState,Mk=Jo.useEffect,Dk=Jo.useLayoutEffect,Fk=Jo.useDebugValue;function jk(e,t){var n=t(),r=Nk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Dk(function(){o.value=n,o.getSnapshot=t,Rm(o)&&i({inst:o})},[e,n,t]),Mk(function(){return Rm(o)&&i({inst:o}),e(function(){Rm(o)&&i({inst:o})})},[e]),Fk(n),n}function Rm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ok(e,n)}catch{return!0}}function Bk(e,t){return t()}var Hk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Bk:jk;W0.useSyncExternalStore=Jo.useSyncExternalStore!==void 0?Jo.useSyncExternalStore:Hk});var Im=pe((PN,q0)=>{"use strict";q0.exports=$0()});var X0=pe(G0=>{"use strict";var Fu=O(),Uk=Im();function zk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vk=typeof Object.is=="function"?Object.is:zk,Kk=Uk.useSyncExternalStore,Wk=Fu.useRef,$k=Fu.useEffect,qk=Fu.useMemo,Gk=Fu.useDebugValue;G0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Wk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=qk(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var v=s.value;if(o(v,y))return f=v}return f=y}if(v=f,Vk(c,y))return v;var h=r(y);return o!==void 0&&o(v,h)?v:(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=Kk(e,i[0],i[1]);return $k(function(){s.hasValue=!0,s.value=a},[a]),Gk(a),a}});var Y0=pe((IN,Q0)=>{"use strict";Q0.exports=X0()});var lx=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Lm=_e?Symbol.for("react.element"):60103,Om=_e?Symbol.for("react.portal"):60106,Uu=_e?Symbol.for("react.fragment"):60107,zu=_e?Symbol.for("react.strict_mode"):60108,Vu=_e?Symbol.for("react.profiler"):60114,Ku=_e?Symbol.for("react.provider"):60109,Wu=_e?Symbol.for("react.context"):60110,Nm=_e?Symbol.for("react.async_mode"):60111,$u=_e?Symbol.for("react.concurrent_mode"):60111,qu=_e?Symbol.for("react.forward_ref"):60112,Gu=_e?Symbol.for("react.suspense"):60113,Zk=_e?Symbol.for("react.suspense_list"):60120,Xu=_e?Symbol.for("react.memo"):60115,Qu=_e?Symbol.for("react.lazy"):60116,Jk=_e?Symbol.for("react.block"):60121,eP=_e?Symbol.for("react.fundamental"):60117,tP=_e?Symbol.for("react.responder"):60118,nP=_e?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lm:switch(e=e.type,e){case Nm:case $u:case Uu:case Vu:case zu:case Gu:return e;default:switch(e=e&&e.$$typeof,e){case Wu:case qu:case Qu:case Xu:case Ku:return e;default:return t}}case Om:return t}}}function ax(e){return ot(e)===$u}Q.AsyncMode=Nm;Q.ConcurrentMode=$u;Q.ContextConsumer=Wu;Q.ContextProvider=Ku;Q.Element=Lm;Q.ForwardRef=qu;Q.Fragment=Uu;Q.Lazy=Qu;Q.Memo=Xu;Q.Portal=Om;Q.Profiler=Vu;Q.StrictMode=zu;Q.Suspense=Gu;Q.isAsyncMode=function(e){return ax(e)||ot(e)===Nm};Q.isConcurrentMode=ax;Q.isContextConsumer=function(e){return ot(e)===Wu};Q.isContextProvider=function(e){return ot(e)===Ku};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm};Q.isForwardRef=function(e){return ot(e)===qu};Q.isFragment=function(e){return ot(e)===Uu};Q.isLazy=function(e){return ot(e)===Qu};Q.isMemo=function(e){return ot(e)===Xu};Q.isPortal=function(e){return ot(e)===Om};Q.isProfiler=function(e){return ot(e)===Vu};Q.isStrictMode=function(e){return ot(e)===zu};Q.isSuspense=function(e){return ot(e)===Gu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uu||e===$u||e===Vu||e===zu||e===Gu||e===Zk||typeof e=="object"&&e!==null&&(e.$$typeof===Qu||e.$$typeof===Xu||e.$$typeof===Ku||e.$$typeof===Wu||e.$$typeof===qu||e.$$typeof===eP||e.$$typeof===tP||e.$$typeof===nP||e.$$typeof===Jk)};Q.typeOf=ot});var cx=pe((KN,ux)=>{"use strict";ux.exports=lx()});var yx=pe((WN,hx)=>{"use strict";var Mm=cx(),rP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},oP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},iP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},mx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Dm={};Dm[Mm.ForwardRef]=iP;Dm[Mm.Memo]=mx;function dx(e){return Mm.isMemo(e)?mx:Dm[e.$$typeof]||rP}var sP=Object.defineProperty,aP=Object.getOwnPropertyNames,fx=Object.getOwnPropertySymbols,lP=Object.getOwnPropertyDescriptor,uP=Object.getPrototypeOf,px=Object.prototype;function gx(e,t,n){if(typeof t!="string"){if(px){var r=uP(t);r&&r!==px&&gx(e,r,n)}var o=aP(t);fx&&(o=o.concat(fx(t)));for(var i=dx(e),s=dx(t),a=0;a<o.length;++a){var l=o[a];if(!oP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=lP(t,l);try{sP(e,l,u)}catch{}}}}return e}hx.exports=gx});var Sx=pe(Y=>{"use strict";var Fm=Symbol.for("react.element"),jm=Symbol.for("react.portal"),Yu=Symbol.for("react.fragment"),Zu=Symbol.for("react.strict_mode"),Ju=Symbol.for("react.profiler"),ec=Symbol.for("react.provider"),tc=Symbol.for("react.context"),cP=Symbol.for("react.server_context"),nc=Symbol.for("react.forward_ref"),rc=Symbol.for("react.suspense"),oc=Symbol.for("react.suspense_list"),ic=Symbol.for("react.memo"),sc=Symbol.for("react.lazy"),dP=Symbol.for("react.offscreen"),vx;vx=Symbol.for("react.module.reference");function Ct(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fm:switch(e=e.type,e){case Yu:case Ju:case Zu:case rc:case oc:return e;default:switch(e=e&&e.$$typeof,e){case cP:case tc:case nc:case sc:case ic:case ec:return e;default:return t}}case jm:return t}}}Y.ContextConsumer=tc;Y.ContextProvider=ec;Y.Element=Fm;Y.ForwardRef=nc;Y.Fragment=Yu;Y.Lazy=sc;Y.Memo=ic;Y.Portal=jm;Y.Profiler=Ju;Y.StrictMode=Zu;Y.Suspense=rc;Y.SuspenseList=oc;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Ct(e)===tc};Y.isContextProvider=function(e){return Ct(e)===ec};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm};Y.isForwardRef=function(e){return Ct(e)===nc};Y.isFragment=function(e){return Ct(e)===Yu};Y.isLazy=function(e){return Ct(e)===sc};Y.isMemo=function(e){return Ct(e)===ic};Y.isPortal=function(e){return Ct(e)===jm};Y.isProfiler=function(e){return Ct(e)===Ju};Y.isStrictMode=function(e){return Ct(e)===Zu};Y.isSuspense=function(e){return Ct(e)===rc};Y.isSuspenseList=function(e){return Ct(e)===oc};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yu||e===Ju||e===Zu||e===rc||e===oc||e===dP||typeof e=="object"&&e!==null&&(e.$$typeof===sc||e.$$typeof===ic||e.$$typeof===ec||e.$$typeof===tc||e.$$typeof===nc||e.$$typeof===vx||e.getModuleId!==void 0)};Y.typeOf=Ct});var _x=pe((qN,xx)=>{"use strict";xx.exports=Sx()});var u_=pe((Q2,l_)=>{"use strict";var VP=/["'&<>]/;l_.exports=KP;function KP(e){var t=""+e,n=VP.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var Og=pe((a8,Fw)=>{"use strict";var NR="Expected a function",Mw=NaN,MR="[object Symbol]",DR=/^\s+|\s+$/g,FR=/^[-+]0x[0-9a-f]+$/i,jR=/^0b[01]+$/i,BR=/^0o[0-7]+$/i,HR=parseInt,UR=typeof global=="object"&&global&&global.Object===Object&&global,zR=typeof self=="object"&&self&&self.Object===Object&&self,VR=UR||zR||Function("return this")(),KR=Object.prototype,WR=KR.toString,$R=Math.max,qR=Math.min,Ag=function(){return VR.Date.now()};function GR(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(NR);t=Dw(t)||0,Lg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?$R(Dw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(w){var b=r,R=o;return r=o=void 0,u=w,s=e.apply(R,b),s}function v(w){return u=w,a=setTimeout(g,t),c?y(w):s}function h(w){var b=w-l,R=w-u,P=t-b;return f?qR(P,i-R):P}function m(w){var b=w-l,R=w-u;return l===void 0||b>=t||b<0||f&&R>=i}function g(){var w=Ag();if(m(w))return p(w);a=setTimeout(g,h(w))}function p(w){return a=void 0,d&&r?y(w):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(Ag())}function C(){var w=Ag(),b=m(w);if(r=arguments,o=this,l=w,b){if(a===void 0)return v(l);if(f)return a=setTimeout(g,t),y(l)}return a===void 0&&(a=setTimeout(g,t)),s}return C.cancel=x,C.flush=_,C}function Lg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function XR(e){return!!e&&typeof e=="object"}function QR(e){return typeof e=="symbol"||XR(e)&&WR.call(e)==MR}function Dw(e){if(typeof e=="number")return e;if(QR(e))return Mw;if(Lg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Lg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(DR,"");var n=jR.test(e);return n||BR.test(e)?HR(e.slice(2),n?2:8):FR.test(e)?Mw:+e}Fw.exports=GR});var MA={};Ce(MA,{Card:()=>me,Chip:()=>oy,ContentEditableInput:()=>ao,DeepdeskAPI:()=>Fn,DeepdeskSDK:()=>Ba,HTTPClient:()=>Wt,InputMediator:()=>_n,InputType:()=>Un,KeyboardHint:()=>pl,Label:()=>ml,Locale:()=>ea,Section:()=>Hn,SectionList:()=>gl,Sources:()=>Ot,Suggestion:()=>oe,SuggestionList:()=>qt,TextAreaInput:()=>wn,ToggleButton:()=>Nr,attachFile:()=>oC,authenticateWithKey:()=>nC,createFullRange:()=>Oi,createOverlayContainer:()=>mi,createRangeFromOffsets:()=>kr,escapeHTML:()=>ki,fetchPlatformConfig:()=>rC,formatTextMarkup:()=>tC,getRangeOffsets:()=>Ma,getRangeText:()=>Da,isSupportedInputElement:()=>Cd,updateContentEditable:()=>eC,updateTextArea:()=>JE,useStyles:()=>k,waitForElementVisibilityChange:()=>bd});var Xa=S(X()),pt=S(O());var qa=S(O()),Uh=S(X()),zi=qa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,qa.useContext)(zi),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Uh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var zh={root:"_root_vr71j_1"};var Ar=S(E()),Ga=()=>(0,Ar.jsxs)("svg",{className:zh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ar.jsx)("defs",{children:(0,Ar.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Ar.jsx)("title",{children:"Failed loading image"}),(0,Ar.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 Od={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 Lr=S(E()),Qa=(0,pt.createContext)(Od),CC=({title:e,src:t})=>{let n=(0,pt.useContext)(Qa),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Lr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Lr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Lr.jsx)(Ga,{})})},bC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(Qa);return(0,Lr.jsx)("div",{className:(0,Xa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},TC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(Qa);return pt.default.createElement(e,{className:(0,Xa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ya=({children:e})=>{let t=k("Card",Od);return(0,Lr.jsx)("div",{className:(0,Xa.default)(t.root),children:(0,Lr.jsx)(Qa.Provider,{value:t,children:e})})};Ya.Image=CC;Ya.Content=bC;Ya.Title=TC;var me=Ya;var qh={root:"_root_nkim0_1"};var dl=S(O());var Nd=function(e,t){return Nd=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])},Nd(e,t)};function Ki(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Nd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var et=function(){return et=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},et.apply(this,arguments)};function Gh(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 Za(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 Ja;(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"})(Ja||(Ja={}));var el=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Lt;(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"})(Lt||(Lt={}));var tl;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(tl||(tl={}));function Md(e){return e.type===Lt.literal}function Xh(e){return e.type===Lt.argument}function nl(e){return e.type===Lt.number}function rl(e){return e.type===Lt.date}function ol(e){return e.type===Lt.time}function il(e){return e.type===Lt.select}function sl(e){return e.type===Lt.plural}function Qh(e){return e.type===Lt.pound}function al(e){return e.type===Lt.tag}function ll(e){return!!(e&&typeof e=="object"&&e.type===tl.number)}function Wi(e){return!!(e&&typeof e=="object"&&e.type===tl.dateTime)}function Dd(e){e.forEach(function(t){if(delete t.location,il(t)||sl(t))for(var n in t.options)delete t.options[n].location,Dd(t.options[n].value);else nl(t)&&ll(t.style)||(rl(t)||ol(t))&&Wi(t.style)?delete t.style.location:al(t)&&Dd(t.children)})}function Yh(e,t){t===void 0&&(t={}),t=et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new el(e,t).parse();if(n.err){var r=SyntaxError(Ja[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Dd(n.val),n.val}function ul(e,t){var n=t&&t.cache?t.cache:LC,r=t&&t.serializer?t.serializer:AC,o=t&&t.strategy?t.strategy:PC;return o(e,{cache:n,serializer:r})}function kC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Zh(e,t,n,r){var o=kC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Jh(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 Fd(e,t,n,r,o){return n.bind(t,e,r,o)}function PC(e,t){var n=e.length===1?Zh:Jh;return Fd(e,this,n,t.cache.create(),t.serializer)}function RC(e,t){return Fd(e,this,Jh,t.cache.create(),t.serializer)}function IC(e,t){return Fd(e,this,Zh,t.cache.create(),t.serializer)}var AC=function(){return JSON.stringify(arguments)};function jd(){this.cache=Object.create(null)}jd.prototype.get=function(e){return this.cache[e]};jd.prototype.set=function(e,t){this.cache[e]=t};var LC={create:function(){return new jd}},cl={variadic:RC,monadic:IC};var Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var $i=function(e){Ki(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 Bd=function(e){Ki(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('", "'),'"'),Or.INVALID_VALUE,i)||this}return t}($i);var ey=function(e){Ki(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Or.INVALID_VALUE,o)||this}return t}($i);var ty=function(e){Ki(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,'"'),Or.MISSING_VALUE,r)||this}return t}($i);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function OC(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 NC(e){return typeof e=="function"}function qi(e,t,n,r,o,i,s){if(e.length===1&&Md(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(Md(c)){a.push({type:Re.literal,value:c.value});continue}if(Qh(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 ty(f,s);var d=o[f];if(Xh(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(rl(c)){var y=typeof c.style=="string"?r.date[c.style]:Wi(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(ol(c)){var y=typeof c.style=="string"?r.time[c.style]:Wi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(nl(c)){var y=typeof c.style=="string"?r.number[c.style]:ll(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(al(c)){var v=c.children,h=c.value,m=o[h];if(!NC(m))throw new ey(h,"function",s);var g=qi(v,t,n,r,o,i),p=m(g.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(il(c)){var x=c.options[d]||c.options.other;if(!x)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,qi(x.value,t,n,r,o));continue}if(sl(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new $i(`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{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="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var 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.
10
10
  Try polyfilling it using "@formatjs/intl-pluralrules"
11
- `,Or.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[_]||c.options.other}if(!x)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,qi(x.value,t,n,r,o,d-(c.offset||0)));continue}}return OC(a)}function MC(e,t){return t?et(et(et({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=et(et({},e[r]),t[r]||{}),n},{})):e}function DC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=MC(e[r],t[r]),n},et({},e)):e}function Hd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function FC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:Hd(e.number),strategy:cl.variadic}),getDateTimeFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:Hd(e.dateTime),strategy:cl.variadic}),getPluralRules:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Za([void 0],n,!1)))},{cache:Hd(e.pluralRules),strategy:cl.variadic})}}var ny=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 qi(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=Gh(s,["formatters"]);this.ast=e.__parse(t,et(et({},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=DC(e.formats,r),this.formatters=o&&o.formatters||FC(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=Yh,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 jC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var BC="dummy",Ud=(0,dl.createContext)(null);function j(e){let t=(0,dl.useContext)(Ud);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=jC(n,r);return i?new ny(i).format(o):(t!==BC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var zd={};Ce(zd,{enUS:()=>HC,nlNL:()=>UC});var HC={experimental:[{type:0,value:"Experimental"}]},UC={experimental:[{type:0,value:"Experimenteel"}]};var Vd=S(E()),ry=({children:e})=>{let t=k("Chip",qh);return(0,Vd.jsx)("span",{className:t.root,children:e})},fl=()=>{let e=j(zd);return(0,Vd.jsx)(ry,{children:e("experimental")})},oy=ry;var sy=S(X());var iy={root:"_root_cq1yq_1"};var ay=S(E());var zC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},VC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",iy);return(0,ay.jsx)("span",{"data-key":zC[t],className:(0,sy.default)(e,r.root),...n})},pl=VC;var uy=S(X());var ly={root:"_root_4a08n_1"};var cy=S(E()),KC=({className:e,children:t,...n})=>{let r=k("Label",ly);return(0,cy.jsx)("span",{...n,className:(0,uy.default)(e,r.root),children:t})},ml=KC;var dy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var po=S(E()),WC=({title:e,children:t,type:n,...r})=>{let o=k("Section",dy);return(0,po.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,po.jsx)("div",{className:o.subTitleContainer,children:(0,po.jsx)("span",{className:o.subtitle,children:e})}),(0,po.jsx)("div",{className:o.suggestions,children:t})]})},Hn=WC;var py=S(X()),my=S(O());var fy={root:"_root_19wxp_1"};var gy=S(E()),$C=my.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",fy);return(0,gy.jsx)("div",{ref:n,className:(0,py.default)(r.root,e),children:t})}),gl=$C;var Gi=S(X()),gt=S(O());var Kd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(E()),mo=(0,gt.createContext)(Kd),qC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{...n,className:(0,Gi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},GC=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsxs)("div",{className:(0,Gi.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})]})},XC=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(mo);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})})},QC=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsx)("button",{type:"button",className:(0,Gi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Wd=({labels:e})=>{let t=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},go=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Kd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Gi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(mo.Provider,{value:a,children:r})})});go.Labels=Wd;go.Actions=qC;go.ActionButton=QC;go.DropdownButton=GC;go.DropdownItem=XC;var oe=go;var yy=S(X());var hy={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var vy=S(E()),YC=({withDivider:e,children:t})=>{let n=k("SuggestionList",hy);return(0,vy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,yy.default)(n.root,{[n.isWithDivider]:e}),children:t})},qt=YC;var xy=S(X());var Sy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var hl=S(E()),ZC=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Sy);return(0,hl.jsx)("button",{type:"button",className:(0,xy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,hl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,hl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Nr=ZC;var _y=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,ho=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var wy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ot=(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))(Ot||{}),Un=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Un||{});var jn=S(Ru());var l1=S(O());function Et(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 yn(e){return!!e&&!!e[le]}function Ft(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)===nk}(e)||Array.isArray(e)||!!e[b0]||!!(!((t=e.constructor)===null||t===void 0)&&t[b0])||dm(e)||fm(e))}function Qr(e,t,n){n===void 0&&(n=!1),Qo(e)===0?(n?Object.keys:Xo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Qo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:dm(e)?2:fm(e)?3:0}function Go(e,t){return Qo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function XT(e,t){return Qo(e)===2?e.get(t):e[t]}function T0(e,t,n){var r=Qo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function k0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function dm(e){return ek&&e instanceof Map}function fm(e){return tk&&e instanceof Set}function ur(e){return e.o||e.t}function pm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=I0(e);delete t[le];for(var n=Xo(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 mm(e,t){return t===void 0&&(t=!1),gm(e)||yn(e)||!Ft(e)||(Qo(e)>1&&(e.set=e.add=e.clear=e.delete=QT),Object.freeze(e),t&&Qr(e,function(n,r){return mm(r,!0)},!0)),e}function QT(){Et(2)}function gm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=cm[e];return t||Et(18,e),t}function YT(e,t){cm[e]||(cm[e]=t)}function am(){return Gs}function rm(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function Iu(e){lm(e),e.p.forEach(ZT),e.p=null}function lm(e){e===Gs&&(Gs=e.l)}function S0(e){return Gs={p:[],l:Gs,h:e,m:!0,_:0}}function ZT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function om(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||tn("ES5").S(t,e,r),r?(n[le].P&&(Iu(t),Et(4)),Ft(e)&&(e=Au(t,e),t.l||Lu(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=Au(t,n,[]),Iu(t),t.u&&t.v(t.u,t.s),e!==R0?e:void 0}function Au(e,t,n){if(gm(t))return t;var r=t[le];if(!r)return Qr(t,function(a,l){return x0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Lu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=pm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Qr(i,function(a,l){return x0(e,r,o,a,l,n,s)}),Lu(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function x0(e,t,n,r,o,i,s){if(yn(o)){var a=Au(e,o,i&&t&&t.i!==3&&!Go(t.R,r)?i.concat(r):void 0);if(T0(n,r,a),!yn(a))return;e.m=!1}else s&&n.add(o);if(Ft(o)&&!gm(o)){if(!e.h.D&&e._<1)return;Au(e,o),t&&t.A.l||Lu(e,o)}}function Lu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&mm(t,n)}function im(e,t){var n=e[le];return(n?ur(n):e)[t]}function _0(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 cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function sm(e){e.o||(e.o=pm(e.t))}function um(e,t,n){var r=dm(t)?tn("MapSet").F(t,n):fm(t)?tn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:am(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Xs;s&&(l=[a],u=qs);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):tn("ES5").J(t,n);return(n?n.A:am()).p.push(r),r}function JT(e){return yn(e)||Et(22,e),function t(n){if(!Ft(n))return n;var r,o=n[le],i=Qo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=w0(n,i),o.I=!1}else r=w0(n,i);return Qr(r,function(s,a){o&&XT(o.t,s)===a||T0(r,s,t(a))}),i===3?new Set(r):r}(e)}function w0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return pm(e)}function P0(){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 Xs.get(u,s)},set:function(u){var c=this[le];Xs.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)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Xo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Go(a,f))return!0;var y=l[f],v=y&&y[le];if(v?v.t!==d:!k0(y,d))return!0}}var h=!!a[le];return u.length!==Xo(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&&Et(3,JSON.stringify(ur(s)))}var i={};YT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(y,""+v,e(v,!0));return y}var h=I0(d);delete h[le];for(var m=Xo(h),g=0;g<m.length;g++){var p=m[g];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:am(),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?yn(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,v=f.R,h=f.i;if(h===4)Qr(y,function(_){_!==le&&(d[_]!==void 0||Go(d,_)?v[_]||u(y[_]):(v[_]=!0,cr(f)))}),Qr(d,function(_){y[_]!==void 0||Go(y,_)||(v[_]=!1,cr(f))});else if(h===5){if(r(f)&&(cr(f),v.length=!0),y.length<d.length)for(var m=y.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<y.length;g++)v[g]=!0;for(var p=Math.min(y.length,d.length),x=0;x<p;x++)y.hasOwnProperty(x)||(v[x]=!0),v[x]===void 0&&u(y[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var E0,Gs,hm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ek=typeof Map<"u",tk=typeof Set<"u",C0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",R0=hm?Symbol.for("immer-nothing"):((E0={})["immer-nothing"]=!0,E0),b0=hm?Symbol.for("immer-draftable"):"__$immer_draftable",le=hm?Symbol.for("immer-state"):"__$immer_state";var nk=""+Object.prototype.constructor,Xo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,I0=Object.getOwnPropertyDescriptors||function(e){var t={};return Xo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},cm={},Xs={get:function(e,t){if(t===le)return e;var n=ur(e);if(!Go(n,t))return function(o,i,s){var a,l=_0(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||!Ft(r)?r:r===im(e.t,t)?(sm(e),e.o[t]=um(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=_0(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=im(ur(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(k0(n,o)&&(n!==void 0||Go(e.t,t)))return!0;sm(e),cr(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 im(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,sm(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Et(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Et(12)}},qs={};Qr(Xs,function(e,t){qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)},qs.set=function(e,t,n){return Xs.set.call(this,e[0],t,n,e[0])};var rk=function(){function e(n){var r=this;this.O=C0,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 m=this;h===void 0&&(h=a);for(var g=arguments.length,p=Array(g>1?g-1:0),x=1;x<g;x++)p[x-1]=arguments[x];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[m,_].concat(p))})}}var u;if(typeof i!="function"&&Et(6),s!==void 0&&typeof s!="function"&&Et(7),Ft(o)){var c=S0(r),f=um(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Iu(c):lm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return rm(c,s),om(h,c)},function(h){throw Iu(c),h}):(rm(c,s),om(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===R0&&(u=void 0),r.D&&mm(u,!0),s){var y=[],v=[];tn("Patches").M(o,u,y,v),s(y,v)}return u}Et(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){Ft(n)||Et(8),yn(n)&&(n=JT(n));var r=S0(this),o=um(this,n,void 0);return o[le].C=!0,lm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return rm(i,r),om(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!C0&&Et(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=tn("Patches").$;return yn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new rk,ok=rt.produce,zO=rt.produceWithPatches.bind(rt),VO=rt.setAutoFreeze.bind(rt),KO=rt.setUseProxies.bind(rt),WO=rt.applyPatches.bind(rt),$O=rt.createDraft.bind(rt),qO=rt.finishDraft.bind(rt),Ou=ok;function dr(e){"@babel/helpers - typeof";return dr=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},dr(e)}function ym(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vm(e){var t=ym(e,"string");return dr(t)==="symbol"?t:String(t)}function Sm(e,t,n){return t=vm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A0(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 Nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(n),!0).forEach(function(r){Sm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A0(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 L0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mu={INIT:"@@redux/INIT"+xm(),REPLACE:"@@redux/REPLACE"+xm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xm()}};function ik(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 _m(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(_m)(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 m=!0;return u(),a.push(h),function(){if(m){if(l)throw new Error(Me(6));m=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!ik(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 m=s=a,g=0;g<m.length;g++){var p=m[g];p()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Mu.REPLACE})}function v(){var h,m=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Me(11));function x(){p.next&&p.next(c())}x();var _=m(x);return{unsubscribe:_}}},h[L0]=function(){return this},h}return d({type:Mu.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[L0]=v,r}function sk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Mu.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Mu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Du(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{sk(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={},v=0;v<i.length;v++){var h=i[v],m=n[h],g=u[h],p=m(g,c);if(typeof p>"u"){var x=c&&c.type;throw new Error(Me(14))}y[h]=p,d=d||p!==g}return d=d||i.length!==Object.keys(u).length,d?y:u}}function Yo(){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 O0(){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=Yo.apply(void 0,a)(o.dispatch),Nu(Nu({},o),{},{dispatch:i})}}}function N0(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 M0=N0();M0.withExtraArgument=N0;var wm=M0;var H0=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)}}(),ak=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}}},Zo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},lk=Object.defineProperty,uk=Object.defineProperties,ck=Object.getOwnPropertyDescriptors,D0=Object.getOwnPropertySymbols,dk=Object.prototype.hasOwnProperty,fk=Object.prototype.propertyIsEnumerable,F0=function(e,t,n){return t in e?lk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fr=function(e,t){for(var n in t||(t={}))dk.call(t,n)&&F0(e,n,t[n]);if(D0)for(var r=0,o=D0(t);r<o.length;r++){var n=o[r];fk.call(t,n)&&F0(e,n,t[n])}return e},Em=function(e,t){return uk(e,ck(t))},pk=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 mk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yo:Yo.apply(null,arguments)},dN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function gk(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 hk=function(e){H0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array),yk=function(e){H0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array);function Tm(e){return Ft(e)?Ou(e,function(){}):e}function vk(e){return typeof e=="boolean"}function Sk(){return function(t){return xk(t)}}function xk(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 hk;if(n&&(vk(n)?a.push(wm):a.push(wm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Cm=!0;function U0(e){var t=Sk(),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(gk(o))y=Du(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(t),!Cm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=O0.apply(void 0,v),m=Yo;l&&(m=mk(fr({trace:!Cm},typeof l=="object"&&l)));var g=new yk(h),p=g;Array.isArray(d)?p=Zo([h],d):typeof d=="function"&&(p=d(g));var x=m.apply(void 0,p);return _m(y,c,x)}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 fr(fr({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 z0(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 _k(e){return typeof e=="function"}function wk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?z0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(_k(e))l=function(){return Tm(e())};else{var u=Tm(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=Zo([i[d.type]],s.filter(function(v){var h=v.matcher;return h(d)}).map(function(v){var h=v.reducer;return h}));return y.filter(function(v){return!!v}).length===0&&(y=[a]),y.reduce(function(v,h){if(h)if(yn(v)){var m=v,g=h(m,d);return g===void 0?v:g}else{if(Ft(v))return Ou(v,function(p){return h(p,d)});var g=h(v,d);if(g===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}return v},f)}return c.getInitialState=l,c}function Ek(e,t){return e+"/"+t}function B(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:Tm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=Ek(t,c),y,v;"reducer"in f?(y=f.reducer,v=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?z0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],v=y===void 0?[]:y,h=c[2],m=h===void 0?void 0:h,g=fr(fr({},d),s);return wk(n,function(p){for(var x in g)p.addCase(x,g[x]);for(var _=0,C=v;_<C.length;_++){var w=C[_];p.addMatcher(w.matcher,w.reducer)}m&&p.addDefaultCase(m)})}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 Ck="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Ck[Math.random()*64|0];return t},Tk=["name","message","stack","code"],bm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),j0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),kk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Tk;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:Em(fr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:Em(fr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,v){return{payload:y,error:(r&&r.serializeError||kk)(c||"Rejected"),meta:Em(fr({},v||{}),{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 v=r!=null&&r.idGenerator?r.idGenerator(c):bk(),h=new l,m,g=!1;function p(_){m=_,h.abort()}var x=function(){return pk(this,null,function(){var _,C,w,b,R,P,N;return ak(this,function(V){switch(V.label){case 0:return V.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),Rk(b)?[4,b]:[3,2];case 1:b=V.sent(),V.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(H,je){return h.signal.addEventListener("abort",function(){return je({name:"AbortError",message:m||"Aborted"})})}),f(i(v,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:v,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:v,signal:h.signal,abort:p,rejectWithValue:function(H,je){return new bm(H,je)},fulfillWithValue:function(H,je){return new j0(H,je)}})).then(function(H){if(H instanceof bm)throw H;return H instanceof j0?o(H.payload,v,c,H.meta):o(H,v,c)})])];case 3:return w=V.sent(),[3,5];case 4:return P=V.sent(),w=P instanceof bm?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition,N||f(w),[2,w]}})})}();return Object.assign(x,{abort:p,requestId:v,arg:c,unwrap:function(){return x.then(Pk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Pk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Rk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ik="task",V0="listener",K0="completed",km="cancelled",gN="task-"+km,hN="task-"+K0,yN=V0+"-"+km,vN=V0+"-"+K0,SN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Ik+" "+km+" (reason: "+t+")"}return e}();var Pm="listenerMiddleware";var xN=fe(Pm+"/add"),_N=fe(Pm+"/removeAll"),wN=fe(Pm+"/remove");var B0,EN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(B0||(B0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ak=function(e){return function(t){setTimeout(t,e)}},CN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ak(10);P0();var Lx=S(Im()),Ox=S(Y0());var Am=S(Ru());function Xk(e){e()}var Z0=Xk,J0=e=>Z0=e,ex=()=>Z0;var ei=S(O());var rx=S(O());var ju=S(O()),tx=Symbol.for(`react-redux-context-${ju.version}`),nx=globalThis;function Qk(){let e=nx[tx];return e||(e=(0,ju.createContext)(null),nx[tx]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=Qk();return(r,...o)=>Reflect[t](n,...o)}}));function Qs(e=De){return function(){return(0,rx.useContext)(e)}}var Bu=Qs();var Hu=()=>{throw new Error("uSES not initialized!")};var ox=Hu,ix=e=>{ox=e},Yk=(e,t)=>e===t;function sx(e=De){let t=e===De?Bu:Qs(e);return function(r,o={}){let{equalityFn:i=Yk,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,ei.useRef)(!0),v=(0,ei.useCallback)({[r.name](m){return r(m)}}[r.name],[r,f,s]),h=ox(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ei.useDebugValue)(h),h}}var L=sx();function vn(){return vn=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},vn.apply(this,arguments)}function Ys(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 Um=S(yx()),Z=S(O()),Px=S(_x());var pP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function mP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,x){return l=p,u=x,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function v(){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 m(){let p=e(l,u),x=!s(p,c);return c=p,x&&(d=n(c,f,u)),d}function g(p,x){let _=!i(x,u),C=!o(p,l,x,u);return l=p,u=x,_&&C?v():_?h():C?m():d}return function(x,_){return a?g(x,_):y(x,_)}}function Bm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ys(t,pP),s=n(e,i),a=r(e,i),l=o(e,i);return mP(s,a,l,e,i)}function Hm(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 Zs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function wx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function ac(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=wx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=wx(u),u=i(a,l)),u},i}}function ti(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Ex(e){return e&&typeof e=="object"?Zs(t=>Hm(e,t)):e?typeof e=="function"?ac(e,"mapDispatchToProps"):ti(e,"mapDispatchToProps"):Zs(t=>({dispatch:t}))}function Cx(e){return e?typeof e=="function"?ac(e,"mapStateToProps"):ti(e,"mapStateToProps"):Zs(()=>({}))}function gP(e,t,n){return vn({},n,e,t)}function hP(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 bx(e){return e?typeof e=="function"?hP(e):ti(e,"mergeProps"):()=>gP}function yP(){let e=ex(),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 Tx={notify(){},get:()=>[]};function lc(e,t){let n,r=Tx;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=yP())}function u(){n&&(n(),n=void 0,r.clear(),r=Tx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var uc=S(O()),vP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ni=vP?uc.useLayoutEffect:uc.useEffect;function kx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ri(e,t){if(kx(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])||!kx(e[n[o]],t[n[o]]))return!1;return!0}var SP=["reactReduxForwardedRef"],Rx=Hu,Ix=e=>{Rx=e};var xP=[null,null];function _P(e,t,n){ni(()=>e(...t),n)}function wP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function EP(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(),m,g;try{m=r(h,o.current)}catch(p){g=p,d=p}g||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function CP(e,t){return e===t}function bP(e,t,n,{pure:r,areStatesEqual:o=CP,areOwnPropsEqual:i=ri,areStatePropsEqual:s=ri,areMergedPropsEqual:a=ri,forwardRef:l=!1,context:u=De}={}){let c=u,f=Cx(e),d=Ex(t),y=bx(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",p=`Connect(${g})`,x={shouldHandleStateChanges:v,displayName:p,wrappedComponentName:g,WrappedComponent:m,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,Ir=Ys(b,SP);return[b.context,dt,Ir]},[b]),V=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Px.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),H=(0,Z.useContext)(V),je=!!b.store&&!!b.store.getState&&!!b.store.dispatch,an=!!H&&!!H.store,$t=je?b.store:H.store,uo=an?H.getServerState:$t.getState,Di=(0,Z.useMemo)(()=>Bm($t.dispatch,x),[$t]),[Pr,Ha]=(0,Z.useMemo)(()=>{if(!v)return xP;let dt=lc($t,je?void 0:H.subscription),Ir=dt.notifyNestedSubs.bind(dt);return[dt,Ir]},[$t,je,H]),Ua=(0,Z.useMemo)(()=>je?H:vn({},H,{subscription:Pr}),[je,H,Pr]),Fi=(0,Z.useRef)(),ji=(0,Z.useRef)(N),ln=(0,Z.useRef)(),Bi=(0,Z.useRef)(!1),Rr=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),$=(0,Z.useRef)();ni(()=>(I.current=!0,()=>{I.current=!1}),[]);let At=(0,Z.useMemo)(()=>()=>ln.current&&N===ji.current?ln.current:Di($t.getState(),N),[$t,N]),Bn=(0,Z.useMemo)(()=>Ir=>Pr?EP(v,$t,Pr,Di,ji,Fi,Bi,I,ln,Ha,Ir):()=>{},[Pr]);_P(wP,[ji,Fi,Bi,N,ln,Ha]);let un;try{un=Rx(Bn,At,uo?()=>Di(uo(),N):At)}catch(dt){throw $.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 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+=`
12
12
  The error may be correlated with this previous error:
13
- ${$.current.stack}
13
+ ${W.current.stack}
14
14
 
15
- `),dt}ni(()=>{$.current=void 0,ln.current=void 0,Fi.current=un});let Hi=(0,Z.useMemo)(()=>Z.default.createElement(m,vn({},un,{ref:P})),[P,m,un]);return(0,Z.useMemo)(()=>v?Z.default.createElement(V.Provider,{value:Ua},Hi):Hi,[V,Hi,Ua])}let w=Z.default.memo(_);if(w.WrappedComponent=m,w.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,V){return Z.default.createElement(w,vn({},N,{reactReduxForwardedRef:V}))});return R.displayName=p,R.WrappedComponent=m,(0,Um.default)(R,m)}return(0,Um.default)(w,m)}}var Yr=bP;var Js=S(O());function TP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Js.useMemo)(()=>{let u=lc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Js.useMemo)(()=>e.getState(),[e]);ni(()=>{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 Js.default.createElement(l.Provider,{value:s},n)}var zm=TP;function cc(e=De){let t=e===De?Bu:Qs(e);return function(){let{store:r}=t();return r}}var Vm=cc();function Ax(e=De){let t=e===De?Vm:cc(e);return function(){return t().dispatch}}var W=Ax();ix(Ox.useSyncExternalStoreWithSelector);Ix(Lx.useSyncExternalStore);J0(Am.unstable_batchedUpdates);var ea=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ea||{});var kP={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"},Nx=B({name:"settings",initialState:kP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ta}=Nx.actions,Km=e=>t=>t.settings[e],F=e=>L(Km(e)),Mx=Nx.reducer;var Tw=S(O());function Sn(){}Sn.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 m=void 0,g=f[h-1],p=f[h+1],x=(p?p.newPos:0)-h;g&&(f[h-1]=void 0);var _=g&&g.newPos+1<a,C=p&&0<=x&&x<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&g.newPos<p.newPos?(m=RP(p),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),x=i.extractCommon(m,n,t,h),m.newPos+1>=a&&x+1>=l)return s(PP(i,m.components,n,t,i.useLongestToken));f[h]=m}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var v=y();if(v)return v}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function PP(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,v){var h=r[l+v];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 RP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var IP=new Sn;function jx(e,t,n){return IP.diff(e,t,n)}var Dx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Fx=/\S/,Bx=new Sn;Bx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Fx.test(e)&&!Fx.test(t)};Bx.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]&&Dx.test(t[n])&&Dx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Hx=new Sn;Hx.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 AP=new Sn;AP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var LP=new Sn;LP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function dc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dc=function(t){return typeof t}:dc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}var OP=Object.prototype.toString,na=new Sn;na.useLongestToken=!0;na.tokenize=Hx.tokenize;na.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(Wm(e,null,null,o),o," ")};na.equals=function(e,t){return Sn.prototype.equals.call(na,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Wm(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(OP.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]=Wm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),dc(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]=Wm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var $m=new Sn;$m.tokenize=function(e){return e.slice()};$m.join=$m.removeEmpty=function(e){return e};function Ux(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function oi(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)=>oi(i,t[s],n-1)):Ux(e)&&Ux(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>oi(e[s],t[s],n-1)):!1}function NP(e){return Math.max(...e.map(t=>t.length))}function MP(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 zx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<NP(r);o++){let i=MP(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 DP=2;function qm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=zx(e,DP);return n&&n.text!==t?n:e[0]}var Vx={current:null,isSupported:null},J=fe("resetConversation"),fc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},pc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},mc=e=>e.conversation.isSupported,Gm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),gc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),hc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),yc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=pc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Xm=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})})}),vc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=pc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),FP=[gc.rejected,hc.rejected,yc.rejected,vc.rejected].map(e=>e==null?void 0:e.toString()),jP=B({name:"conversation",initialState:Vx,reducers:{},extraReducers:e=>{e.addCase(Gm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Xm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(yc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(vc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Vx).addMatcher(t=>FP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Kx=jP.reducer;var pr={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 xc(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 _c=fe("input/replaceText"),wc=fe("input/keyDown"),Zr=fe("input/sendMessage"),Ec=fe("input/sendEditSuggestionMessage"),Cc=fe("input/uiInputChange"),bc=fe("input/applyImageSuggestion"),it=fe("input/sendEvent");function Sc(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 Wx=e=>B({name:e,initialState:pr,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,{...pr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=qm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(oi(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Sc(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:v}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:m}=n.payload,g=jx(h,m);h.length-m.length>1&&t.metrics.deletions.push(...g.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-m.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&&!v){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=pr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&Sc(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"&&Sc(t)},commitSuggestion(t){Sc(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=qm(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=pr.tabCompletionSuggestion,n.previousKeyDownEvent=pr.previousKeyDownEvent,n.textSuggestions=pr.textSuggestions,n.selectedSuggestionIndex=pr.selectedSuggestionIndex,n.metrics=pr.metrics})}}),Qm=Wx("input"),ii=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),BP=e=>e.input.selection,$x=()=>L(BP),{userInput:qx,changeSelection:Ym,initialInput:Gx,mergeMetrics:Xx,nextTextSuggestionIndex:Qx,offeredTextSuggestion:Yx,previousTextSuggestionIndex:Zx,registerCut:Jx,registerKeyDown:e_,registerPaste:t_,reset:n_,resetToCommitted:ra,platformInput:r_,setSelectedTextSuggestionIndex:Tc,setTextSuggestions:mr,stageSuggestion:jt,commitSuggestion:gr}=Qm.actions,Ge=Wx("overlay");var si=S(O());var o_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Zm=S(E()),HP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,si.useRef)(null),l=(0,si.useRef)(null),u=k("Dialog",o_);return(0,si.useEffect)(()=>{var d,y;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},f=v=>{let h=window.getSelection();h!=null&&h.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var v,h;(v=a.current)==null||v.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,si.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,Zm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Zm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ai=HP;var Eg=S(O());var Jm={};Ce(Jm,{enUS:()=>UP,nlNL:()=>zP});var UP={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?"}]},zP={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 i_={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 oa=S(E()),kc=()=>(0,oa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,oa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,oa.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 ia=S(E()),s_=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ia.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ia.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 Tt=S(O());var Pc=S(O());function sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=1,tg=2,ng=4,Se=8,Rc=16,aa=32,Bt=64,eg={a:{content:G|Se,self:!1,type:G|Se|aa|Bt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:G|Se,void:!0},body:{content:G|tg|ng|Se|Rc|aa|Bt},button:{content:Se,type:G|Se|aa|Bt},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|aa|Bt},dd:{content:G,parent:["dl"]},dl:{children:["dt","dd"],type:G},dt:{content:G,invalid:["footer","header"],parent:["dl"]},figcaption:{content:G,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:G,void:!0},img:{void:!0},li:{content:G,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:G},picture:{children:["source","img"],type:G|Se|Rc},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:G},tbody:{parent:["table"],children:["tr"]},td:{content:G,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:G,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:G},video:{children:["track","source"]},wbr:{type:G|Se,void:!0}};function eo(e){return t=>{eg[t]={...e,...eg[t]}}}["address","main","div","figure","p","pre"].forEach(eo({content:G,type:G|Bt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(eo({content:Se,type:G|Se|Bt}));["p","pre"].forEach(eo({content:Se,type:G|Bt}));["s","small","span","del","ins"].forEach(eo({content:Se,type:G|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(eo({content:G,type:G|tg|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(eo({content:Se,type:G|ng|Bt}));["audio","canvas","iframe","img","video"].forEach(eo({type:G|Se|Rc|Bt}));var ua=Object.freeze(eg),rg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],og=Object.keys(ua).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,ig=2,Jr=3,hr=4,Ac=5,Lc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:Jr,controls:hr,datetime:ee,default:hr,disabled:hr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:hr,media:ee,muted:hr,poster:ee,rel:ee,role:ee,rowspan:Jr,scope:ee,sizes:ee,span:Jr,start:Jr,style:Ac,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),sg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Ic(){return Ic=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},Ic.apply(this,arguments)}function Oc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Pc.default.createElement(i,Ic({className:t},e)):Pc.default.createElement(i,Ic({className:t},e),n)}var la=class{attribute(t,n){return n}node(t,n){return n}};function a_(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 Ht=class{constructor(t,n,r){sa(this,"greedy",!1),sa(this,"options",void 0),sa(this,"propName",void 0),sa(this,"inverseName",void 0),sa(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?Pc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return a_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var to=S(O()),d_=S(u_());function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WP=/(url|image|image-set)\(/i,ag=class extends la{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(WP)&&delete n[r]}),n}},c_=1,$P=3,qP=/^<(!doctype|(html|head|body)(\s|>))/i,GP=/^(aria-|data-|\w+:)/iu,XP=/{{{(\w+)\/?}}}/;function QP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Nc=class{constructor(t,n={},r=[],o=[]){var i;xn(this,"allowed",void 0),xn(this,"banned",void 0),xn(this,"blocked",void 0),xn(this,"container",void 0),xn(this,"content",[]),xn(this,"props",void 0),xn(this,"matchers",void 0),xn(this,"filters",void 0),xn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new ag],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:og),this.banned=new Set(rg),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:v,valid:h,void:m,...g}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=m?`{{{${p}/}}}`:`{{{${p}}}}${v}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:v,matcher:l,props:{...o,...g,key:this.keyIndex}}):f+=v,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||v.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,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,`
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||QP)();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(qP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,d_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==c_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Lc[l]||Lc[s];if(!this.isSafe(t)||!l.match(GP)&&(!n&&(!u||u===ig)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===hr?c=!0:u===Jr?c=Number.parseFloat(String(c)):u!==Ac&&(c=String(c)),r[sg[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 ua[t]?{...n,...ua[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===c_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let m=this.keyIndex;h=this.parseNode(v,y);let g=s(v,h,y);if(g===null)return;if(typeof g<"u"){l.push(to.default.cloneElement(g,{key:m}));return}this.keyIndex=m-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 m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),y.void&&(g.selfClose=y.void),l.push(to.default.createElement(Oc,{...g,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(v,y)))}else l=[...l,...this.parseNode(v,y.tagName?y:n)]}else if(c.nodeType===$P){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(XP);){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 v=o.match(new RegExp(`{{{/${a}}}}`));y=v.index+v[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,v.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 YP(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 Nc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?to.default.createElement(to.default.Fragment,null,d):to.default.createElement(Oc,{attributes:n,className:r,tagName:c},d)}function li(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,v=i?[]:l,h=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(C=>{C.onBeforeParse&&m.push(C.onBeforeParse.bind(C)),C.onAfterParse&&g.push(C.onAfterParse.bind(C))});let p=m.reduce((C,w)=>w(C,e),r??""),x=new Nc(p,y,v,h),_=g.reduce((C,w)=>w(C,e),x.parse());return to.default.createElement(YP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var gg=S(X());var lg={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 p_=S(X());var ui=S(O());function f_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Mc(e){let t=(0,ui.useRef)(null),[n,r]=(0,ui.useState)(!1);return(0,ui.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=f_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,v=f/i,h=d.getBoundingClientRect(),m=y>h.x&&y<h.x+h.width&&v>h.y&&v<h.y+h.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=f_(()=>{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 bt={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 ug=S(E()),ZP=({inputElement:e,children:t})=>{let n=k("TabCompletion",bt),[r,o]=Mc(e);return(0,ug.jsx)("mark",{ref:r,className:(0,p_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ci=class extends Ht{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,ug.jsx)(ZP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var di=S(O());function Dc(e){return e.contentEditable==="true"}function JP(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 m_(e){let{selectionStart:t,selectionEnd:n}=Dc(e)?JP(e):e;return[t,n]}function Fc(e){let[,t]=(0,di.useState)(),n=(0,di.useRef)(null);return n.current=m_(e),(0,di.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=m_(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function jc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(ho);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 g_=S(O());function fi(e){(0,g_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function no(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var h_,nn=new Map,eR=["bottom","height","left","right","top","width"],tR=(e={},t={})=>eR.some(n=>e[n]!==t[n]),y_=()=>{let e=[];nn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),nn.delete(n);return}let r=n.getBoundingClientRect();tR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),nn.size!==0&&(h_=window.requestAnimationFrame(y_))};function v_(e,t){return{observe(){let n=nn.size===0;if(nn.has(e)){let r=nn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else nn.set(e,{rect:void 0,callbacks:[t]});n&&y_()},unobserve(){let n=nn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||nn.delete(e),nn.size||cancelAnimationFrame(h_)}}}}var S_,rn=new Map,x_=()=>{rn.forEach((e,t)=>{if(!t.isConnected){rn.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)))}),rn.size!==0&&(S_=window.requestAnimationFrame(x_))};function __(e,t){return{observe(){let n=rn.size===0;rn.has(e)?rn.get(e).callbacks.push(t):rn.set(e,{visible:void 0,callbacks:[t]}),n&&x_()},unobserve(){let n=rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||rn.delete(e),rn.size||cancelAnimationFrame(S_)}}}}var cg=["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 dg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function pi(e){return parseFloat(e)}function Bc(e){return Math.round(e*1e6)}function w_(e){return e/1e6}function fg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=pi(e.width),i=pi(e.borderLeftWidth),s=pi(e.borderRightWidth),a=pi(e.paddingRight),l=w_(Bc(o)-Bc(i)-Bc(s)),u=w_(Bc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function mi(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",no(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};dg(r,n,cg),fg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=__(e,()=>{dg(r,n,cg),fg(r,e,n),i(),setTimeout(i,0)}),a=v_(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(dg(r,n,cg),fg(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=pi(f.borderTopWidth),y=pi(f.borderBottomWidth),v=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${v}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 pg={};Ce(pg,{enUS:()=>nR,nlNL:()=>rR});var nR={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"}]},rR={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 ca=S(E()),E_=()=>(0,ca.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ca.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ca.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 mg=S(E()),C_=()=>(0,mg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,mg.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"})});var b_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(b_||{}),_n=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";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.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",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(b_).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",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),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",n=>this.handlePaste(n)),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()})}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 wn=class extends _n{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):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);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 Xe=S(E()),oR=({value:e,onUse:t,...n})=>{var c;let r=j(pg),o=W(),i=k("EditSuggestionTextInput",lg),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(ho))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new wn(l.current),f.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Ge.actions.registerKeyDown(xc(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Ge.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.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,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(iR,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,gg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(E_,{}):(0,Xe.jsx)(C_,{})]})]})},iR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",lg),r=(0,Tt.useRef)(null),o=Fc(e);return(0,Tt.useEffect)(()=>{jc(e,o)},[o,e]),(0,Xe.jsx)(sR,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,gg.default)(n.root,n.agentText),children:[(0,Xe.jsx)(li,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ci("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},sR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=mi(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},T_=oR;var yi=S(O());var k_=S(O()),Hc=S(X());var Qe={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 ro={};Ce(ro,{enUS:()=>aR,nlNL:()=>lR});var aR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},lR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var yr=S(E()),uR=({src:e,title:t})=>{let n=k("CommandPalette",Qe),[r,o]=(0,k_.useState)("loading"),i=j(ro);return(0,yr.jsxs)("div",{className:n.image,children:[(0,yr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Hc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,yr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,yr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:(0,yr.jsx)(Ga,{})}),t&&(0,yr.jsx)("span",{className:n.imageTitle,children:t})]})},P_=uR;var R_=S(O()),I_=S(X());var da=S(E());function hg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Qe);return R_.default.Children.count(e)===0?null:(0,da.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,da.jsx)("h4",{className:r.listHeading,children:t}),(0,da.jsx)("div",{className:(0,I_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var fa=S(X());var Uc=S(O()),O_=S(E()),A_=Uc.default.createContext(void 0);function vr(){let e=Uc.default.useContext(A_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var L_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,O_.jsx)(A_.Provider,{value:s,children:e})};var kt=S(E());function yg({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}=vr(),y=k("CommandPalette",Qe);function v(h){r(h),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,fa.default)(y.listItem,f===i&&y.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,fa.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,kt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,kt.jsx)(fl,{})]}),l&&(0,kt.jsxs)("div",{className:y.sources,children:[(0,kt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,kt.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,kt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var Sr=S(E());function vg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ro),s=k("CommandPalette",Qe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(kc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(fl,{})]}),e]})}var xr=S(O());var zc=()=>/Mac/i.test(navigator.platform);var cR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=cR;function dR(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,[dR(n)]:re(e[n])}),{}):e}function Sg(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,[Sg(n)]:we(e[n])}),{}):e}var fR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ma=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},pa=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))}),xg=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}),_g=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),N_=e=>e.info.agentInfo,M_=B({name:"info",initialState:fR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(pa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(pa.rejected,t=>{t.fetchState="error"}).addCase(pa.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(xg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(_g.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:D_}=M_.actions,F_=M_.reducer;var Vc={list:[],fetchState:"idle",isOpen:!1,page:"search"},j_=e=>e.search.isOpen,B_=e=>e.search.page,H_=e=>e.search.list;function U_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var oo=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:ma(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),z_=B({name:"search",initialState:Vc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Vc.fetchState,e.list=Vc.list}},extraReducers:e=>{e.addCase(oo.pending,t=>{t.fetchState="loading"}).addCase(oo.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(oo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Vc)}}),{resetSearch:Kc,setIsOpen:st,setPage:Ue}=z_.actions,V_=z_.reducer;var pR=/(https?:\/\/[^\s]+)/,Wc=e=>e.split(" ").find(t=>pR.test(t));var wg=S(X());var $c=S(E()),mR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Qe);return(0,$c.jsxs)("button",{type:"button",...r,onClick:e,className:(0,wg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,$c.jsx)("span",{className:(0,wg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},gi=mR;var En=S(E()),gR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Qe),a=j(ro),{selected:l,setSelected:u}=vr(),c=i[l],f=c&&typeof c.text=="string"&&Wc(c.text),d=(0,xr.useRef)(null);function y(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,w=0;x==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C===_.length-1?0:C+1):x==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C?C-1:_.length-1):u(0);let b=_[w];b&&typeof w=="number"&&(u(w),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:w?"center":"end"}))}function v(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((w,b)=>{b===l&&(_=b)});let C=x[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,xr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&f){h();return}if(x.key==="Enter"&&x.shiftKey){g();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),y("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),y("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),v())},[l]);return(0,xr.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,En.jsxs)("div",{className:s.actions,children:[(0,En.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,En.jsxs)("div",{className:s.actionsBar,children:[f&&(0,En.jsx)(gi,{onClick:h,shortKeys:[zc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,En.jsxs)(xr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,En.jsx)(gi,{onClick:g,shortKeys:[8679,8629],children:n}),(0,En.jsx)(gi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},W_=gR;var $_=S(O());var ga=S(E()),hi=()=>(0,ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ga.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ga.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 Ut=S(E());function hR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Qe);return(0,Ut.jsxs)("div",{className:l.search,children:[(0,Ut.jsx)("div",{className:l.searchIcon,children:(0,Ut.jsx)(hi,{})}),(0,Ut.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ut.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,Ut.jsx)("div",{className:l.selectWrapper,children:(0,Ut.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,Ut.jsx)("option",{children:r}),o.map(u=>(0,Ut.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var q_=(0,$_.forwardRef)(hR);var ha=S(E());function io({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,v]=(0,yi.useState)(0),h=(0,yi.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{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,yi.useEffect)(()=>{v(0)},[d,r]),(0,ha.jsx)(ai,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:g,onClose:m,children:(0,ha.jsxs)(L_,{selected:y,setSelected:v,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,ha.jsx)(q_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}io.Page=vg;io.List=hg;io.Image=P_;io.ListItem=yg;io.ActionsBar=W_;io.Button=gi;var te=io;var Fe=S(E()),yR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",i_),l=W(),u=j(Jm),c=L(v=>v.overlayInput.text);(0,Eg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let f=v=>{v.preventDefault(),d(c)},d=v=>{l(Ec(v)),t(v)},y=v=>h=>{c!==s?window.confirm(u("warning"))&&v(h):v(h)};return(0,Eg.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)(Wd,{labels:e.searchKeywords}),(0,Fe.jsx)(T_,{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)(kc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(s_,{})})]}),(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=yR;var vR=["{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}"],SR=new RegExp(vR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function G_(e,t){let n=e.split(SR),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 X_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var Y_={suggestions:[],fetchState:"idle",isInitialRequest:null},Q_={default:Y_},Z_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},J_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},ew=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")},vi=e=>e.textSuggestions,tw=e=>t=>t.text.startsWith(e),Gc=fe("textSuggestions/refresh"),Cn=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=ii(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ma(r),e);if(e==="default"){let c=s?l.filter(tw(a)):l;t.dispatch(mr(c.slice(0,i)))}return l}),ya=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,{...ma(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(tw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?G_(c.text,e):c.text}))),l=X_(l,i),t.dispatch(mr(l)),l}),nw=B({name:"textSuggestions",initialState:Q_,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(Cn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||Y_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Cn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Cn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(ya.pending,t=>{t.default.fetchState="loading"}).addCase(ya.rejected,t=>{t.default.fetchState="error"}).addCase(ya.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>Q_)}}),{setTextSuggestions:rw,setSuggestionState:ow}=nw.actions,iw=nw.reducer;var sw={contentType:null,suggestion:null},aw=e=>e.activeSuggestion.suggestion,lw=e=>e.activeSuggestion.contentType,uw=B({name:"activeSuggestion",initialState:sw,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,()=>sw)}}),{setActiveSuggestion:bn,resetActiveSuggestion:Cg}=uw.actions,cw=uw.reducer;var bg={};Ce(bg,{enUS:()=>xR,nlNL:()=>_R});var xR={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"}]},_R={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 wR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var dw=({ui:e})=>e.overlayCollapsed;var fw=B({name:"ui",initialState:wR,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:va,setInputHasFocus:Si,setOverlayCollapsed:xi,setOpenOverlayWhenTyping:pw,setOverlayCollapsedUserOverwrite:mw}=fw.actions,gw=fw.reducer;var Sa=S(O()),yw=S(E()),hw=Sa.default.createContext(null),xa=({broadcastEvents:e,children:t})=>{let n=Sa.default.useMemo(()=>e,[]);return(0,yw.jsx)(hw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,Sa.useContext)(hw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var ER={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Tn=e=>e.auth.isLoggedIn,vw=e=>e.auth.loginFetchState,Sw=e=>e.auth.verifyFetchState,xw=e=>e.auth.showLoginOverlay,_r=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),_w=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),_a=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),ww=B({name:"auth",initialState:ER,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(_r.pending,t=>{t.loginFetchState="loading"}),e.addCase(_r.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(_r.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(_a.pending,t=>{t.verifyFetchState="loading"}),e.addCase(_a.rejected,t=>{t.verifyFetchState="error"}),e.addCase(_a.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:_i,setShowLoginOverlay:Ew}=ww.actions,Cw=ww.reducer;var Tg="SetActiveSuggestion",wi="ShowLoginOverlay",kg="UserLoggedIn",CR="UserLoggedOut",kn="ApplySuggestion",Pg="ApplyImageSuggestion",bR="ShowCommandPalette",TR=e=>({[Tg]:t=>{e.dispatch(ow(t.state)),e.dispatch(bn({contentType:t.contentType,suggestion:t.suggestion}))},[bR]:t=>{e.dispatch(st(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[wi]:t=>{e.dispatch(Ew(t))},[kg]:()=>{e.dispatch(_r())},[CR]:()=>{e.dispatch(_r())},[Pg]:t=>{e.dispatch(bc({suggestion:t.suggestion}))},[kn]:t=>{e.dispatch(jt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(gr())}}),bw=TR;var Rg=S(E()),kR=()=>{var v;let[e,t]=(0,Tw.useState)(!1),n=L(aw),r=L(lw),o=L(vi),i=W(),s=Pt(),a=j(bg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Cg()),i(Si(!0)),i(Ge.actions.reset())},c=(h,m)=>{i(Cg()),i(Si(!0)),s.send(kn,{text:h,suggestion:{...m,source:`${m.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(bn({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(bn({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Rg.jsx)(ai,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Rg.jsx)(qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},kw=kR;var Xc=S(X()),zt=S(O());var Rw=S(X());var Pw={root:"_root_1ukx5_1"};var Iw=S(E()),PR=({className:e,value:t,...n})=>{let r=k("TextInput",Pw);return(0,Iw.jsx)("input",{className:(0,Rw.default)(e,r.root),type:"text",value:t,...n})},wa=PR;var Ig={};Ce(Ig,{enUS:()=>RR,nlNL:()=>IR});var RR={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"}]},IR={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 Aw={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=S(E());var AR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},LR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Ig),s=k("LoginTokenDialog",Aw),a=L(Sw),l=W(),u=F("productName"),[c,f]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[v,h]=(0,zt.useState)(""),m=(0,zt.useCallback)(async _=>{_.preventDefault(),l(_w({email:c})),y(1)},[n,c]),g=()=>{h(""),y(0)},p=(0,zt.useCallback)(async _=>{_.preventDefault();let C=AR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:x}));return}l(_a({token:C}))},[n]),x=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,he.jsx)(ai,{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:m,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)(wa,{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,Xc.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)(wa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,he.jsx)("div",{className:s.errorMessage,children:v}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Xc.default)(s.button),onClick:g,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Xc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Lw=LR;var Nw=S(E()),OR=()=>{let e=L(xw),t=L(N_),n=F("adminUrl"),r=Pt(),o=()=>r.send(wi,!1),i=()=>{r.send(wi,!1),r.send(kg)};return(0,Nw.jsx)(Lw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Ow=OR;var s1=S(Og()),Ze=S(O());var YR={data:null,fetchState:"idle"},jw=e=>e.contentTypes.data,Ea=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),ZR=B({name:"contentTypes",initialState:YR,reducers:{},extraReducers:e=>{e.addCase(Ea.pending,t=>{t.fetchState="loading"}).addCase(Ea.rejected,t=>{t.fetchState="error"}).addCase(Ea.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Bw=ZR.reducer;function Ca(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 Hw=S(O());function Uw(e,t){(0,Hw.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 ba=S(O());var zw={data:null,fetchState:"idle"},Qc=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},Vt=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)}),JR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),eI=B({name:"entities",initialState:zw,reducers:{},extraReducers:e=>{e.addCase(Vt.pending,t=>{t.fetchState="loading"}).addCase(Vt.rejected,t=>{t.fetchState="error"}).addCase(Vt.fulfilled,(t,n)=>{t.fetchState="done",t.data=JR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>zw)}}),Vw=eI.reducer;var Ng={};Ce(Ng,{enUS:()=>tI,nlNL:()=>nI});var tI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},nI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Kw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var so=S(E()),rI=({onCopy:e,onUse:t})=>{let n=(0,ba.useRef)(null),r=k("EntitiesList",Kw),o=j(Ng),i=L(Qc),s=W();return(0,ba.useEffect)(()=>{s(Vt())},[]),(0,ba.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,so.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,so.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,so.jsx)(te.List,{children:i.map((a,l)=>(0,so.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,so.jsx)("p",{className:r.empty,children:o("noResults")})]})},Ww=rI;var Kt=S(O());var $w={data:null,fetchState:"idle"},qw=e=>e.summary.data,Gw=e=>e.summary.fetchState==="error",Pn=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})}}),oI=B({name:"summary",initialState:$w,reducers:{},extraReducers:e=>{e.addCase(Pn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Pn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Pn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>$w)}}),Xw=oI.reducer;var Mg={};Ce(Mg,{enUS:()=>iI,nlNL:()=>sI});var iI={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."}]},sI={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 Qw={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 Rn=S(E()),aI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",Qw),[r,o]=(0,Kt.useState)(""),i=j(Mg),s=L(qw),a=L(Gw),l=W(),u=()=>{l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(Pn())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,Rn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Rn.jsx)("p",{className:n.error,children:i("error")}):(0,Rn.jsxs)(Kt.Fragment,{children:[(0,Rn.jsx)("div",{className:n.main,children:(0,Rn.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,Rn.jsx)("div",{className:n.actions,children:(0,Rn.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},Yw=aI;var Dg={};Ce(Dg,{enUS:()=>lI,nlNL:()=>uI});var lI={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?"}]},uI={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 wr=S(O());var Fg={};Ce(Fg,{enUS:()=>cI,nlNL:()=>dI});var cI={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"}]},dI={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 Zw={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 jg={data:[],fetchState:"idle"},Jw=e=>{var t;return(t=e.answer)==null?void 0:t.data},e1=e=>e.answer.fetchState,Ci=fe("answer/resetKnowledgeSearch"),Ei=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}}),fI=B({name:"answer",initialState:jg,reducers:{},extraReducers:e=>{e.addCase(Ei.pending,t=>{t.fetchState="loading"}).addCase(Ei.rejected,t=>{t.fetchState="error"}).addCase(Ei.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>jg).addCase(Ci,()=>jg)}}),t1=fI.reducer;var Ta=S(E()),n1=()=>(0,Ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ta.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ta.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 Ye=S(E()),pI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=wr.default.useState(""),{setSelected:s}=vr(),a=(0,wr.useRef)(null),l=k("EntitiesList",Zw),u=j(Fg),c=W(),f=L(Jw),d=L(e1),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(Ei({question:o,promptInstruction:r}))},v=(h,m)=>{c(it({name:"knowledge assist source viewed",data:{question:m,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,wr.useEffect)(()=>{var h;n&&d==="idle"?c(Ei({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,wr.useEffect)(()=>{d==="done"&&(c(it({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,wr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ye.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ye.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:m},g)=>(0,Ye.jsx)(te.List,{children:(0,Ye.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:p=>v(p,h),sources:m.sources,styles:{title:l.question,description:l.answer},children:h})},`${m.answer}_${g}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ye.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,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(n1,{})})]})]})]})},r1=pI;var mI={data:null,fetchState:"idle"},bi=e=>e.profile.data,Yc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],ka=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)}),gI=B({name:"profile",initialState:mI,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})}}),o1=gI.reducer;var Ee=S(E()),hI=200,yI=5,vI=4,SI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),i1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),xI=()=>{let e=W(),t=Pt(),n=j(Dg),[r,o]=(0,Ze.useState)(!1),[i,s]=(0,Ze.useState)(""),a=L(B_),l=L(bi),[u,c]=(0,Ze.useState)(null),[f,d]=(0,Ze.useState)([]),[y,v]=(0,Ze.useState)(),h=L(Tn),m=F("showSearch"),g=F("showEntitiesCommand"),p=F("showSummaryCommand"),x=F("showKnowledgeSearch"),_=F("showImageSearch"),C=F("searchTriggerKey"),w=L(jw),b=L(H_),R=L(j_),P=I=>ln(b.filter($=>$.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),V=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:g&&i1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:p&&i1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Ue("knowledgeAssist")),shouldShow:x,experimental:!0}].filter(I=>I.shouldShow),H=(w==null?void 0:w.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,Ze.useCallback)((0,s1.default)((I,$)=>{e(oo({query:I,type:$,tags:["search-overlay"]}))},hI),[]),an=SI([...H,...N]),$t=(0,Ze.useCallback)((I,$)=>{if(!$)return;let At=[...N,...H].find(({value:Bn})=>Bn===$);At&&(e(Ue("edit")),c({...I,searchTerm:void 0}),d(At.list))},[e,u,H]),uo=(0,Ze.useCallback)((I,$)=>{switch($.type){case"IMAGE":t.send(Pg,{suggestion:$});break;default:t.send(kn,{text:I,suggestion:$})}e(st(!1))},[e]),Di=I=>{Ca(I.text),e(it({name:"entity copied",data:{entity:I,type:"copy"}})),e(st(!1))},Pr=I=>{t.send(kn,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(it({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ci()),e(st(!1))},Ha=I=>{Ca(I),e(st(!1))},Ua=I=>{t.send(kn,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(st(!1))},Fi=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),ji=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function ln(I,$){return I.slice(0,y?10:$.toLowerCase()==="image"?vI:yI)}function Bi(I,$,At){return $.reduce((Bn,un)=>At&&y===At?un.length+Bn:ln(un,At).length+Bn,I)}function Rr(I){return $=>{r?window.confirm(n("warning"))&&(I($),o(!1)):I($)}}return(0,Ze.useEffect)(()=>{i?je(i,y):e(Kc())},[i,y]),(0,Ze.useEffect)(()=>{a==="search"&&e(Ci())},[a]),(0,Ze.useEffect)(()=>{h&&e(Ea())},[h]),Uw(C,()=>e(st(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Rr(I=>e(st(I))),onChangeType:I=>v(I),onChangePage:Rr(I=>e(Ue(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...H,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...V.map(I=>({text:I.label,type:"command"})),...an.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},$)=>uo(I,an[$]),onSecondary:(I,$)=>{$t(an[$-V.length],an[$-V.length].type)},children:[V.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:V.map((I,$)=>(0,Ee.jsx)(te.ListItem,{index:Bi($,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...H,...N].map(({value:I,label:$,list:At,lineClamp:Bn,listOrientation:un},Hi)=>(0,Ee.jsx)(te.List,{heading:$,orientation:un==="horizontal"?"horizontal":"vertical",children:ln(At,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Bi(V.length+dt,[...H,...N].slice(0,Hi).map(({list:Ir})=>Ir),I),closeOnSelect:!1,lineClamp:Bn,onClick:()=>uo(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:Rr(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ee.jsx)(qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:ji,onPrevious:Fi,onUse:I=>{e(Ue("search")),uo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(st(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Ww,{onUse:Ua,onCopy:Di})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Yw,{onCopy:Ha})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Rr(()=>{e(Ci()),e(Ue("search"))}),children:(0,Ee.jsx)(r1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Pr,onResetQuestion:()=>{e(Ci()),s("")}})})]})},a1=xI;var Ti=S(E()),_I=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,Ti.jsxs)(l1.Fragment,{children:[e&&(0,Ti.jsx)(a1,{}),(0,Ti.jsx)(kw,{}),t&&(0,Ti.jsx)(Ow,{})]})},u1=_I;var Pa=S(E()),wI=({children:e})=>{let n=F("locale").replace("-","");return(0,Pa.jsx)(Ud.Provider,{value:n,children:e})},EI=({store:e,customStyles:t={},children:n})=>(0,Pa.jsx)(zm,{store:e,children:(0,Pa.jsx)(wI,{children:(0,Pa.jsx)(zi.Provider,{value:t,children:n})})}),Ra=EI;var ed=S(X()),Ri=S(O());var c1=S(O());function d1(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)}}]}function Zc(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 p1=S(X()),In=S(O());var Bg={};Ce(Bg,{enUS:()=>CI,nlNL:()=>bI});var CI={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"}]}]},bI={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 f1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Er=S(E()),Hg=(e,t,n)=>r=>(0,Er.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),TI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Bg),i=Pt(),s=k("Login",f1),a=F("productName"),l=(0,In.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,In.useCallback)(h=>{h.preventDefault(),i.send(wi,!0)},[t]),c=(0,In.useMemo)(()=>h=>(0,Er.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,In.useCallback)(h=>(0,Er.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:v}=(0,In.useMemo)(()=>({min:Hg(s,60*10,l),hour:Hg(s,60*60,l),day:Hg(s,60*60*12,l)}),[]);return(0,Er.jsxs)("div",{className:(0,p1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,Er.jsxs)(In.Fragment,{children:[(0,Er.jsx)("br",{}),o("snooze",{min:d,hour:y,day:v})]})]})},Jc=TI;var m1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Ia=S(E()),kI=({title:e})=>{let t=k("SearchTrigger",m1),n=W();return(0,Ia.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(st(!0)),children:[(0,Ia.jsx)(hi,{}),(0,Ia.jsx)("span",{className:t.text,children:e})]})},g1=kI;var w1=S(O());var Pi=S(O());var h1=S(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 PI=/[.*+?^${}()|[\]\\]/g,RI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function II(e){return e.replace(PI,"\\$&")}function AI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Ug(e){return e.search(RI)}function v1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${II(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function S1(e){return e.replace(ho,'<mark data-type="placeholder">$1</mark>')}function ki(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function LI(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 zg(e,t,n={}){if(t){let r=AI(t.toLowerCase(),e.toLowerCase()),o=ki(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Ug(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(_y).length>3||t.length>30?LI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ki(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var x1={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Vg=S(E()),NI=["search","personal-collection-search","search-autocomplete"];function MI(e,t,n,r={}){let o="";return NI.includes(t)?o=v1(zg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=zg(e,n,r),r.placeholders===!0&&(o=S1(o)),o}var DI=()=>{},FI=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=L(ii),i=W(),s=k("TextSuggestion",x1),a=(0,Pi.useRef)(null);(0,Pi.useEffect)(()=>{let u=setTimeout(()=>{i(Yx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),y1(a,"click",()=>{i(Tc(e)),i(jt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Pi.useMemo)(()=>MI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Vg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:DI,children:(0,Vg.jsx)(li,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},_1=FI;var Kg=S(E()),jI=({suggestions:e,selectedIndex:t})=>(0,Kg.jsx)(w1.Fragment,{children:e.slice().map((n,r)=>(0,Kg.jsx)(_1,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),E1=jI;var Wg={};Ce(Wg,{enUS:()=>BI,nlNL:()=>HI});var BI={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"}]},HI={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 C1={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(E()),UI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=k("SuggestionsOverlay",C1),o=j(Wg),i=F("inlineSuggestions"),s=L(Zc),a=$x(),l=W(),u=(0,Ri.useRef)(null),c=F("searchTriggerKey"),f=F("productName"),d=L(dw),y=L(Tn),v=L(mc),[h,m]=(0,Ri.useState)(null),g=F("showSearch"),p=F("showTextSuggestions"),x=F("adminUrl"),_=F("isEmbedded"),[C,w]=d1("dd-snooze-until-ms",0),b=d||C>Date.now(),R=t.filter(V=>V.source!=="gpt").length,P=()=>{b&&w(0),l(mw(!b))},N=V=>{let H=Date.now()+V*1e3;w(H),U.info(`Snooze until: ${new Date(H)}`),l(xi({collapse:!0}))};return(0,Ri.useEffect)(()=>{R===0&&m(null)},[t,R]),fi(()=>{l(xi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||y===null||v===!1?null:y===!1?(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:f}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Jc,{loginUrl:x,isEmbedded:_,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:g&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(o(zc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,ue.jsx)(g1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,ed.default)(!h&&r.hintsHidden,r.hints),children:h}),(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:f}),onClick:P,isCollapsed:!0})}),R>0&&p&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(qt,{children:(0,ue.jsx)(E1,{suggestions:t,selectedIndex:n})})})]})},zI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),td=Yr(zI)(UI);var md=S(X());var Nn=S(O());var b1=S(O()),VI=["div","span","mark","strong","b","i","u","em"];function $g(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(VI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,b1.cloneElement)(r,{children:$g(s,t,n+1)})]}return[...e,...t]}function An(e){return e.tagName.toLowerCase()==="textarea"}var T1={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 id=S(O());var Gg=S(X()),Rt=S(O());var nd=S(O()),KI=["bottom","height","left","right","top","width"],WI=(e={},t={})=>KI.some(n=>e[n]!==t[n]),Ln=new Map,k1,P1=()=>{let e=[],t=[];Ln.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();WI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Ln.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),k1=window.requestAnimationFrame(P1)};function $I(e,t){return{observe(){let n=Ln.size===0;if(Ln.has(e)){let r=Ln.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Ln.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&P1()},unobserve(){let n=Ln.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Ln.delete(e),Ln.size||cancelAnimationFrame(k1)}}}}function qg(e){let[t,n]=(0,nd.useState)(null);return(0,nd.useLayoutEffect)(()=>{if(!e.current)return;let r=$I(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ii=S(O()),I1=S(Ru());var R1={root:"_root_1jq08_1"};var A1=({children:e})=>{let[t,n]=(0,Ii.useState)(null),r=(0,Ii.useContext)(zi);return(0,Ii.useLayoutEffect)(()=>{let o=document.createElement("div");return no(o),o.classList.add(R1.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,I1.createPortal)(e,t):null};var on={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 rd=S(E()),Ai=(e=!1)=>{let[t,n]=(0,Rt.useState)(e),r=(0,Rt.useCallback)(()=>n(!0),[]),o=(0,Rt.useCallback)(()=>n(!1),[]),i=(0,Rt.useCallback)(()=>n(a=>!a),[]),s=(0,Rt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Xg(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 Li=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Xg,...a})=>{let l=qg(t),u=qg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,rd.jsx)(A1,{children:(0,rd.jsx)("div",{className:(0,Gg.default)(on.ref,{[on.positionAbove]:r==="above",[on.positionBelow]:r==="below",[on.positionLeft]:r==="left",[on.positionRight]:r==="right",[on.alignStart]:o==="start",[on.alignCenter]:o==="center",[on.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,rd.jsx)("div",{className:(0,Gg.default)(e,on.root),children:i})})})};var Cr=S(E()),qI=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",bt),r=Ai(document.activeElement===t);return fi(()=>r.close()),(0,id.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Cr.jsxs)(id.Fragment,{children:[(0,Cr.jsx)("mark",{className:bt.caret,ref:r.triggerRef}),r.opened&&(0,Cr.jsx)(Li,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Cr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Cr.jsx)(td,{inline:!0})})})]})},od=class extends Ht{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:Ug(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,Cr.jsx)(qI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var M1=S(X());var cd=S(O());function L1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function sd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function O1(e){return e!=null}var N1=S(X()),ad=S(O());var Qg=S(E()),ld=(0,ad.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ad.useRef)(null),i=k("TabCompletion",bt);return(0,Qg.jsx)("div",{ref:sd([o,r]),className:(0,N1.default)(e,i.popoverContentContainer),...n,children:(0,Qg.jsx)("div",{className:i.popoverContent,children:t})})});var br=S(E()),GI=e=>t=>{let n=Xg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},XI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",bt),s=Ai(),a=(0,cd.useMemo)(()=>GI(e.getBoundingClientRect()),[e]),[l,u]=Mc(e);return(0,cd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,br.jsxs)("span",{children:[(0,br.jsx)("mark",{ref:sd([l,s.triggerRef]),className:(0,M1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,br.jsx)(Li,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,br.jsx)(ld,{style:n,children:(0,br.jsx)("div",{className:i.hintText,children:o})})})]})},ud=class extends Ht{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${L1(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(O1);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,br.jsx)(XI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var fd=S(X());var Ve=S(O());var Yg=S(E()),D1=()=>(0,Yg.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,Yg.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 Tr=S(O());var j1=S(Og());var F1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function dd(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 Zg(e){return e.replace("https://www.","").replace("https://","")}var It=S(E()),QI=3,YI=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),ZI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=QI})=>{let i=k("LinkSearch",F1),[s,a]=(0,Tr.useState)(""),l=W(),u=L(Z_("url")),c=L(U_("URL",YI)),[f,d]=(0,Tr.useState)(c.length-1),y=F("fallbackImage"),v=p=>{let x=p.target;a(x.value)},h=(p,x)=>{p.stopPropagation(),p.preventDefault(),window.open(x,"_blank")},m=p=>{var C;let x=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(x),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},g=(0,Tr.useCallback)((0,j1.default)(p=>{l(oo({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,Tr.useEffect)(()=>{s&&g(s)},[s]),(0,Tr.useEffect)(()=>()=>{l(Kc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(qt,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,x)=>(0,It.jsx)(oe,{selected:f===x,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:dd(p,"small",y||void 0),title:p.title||p.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:p.title||Zg(p.text)}),p.title&&Zg(p.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,It.jsx)(wa,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},B1=ZI;var Jg={};Ce(Jg,{enUS:()=>JI,nlNL:()=>eA});var JI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},eA={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(E()),tA=(0,Ve.forwardRef)((e,t)=>{let n=k("TabCompletion",bt);return(0,ze.jsx)("mark",{ref:t,className:(0,fd.default)(n.matchSelection)},"selection-start")}),nA=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(Jg),s=k("TabCompletion",bt),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),f=W(),d=Ai(document.activeElement===r),[y]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ve.useEffect)(()=>()=>y.detach(),[]),(0,Ve.useEffect)(()=>{let h=e.current,m=a.current;!h||!m||(y.setStart(h,0),y.setEnd(m,0))},[e.current,a.current]),fi(()=>{d.close()});let v=(0,Ve.useCallback)(h=>{let m=y.toString(),g=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(_c({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,fd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(Li,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(ld,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,fd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(D1,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(B1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},pd=class extends Ht{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.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,ze.jsx)(tA,{ref:this.startRef}):(0,ze.jsx)(nA,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var On=S(E()),rA=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",T1),c=F("insertLink"),f=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),y=Fc(a),v=(0,Nn.useRef)(null);(0,Nn.useEffect)(()=>{An(a)&&y&&jc(a,y)},[y]);let h=(0,Nn.useCallback)(p=>{if(!o||!n)return p;let x=[(0,On.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,On.jsx)("span",{"data-testid":"tab-completion",className:(0,md.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,On.jsx)("span",{className:(0,md.default)(u.hint,u.resetIndent),children:(0,On.jsx)(pl,{keyCode:"tab"},"tabHint")})),$g(p,x)},[o,n,r]),m=(0,Nn.useMemo)(()=>{let p=[];return d&&p.push(new od("inline")),c&&p.push(new pd("selection")),p.push(new ci("placeholders")),i&&p.push(new ud("keywords")),p},[d,c,i]),g=(0,Nn.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,On.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(v.current=p==null?void 0:p.parentElement)},className:u.root,style:g,children:[(0,On.jsx)(li,{tagName:"span",containerTagName:"div",className:(0,md.default)(u.container,u.agentText),disableLineBreaks:An(a),content:t||"\u200B",onAfterParse:h,matchers:m,selection:y,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!f}),(0,On.jsx)("br",{})]}):null},oA=({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??ki(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},H1=Yr(oA)(rA);var PE=S(X()),RE=S(O());var U1={list:[],fetchState:"idle",isInitialRequest:null},V1=e=>e.autoflows.list||[],z1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Mn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),eh=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(Mn(e.platformSessionId))}),th=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(Mn(e.platformSessionId))}),iA=B({name:"autoflows",initialState:U1,reducers:{},extraReducers:e=>{e.addCase(eh.pending,(t,n)=>{let r=z1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(th.pending,(t,n)=>{let r=z1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Mn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Mn.rejected,t=>{t.fetchState="error"}),e.addCase(Mn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>U1)}}),K1=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(Mn(e))}),o.on("sessionCompleted",()=>{n(Mn(e))})}),W1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),$1=iA.reducer;var q1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},G1=e=>e.customMessages.list,X1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),Q1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),Y1=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Aa=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),gd=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)}),hd=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)}),Z1=B({name:"customMessages",initialState:q1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Aa.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Aa.rejected,t=>{t.fetchState="error"}).addCase(Aa.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(gd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(gd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(hd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(hd.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,()=>q1)}}),J1=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(Z1.actions.onCustomMessage(i))})}),eE=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),tE=Z1.reducer;var sA={jwt:null,accountUrl:null,interval:null},nE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},nh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),rh=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(nh()),setInterval(()=>r(nh()),n)}),rE=B({name:"exchangeToken",initialState:sA,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(nh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(rh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:oE}=rE.actions,iE=rE.reducer;function sE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var gE=S(O());var fE=S(X()),pE=S(O());var lE=S(X());var aE={root:"_root_838fd_1"};var cE=S(E()),aA=({className:e,children:t})=>{let n=k("Unicode",aE);return(0,cE.jsx)("span",{className:(0,lE.default)(e,n.root),children:t})},uE=aA;var dE={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 oh={};Ce(oh,{enUS:()=>lA,nlNL:()=>uA});var lA={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"}]},uA={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 at=S(E()),dA=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",dE),a=j(oh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,fE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(pE.Fragment,{children:[(0,at.jsx)(uE,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},mE=dA;var ih=S(E()),fA=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},pA=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ih.jsx)(gE.Fragment,{children:e.map(o=>(0,ih.jsx)(mE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||fA(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),mA=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},gA={onStartAutoflow:eh,onStopAutoflow:th},hE=Yr(mA,gA)(pA);var yd=S(O());var lh=S(X());var sh=S(E()),ah=()=>(0,sh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,sh.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 yE={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 sn=S(E()),hA=({entities:e})=>{let t=k("EntitiesWidgetList",yE),[n,r]=(0,yd.useState)(void 0),o=W(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ca(a.text),o(it({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,yd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,sn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,sn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,sn.jsx)("span",{className:t.entityText,children:a.text}),(0,sn.jsxs)("span",{className:t.iconWrapper,children:[(0,sn.jsx)("span",{className:(0,lh.default)(t.icon),children:(0,sn.jsx)(ah,{})}),(0,sn.jsx)("span",{className:(0,lh.default)(t.icon,n===l&&t.iconClicked),children:(0,sn.jsx)(ah,{})})]})]},a.text))})},vE=hA;var SE=S(X()),uh=S(O());var La={};Ce(La,{enUS:()=>yA,nlNL:()=>vA});var yA={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"}]},vA={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 Dn={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 Je=S(E()),SA=({suggestion:e})=>{let t=j(La),n=W(),r=L(X1(e.text)),o=L(Q1(e.text)),i=L(Y1(e.text)),s=L(fc),{replyOptions:a}=e,l=(0,uh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(gd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,uh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(hd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Je.jsxs)(oe,{onClick:l,className:(0,SE.default)(Dn.root,{[Dn.isUsed]:r,[Dn.hasError]:i}),children:[(0,Je.jsx)(me,{children:(0,Je.jsxs)(me.Content,{children:[(0,Je.jsxs)(me.Title,{className:Dn.title,children:[e.text," ",(0,Je.jsx)(ml,{className:Dn.label,children:"analyse tool"})," ",i&&(0,Je.jsx)("span",{className:Dn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Je.jsx)("ul",{className:Dn.quickReplies,children:a.map(c=>(0,Je.jsx)("li",{className:Dn.quickReply,children:c.title},c.title))})]})}),(0,Je.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Je.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,Je.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,Je.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},xE=SA;var ch=S(E()),_E=()=>(0,ch.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ch.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 wE=S(O());var lt=S(E()),xA=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Wc(o),s=j(La),a=F("showImages"),l=F("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,wE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:dd(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},EE=xA;var Oa=S(E()),_A=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=L(vi),i=a=>{r.send(Tg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(kn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Oa.jsx)(Oa.Fragment,{children:n.map(a=>(0,Oa.jsx)(EE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},CE=_A;var dh={};Ce(dh,{enUS:()=>wA,nlNL:()=>EA});var wA={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"}]},EA={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 bE={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 fh=S(E()),TE=()=>(0,fh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,fh.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 ph=S(E()),kE=()=>(0,ph.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ph.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=S(E()),vd=(e,t)=>{let n=L(Tn);(0,RE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},CA=()=>{let e=j(dh),t=W(),n=F("isEmbedded"),r=k("Widget",bE),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=L(bi),f=L(Yc),d=L(V1),y=L(Qc),v=L(G1),h=L(pc),m=L(mc),g=L(Tn),p=L(fc),x=L(sE),_=L(vi),C=Pt(),w=L(ew),b=L(nE("/admin/personal-collection")),R=F("adminUrl");if(vd(()=>(t(Aa(p)),t(J1(p)),()=>{t(eE(p))}),[t,m,i,p]),vd(()=>(t(Mn(p)),t(K1(p)),()=>{t(W1(p))}),[t,m,o,p]),vd(()=>{f.forEach(({type:N})=>{t(N==="entities"?Vt():Cn(N))})},[t,m,h,c]),vd(()=>(t(rh()),()=>{t(oE())}),[t,m,s,h]),m===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(Jc,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||g===null||w||x)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,PE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(gl,{className:r.sectionList,children:[P&&(0,z.jsx)(Hn,{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)(hi,{}),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)(kE,{}),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)(TE,{}),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)(_E,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,z.jsx)(Hn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(qt,{withDivider:!0,children:v.map(N=>(0,z.jsx)(xE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Hn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(hE,{})})}),f.map(({type:N,title:V,amount:H,lines:je})=>{var an;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Hn,{type:N,title:V,"data-testid":`type-${N}`,children:(0,z.jsx)(vE,{entities:y})},N);default:return((an=_[N])==null?void 0:an.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Hn,{type:N,title:V,"data-testid":`type-${N}`,children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(CE,{lines:je,contentType:N,suggestions:_[N].suggestions.slice(0,H)||[]})})},N)}})]})})},IE=CA;function Oi(e){let t=new Range;return t.selectNodeContents(e),t}function AE(e,t,n){try{return kr(e,t,n),!0}catch{return!1}}function Sd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function xd(e){return"tagName"in e&&e.tagName==="BR"}var Na=/[\u200B-\u200D\uFEFF]/g;function kr(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(Na,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let v=s(u,t-o);v===0&&!y?r.setStartBefore(l):r.setStart(l,v)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(xd(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;Sd(l)&&u&&!Sd(u)&&!xd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ma(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 v=f.textContent;d&&(a=u+v.substring(0,r).replace(Na,"").length),y&&(l=u+v.substring(0,i).replace(Na,"").length),u+=v.replace(Na,"").length;break}case Node.ELEMENT_NODE:{let v=f.nextSibling===null;xd(f)&&!v&&u++;for(let h=0;h<f.childNodes.length;h++){let m=d&&h===r;if(m&&(a=u),(!m||!s)&&c(f.childNodes[h]),y&&h===i-1&&(l=u),l!==void 0)break}!y&&Sd(f)&&!v&&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 Da(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,v=u.textContent.replace(Na,"");d===0&&y===void 0?a+=v:a+=v.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&xd(u)&&!d&&(a+=`
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&&Sd(u)&&!d&&(a+=`
21
- `);break}default:break}f&&s++}return l(e),a}var ao=class extends _n{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Da(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var o;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?(o=n.getComposedRanges(t))==null?void 0:o[0]:n.rangeCount>0?n.getRangeAt(0):null;return!r||!this.element.contains(r.startContainer)||!this.element.contains(r.endContainer)?null:r}getSelection(){let t=this.getRange();if(t)return Ma(this.element,t);let n=this.lastKnownSelection;if(n&&AE(this.element,n.start,n.end))return n;let r=Oi(this.element);return r.collapse(!1),Ma(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Da(this.element,kr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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 mh=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()}},gh=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()}},hh=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 gh(t,this.deepdeskUrl,{debug:!0}):new mh(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)}},LE=hh;var Ni=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var yh=e=>new Promise(t=>{setTimeout(t,e)});var Mi=class extends Ni{name="ClientError"},vh=class extends Ni{name="ServerError"},Wt=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:v="v1",...h}=n,m={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(m.headers={...m.headers,"X-CSRFToken":this.csrfToken}),typeof v=="string"&&(m.headers={...m.headers,"X-Deepdesk-API-Version":v});let g=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 x=async()=>(g--,a(s,m).then(async _=>y(_)&&!i.isAborted&&g>0?(await yh(c),x()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),x()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await yh(c),x();throw _}));x().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new vh("Server Error",C)):_.status===401?o(new Mi("Unauthorized",C)):_.status===403?o(new Mi("Forbidden",C)):_.status===404?o(new Mi("Not Found",C)):_.status>=400&&o(new Mi("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 bA;(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||={})})(bA||={});function _d(e){return{...re(e),tags:e.tags}}var Fn=class e{constructor(t,n={}){this.options=n;this.client=new Wt(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 _d(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 _d(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 _d(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=>_d(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(wy);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 Fa=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Sg(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 TA;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(TA||={});var ja=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(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 Fa(`${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 OE={startTime:null,stopTime:null},NE=B({name:"handlingTime",initialState:OE,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,()=>OE)}}),{handlingTimeStart:ME,handlingTimeStop:wd,handlingTimeReset:DE}=NE.actions,FE=NE.reducer;var jE=(e={})=>{let t={onAuthError:_i(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Ed={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var lo=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 Ed.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),kA=B({name:"styleSuggestions",initialState:Ed,reducers:{},extraReducers:e=>{e.addCase(lo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(lo.rejected,t=>{t.fetchState="error"}).addCase(lo.fulfilled,(t,n)=>{t.fetchState="done",oi(t.list,n.payload)||(t.list=n.payload)}).addCase(Zr,t=>{t.list=Ed.list}).addCase(J,()=>Ed)}}),BE=kA.reducer;var HE=(e={})=>{let t,n=!0,r={getStyleSuggestions:lo,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 PA(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var UE=(e={})=>{let t={getTextSuggestions:Cn,getAutocompleteSuggestions:ya,debounce:200,check:Zc,...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===Gc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return PA(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=ii(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var zE=lo.fulfilled.toString();function RA(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 VE=e=>t=>n=>r=>{var u;if(r.type!==zE){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=RA(o,s);r.type===zE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var IA=Du({activeSuggestion:cw,answer:t1,auth:Cw,autoflows:$1,conversation:Kx,contentTypes:Bw,customMessages:tE,exchangeToken:iE,entities:Vw,handlingTime:FE,info:F_,input:Qm.reducer,overlayInput:Ge.reducer,settings:Mx,profile:o1,search:V_,summary:Xw,styleSuggestions:BE,ui:gw,textSuggestions:iw});function KE(e){return U0({reducer:IA,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),jE(),UE({debounce:200}),HE({debounce:500}),VE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var AA=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},LA=e=>t=>n=>r=>{var a;let o=t.getState(),i=Km("inlineSuggestions")(o);switch(r.type){case bn.toString():{let l=J_(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 _i.toString():{!r.payload&&e.emit("logout",void 0);break}case jt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:AA(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case _c.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 ra.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case bc.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 Vt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Pn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case it.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 wc.toString():e.handleKeyDown(r.payload);break;case Zr.toString():e.logSendMessage(r.payload);break;case Ec.toString():e.logSendEditSuggestionMessage(r.payload);break;case Cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Zr.toString():e.handleAfterSendMessage(r.payload);break;case va.toString():e.onUpdateShowTabHint(r.payload);break;case wd.toString():e.logHandlingTime();break;case jt.toString():{i&&(t.dispatch(mr([])),t.dispatch(gr()));break}default:break}return s},WE=LA;function Sh(e){return e.toISOString().replace("T"," ").replace("Z","")}function $E(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:Sh(n),timeStop:Sh(r)}}function xh(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:v,offeredTextSuggestions:h}}=t[e],m=r.length,p=v.reduce((N,{text:V,searchTerm:H})=>N+V.length-(H?H.length:0),0),x=u??Date.now(),_=(Date.now()-x)/1e3+(c||0),C=o/_,w=v.reduce((N,{searchTerm:V})=>N+(V?V.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+w,lenTextTotal:m,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:v,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 qE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?qE(r,t):null}function GE(e,t){return qE(e,t)}function XE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function Cd(e){return e instanceof HTMLElement&&(An(e)||Dc(e))}var QE=(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 OA(e){return e.offsetParent!==null}function YE(e){if(!OA(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 bd(e,t,n=100){let r=YE(e);t({isVisible:r});let o=setInterval(()=>{let i=YE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var ut=S(E()),ZE=QE("showTabHint",!0),Ba=class e{static version="10.3.1-beta.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Fn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[WE({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=>ZE.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ja(n)}),this.store=KE(c),this.broadcastEvents=new LE({debug:!0,deepdeskUrl:u,eventMap:bw(this.store),createCustomChannel:l}),this.store.dispatch(ta),this.store.dispatch(va(ZE.value())),this.store.dispatch(ta({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(_i(null)),this.store.dispatch(_r()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Tn(r)&&vw(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(Gm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(gc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(hc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Xm(t))).payload}async postMessages(t){return(await this.store.dispatch(vc(t))).payload}async updateConversation(t){return(await this.store.dispatch(yc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Pn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ta(t))}setVisitorInfo(t){this.store.dispatch(D_(t))}async setAgentInfo(t){await this.store.dispatch(pa(t))}async setAgentSettings(t){await this.store.dispatch(xg(t))}async getAgentSettings(){return(await this.store.dispatch(_g())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Gc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Cc(t))}notifyKeyDown(t){this.store.dispatch(wc(t))}notifyPaste(t,n){this.store.dispatch(t_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Jx(t))}notifyExternalSuggestion(t){this.store.dispatch(jt(t)),this.store.dispatch(gr())}notifyEditSuggestion(t){this.store.dispatch(rw(t.contentType,t.suggestions)),this.store.dispatch(bn({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(xi({collapse:!1})),this.inputMediator&&this.store.dispatch(qx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(mr([])))}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(e_(xc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Qx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Zx());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(ra()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Tc(-1)),this.store.dispatch(ra()),t.preventDefault()):n||(this.store.dispatch(xi({collapse:!0})),this.store.dispatch(pw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:f}=this.state.input;this.store.dispatch(va(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&f&&f.text.startsWith(c)&&(this.store.dispatch(jt({text:f.text,suggestion:f,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(gr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(n_()),this.store.dispatch(mr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(ME()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(wd()))}logSendMessage(t){let n=xh("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=xh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(Xx(this.state.overlayInput.metrics))}logHandlingTime(){let t=$E(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(DE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(gr()),this.store.dispatch(Zr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(jt({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]=mi(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,jn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return no(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,jn.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(!Cd(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:v,closestScrollSelector:h,appendOverlayTo:m,inlineSuggestions:g}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:g});let p=h&&GE(t,h)||void 0,x=this.overlayContainerFactory("deepdesk-tab-completion",p||t,{appendTo:m,closestScrollElement:p,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),_=this.overlayContainerFactory("deepdesk-suggestions-overlay",p||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);n.automaticHandlingTime&&this.setupHandlingTime(t),(0,jn.render)((0,ut.jsx)(Ra,{store:this.store,customStyles:r,children:(0,ut.jsx)(xa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(H1,{inputElement:t})})}),x),(0,jn.render)((0,ut.jsx)(Ra,{store:this.store,customStyles:r,children:(0,ut.jsx)(xa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(td,{})})}),_),(0,jn.render)((0,ut.jsx)(Ra,{store:this.store,customStyles:r,children:(0,ut.jsx)(xa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(u1,{})})}),this.createContainer("deepdesk-overlays")),no(t),this.inputMediator=v||(An(t)?new wn(t):new ao(t)),this.inputMediator.on("change",({plainText:w})=>{this.notifyInputChanged(w)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(r_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",w=>{this.notifyKeyDown(w)}),this.inputMediator.on("paste",({pastedText:w,selectionText:b})=>{this.notifyPaste(w,b)}),this.inputMediator.on("cut",({selectionText:w})=>{this.notifyCut(w)});let C;this.inputMediator.on("selection",w=>{clearTimeout(C),w===null?C=setTimeout(()=>{w!==null&&this.store.dispatch(Ym(w))},500):this.store.dispatch(Ym(w))}),this.inputMediator.on("disabled",()=>{var w;(w=this.inputMediator)==null||w.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(Si(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Si(!0))),this.store.dispatch(Gx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var w;this.refresh(),this.broadcastEvents.setSessionId((w=this.state.conversation.current)==null?void 0:w.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,jn.render)((0,ut.jsx)(Ra,{store:this.store,customStyles:r,children:(0,ut.jsx)(xa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(IE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,jn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=bd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){XE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(ka());let t=bi(this.state);t&&this.store.dispatch(ta({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=Yc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Cn(r))})}catch(r){this.handleError(r)}}};async function JE(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 eC(e,t,n={}){let r=n.replace?kr(e,n.replace.start,n.replace.end):Oi(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?kr(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function tC(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function nC(e,t,n){await new Fn(e).authenticateWithKey(t,n)}async function rC(e){let n=await new Wt(e).get("/platform/config/",{version:null});return re(n)}async function NA(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 oC(e,t){let n=await NA(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 cC(MA);})();
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|&#x0([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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}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+=`
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 lC(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 uC(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function cC(e,t,n){await new Bn(e).authenticateWithKey(t,n)}async function dC(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 fC(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 vC(GL);})();
23
24
  /*! Bundled license information:
24
25
 
25
26
  classnames/index.js: