@deepdesk/deepdesk-sdk 10.6.0 → 10.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- "use strict";var Deepdesk=(()=>{var vE=Object.create;var Ka=Object.defineProperty;var SE=Object.getOwnPropertyDescriptor;var xE=Object.getOwnPropertyNames;var _E=Object.getPrototypeOf,wE=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var n in t)Ka(e,n,{get:t[n],enumerable:!0})},Rh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of xE(t))!wE.call(e,o)&&o!==n&&Ka(e,o,{get:()=>t[o],enumerable:!(r=SE(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?vE(_E(e)):{},Rh(t||!e||!e.__esModule?Ka(n,"default",{value:e,enumerable:!0}):n,e)),bE=e=>Rh(Ka({},"__esModule",{value:!0}),e);var $=me((oA,Wa)=>{"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 Wa<"u"&&Wa.exports?(n.default=n,Wa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var $a=me((iA,Lh)=>{"use strict";var Ih=Object.getOwnPropertySymbols,EE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable;function TE(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function kE(){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}}Lh.exports=kE()?Object.assign:function(e,t){for(var n,r=TE(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)EE.call(n,s)&&(r[s]=n[s]);if(Ih){o=Ih(n);for(var a=0;a<o.length;a++)CE.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var qh=me(W=>{"use strict";var Ad=$a(),So=60103,Nh=60106;W.Fragment=60107;W.StrictMode=60108;W.Profiler=60114;var Mh=60109,Dh=60110,Fh=60112;W.Suspense=60113;var jh=60115,Bh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,So=ft("react.element"),Nh=ft("react.portal"),W.Fragment=ft("react.fragment"),W.StrictMode=ft("react.strict_mode"),W.Profiler=ft("react.profiler"),Mh=ft("react.provider"),Dh=ft("react.context"),Fh=ft("react.forward_ref"),W.Suspense=ft("react.suspense"),jh=ft("react.memo"),Bh=ft("react.lazy"));var ft,Ah=typeof Symbol=="function"&&Symbol.iterator;function PE(e){return e===null||typeof e!="object"?null:(e=Ah&&e[Ah]||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(){}},zh={};function xo(e,t,n){this.props=e,this.context=t,this.refs=zh,this.updater=n||Hh}xo.prototype.isReactComponent={};xo.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")};xo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uh(){}Uh.prototype=xo.prototype;function Od(e,t,n){this.props=e,this.context=t,this.refs=zh,this.updater=n||Hh}var Nd=Od.prototype=new Uh;Nd.constructor=Od;Ad(Nd,xo.prototype);Nd.isPureReactComponent=!0;var Md={current:null},Vh=Object.prototype.hasOwnProperty,Kh={key:!0,ref:!0,__self:!0,__source:!0};function Wh(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)Vh.call(t,r)&&!Kh.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:So,type:e,key:i,ref:s,props:o,_owner:Md.current}}function RE(e,t){return{$$typeof:So,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===So}function IE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Oh=/\/+/g;function Ld(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IE(""+e.key):t.toString(36)}function Ga(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 So:case Nh: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(Oh,"$&/")+"/"),Ga(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=RE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Oh,"$&/")+"/")+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+=Ga(i,t,n,l,o)}else if(l=PE(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ld(i,a++),s+=Ga(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 qa(e,t,n){if(e==null)return e;var r=[],o=0;return Ga(e,r,"","",function(i){return t.call(n,i,o++)}),r}function LE(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 $h={current:null};function dn(){var e=$h.current;if(e===null)throw Error(Wi(321));return e}var AE={ReactCurrentDispatcher:$h,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Md,IsSomeRendererActing:{current:!1},assign:Ad};W.Children={map:qa,forEach:function(e,t,n){qa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return qa(e,function(){t++}),t},toArray:function(e){return qa(e,function(t){return t})||[]},only:function(e){if(!Dd(e))throw Error(Wi(143));return e}};W.Component=xo;W.PureComponent=Od;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AE;W.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)Vh.call(t,l)&&!Kh.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:So,type:e.type,key:o,ref:i,props:r,_owner:s}};W.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Dh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Mh,_context:e},e.Consumer=e};W.createElement=Wh;W.createFactory=function(e){var t=Wh.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:Fh,render:e}};W.isValidElement=Dd;W.lazy=function(e){return{$$typeof:Bh,_payload:{_status:-1,_result:e},_init:LE}};W.memo=function(e,t){return{$$typeof:jh,type:e,compare:t===void 0?null:t}};W.useCallback=function(e,t){return dn().useCallback(e,t)};W.useContext=function(e,t){return dn().useContext(e,t)};W.useDebugValue=function(){};W.useEffect=function(e,t){return dn().useEffect(e,t)};W.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};W.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};W.useMemo=function(e,t){return dn().useMemo(e,t)};W.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};W.useRef=function(e){return dn().useRef(e)};W.useState=function(e){return dn().useState(e)};W.version="17.0.2"});var O=me((aA,Gh)=>{"use strict";Gh.exports=qh()});var Jh=me(qi=>{"use strict";$a();var OE=O(),Yh=60103;qi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Fd=Symbol.for,Yh=Fd("react.element"),qi.Fragment=Fd("react.fragment"));var Fd,NE=OE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ME=Object.prototype.hasOwnProperty,DE={key:!0,ref:!0,__self:!0,__source:!0};function Zh(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)ME.call(t,r)&&!DE.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:Yh,type:e,key:i,ref:s,props:o,_owner:NE.current}}qi.jsx=Zh;qi.jsxs=Zh});var w=me((mA,ey)=>{"use strict";ey.exports=Jh()});var Ey=me(q=>{"use strict";var To,Yi,al,qd;typeof performance=="object"&&typeof performance.now=="function"?(Sy=performance,q.unstable_now=function(){return Sy.now()}):(zd=Date,xy=zd.now(),q.unstable_now=function(){return zd.now()-xy});var Sy,zd,xy;typeof window>"u"||typeof MessageChannel!="function"?(Co=null,Ud=null,Vd=function(){if(Co!==null)try{var e=q.unstable_now();Co(!0,e),Co=null}catch(t){throw setTimeout(Vd,0),t}},To=function(e){Co!==null?setTimeout(To,0,e):(Co=e,setTimeout(Vd,0))},Yi=function(e,t){Ud=setTimeout(e,t)},al=function(){clearTimeout(Ud)},q.unstable_shouldYield=function(){return!1},qd=q.unstable_forceFrameRate=function(){}):(_y=window.setTimeout,wy=window.clearTimeout,typeof console<"u"&&(by=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 by!="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,ol=-1,Kd=5,Wd=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Wd},qd=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"):Kd=0<e?Math.floor(1e3/e):5},$d=new MessageChannel,il=$d.port2,$d.port1.onmessage=function(){if(Qi!==null){var e=q.unstable_now();Wd=e+Kd;try{Qi(!0,e)?il.postMessage(null):(Xi=!1,Qi=null)}catch(t){throw il.postMessage(null),t}}else Xi=!1},To=function(e){Qi=e,Xi||(Xi=!0,il.postMessage(null))},Yi=function(e,t){ol=_y(function(){e(q.unstable_now())},t)},al=function(){wy(ol),ol=-1});var Co,Ud,Vd,_y,wy,by,Xi,Qi,ol,Kd,Wd,$d,il;function Gd(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 Ot(e){return e=e[0],e===void 0?null:e}function ll(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 Qt=[],Kn=[],YE=1,vt=null,Le=3,ul=!1,Fr=!1,Zi=!1;function Xd(e){for(var t=Ot(Kn);t!==null;){if(t.callback===null)ll(Kn);else if(t.startTime<=e)ll(Kn),t.sortIndex=t.expirationTime,Gd(Qt,t);else break;t=Ot(Kn)}}function Qd(e){if(Zi=!1,Xd(e),!Fr)if(Ot(Qt)!==null)Fr=!0,To(Yd);else{var t=Ot(Kn);t!==null&&Yi(Qd,t.startTime-e)}}function Yd(e,t){Fr=!1,Zi&&(Zi=!1,al()),ul=!0;var n=Le;try{for(Xd(t),vt=Ot(Qt);vt!==null&&(!(vt.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=vt.callback;if(typeof r=="function"){vt.callback=null,Le=vt.priorityLevel;var o=r(vt.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?vt.callback=o:vt===Ot(Qt)&&ll(Qt),Xd(t)}else ll(Qt);vt=Ot(Qt)}if(vt!==null)var i=!0;else{var s=Ot(Kn);s!==null&&Yi(Qd,s.startTime-t),i=!1}return i}finally{vt=null,Le=n,ul=!1}}var ZE=qd;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(){Fr||ul||(Fr=!0,To(Yd))};q.unstable_getCurrentPriorityLevel=function(){return Le};q.unstable_getFirstCallbackNode=function(){return Ot(Qt)};q.unstable_next=function(e){switch(Le){case 1:case 2:case 3:var t=3;break;default:t=Le}var n=Le;Le=t;try{return e()}finally{Le=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=ZE;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Le;Le=e;try{return t()}finally{Le=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:YE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Gd(Kn,e),Ot(Qt)===null&&e===Ot(Kn)&&(Zi?al():Zi=!0,Yi(Qd,n-r))):(e.sortIndex=o,Gd(Qt,e),Fr||ul||(Fr=!0,To(Yd))),e};q.unstable_wrapCallback=function(e){var t=Le;return function(){var n=Le;Le=t;try{return e.apply(this,arguments)}finally{Le=n}}}});var Ty=me((RO,Cy)=>{"use strict";Cy.exports=Ey()});var p0=me(Et=>{"use strict";var nu=O(),ae=$a(),_e=Ty();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(!nu)throw Error(T(227));var Bv=new Set,Ps={};function Gr(e,t){qo(e,t),qo(e+"Capture",t)}function qo(e,t){for(Ps[e]=t,e=0;e<t.length;e++)Bv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JE=/^[: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]*$/,ky=Object.prototype.hasOwnProperty,Py={},Ry={};function eC(e){return ky.call(Ry,e)?!0:ky.call(Py,e)?!1:JE.test(e)?Ry[e]=!0:(Py[e]=!0,!1)}function tC(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 nC(e,t,n,r){if(t===null||typeof t>"u"||tC(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 We(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 We(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 We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new We(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 We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var af=/[\-:]([a-z])/g;function lf(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(af,lf);ke[t]=new We(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(af,lf);ke[t]=new We(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(af,lf);ke[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function uf(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||(nC(t,n,o,r)&&(n=null),r||o===null?eC(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 Xr=nu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ds=60103,Br=60106,$n=60107,cf=60108,hs=60114,df=60109,pf=60110,ru=60112,ys=60113,Ol=60120,ou=60115,ff=60116,mf=60121,gf=60128,Hv=60129,hf=60130,xp=60131;typeof Symbol=="function"&&Symbol.for&&(ve=Symbol.for,ds=ve("react.element"),Br=ve("react.portal"),$n=ve("react.fragment"),cf=ve("react.strict_mode"),hs=ve("react.profiler"),df=ve("react.provider"),pf=ve("react.context"),ru=ve("react.forward_ref"),ys=ve("react.suspense"),Ol=ve("react.suspense_list"),ou=ve("react.memo"),ff=ve("react.lazy"),mf=ve("react.block"),ve("react.scope"),gf=ve("react.opaque.id"),Hv=ve("react.debug_trace_mode"),hf=ve("react.offscreen"),xp=ve("react.legacy_hidden"));var ve,Iy=typeof Symbol=="function"&&Symbol.iterator;function Ji(e){return e===null||typeof e!="object"?null:(e=Iy&&e[Iy]||e["@@iterator"],typeof e=="function"?e:null)}var Zd;function ps(e){if(Zd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zd=t&&t[1]||""}return`
2
- `+Zd+e}var Jd=!1;function cl(e,t){if(!e||Jd)return"";Jd=!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 vE=Object.create;var Ka=Object.defineProperty;var SE=Object.getOwnPropertyDescriptor;var xE=Object.getOwnPropertyNames;var _E=Object.getPrototypeOf,wE=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var n in t)Ka(e,n,{get:t[n],enumerable:!0})},Rh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of xE(t))!wE.call(e,o)&&o!==n&&Ka(e,o,{get:()=>t[o],enumerable:!(r=SE(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?vE(_E(e)):{},Rh(t||!e||!e.__esModule?Ka(n,"default",{value:e,enumerable:!0}):n,e)),bE=e=>Rh(Ka({},"__esModule",{value:!0}),e);var $=me((oA,Wa)=>{"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 Wa<"u"&&Wa.exports?(n.default=n,Wa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var $a=me((iA,Lh)=>{"use strict";var Ih=Object.getOwnPropertySymbols,EE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable;function TE(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function kE(){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}}Lh.exports=kE()?Object.assign:function(e,t){for(var n,r=TE(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)EE.call(n,s)&&(r[s]=n[s]);if(Ih){o=Ih(n);for(var a=0;a<o.length;a++)CE.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var qh=me(W=>{"use strict";var Od=$a(),So=60103,Nh=60106;W.Fragment=60107;W.StrictMode=60108;W.Profiler=60114;var Mh=60109,Dh=60110,Fh=60112;W.Suspense=60113;var jh=60115,Bh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,So=ft("react.element"),Nh=ft("react.portal"),W.Fragment=ft("react.fragment"),W.StrictMode=ft("react.strict_mode"),W.Profiler=ft("react.profiler"),Mh=ft("react.provider"),Dh=ft("react.context"),Fh=ft("react.forward_ref"),W.Suspense=ft("react.suspense"),jh=ft("react.memo"),Bh=ft("react.lazy"));var ft,Ah=typeof Symbol=="function"&&Symbol.iterator;function PE(e){return e===null||typeof e!="object"?null:(e=Ah&&e[Ah]||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(){}},zh={};function xo(e,t,n){this.props=e,this.context=t,this.refs=zh,this.updater=n||Hh}xo.prototype.isReactComponent={};xo.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")};xo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uh(){}Uh.prototype=xo.prototype;function Nd(e,t,n){this.props=e,this.context=t,this.refs=zh,this.updater=n||Hh}var Md=Nd.prototype=new Uh;Md.constructor=Nd;Od(Md,xo.prototype);Md.isPureReactComponent=!0;var Dd={current:null},Vh=Object.prototype.hasOwnProperty,Kh={key:!0,ref:!0,__self:!0,__source:!0};function Wh(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)Vh.call(t,r)&&!Kh.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:So,type:e,key:i,ref:s,props:o,_owner:Dd.current}}function RE(e,t){return{$$typeof:So,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Fd(e){return typeof e=="object"&&e!==null&&e.$$typeof===So}function IE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Oh=/\/+/g;function Ad(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IE(""+e.key):t.toString(36)}function Ga(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 So:case Nh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Ad(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Oh,"$&/")+"/"),Ga(o,t,n,"",function(u){return u})):o!=null&&(Fd(o)&&(o=RE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Oh,"$&/")+"/")+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+Ad(i,a);s+=Ga(i,t,n,l,o)}else if(l=PE(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ad(i,a++),s+=Ga(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 qa(e,t,n){if(e==null)return e;var r=[],o=0;return Ga(e,r,"","",function(i){return t.call(n,i,o++)}),r}function LE(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 $h={current:null};function dn(){var e=$h.current;if(e===null)throw Error(Wi(321));return e}var AE={ReactCurrentDispatcher:$h,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Dd,IsSomeRendererActing:{current:!1},assign:Od};W.Children={map:qa,forEach:function(e,t,n){qa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return qa(e,function(){t++}),t},toArray:function(e){return qa(e,function(t){return t})||[]},only:function(e){if(!Fd(e))throw Error(Wi(143));return e}};W.Component=xo;W.PureComponent=Nd;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AE;W.cloneElement=function(e,t,n){if(e==null)throw Error(Wi(267,e));var r=Od({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Dd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Vh.call(t,l)&&!Kh.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:So,type:e.type,key:o,ref:i,props:r,_owner:s}};W.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Dh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Mh,_context:e},e.Consumer=e};W.createElement=Wh;W.createFactory=function(e){var t=Wh.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:Fh,render:e}};W.isValidElement=Fd;W.lazy=function(e){return{$$typeof:Bh,_payload:{_status:-1,_result:e},_init:LE}};W.memo=function(e,t){return{$$typeof:jh,type:e,compare:t===void 0?null:t}};W.useCallback=function(e,t){return dn().useCallback(e,t)};W.useContext=function(e,t){return dn().useContext(e,t)};W.useDebugValue=function(){};W.useEffect=function(e,t){return dn().useEffect(e,t)};W.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};W.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};W.useMemo=function(e,t){return dn().useMemo(e,t)};W.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};W.useRef=function(e){return dn().useRef(e)};W.useState=function(e){return dn().useState(e)};W.version="17.0.2"});var O=me((aA,Gh)=>{"use strict";Gh.exports=qh()});var Jh=me(qi=>{"use strict";$a();var OE=O(),Yh=60103;qi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(jd=Symbol.for,Yh=jd("react.element"),qi.Fragment=jd("react.fragment"));var jd,NE=OE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ME=Object.prototype.hasOwnProperty,DE={key:!0,ref:!0,__self:!0,__source:!0};function Zh(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)ME.call(t,r)&&!DE.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:Yh,type:e,key:i,ref:s,props:o,_owner:NE.current}}qi.jsx=Zh;qi.jsxs=Zh});var w=me((mA,ey)=>{"use strict";ey.exports=Jh()});var Ey=me(q=>{"use strict";var To,Yi,al,Gd;typeof performance=="object"&&typeof performance.now=="function"?(Sy=performance,q.unstable_now=function(){return Sy.now()}):(Ud=Date,xy=Ud.now(),q.unstable_now=function(){return Ud.now()-xy});var Sy,Ud,xy;typeof window>"u"||typeof MessageChannel!="function"?(Co=null,Vd=null,Kd=function(){if(Co!==null)try{var e=q.unstable_now();Co(!0,e),Co=null}catch(t){throw setTimeout(Kd,0),t}},To=function(e){Co!==null?setTimeout(To,0,e):(Co=e,setTimeout(Kd,0))},Yi=function(e,t){Vd=setTimeout(e,t)},al=function(){clearTimeout(Vd)},q.unstable_shouldYield=function(){return!1},Gd=q.unstable_forceFrameRate=function(){}):(_y=window.setTimeout,wy=window.clearTimeout,typeof console<"u"&&(by=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 by!="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,ol=-1,Wd=5,$d=0,q.unstable_shouldYield=function(){return q.unstable_now()>=$d},Gd=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"):Wd=0<e?Math.floor(1e3/e):5},qd=new MessageChannel,il=qd.port2,qd.port1.onmessage=function(){if(Qi!==null){var e=q.unstable_now();$d=e+Wd;try{Qi(!0,e)?il.postMessage(null):(Xi=!1,Qi=null)}catch(t){throw il.postMessage(null),t}}else Xi=!1},To=function(e){Qi=e,Xi||(Xi=!0,il.postMessage(null))},Yi=function(e,t){ol=_y(function(){e(q.unstable_now())},t)},al=function(){wy(ol),ol=-1});var Co,Vd,Kd,_y,wy,by,Xi,Qi,ol,Wd,$d,qd,il;function Xd(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 Ot(e){return e=e[0],e===void 0?null:e}function ll(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 Qt=[],Kn=[],YE=1,vt=null,Le=3,ul=!1,Fr=!1,Zi=!1;function Qd(e){for(var t=Ot(Kn);t!==null;){if(t.callback===null)ll(Kn);else if(t.startTime<=e)ll(Kn),t.sortIndex=t.expirationTime,Xd(Qt,t);else break;t=Ot(Kn)}}function Yd(e){if(Zi=!1,Qd(e),!Fr)if(Ot(Qt)!==null)Fr=!0,To(Zd);else{var t=Ot(Kn);t!==null&&Yi(Yd,t.startTime-e)}}function Zd(e,t){Fr=!1,Zi&&(Zi=!1,al()),ul=!0;var n=Le;try{for(Qd(t),vt=Ot(Qt);vt!==null&&(!(vt.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=vt.callback;if(typeof r=="function"){vt.callback=null,Le=vt.priorityLevel;var o=r(vt.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?vt.callback=o:vt===Ot(Qt)&&ll(Qt),Qd(t)}else ll(Qt);vt=Ot(Qt)}if(vt!==null)var i=!0;else{var s=Ot(Kn);s!==null&&Yi(Yd,s.startTime-t),i=!1}return i}finally{vt=null,Le=n,ul=!1}}var ZE=Gd;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(){Fr||ul||(Fr=!0,To(Zd))};q.unstable_getCurrentPriorityLevel=function(){return Le};q.unstable_getFirstCallbackNode=function(){return Ot(Qt)};q.unstable_next=function(e){switch(Le){case 1:case 2:case 3:var t=3;break;default:t=Le}var n=Le;Le=t;try{return e()}finally{Le=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=ZE;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Le;Le=e;try{return t()}finally{Le=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:YE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Xd(Kn,e),Ot(Qt)===null&&e===Ot(Kn)&&(Zi?al():Zi=!0,Yi(Yd,n-r))):(e.sortIndex=o,Xd(Qt,e),Fr||ul||(Fr=!0,To(Zd))),e};q.unstable_wrapCallback=function(e){var t=Le;return function(){var n=Le;Le=t;try{return e.apply(this,arguments)}finally{Le=n}}}});var Ty=me((RO,Cy)=>{"use strict";Cy.exports=Ey()});var p0=me(Et=>{"use strict";var nu=O(),ae=$a(),_e=Ty();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(!nu)throw Error(T(227));var Bv=new Set,Ps={};function Gr(e,t){qo(e,t),qo(e+"Capture",t)}function qo(e,t){for(Ps[e]=t,e=0;e<t.length;e++)Bv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JE=/^[: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]*$/,ky=Object.prototype.hasOwnProperty,Py={},Ry={};function eC(e){return ky.call(Ry,e)?!0:ky.call(Py,e)?!1:JE.test(e)?Ry[e]=!0:(Py[e]=!0,!1)}function tC(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 nC(e,t,n,r){if(t===null||typeof t>"u"||tC(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 We(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 We(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 We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new We(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 We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var lf=/[\-:]([a-z])/g;function uf(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(lf,uf);ke[t]=new We(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(lf,uf);ke[t]=new We(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(lf,uf);ke[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function cf(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||(nC(t,n,o,r)&&(n=null),r||o===null?eC(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 Xr=nu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ds=60103,Br=60106,$n=60107,df=60108,hs=60114,pf=60109,ff=60110,ru=60112,ys=60113,Ol=60120,ou=60115,mf=60116,gf=60121,hf=60128,Hv=60129,yf=60130,_p=60131;typeof Symbol=="function"&&Symbol.for&&(ve=Symbol.for,ds=ve("react.element"),Br=ve("react.portal"),$n=ve("react.fragment"),df=ve("react.strict_mode"),hs=ve("react.profiler"),pf=ve("react.provider"),ff=ve("react.context"),ru=ve("react.forward_ref"),ys=ve("react.suspense"),Ol=ve("react.suspense_list"),ou=ve("react.memo"),mf=ve("react.lazy"),gf=ve("react.block"),ve("react.scope"),hf=ve("react.opaque.id"),Hv=ve("react.debug_trace_mode"),yf=ve("react.offscreen"),_p=ve("react.legacy_hidden"));var ve,Iy=typeof Symbol=="function"&&Symbol.iterator;function Ji(e){return e===null||typeof e!="object"?null:(e=Iy&&e[Iy]||e["@@iterator"],typeof e=="function"?e:null)}var Jd;function ps(e){if(Jd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jd=t&&t[1]||""}return`
2
+ `+Jd+e}var ep=!1;function cl(e,t){if(!e||ep)return"";ep=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
3
3
  `),i=r.stack.split(`
4
4
  `),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a])return`
5
- `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{Jd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function rC(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=cl(e.type,!1),e;case 11:return e=cl(e.type.render,!1),e;case 22:return e=cl(e.type._render,!1),e;case 1:return e=cl(e.type,!0),e;default:return""}}function Fo(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 Br:return"Portal";case hs:return"Profiler";case cf:return"StrictMode";case ys:return"Suspense";case Ol:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pf:return(e.displayName||"Context")+".Consumer";case df:return(e._context.displayName||"Context")+".Provider";case ru:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case ou:return Fo(e.type);case mf:return Fo(e._render);case ff:t=e._payload,e=e._init;try{return Fo(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 oC(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 dl(e){e._valueTracker||(e._valueTracker=oC(e))}function Uv(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 Nl(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 _p(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ly(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 Vv(e,t){t=t.checked,t!=null&&uf(e,"checked",t,!1)}function wp(e,t){Vv(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")?bp(e,t.type,n):t.hasOwnProperty("defaultValue")&&bp(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ay(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bp(e,t,n){(t!=="number"||Nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function iC(e){var t="";return nu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Ep(e,t){return e=ae({children:void 0},t),(t=iC(t.children))&&(e.children=t),e}function jo(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 Cp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oy(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 Kv(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 Ny(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Tp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Wv(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 kp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pl,$v=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!==Tp.svg||"innerHTML"in e)e.innerHTML=t;else{for(pl=pl||document.createElement("div"),pl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pl.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},sC=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(e){sC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vs[t]=vs[e]})});function qv(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 Gv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=qv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var aC=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 Pp(e,t){if(t){if(aC[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 Rp(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 yf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Bo=null,Ho=null;function My(e){if(e=Vs(e)){if(typeof Ip!="function")throw Error(T(280));var t=e.stateNode;t&&(t=cu(t),Ip(e.stateNode,e.type,t))}}function Xv(e){Bo?Ho?Ho.push(e):Ho=[e]:Bo=e}function Qv(){if(Bo){var e=Bo,t=Ho;if(Ho=Bo=null,My(e),t)for(e=0;e<t.length;e++)My(t[e])}}function vf(e,t){return e(t)}function Yv(e,t,n,r,o){return e(t,n,r,o)}function Sf(){}var Zv=vf,Hr=!1,ep=!1;function xf(){(Bo!==null||Ho!==null)&&(Sf(),Qv())}function lC(e,t,n){if(ep)return e(t,n);ep=!0;try{return Zv(e,t,n)}finally{ep=!1,xf()}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var r=cu(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 Lp=!1;if(yn)try{ko={},Object.defineProperty(ko,"passive",{get:function(){Lp=!0}}),window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{Lp=!1}var ko;function uC(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,Ml=null,Dl=!1,Ap=null,cC={onError:function(e){Ss=!0,Ml=e}};function dC(e,t,n,r,o,i,s,a,l){Ss=!1,Ml=null,uC.apply(cC,arguments)}function pC(e,t,n,r,o,i,s,a,l){if(dC.apply(this,arguments),Ss){if(Ss){var u=Ml;Ss=!1,Ml=null}else throw Error(T(198));Dl||(Dl=!0,Ap=u)}}function Qr(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 Jv(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 Dy(e){if(Qr(e)!==e)throw Error(T(188))}function fC(e){var t=e.alternate;if(!t){if(t=Qr(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 Dy(o),e;if(i===r)return Dy(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 eS(e){if(e=fC(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 Fy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var tS,_f,nS,rS,Op=!1,Yt=[],Qn=null,Yn=null,Zn=null,Ls=new Map,As=new Map,es=[],jy="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 Np(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function By(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":Ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(t.pointerId)}}function ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Np(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&_f(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function mC(e,t,n,r,o){switch(t){case"focusin":return Qn=ts(Qn,e,t,n,r,o),!0;case"dragenter":return Yn=ts(Yn,e,t,n,r,o),!0;case"mouseover":return Zn=ts(Zn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ls.set(i,ts(Ls.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,As.set(i,ts(As.get(i)||null,e,t,n,r,o)),!0}return!1}function gC(e){var t=zr(e.target);if(t!==null){var n=Qr(t);if(n!==null){if(t=n.tag,t===13){if(t=Jv(n),t!==null){e.blockedOn=t,rS(e.lanePriority,function(){_e.unstable_runWithPriority(e.priority,function(){nS(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=Cf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&_f(t),e.blockedOn=n,!1;t.shift()}return!0}function Hy(e,t,n){bl(e)&&n.delete(t)}function hC(){for(Op=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&tS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Cf(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),Ls.forEach(Hy),As.forEach(Hy)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Op||(Op=!0,_e.unstable_scheduleCallback(_e.unstable_NormalPriority,hC)))}function oS(e){function t(o){return ns(o,e)}if(0<Yt.length){ns(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qn!==null&&ns(Qn,e),Yn!==null&&ns(Yn,e),Zn!==null&&ns(Zn,e),Ls.forEach(t),As.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);)gC(n),n.blockedOn===null&&es.shift()}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lo={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},tp={},iS={};yn&&(iS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function iu(e){if(tp[e])return tp[e];if(!Lo[e])return e;var t=Lo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in iS)return tp[e]=t[n];return e}var sS=iu("animationend"),aS=iu("animationiteration"),lS=iu("animationstart"),uS=iu("transitionend"),cS=new Map,wf=new Map,yC=["abort","abort",sS,"animationEnd",aS,"animationIteration",lS,"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",uS,"transitionEnd","waiting","waiting"];function bf(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)),wf.set(r,t),cS.set(r,o),Gr(o,[r])}}var vC=_e.unstable_now;vC();var ne=8;function Ro(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 SC(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 xC(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=Ro(l),o=ne):(a&=i,a!==0&&(r=Ro(a),o=ne))}else i=n&~s,i!==0?(r=Ro(i),o=ne):a!==0&&(r=Ro(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(Ro(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 dS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Io(24&~t),e===0?Fl(10,t):e;case 10:return e=Io(192&~t),e===0?Fl(8,t):e;case 8:return e=Io(3584&~t),e===0&&(e=Io(4186112&~t),e===0&&(e=512)),e;case 2:return t=Io(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Io(e){return e&-e}function np(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-ir(t),e[t]=n}var ir=Math.clz32?Math.clz32:bC,_C=Math.log,wC=Math.LN2;function bC(e){return e===0?32:31-(_C(e)/wC|0)|0}var EC=_e.unstable_UserBlockingPriority,CC=_e.unstable_runWithPriority,El=!0;function TC(e,t,n,r){Hr||Sf();var o=Ef,i=Hr;Hr=!0;try{Yv(o,e,t,n,r)}finally{(Hr=i)||xf()}}function kC(e,t,n,r){CC(EC,Ef.bind(null,e,t,n,r))}function Ef(e,t,n,r){if(El){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<jy.indexOf(e))e=Np(null,e,t,n,r),Yt.push(e);else{var i=Cf(e,t,n,r);if(i===null)o&&By(e,r);else{if(o){if(-1<jy.indexOf(e)){e=Np(i,e,t,n,r),Yt.push(e);return}if(mC(i,e,t,n,r))return;By(e,r)}ES(e,t,r,null,n)}}}}function Cf(e,t,n,r){var o=yf(r);if(o=zr(o),o!==null){var i=Qr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Jv(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 ES(e,t,r,o,n),null}var qn=null,Tf=null,Cl=null;function pS(){if(Cl)return Cl;var e,t=Tf,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 Cl=o.slice(e,1<r?1-r:void 0)}function Tl(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 ml(){return!0}function zy(){return!1}function it(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)?ml: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=ml)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),t}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kf=it(Yo),Us=ae({},Yo,{view:0,detail:0}),PC=it(Us),rp,op,rs,au=ae({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pf,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"?(rp=e.screenX-rs.screenX,op=e.screenY-rs.screenY):op=rp=0,rs=e),rp)},movementY:function(e){return"movementY"in e?e.movementY:op}}),Uy=it(au),RC=ae({},au,{dataTransfer:0}),IC=it(RC),LC=ae({},Us,{relatedTarget:0}),ip=it(LC),AC=ae({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),OC=it(AC),NC=ae({},Yo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),MC=it(NC),DC=ae({},Yo,{data:0}),Vy=it(DC),FC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jC={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"},BC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=BC[e])?!!t[e]:!1}function Pf(){return HC}var zC=ae({},Us,{key:function(e){if(e.key){var t=FC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pf,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),UC=it(zC),VC=ae({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ky=it(VC),KC=ae({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pf}),WC=it(KC),$C=ae({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),qC=it($C),GC=ae({},au,{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}),XC=it(GC),QC=[9,13,27,32],Rf=yn&&"CompositionEvent"in window,xs=null;yn&&"documentMode"in document&&(xs=document.documentMode);var YC=yn&&"TextEvent"in window&&!xs,fS=yn&&(!Rf||xs&&8<xs&&11>=xs),Wy=String.fromCharCode(32),$y=!1;function mS(e,t){switch(e){case"keyup":return QC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function ZC(e,t){switch(e){case"compositionend":return gS(t);case"keypress":return t.which!==32?null:($y=!0,Wy);case"textInput":return e=t.data,e===Wy&&$y?null:e;default:return null}}function JC(e,t){if(Ao)return e==="compositionend"||!Rf&&mS(e,t)?(e=pS(),Cl=Tf=qn=null,Ao=!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 fS&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 qy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function hS(e,t,n,r){Xv(r),t=jl(t,"onChange"),0<t.length&&(n=new kf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _s=null,Ns=null;function tT(e){_S(e,0)}function lu(e){var t=No(e);if(Uv(t))return e}function nT(e,t){if(e==="change")return t}var yS=!1;yn&&(yn?(hl="oninput"in document,hl||(sp=document.createElement("div"),sp.setAttribute("oninput","return;"),hl=typeof sp.oninput=="function"),gl=hl):gl=!1,yS=gl&&(!document.documentMode||9<document.documentMode));var gl,hl,sp;function Gy(){_s&&(_s.detachEvent("onpropertychange",vS),Ns=_s=null)}function vS(e){if(e.propertyName==="value"&&lu(Ns)){var t=[];if(hS(t,Ns,e,yf(e)),e=tT,Hr)e(t);else{Hr=!0;try{vf(e,t)}finally{Hr=!1,xf()}}}}function rT(e,t,n){e==="focusin"?(Gy(),_s=t,Ns=n,_s.attachEvent("onpropertychange",vS)):e==="focusout"&&Gy()}function oT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lu(Ns)}function iT(e,t){if(e==="click")return lu(t)}function sT(e,t){if(e==="input"||e==="change")return lu(t)}function aT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:aT,lT=Object.prototype.hasOwnProperty;function Ms(e,t){if(St(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(!lT.call(t,n[r])||!St(e[n[r]],t[n[r]]))return!1;return!0}function Xy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qy(e,t){var n=Xy(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=Xy(n)}}function SS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?SS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yy(){for(var e=window,t=Nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nl(e.document)}return t}function Mp(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 uT=yn&&"documentMode"in document&&11>=document.documentMode,Oo=null,Dp=null,ws=null,Fp=!1;function Zy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fp||Oo==null||Oo!==Nl(r)||(r=Oo,"selectionStart"in r&&Mp(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=jl(Dp,"onSelect"),0<r.length&&(t=new kf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oo)))}bf("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);bf("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);bf(yC,2);for(ap="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),yl=0;yl<ap.length;yl++)wf.set(ap[yl],0);var ap,yl;qo("onMouseEnter",["mouseout","mouseover"]);qo("onMouseLeave",["mouseout","mouseover"]);qo("onPointerEnter",["pointerout","pointerover"]);qo("onPointerLeave",["pointerout","pointerover"]);Gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xS=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function Jy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pC(r,t,void 0,e),e.currentTarget=null}function _S(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;Jy(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;Jy(o,a,u),i=l}}}if(Dl)throw e=Ap,Dl=!1,Ap=null,e}function ie(e,t){var n=TS(t),r=e+"__bubble";n.has(r)||(bS(t,e,2,!1),n.add(r))}var ev="_reactListening"+Math.random().toString(36).slice(2);function wS(e){e[ev]||(e[ev]=!0,Bv.forEach(function(t){xS.has(t)||tv(t,!1,e,null),tv(t,!0,e,null)}))}function tv(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&&xS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=TS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),bS(i,e,o,t),s.add(a))}function bS(e,t,n,r){var o=wf.get(t);switch(o===void 0?2:o){case 0:o=TC;break;case 1:o=kC;break;default:o=Ef}n=o.bind(null,t,n,e),o=void 0,!Lp||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 ES(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=zr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}lC(function(){var u=i,c=yf(n),p=[];e:{var d=cS.get(e);if(d!==void 0){var h=kf,v=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":h=UC;break;case"focusin":v="focus",h=ip;break;case"focusout":v="blur",h=ip;break;case"beforeblur":case"afterblur":h=ip;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":h=Uy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=IC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=WC;break;case sS:case aS:case lS:h=OC;break;case uS:h=qC;break;case"scroll":h=PC;break;case"wheel":h=XC;break;case"copy":case"cut":case"paste":h=MC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ky}var y=(t&4)!==0,m=!y&&e==="scroll",g=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,S;f!==null;){S=f;var _=S.stateNode;if(S.tag===5&&_!==null&&(S=_,g!==null&&(_=Is(f,g),_!=null&&y.push(Ds(f,_,S)))),m)break;f=f.return}0<y.length&&(d=new h(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(zr(v)||v[Zo]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?zr(v):null,v!==null&&(m=Qr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Uy,_="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Ky,_="onPointerLeave",g="onPointerEnter",f="pointer"),m=h==null?d:No(h),S=v==null?d:No(v),d=new y(_,f+"leave",h,n,c),d.target=m,d.relatedTarget=S,_=null,zr(c)===u&&(y=new y(g,f+"enter",v,n,c),y.target=S,y.relatedTarget=m,_=y),m=_,h&&v)t:{for(y=h,g=v,f=0,S=y;S;S=Po(S))f++;for(S=0,_=g;_;_=Po(_))S++;for(;0<f-S;)y=Po(y),f--;for(;0<S-f;)g=Po(g),S--;for(;f--;){if(y===g||g!==null&&y===g.alternate)break t;y=Po(y),g=Po(g)}y=null}else y=null;h!==null&&nv(p,d,h,y,!1),v!==null&&m!==null&&nv(p,m,v,y,!0)}}e:{if(d=u?No(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var b=nT;else if(qy(d))if(yS)b=sT;else{b=oT;var E=rT}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=iT);if(b&&(b=b(e,u))){hS(p,b,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&bp(d,"number",d.value)}switch(E=u?No(u):window,e){case"focusin":(qy(E)||E.contentEditable==="true")&&(Oo=E,Dp=u,ws=null);break;case"focusout":ws=Dp=Oo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,Zy(p,n,c);break;case"selectionchange":if(uT)break;case"keydown":case"keyup":Zy(p,n,c)}var C;if(Rf)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 Ao?mS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(fS&&n.locale!=="ko"&&(Ao||R!=="onCompositionStart"?R==="onCompositionEnd"&&Ao&&(C=pS()):(qn=c,Tf="value"in qn?qn.value:qn.textContent,Ao=!0)),E=jl(u,R),0<E.length&&(R=new Vy(R,e,null,n,c),p.push({event:R,listeners:E}),C?R.data=C:(C=gS(n),C!==null&&(R.data=C)))),(C=YC?ZC(e,n):JC(e,n))&&(u=jl(u,"onBeforeInput"),0<u.length&&(c=new Vy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=C))}_S(p,t)})}function Ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jl(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 Po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nv(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 Bl(){}var lp=null,up=null;function CS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function jp(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 rv=typeof setTimeout=="function"?setTimeout:void 0,cT=typeof clearTimeout=="function"?clearTimeout:void 0;function If(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function zo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function ov(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 cp=0;function dT(e){return{$$typeof:gf,toString:e,valueOf:e}}var uu=Math.random().toString(36).slice(2),Gn="__reactFiber$"+uu,Hl="__reactProps$"+uu,Zo="__reactContainer$"+uu,iv="__reactEvents$"+uu;function zr(e){var t=e[Gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zo]||n[Gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ov(e);e!==null;){if(n=e[Gn])return n;e=ov(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[Gn]||e[Zo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function No(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function cu(e){return e[Hl]||null}function TS(e){var t=e[iv];return t===void 0&&(t=e[iv]=new Set),t}var Bp=[],Mo=-1;function ur(e){return{current:e}}function se(e){0>Mo||(e.current=Bp[Mo],Bp[Mo]=null,Mo--)}function pe(e,t){Mo++,Bp[Mo]=e.current,e.current=t}var sr={},Me=ur(sr),Ze=ur(!1),Wr=sr;function Go(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 Je(e){return e=e.childContextTypes,e!=null}function zl(){se(Ze),se(Me)}function sv(e,t,n){if(Me.current!==sr)throw Error(T(168));pe(Me,t),pe(Ze,n)}function kS(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,Fo(t)||"Unknown",o));return ae({},n,r)}function kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Wr=Me.current,pe(Me,e),pe(Ze,Ze.current),!0}function av(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=kS(e,t,Wr),r.__reactInternalMemoizedMergedChildContext=e,se(Ze),se(Me),pe(Me,e)):se(Ze),pe(Ze,n)}var Lf=null,Kr=null,pT=_e.unstable_runWithPriority,Af=_e.unstable_scheduleCallback,Hp=_e.unstable_cancelCallback,fT=_e.unstable_shouldYield,lv=_e.unstable_requestPaint,zp=_e.unstable_now,mT=_e.unstable_getCurrentPriorityLevel,du=_e.unstable_ImmediatePriority,PS=_e.unstable_UserBlockingPriority,RS=_e.unstable_NormalPriority,IS=_e.unstable_LowPriority,LS=_e.unstable_IdlePriority,dp={},gT=lv!==void 0?lv:function(){},pn=null,Pl=null,pp=!1,uv=zp(),Oe=1e4>uv?zp:function(){return zp()-uv};function Xo(){switch(mT()){case du:return 99;case PS:return 98;case RS:return 97;case IS:return 96;case LS:return 95;default:throw Error(T(332))}}function AS(e){switch(e){case 99:return du;case 98:return PS;case 97:return RS;case 96:return IS;case 95:return LS;default:throw Error(T(332))}}function $r(e,t){return e=AS(e),pT(e,t)}function Fs(e,t,n){return e=AS(e),Af(e,t,n)}function nn(){if(Pl!==null){var e=Pl;Pl=null,Hp(e)}OS()}function OS(){if(!pp&&pn!==null){pp=!0;var e=0;try{var t=pn;$r(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)),Af(du,nn),n}finally{pp=!1}}}var hT=Xr.ReactCurrentBatchConfig;function Nt(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 Ul=ur(null),Vl=null,Do=null,Kl=null;function Of(){Kl=Do=Vl=null}function Nf(e){var t=Ul.current;se(Ul),e.type._context._currentValue=t}function NS(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 Uo(e,t){Vl=e,Kl=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function wt(e,t){if(Kl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Kl=e,t=1073741823),t={context:e,observedBits:t,next:null},Do===null){if(Vl===null)throw Error(T(308));Do=t,Vl.dependencies={lanes:0,firstContext:t,responders:null}}else Do=Do.next=t;return e._currentValue}var Wn=!1;function Mf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function MS(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 cv(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;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 p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,v=i;switch(a=t,d=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=v.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,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=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Ws|=s,e.lanes=s,e.memoizedState=p}}function dv(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 DS=new nu.Component().refs;function Wl(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 pu={isMounted:function(e){return(e=e._reactInternals)?Qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),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=ot(),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=ot(),r=tr(e),o=Jn(n,r);o.tag=2,t!=null&&(o.callback=t),er(e,o),nr(e,r,n)}};function pv(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 FS(e,t,n){var r=!1,o=sr,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(o=Je(t)?Wr:Me.current,r=t.contextTypes,i=(r=r!=null)?Go(e,o):sr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function fv(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&&pu.enqueueReplaceState(t,t.state,null)}function Up(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=DS,Mf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=wt(i):(i=Je(t)?Wr:Me.current,o.context=Go(e,i)),js(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Wl(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&&pu.enqueueReplaceState(o,o.state,null),js(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var vl=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===DS&&(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 Sl(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 jS(e){function t(m,g){if(e){var f=m.lastEffect;f!==null?(f.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=lr(m,g),m.index=0,m.sibling=null,m}function i(m,g,f){return m.index=f,e?(f=m.alternate,f!==null?(f=f.index,f<g?(m.flags=2,g):f):(m.flags=2,g)):g}function s(m){return e&&m.alternate===null&&(m.flags=2),m}function a(m,g,f,S){return g===null||g.tag!==6?(g=yp(f,m.mode,S),g.return=m,g):(g=o(g,f),g.return=m,g)}function l(m,g,f,S){return g!==null&&g.elementType===f.type?(S=o(g,f.props),S.ref=os(m,g,f),S.return=m,S):(S=Al(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,S)}function u(m,g,f,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==f.containerInfo||g.stateNode.implementation!==f.implementation?(g=vp(f,m.mode,S),g.return=m,g):(g=o(g,f.children||[]),g.return=m,g)}function c(m,g,f,S,_){return g===null||g.tag!==7?(g=$o(f,m.mode,S,_),g.return=m,g):(g=o(g,f),g.return=m,g)}function p(m,g,f){if(typeof g=="string"||typeof g=="number")return g=yp(""+g,m.mode,f),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ds:return f=Al(g.type,g.key,g.props,null,m.mode,f),f.ref=os(m,null,g),f.return=m,f;case Br:return g=vp(g,m.mode,f),g.return=m,g}if(vl(g)||Ji(g))return g=$o(g,m.mode,f,null),g.return=m,g;Sl(m,g)}return null}function d(m,g,f,S){var _=g!==null?g.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,g,""+f,S);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ds:return f.key===_?f.type===$n?c(m,g,f.props.children,S,_):l(m,g,f,S):null;case Br:return f.key===_?u(m,g,f,S):null}if(vl(f)||Ji(f))return _!==null?null:c(m,g,f,S,null);Sl(m,f)}return null}function h(m,g,f,S,_){if(typeof S=="string"||typeof S=="number")return m=m.get(f)||null,a(g,m,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:return m=m.get(S.key===null?f:S.key)||null,S.type===$n?c(g,m,S.props.children,_,S.key):l(g,m,S,_);case Br:return m=m.get(S.key===null?f:S.key)||null,u(g,m,S,_)}if(vl(S)||Ji(S))return m=m.get(f)||null,c(g,m,S,_,null);Sl(g,S)}return null}function v(m,g,f,S){for(var _=null,b=null,E=g,C=g=0,R=null;E!==null&&C<f.length;C++){E.index>C?(R=E,E=null):R=E.sibling;var P=d(m,E,f[C],S);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(m,E),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P,E=R}if(C===f.length)return n(m,E),_;if(E===null){for(;C<f.length;C++)E=p(m,f[C],S),E!==null&&(g=i(E,g,C),b===null?_=E:b.sibling=E,b=E);return _}for(E=r(m,E);C<f.length;C++)R=h(E,m,C,f[C],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),g=i(R,g,C),b===null?_=R:b.sibling=R,b=R);return e&&E.forEach(function(N){return t(m,N)}),_}function y(m,g,f,S){var _=Ji(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var b=_=null,E=g,C=g=0,R=null,P=f.next();E!==null&&!P.done;C++,P=f.next()){E.index>C?(R=E,E=null):R=E.sibling;var N=d(m,E,P.value,S);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(m,E),g=i(N,g,C),b===null?_=N:b.sibling=N,b=N,E=R}if(P.done)return n(m,E),_;if(E===null){for(;!P.done;C++,P=f.next())P=p(m,P.value,S),P!==null&&(g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return _}for(E=r(m,E);!P.done;C++,P=f.next())P=h(E,m,C,P.value,S),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?C:P.key),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return e&&E.forEach(function(H){return t(m,H)}),_}return function(m,g,f,S){var _=typeof f=="object"&&f!==null&&f.type===$n&&f.key===null;_&&(f=f.props.children);var b=typeof f=="object"&&f!==null;if(b)switch(f.$$typeof){case ds:e:{for(b=f.key,_=g;_!==null;){if(_.key===b){switch(_.tag){case 7:if(f.type===$n){n(m,_.sibling),g=o(_,f.props.children),g.return=m,m=g;break e}break;default:if(_.elementType===f.type){n(m,_.sibling),g=o(_,f.props),g.ref=os(m,_,f),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===$n?(g=$o(f.props.children,m.mode,S,f.key),g.return=m,m=g):(S=Al(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,m=S)}return s(m);case Br:e:{for(_=f.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===f.containerInfo&&g.stateNode.implementation===f.implementation){n(m,g.sibling),g=o(g,f.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=vp(f,m.mode,S),g.return=m,m=g}return s(m)}if(typeof f=="string"||typeof f=="number")return f=""+f,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,f),g.return=m,m=g):(n(m,g),g=yp(f,m.mode,S),g.return=m,m=g),s(m);if(vl(f))return v(m,g,f,S);if(Ji(f))return y(m,g,f,S);if(b&&Sl(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Fo(m.type)||"Component"))}return n(m,g)}}var $l=jS(!0),BS=jS(!1),Ks={},en=ur(Ks),Bs=ur(Ks),Hs=ur(Ks);function Ur(e){if(e===Ks)throw Error(T(174));return e}function Vp(e,t){switch(pe(Hs,t),pe(Bs,e),pe(en,Ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kp(t,e)}se(en),pe(en,t)}function Qo(){se(en),se(Bs),se(Hs)}function mv(e){Ur(Hs.current);var t=Ur(en.current),n=kp(t,e.type);t!==n&&(pe(Bs,e),pe(en,n))}function Df(e){Bs.current===e&&(se(en),se(Bs))}var de=ur(0);function ql(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 mn=null,Xn=null,tn=!1;function HS(e,t){var n=xt(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 gv(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 Kp(e){if(tn){var t=Xn;if(t){var n=t;if(!gv(e,t)){if(t=zo(n.nextSibling),!t||!gv(e,t)){e.flags=e.flags&-1025|2,tn=!1,mn=e;return}HS(mn,n)}mn=e,Xn=zo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,mn=e}}function hv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function xl(e){if(e!==mn)return!1;if(!tn)return hv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!jp(t,e.memoizedProps))for(t=Xn;t;)HS(e,t),t=zo(t.nextSibling);if(hv(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=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xn=null}}else Xn=mn?zo(e.stateNode.nextSibling):null;return!0}function fp(){Xn=mn=null,tn=!1}var Vo=[];function Ff(){for(var e=0;e<Vo.length;e++)Vo[e]._workInProgressVersionPrimary=null;Vo.length=0}var bs=Xr.ReactCurrentDispatcher,_t=Xr.ReactCurrentBatchConfig,zs=0,he=null,Ae=null,Ce=null,Gl=!1,Es=!1;function Qe(){throw Error(T(321))}function jf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function Bf(e,t,n,r,o,i){if(zs=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bs.current=e===null||e.memoizedState===null?vT:ST,e=n(r,o),Es){i=0;do{if(Es=!1,!(25>i))throw Error(T(301));i+=1,Ce=Ae=null,t.updateQueue=null,bs.current=xT,e=n(r,o)}while(Es)}if(bs.current=Zl,t=Ae!==null&&Ae.next!==null,zs=0,Ce=Ae=he=null,Gl=!1,t)throw Error(T(300));return e}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function Yr(){if(Ae===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ce===null?he.memoizedState:Ce.next;if(t!==null)Ce=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},Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function Zt(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Yr(),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((zs&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,he.lanes|=u,Ws|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,St(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ss(e){var t=Yr(),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);St(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yv(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=(zs&e)===e)&&(t._workInProgressVersionPrimary=r,Vo.push(t))),e)return n(t._source);throw Vo.push(t),Error(T(350))}function zS(e,t,n,r){var o=Ke;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=bs.current,l=a.useState(function(){return yv(o,t,n)}),u=l[1],c=l[0];l=Ce;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=he;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!St(s,m)){m=n(t._source),St(c,m)||(u(m),m=tr(y),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,f=m;0<f;){var S=31-ir(f),_=1<<S;g[S]|=m,f&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var m=d.getSnapshot,g=d.setSnapshot;try{g(m(t._source));var f=tr(y);o.mutableReadLanes|=f&o.pendingLanes}catch(S){g(function(){throw S})}})},[t,r]),St(h,n)&&St(v,t)&&St(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Uf.bind(null,he,e),l.queue=e,l.baseQueue=null,c=yv(o,t,n),l.memoizedState=l.baseState=c),c}function US(e,t,n){var r=Yr();return zS(r,e,t,n)}function as(e){var t=Vr();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=Uf.bind(null,he,e),[t.memoizedState,e]}function Xl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null},he.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 vv(e){var t=Vr();return e={current:e},t.memoizedState=e}function Ql(){return Yr().memoizedState}function Wp(e,t,n,r){var o=Vr();he.flags|=e,o.memoizedState=Xl(1|t,n,void 0,r===void 0?null:r)}function Hf(e,t,n,r){var o=Yr();r=r===void 0?null:r;var i=void 0;if(Ae!==null){var s=Ae.memoizedState;if(i=s.destroy,r!==null&&jf(r,s.deps)){Xl(t,n,i,r);return}}he.flags|=e,o.memoizedState=Xl(1|t,n,i,r)}function Sv(e,t){return Wp(516,4,e,t)}function Yl(e,t){return Hf(516,4,e,t)}function VS(e,t){return Hf(4,2,e,t)}function KS(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 WS(e,t,n){return n=n!=null?n.concat([e]):null,Hf(4,2,KS.bind(null,t,e),n)}function zf(){}function $S(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yT(e,t){var n=Xo();$r(98>n?98:n,function(){e(!0)}),$r(97<n?97:n,function(){var r=_t.transition;_t.transition=1;try{e(!1),t()}finally{_t.transition=r}})}function Uf(e,t,n){var r=ot(),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===he||s!==null&&s===he)Es=Gl=!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,St(l,a))return}catch{}finally{}nr(e,o,r)}}var Zl={readContext:wt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useOpaqueIdentifier:Qe,unstable_isNewReconciler:!1},vT={readContext:wt,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wp(4,2,KS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wp(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();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=Uf.bind(null,he,e),[r.memoizedState,e]},useRef:vv,useState:as,useDebugValue:zf,useDeferredValue:function(e){var t=as(e),n=t[0],r=t[1];return Sv(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=as(!1),t=e[0];return e=yT.bind(null,e[1]),vv(e),[e,t]},useMutableSource:function(e,t,n){var r=Vr();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=dT(function(){throw e||(e=!0,n("r:"+(cp++).toString(36))),Error(T(355))}),n=as(t)[1];return!(he.mode&2)&&(he.flags|=516,Xl(5,function(){n("r:"+(cp++).toString(36))},void 0,null)),t}return t="r:"+(cp++).toString(36),as(t),t},unstable_isNewReconciler:!1},ST={readContext:wt,useCallback:$S,useContext:wt,useEffect:Yl,useImperativeHandle:WS,useLayoutEffect:VS,useMemo:qS,useReducer:is,useRef:Ql,useState:function(){return is(Zt)},useDebugValue:zf,useDeferredValue:function(e){var t=is(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=is(Zt)[0];return[Ql().current,e]},useMutableSource:US,useOpaqueIdentifier:function(){return is(Zt)[0]},unstable_isNewReconciler:!1},xT={readContext:wt,useCallback:$S,useContext:wt,useEffect:Yl,useImperativeHandle:WS,useLayoutEffect:VS,useMemo:qS,useReducer:ss,useRef:Ql,useState:function(){return ss(Zt)},useDebugValue:zf,useDeferredValue:function(e){var t=ss(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=ss(Zt)[0];return[Ql().current,e]},useMutableSource:US,useOpaqueIdentifier:function(){return ss(Zt)[0]},unstable_isNewReconciler:!1},_T=Xr.ReactCurrentOwner,Mt=!1;function Ye(e,t,n,r){t.child=e===null?BS(t,null,n,r):$l(t,e.child,n,r)}function xv(e,t,n,r,o){n=n.render;var i=t.ref;return Uo(t,o),r=Bf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Ye(e,t,r,o),t.child)}function _v(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Gf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,GS(e,t,s,r,o,i)):(e=Al(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)?gn(e,t,i):(t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function GS(e,t,n,r,o,i){if(e!==null&&Ms(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,gn(e,t,i);return $p(e,t,n,r,i)}function mp(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},wl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},wl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},wl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,wl(t,r);return Ye(e,t,o,n),t.child}function XS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function $p(e,t,n,r,o){var i=Je(n)?Wr:Me.current;return i=Go(t,i),Uo(t,o),n=Bf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Ye(e,t,n,o),t.child)}function wv(e,t,n,r,o){if(Je(n)){var i=!0;kl(t)}else i=!1;if(Uo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),FS(t,n,r),Up(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=wt(u):(u=Je(n)?Wr:Me.current,u=Go(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&fv(t,s,r,u),Wn=!1;var d=t.memoizedState;s.state=d,js(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Ze.current||Wn?(typeof c=="function"&&(Wl(t,n,c,r),l=t.memoizedState),(a=Wn||pv(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,MS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=Je(n)?Wr:Me.current,l=Go(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&fv(t,s,r,l),Wn=!1,d=t.memoizedState,s.state=d,js(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||Ze.current||Wn?(typeof h=="function"&&(Wl(t,n,h,r),v=t.memoizedState),(u=Wn||pv(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 qp(e,t,n,r,i,o)}function qp(e,t,n,r,o,i){XS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&av(t,n,!1),gn(e,t,i);r=t.stateNode,_T.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=$l(t,e.child,null,i),t.child=$l(t,null,a,i)):Ye(e,t,a,i),t.memoizedState=r.state,o&&av(t,n,!0),t.child}function bv(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Vp(e,t.containerInfo)}var _l={dehydrated:null,retryLane:0};function Ev(e,t,n){var r=t.pendingProps,o=de.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),pe(de,o&1),e===null?(r.fallback!==void 0&&Kp(t),e=r.children,o=r.fallback,i?(e=Cv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,e):typeof r.unstable_expectedLoadTime=="number"?(e=Cv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,t.lanes=33554432,e):(n=Xf({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=kv(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=_l,r):(n=Tv(e,t,r.children,n),t.memoizedState=null,n):i?(r=kv(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=_l,r):(n=Tv(e,t,r.children,n),t.memoizedState=null,n)}function Cv(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=Xf(t,o,0,null),n=$o(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Tv(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 kv(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=$o(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Pv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),NS(e.return,t)}function gp(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 Rv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ye(e,t,r.children,n),r=de.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&&Pv(e,n);else if(e.tag===19)Pv(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(pe(de,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&&ql(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),gp(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&&ql(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}gp(t,!0,n,null,i,t.lastEffect);break;case"together":gp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(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=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 QS,Gp,YS,ZS;QS=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}};Gp=function(){};YS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ur(en.current);var i=null;switch(n){case"input":o=_p(e,o),r=_p(e,r),i=[];break;case"option":o=Ep(e,o),r=Ep(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Cp(e,o),r=Cp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}Pp(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===gf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};ZS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ls(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 wT(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 Je(t.type)&&zl(),null;case 3:return Qo(),se(Ze),se(Me),Ff(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Gp(t),null;case 5:Df(t);var o=Ur(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)YS(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=Ur(en.current),xl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Gn]=t,r[Hl]=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<fs.length;e++)ie(fs[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":Ly(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Oy(r,i),ie("invalid",r)}Pp(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":dl(r),Ay(r,i,!0);break;case"textarea":dl(r),Ny(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Bl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Tp.html&&(e=Wv(n)),e===Tp.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[Hl]=r,QS(e,t,!1,!1),t.stateNode=e,s=Rp(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<fs.length;o++)ie(fs[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":Ly(e,r),o=_p(e,r),ie("invalid",e);break;case"option":o=Ep(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Oy(e,r),o=Cp(e,r),ie("invalid",e);break;default:o=r}Pp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Gv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&$v(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&&uf(e,i,l,s))}switch(n){case"input":dl(e),Ay(e,r,!1);break;case"textarea":dl(e),Ny(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?jo(e,!!r.multiple,i,!1):r.defaultValue!=null&&jo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bl)}CS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ZS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Ur(Hs.current),Ur(en.current),xl(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(de),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&xl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||de.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Ke===null||!(Ws&134217727)&&!(ei&134217727)||Ko(Ke,Ne))),(r||n)&&(t.flags|=4),null);case 4:return Qo(),Gp(t),e===null&&wS(t.stateNode.containerInfo),null;case 10:return Nf(t),null;case 17:return Je(t.type)&&zl(),null;case 19:if(se(de),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=ql(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 pe(de,de.current&1|2),t.child}e=e.sibling}r.tail!==null&&Oe()>ef&&(t.flags|=64,i=!0,ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=ql(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&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Oe()-r.renderingStartTime>ef&&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=Oe(),n.sibling=null,t=de.current,pe(de,i?t&1|2:t&1),n):null;case 23:case 24:return qf(),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:Je(e.type)&&zl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Qo(),se(Ze),se(Me),Ff(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Df(e),null;case 13:return se(de),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(de),null;case 4:return Qo(),null;case 10:return Nf(e),null;case 23:case 24:return qf(),null;default:return null}}function Vf(e,t){try{var n="",r=t;do n+=rC(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{ep=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function rC(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=cl(e.type,!1),e;case 11:return e=cl(e.type.render,!1),e;case 22:return e=cl(e.type._render,!1),e;case 1:return e=cl(e.type,!0),e;default:return""}}function Fo(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 Br:return"Portal";case hs:return"Profiler";case df:return"StrictMode";case ys:return"Suspense";case Ol:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ff:return(e.displayName||"Context")+".Consumer";case pf:return(e._context.displayName||"Context")+".Provider";case ru:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case ou:return Fo(e.type);case gf:return Fo(e._render);case mf:t=e._payload,e=e._init;try{return Fo(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 oC(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 dl(e){e._valueTracker||(e._valueTracker=oC(e))}function Uv(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 Nl(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 wp(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ly(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 Vv(e,t){t=t.checked,t!=null&&cf(e,"checked",t,!1)}function bp(e,t){Vv(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")?Ep(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ep(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ay(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 Ep(e,t,n){(t!=="number"||Nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function iC(e){var t="";return nu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Cp(e,t){return e=ae({children:void 0},t),(t=iC(t.children))&&(e.children=t),e}function jo(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 Tp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oy(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 Kv(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 Ny(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var kp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Wv(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 Pp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pl,$v=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!==kp.svg||"innerHTML"in e)e.innerHTML=t;else{for(pl=pl||document.createElement("div"),pl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pl.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},sC=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(e){sC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vs[t]=vs[e]})});function qv(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 Gv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=qv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var aC=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 Rp(e,t){if(t){if(aC[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 Ip(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 vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lp=null,Bo=null,Ho=null;function My(e){if(e=Vs(e)){if(typeof Lp!="function")throw Error(T(280));var t=e.stateNode;t&&(t=cu(t),Lp(e.stateNode,e.type,t))}}function Xv(e){Bo?Ho?Ho.push(e):Ho=[e]:Bo=e}function Qv(){if(Bo){var e=Bo,t=Ho;if(Ho=Bo=null,My(e),t)for(e=0;e<t.length;e++)My(t[e])}}function Sf(e,t){return e(t)}function Yv(e,t,n,r,o){return e(t,n,r,o)}function xf(){}var Zv=Sf,Hr=!1,tp=!1;function _f(){(Bo!==null||Ho!==null)&&(xf(),Qv())}function lC(e,t,n){if(tp)return e(t,n);tp=!0;try{return Zv(e,t,n)}finally{tp=!1,_f()}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var r=cu(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 Ap=!1;if(yn)try{ko={},Object.defineProperty(ko,"passive",{get:function(){Ap=!0}}),window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{Ap=!1}var ko;function uC(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,Ml=null,Dl=!1,Op=null,cC={onError:function(e){Ss=!0,Ml=e}};function dC(e,t,n,r,o,i,s,a,l){Ss=!1,Ml=null,uC.apply(cC,arguments)}function pC(e,t,n,r,o,i,s,a,l){if(dC.apply(this,arguments),Ss){if(Ss){var u=Ml;Ss=!1,Ml=null}else throw Error(T(198));Dl||(Dl=!0,Op=u)}}function Qr(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 Jv(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 Dy(e){if(Qr(e)!==e)throw Error(T(188))}function fC(e){var t=e.alternate;if(!t){if(t=Qr(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 Dy(o),e;if(i===r)return Dy(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 eS(e){if(e=fC(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 Fy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var tS,wf,nS,rS,Np=!1,Yt=[],Qn=null,Yn=null,Zn=null,Ls=new Map,As=new Map,es=[],jy="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 Mp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function By(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":Ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(t.pointerId)}}function ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Mp(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&wf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function mC(e,t,n,r,o){switch(t){case"focusin":return Qn=ts(Qn,e,t,n,r,o),!0;case"dragenter":return Yn=ts(Yn,e,t,n,r,o),!0;case"mouseover":return Zn=ts(Zn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ls.set(i,ts(Ls.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,As.set(i,ts(As.get(i)||null,e,t,n,r,o)),!0}return!1}function gC(e){var t=zr(e.target);if(t!==null){var n=Qr(t);if(n!==null){if(t=n.tag,t===13){if(t=Jv(n),t!==null){e.blockedOn=t,rS(e.lanePriority,function(){_e.unstable_runWithPriority(e.priority,function(){nS(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=Tf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&wf(t),e.blockedOn=n,!1;t.shift()}return!0}function Hy(e,t,n){bl(e)&&n.delete(t)}function hC(){for(Np=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&tS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Tf(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),Ls.forEach(Hy),As.forEach(Hy)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Np||(Np=!0,_e.unstable_scheduleCallback(_e.unstable_NormalPriority,hC)))}function oS(e){function t(o){return ns(o,e)}if(0<Yt.length){ns(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qn!==null&&ns(Qn,e),Yn!==null&&ns(Yn,e),Zn!==null&&ns(Zn,e),Ls.forEach(t),As.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);)gC(n),n.blockedOn===null&&es.shift()}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lo={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},np={},iS={};yn&&(iS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function iu(e){if(np[e])return np[e];if(!Lo[e])return e;var t=Lo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in iS)return np[e]=t[n];return e}var sS=iu("animationend"),aS=iu("animationiteration"),lS=iu("animationstart"),uS=iu("transitionend"),cS=new Map,bf=new Map,yC=["abort","abort",sS,"animationEnd",aS,"animationIteration",lS,"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",uS,"transitionEnd","waiting","waiting"];function Ef(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)),bf.set(r,t),cS.set(r,o),Gr(o,[r])}}var vC=_e.unstable_now;vC();var ne=8;function Ro(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 SC(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 xC(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=Ro(l),o=ne):(a&=i,a!==0&&(r=Ro(a),o=ne))}else i=n&~s,i!==0?(r=Ro(i),o=ne):a!==0&&(r=Ro(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(Ro(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 dS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Io(24&~t),e===0?Fl(10,t):e;case 10:return e=Io(192&~t),e===0?Fl(8,t):e;case 8:return e=Io(3584&~t),e===0&&(e=Io(4186112&~t),e===0&&(e=512)),e;case 2:return t=Io(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Io(e){return e&-e}function rp(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-ir(t),e[t]=n}var ir=Math.clz32?Math.clz32:bC,_C=Math.log,wC=Math.LN2;function bC(e){return e===0?32:31-(_C(e)/wC|0)|0}var EC=_e.unstable_UserBlockingPriority,CC=_e.unstable_runWithPriority,El=!0;function TC(e,t,n,r){Hr||xf();var o=Cf,i=Hr;Hr=!0;try{Yv(o,e,t,n,r)}finally{(Hr=i)||_f()}}function kC(e,t,n,r){CC(EC,Cf.bind(null,e,t,n,r))}function Cf(e,t,n,r){if(El){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<jy.indexOf(e))e=Mp(null,e,t,n,r),Yt.push(e);else{var i=Tf(e,t,n,r);if(i===null)o&&By(e,r);else{if(o){if(-1<jy.indexOf(e)){e=Mp(i,e,t,n,r),Yt.push(e);return}if(mC(i,e,t,n,r))return;By(e,r)}ES(e,t,r,null,n)}}}}function Tf(e,t,n,r){var o=vf(r);if(o=zr(o),o!==null){var i=Qr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Jv(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 ES(e,t,r,o,n),null}var qn=null,kf=null,Cl=null;function pS(){if(Cl)return Cl;var e,t=kf,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 Cl=o.slice(e,1<r?1-r:void 0)}function Tl(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 ml(){return!0}function zy(){return!1}function it(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)?ml: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=ml)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),t}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pf=it(Yo),Us=ae({},Yo,{view:0,detail:0}),PC=it(Us),op,ip,rs,au=ae({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rf,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"?(op=e.screenX-rs.screenX,ip=e.screenY-rs.screenY):ip=op=0,rs=e),op)},movementY:function(e){return"movementY"in e?e.movementY:ip}}),Uy=it(au),RC=ae({},au,{dataTransfer:0}),IC=it(RC),LC=ae({},Us,{relatedTarget:0}),sp=it(LC),AC=ae({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),OC=it(AC),NC=ae({},Yo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),MC=it(NC),DC=ae({},Yo,{data:0}),Vy=it(DC),FC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jC={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"},BC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=BC[e])?!!t[e]:!1}function Rf(){return HC}var zC=ae({},Us,{key:function(e){if(e.key){var t=FC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rf,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),UC=it(zC),VC=ae({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ky=it(VC),KC=ae({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rf}),WC=it(KC),$C=ae({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),qC=it($C),GC=ae({},au,{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}),XC=it(GC),QC=[9,13,27,32],If=yn&&"CompositionEvent"in window,xs=null;yn&&"documentMode"in document&&(xs=document.documentMode);var YC=yn&&"TextEvent"in window&&!xs,fS=yn&&(!If||xs&&8<xs&&11>=xs),Wy=String.fromCharCode(32),$y=!1;function mS(e,t){switch(e){case"keyup":return QC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function ZC(e,t){switch(e){case"compositionend":return gS(t);case"keypress":return t.which!==32?null:($y=!0,Wy);case"textInput":return e=t.data,e===Wy&&$y?null:e;default:return null}}function JC(e,t){if(Ao)return e==="compositionend"||!If&&mS(e,t)?(e=pS(),Cl=kf=qn=null,Ao=!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 fS&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 qy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function hS(e,t,n,r){Xv(r),t=jl(t,"onChange"),0<t.length&&(n=new Pf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _s=null,Ns=null;function tT(e){_S(e,0)}function lu(e){var t=No(e);if(Uv(t))return e}function nT(e,t){if(e==="change")return t}var yS=!1;yn&&(yn?(hl="oninput"in document,hl||(ap=document.createElement("div"),ap.setAttribute("oninput","return;"),hl=typeof ap.oninput=="function"),gl=hl):gl=!1,yS=gl&&(!document.documentMode||9<document.documentMode));var gl,hl,ap;function Gy(){_s&&(_s.detachEvent("onpropertychange",vS),Ns=_s=null)}function vS(e){if(e.propertyName==="value"&&lu(Ns)){var t=[];if(hS(t,Ns,e,vf(e)),e=tT,Hr)e(t);else{Hr=!0;try{Sf(e,t)}finally{Hr=!1,_f()}}}}function rT(e,t,n){e==="focusin"?(Gy(),_s=t,Ns=n,_s.attachEvent("onpropertychange",vS)):e==="focusout"&&Gy()}function oT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lu(Ns)}function iT(e,t){if(e==="click")return lu(t)}function sT(e,t){if(e==="input"||e==="change")return lu(t)}function aT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:aT,lT=Object.prototype.hasOwnProperty;function Ms(e,t){if(St(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(!lT.call(t,n[r])||!St(e[n[r]],t[n[r]]))return!1;return!0}function Xy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qy(e,t){var n=Xy(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=Xy(n)}}function SS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?SS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yy(){for(var e=window,t=Nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nl(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var uT=yn&&"documentMode"in document&&11>=document.documentMode,Oo=null,Fp=null,ws=null,jp=!1;function Zy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jp||Oo==null||Oo!==Nl(r)||(r=Oo,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ws&&Ms(ws,r)||(ws=r,r=jl(Fp,"onSelect"),0<r.length&&(t=new Pf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oo)))}Ef("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);Ef("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);Ef(yC,2);for(lp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),yl=0;yl<lp.length;yl++)bf.set(lp[yl],0);var lp,yl;qo("onMouseEnter",["mouseout","mouseover"]);qo("onMouseLeave",["mouseout","mouseover"]);qo("onPointerEnter",["pointerout","pointerover"]);qo("onPointerLeave",["pointerout","pointerover"]);Gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xS=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function Jy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pC(r,t,void 0,e),e.currentTarget=null}function _S(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;Jy(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;Jy(o,a,u),i=l}}}if(Dl)throw e=Op,Dl=!1,Op=null,e}function ie(e,t){var n=TS(t),r=e+"__bubble";n.has(r)||(bS(t,e,2,!1),n.add(r))}var ev="_reactListening"+Math.random().toString(36).slice(2);function wS(e){e[ev]||(e[ev]=!0,Bv.forEach(function(t){xS.has(t)||tv(t,!1,e,null),tv(t,!0,e,null)}))}function tv(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&&xS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=TS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),bS(i,e,o,t),s.add(a))}function bS(e,t,n,r){var o=bf.get(t);switch(o===void 0?2:o){case 0:o=TC;break;case 1:o=kC;break;default:o=Cf}n=o.bind(null,t,n,e),o=void 0,!Ap||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 ES(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=zr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}lC(function(){var u=i,c=vf(n),p=[];e:{var d=cS.get(e);if(d!==void 0){var h=Pf,v=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":h=UC;break;case"focusin":v="focus",h=sp;break;case"focusout":v="blur",h=sp;break;case"beforeblur":case"afterblur":h=sp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Uy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=IC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=WC;break;case sS:case aS:case lS:h=OC;break;case uS:h=qC;break;case"scroll":h=PC;break;case"wheel":h=XC;break;case"copy":case"cut":case"paste":h=MC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ky}var y=(t&4)!==0,m=!y&&e==="scroll",g=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,S;f!==null;){S=f;var _=S.stateNode;if(S.tag===5&&_!==null&&(S=_,g!==null&&(_=Is(f,g),_!=null&&y.push(Ds(f,_,S)))),m)break;f=f.return}0<y.length&&(d=new h(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(zr(v)||v[Zo]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?zr(v):null,v!==null&&(m=Qr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Uy,_="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Ky,_="onPointerLeave",g="onPointerEnter",f="pointer"),m=h==null?d:No(h),S=v==null?d:No(v),d=new y(_,f+"leave",h,n,c),d.target=m,d.relatedTarget=S,_=null,zr(c)===u&&(y=new y(g,f+"enter",v,n,c),y.target=S,y.relatedTarget=m,_=y),m=_,h&&v)t:{for(y=h,g=v,f=0,S=y;S;S=Po(S))f++;for(S=0,_=g;_;_=Po(_))S++;for(;0<f-S;)y=Po(y),f--;for(;0<S-f;)g=Po(g),S--;for(;f--;){if(y===g||g!==null&&y===g.alternate)break t;y=Po(y),g=Po(g)}y=null}else y=null;h!==null&&nv(p,d,h,y,!1),v!==null&&m!==null&&nv(p,m,v,y,!0)}}e:{if(d=u?No(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var b=nT;else if(qy(d))if(yS)b=sT;else{b=oT;var E=rT}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=iT);if(b&&(b=b(e,u))){hS(p,b,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Ep(d,"number",d.value)}switch(E=u?No(u):window,e){case"focusin":(qy(E)||E.contentEditable==="true")&&(Oo=E,Fp=u,ws=null);break;case"focusout":ws=Fp=Oo=null;break;case"mousedown":jp=!0;break;case"contextmenu":case"mouseup":case"dragend":jp=!1,Zy(p,n,c);break;case"selectionchange":if(uT)break;case"keydown":case"keyup":Zy(p,n,c)}var C;if(If)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 Ao?mS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(fS&&n.locale!=="ko"&&(Ao||R!=="onCompositionStart"?R==="onCompositionEnd"&&Ao&&(C=pS()):(qn=c,kf="value"in qn?qn.value:qn.textContent,Ao=!0)),E=jl(u,R),0<E.length&&(R=new Vy(R,e,null,n,c),p.push({event:R,listeners:E}),C?R.data=C:(C=gS(n),C!==null&&(R.data=C)))),(C=YC?ZC(e,n):JC(e,n))&&(u=jl(u,"onBeforeInput"),0<u.length&&(c=new Vy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=C))}_S(p,t)})}function Ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jl(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 Po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nv(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 Bl(){}var up=null,cp=null;function CS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Bp(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 rv=typeof setTimeout=="function"?setTimeout:void 0,cT=typeof clearTimeout=="function"?clearTimeout:void 0;function Lf(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function zo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function ov(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dp=0;function dT(e){return{$$typeof:hf,toString:e,valueOf:e}}var uu=Math.random().toString(36).slice(2),Gn="__reactFiber$"+uu,Hl="__reactProps$"+uu,Zo="__reactContainer$"+uu,iv="__reactEvents$"+uu;function zr(e){var t=e[Gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zo]||n[Gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ov(e);e!==null;){if(n=e[Gn])return n;e=ov(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[Gn]||e[Zo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function No(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function cu(e){return e[Hl]||null}function TS(e){var t=e[iv];return t===void 0&&(t=e[iv]=new Set),t}var Hp=[],Mo=-1;function ur(e){return{current:e}}function se(e){0>Mo||(e.current=Hp[Mo],Hp[Mo]=null,Mo--)}function pe(e,t){Mo++,Hp[Mo]=e.current,e.current=t}var sr={},Me=ur(sr),Ze=ur(!1),Wr=sr;function Go(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 Je(e){return e=e.childContextTypes,e!=null}function zl(){se(Ze),se(Me)}function sv(e,t,n){if(Me.current!==sr)throw Error(T(168));pe(Me,t),pe(Ze,n)}function kS(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,Fo(t)||"Unknown",o));return ae({},n,r)}function kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Wr=Me.current,pe(Me,e),pe(Ze,Ze.current),!0}function av(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=kS(e,t,Wr),r.__reactInternalMemoizedMergedChildContext=e,se(Ze),se(Me),pe(Me,e)):se(Ze),pe(Ze,n)}var Af=null,Kr=null,pT=_e.unstable_runWithPriority,Of=_e.unstable_scheduleCallback,zp=_e.unstable_cancelCallback,fT=_e.unstable_shouldYield,lv=_e.unstable_requestPaint,Up=_e.unstable_now,mT=_e.unstable_getCurrentPriorityLevel,du=_e.unstable_ImmediatePriority,PS=_e.unstable_UserBlockingPriority,RS=_e.unstable_NormalPriority,IS=_e.unstable_LowPriority,LS=_e.unstable_IdlePriority,pp={},gT=lv!==void 0?lv:function(){},pn=null,Pl=null,fp=!1,uv=Up(),Oe=1e4>uv?Up:function(){return Up()-uv};function Xo(){switch(mT()){case du:return 99;case PS:return 98;case RS:return 97;case IS:return 96;case LS:return 95;default:throw Error(T(332))}}function AS(e){switch(e){case 99:return du;case 98:return PS;case 97:return RS;case 96:return IS;case 95:return LS;default:throw Error(T(332))}}function $r(e,t){return e=AS(e),pT(e,t)}function Fs(e,t,n){return e=AS(e),Of(e,t,n)}function nn(){if(Pl!==null){var e=Pl;Pl=null,zp(e)}OS()}function OS(){if(!fp&&pn!==null){fp=!0;var e=0;try{var t=pn;$r(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)),Of(du,nn),n}finally{fp=!1}}}var hT=Xr.ReactCurrentBatchConfig;function Nt(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 Ul=ur(null),Vl=null,Do=null,Kl=null;function Nf(){Kl=Do=Vl=null}function Mf(e){var t=Ul.current;se(Ul),e.type._context._currentValue=t}function NS(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 Uo(e,t){Vl=e,Kl=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function wt(e,t){if(Kl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Kl=e,t=1073741823),t={context:e,observedBits:t,next:null},Do===null){if(Vl===null)throw Error(T(308));Do=t,Vl.dependencies={lanes:0,firstContext:t,responders:null}}else Do=Do.next=t;return e._currentValue}var Wn=!1;function Df(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function MS(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 cv(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;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 p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,v=i;switch(a=t,d=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=v.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,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=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Ws|=s,e.lanes=s,e.memoizedState=p}}function dv(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 DS=new nu.Component().refs;function Wl(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 pu={isMounted:function(e){return(e=e._reactInternals)?Qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),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=ot(),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=ot(),r=tr(e),o=Jn(n,r);o.tag=2,t!=null&&(o.callback=t),er(e,o),nr(e,r,n)}};function pv(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 FS(e,t,n){var r=!1,o=sr,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(o=Je(t)?Wr:Me.current,r=t.contextTypes,i=(r=r!=null)?Go(e,o):sr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function fv(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&&pu.enqueueReplaceState(t,t.state,null)}function Vp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=DS,Df(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=wt(i):(i=Je(t)?Wr:Me.current,o.context=Go(e,i)),js(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Wl(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&&pu.enqueueReplaceState(o,o.state,null),js(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var vl=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===DS&&(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 Sl(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 jS(e){function t(m,g){if(e){var f=m.lastEffect;f!==null?(f.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=lr(m,g),m.index=0,m.sibling=null,m}function i(m,g,f){return m.index=f,e?(f=m.alternate,f!==null?(f=f.index,f<g?(m.flags=2,g):f):(m.flags=2,g)):g}function s(m){return e&&m.alternate===null&&(m.flags=2),m}function a(m,g,f,S){return g===null||g.tag!==6?(g=vp(f,m.mode,S),g.return=m,g):(g=o(g,f),g.return=m,g)}function l(m,g,f,S){return g!==null&&g.elementType===f.type?(S=o(g,f.props),S.ref=os(m,g,f),S.return=m,S):(S=Al(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,S)}function u(m,g,f,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==f.containerInfo||g.stateNode.implementation!==f.implementation?(g=Sp(f,m.mode,S),g.return=m,g):(g=o(g,f.children||[]),g.return=m,g)}function c(m,g,f,S,_){return g===null||g.tag!==7?(g=$o(f,m.mode,S,_),g.return=m,g):(g=o(g,f),g.return=m,g)}function p(m,g,f){if(typeof g=="string"||typeof g=="number")return g=vp(""+g,m.mode,f),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ds:return f=Al(g.type,g.key,g.props,null,m.mode,f),f.ref=os(m,null,g),f.return=m,f;case Br:return g=Sp(g,m.mode,f),g.return=m,g}if(vl(g)||Ji(g))return g=$o(g,m.mode,f,null),g.return=m,g;Sl(m,g)}return null}function d(m,g,f,S){var _=g!==null?g.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,g,""+f,S);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ds:return f.key===_?f.type===$n?c(m,g,f.props.children,S,_):l(m,g,f,S):null;case Br:return f.key===_?u(m,g,f,S):null}if(vl(f)||Ji(f))return _!==null?null:c(m,g,f,S,null);Sl(m,f)}return null}function h(m,g,f,S,_){if(typeof S=="string"||typeof S=="number")return m=m.get(f)||null,a(g,m,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:return m=m.get(S.key===null?f:S.key)||null,S.type===$n?c(g,m,S.props.children,_,S.key):l(g,m,S,_);case Br:return m=m.get(S.key===null?f:S.key)||null,u(g,m,S,_)}if(vl(S)||Ji(S))return m=m.get(f)||null,c(g,m,S,_,null);Sl(g,S)}return null}function v(m,g,f,S){for(var _=null,b=null,E=g,C=g=0,R=null;E!==null&&C<f.length;C++){E.index>C?(R=E,E=null):R=E.sibling;var P=d(m,E,f[C],S);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(m,E),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P,E=R}if(C===f.length)return n(m,E),_;if(E===null){for(;C<f.length;C++)E=p(m,f[C],S),E!==null&&(g=i(E,g,C),b===null?_=E:b.sibling=E,b=E);return _}for(E=r(m,E);C<f.length;C++)R=h(E,m,C,f[C],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),g=i(R,g,C),b===null?_=R:b.sibling=R,b=R);return e&&E.forEach(function(N){return t(m,N)}),_}function y(m,g,f,S){var _=Ji(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var b=_=null,E=g,C=g=0,R=null,P=f.next();E!==null&&!P.done;C++,P=f.next()){E.index>C?(R=E,E=null):R=E.sibling;var N=d(m,E,P.value,S);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(m,E),g=i(N,g,C),b===null?_=N:b.sibling=N,b=N,E=R}if(P.done)return n(m,E),_;if(E===null){for(;!P.done;C++,P=f.next())P=p(m,P.value,S),P!==null&&(g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return _}for(E=r(m,E);!P.done;C++,P=f.next())P=h(E,m,C,P.value,S),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?C:P.key),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return e&&E.forEach(function(H){return t(m,H)}),_}return function(m,g,f,S){var _=typeof f=="object"&&f!==null&&f.type===$n&&f.key===null;_&&(f=f.props.children);var b=typeof f=="object"&&f!==null;if(b)switch(f.$$typeof){case ds:e:{for(b=f.key,_=g;_!==null;){if(_.key===b){switch(_.tag){case 7:if(f.type===$n){n(m,_.sibling),g=o(_,f.props.children),g.return=m,m=g;break e}break;default:if(_.elementType===f.type){n(m,_.sibling),g=o(_,f.props),g.ref=os(m,_,f),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===$n?(g=$o(f.props.children,m.mode,S,f.key),g.return=m,m=g):(S=Al(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,m=S)}return s(m);case Br:e:{for(_=f.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===f.containerInfo&&g.stateNode.implementation===f.implementation){n(m,g.sibling),g=o(g,f.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Sp(f,m.mode,S),g.return=m,m=g}return s(m)}if(typeof f=="string"||typeof f=="number")return f=""+f,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,f),g.return=m,m=g):(n(m,g),g=vp(f,m.mode,S),g.return=m,m=g),s(m);if(vl(f))return v(m,g,f,S);if(Ji(f))return y(m,g,f,S);if(b&&Sl(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Fo(m.type)||"Component"))}return n(m,g)}}var $l=jS(!0),BS=jS(!1),Ks={},en=ur(Ks),Bs=ur(Ks),Hs=ur(Ks);function Ur(e){if(e===Ks)throw Error(T(174));return e}function Kp(e,t){switch(pe(Hs,t),pe(Bs,e),pe(en,Ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pp(t,e)}se(en),pe(en,t)}function Qo(){se(en),se(Bs),se(Hs)}function mv(e){Ur(Hs.current);var t=Ur(en.current),n=Pp(t,e.type);t!==n&&(pe(Bs,e),pe(en,n))}function Ff(e){Bs.current===e&&(se(en),se(Bs))}var de=ur(0);function ql(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 mn=null,Xn=null,tn=!1;function HS(e,t){var n=xt(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 gv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Wp(e){if(tn){var t=Xn;if(t){var n=t;if(!gv(e,t)){if(t=zo(n.nextSibling),!t||!gv(e,t)){e.flags=e.flags&-1025|2,tn=!1,mn=e;return}HS(mn,n)}mn=e,Xn=zo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,mn=e}}function hv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function xl(e){if(e!==mn)return!1;if(!tn)return hv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Bp(t,e.memoizedProps))for(t=Xn;t;)HS(e,t),t=zo(t.nextSibling);if(hv(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=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xn=null}}else Xn=mn?zo(e.stateNode.nextSibling):null;return!0}function mp(){Xn=mn=null,tn=!1}var Vo=[];function jf(){for(var e=0;e<Vo.length;e++)Vo[e]._workInProgressVersionPrimary=null;Vo.length=0}var bs=Xr.ReactCurrentDispatcher,_t=Xr.ReactCurrentBatchConfig,zs=0,he=null,Ae=null,Ce=null,Gl=!1,Es=!1;function Qe(){throw Error(T(321))}function Bf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function Hf(e,t,n,r,o,i){if(zs=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bs.current=e===null||e.memoizedState===null?vT:ST,e=n(r,o),Es){i=0;do{if(Es=!1,!(25>i))throw Error(T(301));i+=1,Ce=Ae=null,t.updateQueue=null,bs.current=xT,e=n(r,o)}while(Es)}if(bs.current=Zl,t=Ae!==null&&Ae.next!==null,zs=0,Ce=Ae=he=null,Gl=!1,t)throw Error(T(300));return e}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function Yr(){if(Ae===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ce===null?he.memoizedState:Ce.next;if(t!==null)Ce=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},Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function Zt(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Yr(),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((zs&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,he.lanes|=u,Ws|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,St(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ss(e){var t=Yr(),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);St(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yv(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=(zs&e)===e)&&(t._workInProgressVersionPrimary=r,Vo.push(t))),e)return n(t._source);throw Vo.push(t),Error(T(350))}function zS(e,t,n,r){var o=Ke;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=bs.current,l=a.useState(function(){return yv(o,t,n)}),u=l[1],c=l[0];l=Ce;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=he;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!St(s,m)){m=n(t._source),St(c,m)||(u(m),m=tr(y),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,f=m;0<f;){var S=31-ir(f),_=1<<S;g[S]|=m,f&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var m=d.getSnapshot,g=d.setSnapshot;try{g(m(t._source));var f=tr(y);o.mutableReadLanes|=f&o.pendingLanes}catch(S){g(function(){throw S})}})},[t,r]),St(h,n)&&St(v,t)&&St(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Vf.bind(null,he,e),l.queue=e,l.baseQueue=null,c=yv(o,t,n),l.memoizedState=l.baseState=c),c}function US(e,t,n){var r=Yr();return zS(r,e,t,n)}function as(e){var t=Vr();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=Vf.bind(null,he,e),[t.memoizedState,e]}function Xl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null},he.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 vv(e){var t=Vr();return e={current:e},t.memoizedState=e}function Ql(){return Yr().memoizedState}function $p(e,t,n,r){var o=Vr();he.flags|=e,o.memoizedState=Xl(1|t,n,void 0,r===void 0?null:r)}function zf(e,t,n,r){var o=Yr();r=r===void 0?null:r;var i=void 0;if(Ae!==null){var s=Ae.memoizedState;if(i=s.destroy,r!==null&&Bf(r,s.deps)){Xl(t,n,i,r);return}}he.flags|=e,o.memoizedState=Xl(1|t,n,i,r)}function Sv(e,t){return $p(516,4,e,t)}function Yl(e,t){return zf(516,4,e,t)}function VS(e,t){return zf(4,2,e,t)}function KS(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 WS(e,t,n){return n=n!=null?n.concat([e]):null,zf(4,2,KS.bind(null,t,e),n)}function Uf(){}function $S(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yT(e,t){var n=Xo();$r(98>n?98:n,function(){e(!0)}),$r(97<n?97:n,function(){var r=_t.transition;_t.transition=1;try{e(!1),t()}finally{_t.transition=r}})}function Vf(e,t,n){var r=ot(),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===he||s!==null&&s===he)Es=Gl=!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,St(l,a))return}catch{}finally{}nr(e,o,r)}}var Zl={readContext:wt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useOpaqueIdentifier:Qe,unstable_isNewReconciler:!1},vT={readContext:wt,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$p(4,2,KS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $p(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();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=Vf.bind(null,he,e),[r.memoizedState,e]},useRef:vv,useState:as,useDebugValue:Uf,useDeferredValue:function(e){var t=as(e),n=t[0],r=t[1];return Sv(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=as(!1),t=e[0];return e=yT.bind(null,e[1]),vv(e),[e,t]},useMutableSource:function(e,t,n){var r=Vr();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=dT(function(){throw e||(e=!0,n("r:"+(dp++).toString(36))),Error(T(355))}),n=as(t)[1];return!(he.mode&2)&&(he.flags|=516,Xl(5,function(){n("r:"+(dp++).toString(36))},void 0,null)),t}return t="r:"+(dp++).toString(36),as(t),t},unstable_isNewReconciler:!1},ST={readContext:wt,useCallback:$S,useContext:wt,useEffect:Yl,useImperativeHandle:WS,useLayoutEffect:VS,useMemo:qS,useReducer:is,useRef:Ql,useState:function(){return is(Zt)},useDebugValue:Uf,useDeferredValue:function(e){var t=is(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=is(Zt)[0];return[Ql().current,e]},useMutableSource:US,useOpaqueIdentifier:function(){return is(Zt)[0]},unstable_isNewReconciler:!1},xT={readContext:wt,useCallback:$S,useContext:wt,useEffect:Yl,useImperativeHandle:WS,useLayoutEffect:VS,useMemo:qS,useReducer:ss,useRef:Ql,useState:function(){return ss(Zt)},useDebugValue:Uf,useDeferredValue:function(e){var t=ss(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=ss(Zt)[0];return[Ql().current,e]},useMutableSource:US,useOpaqueIdentifier:function(){return ss(Zt)[0]},unstable_isNewReconciler:!1},_T=Xr.ReactCurrentOwner,Mt=!1;function Ye(e,t,n,r){t.child=e===null?BS(t,null,n,r):$l(t,e.child,n,r)}function xv(e,t,n,r,o){n=n.render;var i=t.ref;return Uo(t,o),r=Hf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Ye(e,t,r,o),t.child)}function _v(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Xf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,GS(e,t,s,r,o,i)):(e=Al(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)?gn(e,t,i):(t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function GS(e,t,n,r,o,i){if(e!==null&&Ms(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,gn(e,t,i);return qp(e,t,n,r,i)}function gp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},wl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},wl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},wl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,wl(t,r);return Ye(e,t,o,n),t.child}function XS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function qp(e,t,n,r,o){var i=Je(n)?Wr:Me.current;return i=Go(t,i),Uo(t,o),n=Hf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Ye(e,t,n,o),t.child)}function wv(e,t,n,r,o){if(Je(n)){var i=!0;kl(t)}else i=!1;if(Uo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),FS(t,n,r),Vp(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=wt(u):(u=Je(n)?Wr:Me.current,u=Go(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&fv(t,s,r,u),Wn=!1;var d=t.memoizedState;s.state=d,js(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Ze.current||Wn?(typeof c=="function"&&(Wl(t,n,c,r),l=t.memoizedState),(a=Wn||pv(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,MS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=Je(n)?Wr:Me.current,l=Go(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&fv(t,s,r,l),Wn=!1,d=t.memoizedState,s.state=d,js(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||Ze.current||Wn?(typeof h=="function"&&(Wl(t,n,h,r),v=t.memoizedState),(u=Wn||pv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Gp(e,t,n,r,i,o)}function Gp(e,t,n,r,o,i){XS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&av(t,n,!1),gn(e,t,i);r=t.stateNode,_T.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=$l(t,e.child,null,i),t.child=$l(t,null,a,i)):Ye(e,t,a,i),t.memoizedState=r.state,o&&av(t,n,!0),t.child}function bv(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Kp(e,t.containerInfo)}var _l={dehydrated:null,retryLane:0};function Ev(e,t,n){var r=t.pendingProps,o=de.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),pe(de,o&1),e===null?(r.fallback!==void 0&&Wp(t),e=r.children,o=r.fallback,i?(e=Cv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,e):typeof r.unstable_expectedLoadTime=="number"?(e=Cv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,t.lanes=33554432,e):(n=Qf({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=kv(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=_l,r):(n=Tv(e,t,r.children,n),t.memoizedState=null,n):i?(r=kv(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=_l,r):(n=Tv(e,t,r.children,n),t.memoizedState=null,n)}function Cv(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=Qf(t,o,0,null),n=$o(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Tv(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 kv(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=$o(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Pv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),NS(e.return,t)}function hp(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function Rv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ye(e,t,r.children,n),r=de.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&&Pv(e,n);else if(e.tag===19)Pv(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(pe(de,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&&ql(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hp(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ql(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hp(t,!0,n,null,i,t.lastEffect);break;case"together":hp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(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=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 QS,Xp,YS,ZS;QS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xp=function(){};YS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ur(en.current);var i=null;switch(n){case"input":o=wp(e,o),r=wp(e,r),i=[];break;case"option":o=Cp(e,o),r=Cp(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Tp(e,o),r=Tp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}Rp(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===hf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};ZS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ls(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 wT(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 Je(t.type)&&zl(),null;case 3:return Qo(),se(Ze),se(Me),jf(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Xp(t),null;case 5:Ff(t);var o=Ur(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)YS(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=Ur(en.current),xl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Gn]=t,r[Hl]=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<fs.length;e++)ie(fs[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":Ly(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Oy(r,i),ie("invalid",r)}Rp(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":dl(r),Ay(r,i,!0);break;case"textarea":dl(r),Ny(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Bl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===kp.html&&(e=Wv(n)),e===kp.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[Hl]=r,QS(e,t,!1,!1),t.stateNode=e,s=Ip(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<fs.length;o++)ie(fs[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":Ly(e,r),o=wp(e,r),ie("invalid",e);break;case"option":o=Cp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Oy(e,r),o=Tp(e,r),ie("invalid",e);break;default:o=r}Rp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Gv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&$v(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&&cf(e,i,l,s))}switch(n){case"input":dl(e),Ay(e,r,!1);break;case"textarea":dl(e),Ny(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?jo(e,!!r.multiple,i,!1):r.defaultValue!=null&&jo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bl)}CS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ZS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Ur(Hs.current),Ur(en.current),xl(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(de),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&xl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||de.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Ke===null||!(Ws&134217727)&&!(ei&134217727)||Ko(Ke,Ne))),(r||n)&&(t.flags|=4),null);case 4:return Qo(),Xp(t),e===null&&wS(t.stateNode.containerInfo),null;case 10:return Mf(t),null;case 17:return Je(t.type)&&zl(),null;case 19:if(se(de),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=ql(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 pe(de,de.current&1|2),t.child}e=e.sibling}r.tail!==null&&Oe()>tf&&(t.flags|=64,i=!0,ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=ql(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&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Oe()-r.renderingStartTime>tf&&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=Oe(),n.sibling=null,t=de.current,pe(de,i?t&1|2:t&1),n):null;case 23:case 24:return Gf(),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:Je(e.type)&&zl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Qo(),se(Ze),se(Me),jf(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Ff(e),null;case 13:return se(de),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(de),null;case 4:return Qo(),null;case 10:return Mf(e),null;case 23:case 24:return Gf(),null;default:return null}}function Kf(e,t){try{var n="",r=t;do n+=rC(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 Xp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ET=typeof WeakMap=="function"?WeakMap:Map;function JS(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){eu||(eu=!0,tf=r),Xp(e,t)},n}function e0(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 Xp(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),Xp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var CT=typeof WeakSet=="function"?WeakSet:Set;function Iv(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 TT(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:Nt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&If(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function kT(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&&(u0(n,e),MT(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:Nt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&dv(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}dv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&CS(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&&oS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Lv(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=qv("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 Av(e,t){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Lf,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)u0(t,n);else{r=t;try{o()}catch(i){rr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Iv(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:Iv(t);break;case 4:t0(e,t)}}function Ov(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 Nv(e){return e.tag===5||e.tag===3||e.tag===4}function Mv(e){e:{for(var t=e.return;t!==null;){if(Nv(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||Nv(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Qp(e,n,t):Yp(e,n,t)}function Qp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bl));else if(r!==4&&(e=e.child,e!==null))for(Qp(e,t,n),e=e.sibling;e!==null;)Qp(e,t,n),e=e.sibling}function Yp(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(Yp(e,t,n),e=e.sibling;e!==null;)Yp(e,t,n),e=e.sibling}function t0(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(Av(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(Av(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 hp(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[Hl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Vv(n,r),Rp(e,o),t=Rp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Gv(n,a):s==="dangerouslySetInnerHTML"?$v(n,a):s==="children"?Rs(n,a):uf(n,s,a,t)}switch(e){case"input":wp(n,r);break;case"textarea":Kv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?jo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?jo(n,!!r.multiple,r.defaultValue,!0):jo(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,oS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&($f=Oe(),Lv(t.child,!0)),Dv(t);return;case 19:Dv(t);return;case 17:return;case 23:case 24:Lv(t,t.memoizedState!==null);return}throw Error(T(163))}function Dv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CT),t.forEach(function(r){var o=jT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function PT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var RT=Math.ceil,Jl=Xr.ReactCurrentDispatcher,Kf=Xr.ReactCurrentOwner,F=0,Ke=null,Se=null,Ne=0,qr=0,Zp=ur(0),Te=0,fu=null,Jo=0,Ws=0,ei=0,Wf=0,Jp=null,$f=0,ef=1/0;function ti(){ef=Oe()+500}var A=null,eu=!1,tf=null,Jt=null,ar=!1,Cs=null,ms=90,nf=[],rf=[],hn=null,Ts=0,of=null,Rl=-1,fn=0,Il=0,ks=null,Ll=!1;function ot(){return F&48?Oe():Rl!==-1?Rl:Rl=Oe()}function tr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Xo()===99?1:2;if(fn===0&&(fn=Jo),hT.transition!==0){Il!==0&&(Il=Jp!==null?Jp.pendingLanes:0),e=fn;var t=4186112&~Il;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Xo(),F&4&&e===98?e=Fl(12,fn):(e=SC(e),e=Fl(e,fn)),e}function nr(e,t,n){if(50<Ts)throw Ts=0,of=null,Error(T(185));if(e=mu(e,t),e===null)return null;su(e,t,n),e===Ke&&(ei|=t,Te===4&&Ko(e,Ne));var r=Xo();t===1?F&8&&!(F&48)?sf(e):(bt(e,n),F===0&&(ti(),nn())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),bt(e,n)),Jp=e}function mu(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 bt(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,Ro(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===Ke?Ne:0),t=ne,r===0)n!==null&&(n!==dp&&Hp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==dp&&Hp(n)}t===15?(n=sf.bind(null,e),pn===null?(pn=[n],Pl=Af(du,OS)):pn.push(n),n=dp):t===14?n=Fs(99,sf.bind(null,e)):(n=xC(t),n=Fs(n,n0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function n0(e){if(Rl=-1,Il=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(cr()&&e.callbackNode!==t)return null;var n=Os(e,e===Ke?Ne:0);if(n===0)return null;var r=n,o=F;F|=16;var i=s0();(Ke!==e||Ne!==r)&&(ti(),Wo(e,r));do try{AT();break}catch(a){i0(e,a)}while(1);if(Of(),Jl.current=i,F=o,Se!==null?r=0:(Ke=null,Ne=0,r=Te),Jo&ei)Wo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,If(e.containerInfo)),n=dS(e),n!==0&&(r=gs(e,n))),r===1)throw t=fu,Wo(e,0),Ko(e,n),bt(e,Oe()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:jr(e);break;case 3:if(Ko(e,n),(n&62914560)===n&&(r=$f+500-Oe(),10<r)){if(Os(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ot(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rv(jr.bind(null,e),r);break}jr(e);break;case 4:if(Ko(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=Oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*RT(n/1960))-n,10<n){e.timeoutHandle=rv(jr.bind(null,e),n);break}jr(e);break;case 5:jr(e);break;default:throw Error(T(329))}}return bt(e,Oe()),e.callbackNode===t?n0.bind(null,e):null}function Ko(e,t){for(t&=~Wf,t&=~ei,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 sf(e){if(F&48)throw Error(T(327));if(cr(),e===Ke&&e.expiredLanes&Ne){var t=Ne,n=gs(e,t);Jo&ei&&(t=Os(e,t),n=gs(e,t))}else t=Os(e,0),n=gs(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,If(e.containerInfo)),t=dS(e),t!==0&&(n=gs(e,t))),n===1)throw n=fu,Wo(e,0),Ko(e,t),bt(e,Oe()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,jr(e),bt(e,Oe()),null}function IT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,bt(t,Oe())})}nn()}function r0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}}function o0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}}function wl(e,t){pe(Zp,qr),qr|=t,Jo|=t}function qf(){qr=Zp.current,se(Zp)}function Wo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cT(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&zl();break;case 3:Qo(),se(Ze),se(Me),Ff();break;case 5:Df(r);break;case 4:Qo();break;case 13:se(de);break;case 19:se(de);break;case 10:Nf(r);break;case 23:case 24:qf()}n=n.return}Ke=e,Se=lr(e.current,null),Ne=qr=Jo=t,Te=0,fu=null,Wf=ei=Ws=0}function i0(e,t){do{var n=Se;try{if(Of(),bs.current=Zl,Gl){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Gl=!1}if(zs=0,Ce=Ae=he=null,Es=!1,Kf.current=null,n===null||n.return===null){Te=1,fu=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ne,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(de.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var v=d.memoizedState;if(v!==null)h=v.dehydrated!==null;else{var y=d.memoizedProps;h=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(h){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 f=Jn(-1,1);f.tag=2,er(a,f)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new ET,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var _=FT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Fo(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 Qp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ET=typeof WeakMap=="function"?WeakMap:Map;function JS(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){eu||(eu=!0,nf=r),Qp(e,t)},n}function e0(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 Qp(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),Qp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var CT=typeof WeakSet=="function"?WeakSet:Set;function Iv(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 TT(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:Nt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Lf(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function kT(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&&(u0(n,e),MT(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:Nt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&dv(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}dv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&CS(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&&oS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Lv(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=qv("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 Av(e,t){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Af,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)u0(t,n);else{r=t;try{o()}catch(i){rr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Iv(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:Iv(t);break;case 4:t0(e,t)}}function Ov(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 Nv(e){return e.tag===5||e.tag===3||e.tag===4}function Mv(e){e:{for(var t=e.return;t!==null;){if(Nv(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||Nv(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?Yp(e,n,t):Zp(e,n,t)}function Yp(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=Bl));else if(r!==4&&(e=e.child,e!==null))for(Yp(e,t,n),e=e.sibling;e!==null;)Yp(e,t,n),e=e.sibling}function Zp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zp(e,t,n),e=e.sibling;e!==null;)Zp(e,t,n),e=e.sibling}function t0(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(Av(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(Av(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function yp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Hl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Vv(n,r),Ip(e,o),t=Ip(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Gv(n,a):s==="dangerouslySetInnerHTML"?$v(n,a):s==="children"?Rs(n,a):cf(n,s,a,t)}switch(e){case"input":bp(n,r);break;case"textarea":Kv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?jo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?jo(n,!!r.multiple,r.defaultValue,!0):jo(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,oS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(qf=Oe(),Lv(t.child,!0)),Dv(t);return;case 19:Dv(t);return;case 17:return;case 23:case 24:Lv(t,t.memoizedState!==null);return}throw Error(T(163))}function Dv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CT),t.forEach(function(r){var o=jT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function PT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var RT=Math.ceil,Jl=Xr.ReactCurrentDispatcher,Wf=Xr.ReactCurrentOwner,F=0,Ke=null,Se=null,Ne=0,qr=0,Jp=ur(0),Te=0,fu=null,Jo=0,Ws=0,ei=0,$f=0,ef=null,qf=0,tf=1/0;function ti(){tf=Oe()+500}var A=null,eu=!1,nf=null,Jt=null,ar=!1,Cs=null,ms=90,rf=[],of=[],hn=null,Ts=0,sf=null,Rl=-1,fn=0,Il=0,ks=null,Ll=!1;function ot(){return F&48?Oe():Rl!==-1?Rl:Rl=Oe()}function tr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Xo()===99?1:2;if(fn===0&&(fn=Jo),hT.transition!==0){Il!==0&&(Il=ef!==null?ef.pendingLanes:0),e=fn;var t=4186112&~Il;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Xo(),F&4&&e===98?e=Fl(12,fn):(e=SC(e),e=Fl(e,fn)),e}function nr(e,t,n){if(50<Ts)throw Ts=0,sf=null,Error(T(185));if(e=mu(e,t),e===null)return null;su(e,t,n),e===Ke&&(ei|=t,Te===4&&Ko(e,Ne));var r=Xo();t===1?F&8&&!(F&48)?af(e):(bt(e,n),F===0&&(ti(),nn())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),bt(e,n)),ef=e}function mu(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 bt(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,Ro(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===Ke?Ne:0),t=ne,r===0)n!==null&&(n!==pp&&zp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==pp&&zp(n)}t===15?(n=af.bind(null,e),pn===null?(pn=[n],Pl=Of(du,OS)):pn.push(n),n=pp):t===14?n=Fs(99,af.bind(null,e)):(n=xC(t),n=Fs(n,n0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function n0(e){if(Rl=-1,Il=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(cr()&&e.callbackNode!==t)return null;var n=Os(e,e===Ke?Ne:0);if(n===0)return null;var r=n,o=F;F|=16;var i=s0();(Ke!==e||Ne!==r)&&(ti(),Wo(e,r));do try{AT();break}catch(a){i0(e,a)}while(1);if(Nf(),Jl.current=i,F=o,Se!==null?r=0:(Ke=null,Ne=0,r=Te),Jo&ei)Wo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Lf(e.containerInfo)),n=dS(e),n!==0&&(r=gs(e,n))),r===1)throw t=fu,Wo(e,0),Ko(e,n),bt(e,Oe()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:jr(e);break;case 3:if(Ko(e,n),(n&62914560)===n&&(r=qf+500-Oe(),10<r)){if(Os(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ot(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rv(jr.bind(null,e),r);break}jr(e);break;case 4:if(Ko(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=Oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*RT(n/1960))-n,10<n){e.timeoutHandle=rv(jr.bind(null,e),n);break}jr(e);break;case 5:jr(e);break;default:throw Error(T(329))}}return bt(e,Oe()),e.callbackNode===t?n0.bind(null,e):null}function Ko(e,t){for(t&=~$f,t&=~ei,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 af(e){if(F&48)throw Error(T(327));if(cr(),e===Ke&&e.expiredLanes&Ne){var t=Ne,n=gs(e,t);Jo&ei&&(t=Os(e,t),n=gs(e,t))}else t=Os(e,0),n=gs(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Lf(e.containerInfo)),t=dS(e),t!==0&&(n=gs(e,t))),n===1)throw n=fu,Wo(e,0),Ko(e,t),bt(e,Oe()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,jr(e),bt(e,Oe()),null}function IT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,bt(t,Oe())})}nn()}function r0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}}function o0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}}function wl(e,t){pe(Jp,qr),qr|=t,Jo|=t}function Gf(){qr=Jp.current,se(Jp)}function Wo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cT(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&zl();break;case 3:Qo(),se(Ze),se(Me),jf();break;case 5:Ff(r);break;case 4:Qo();break;case 13:se(de);break;case 19:se(de);break;case 10:Mf(r);break;case 23:case 24:Gf()}n=n.return}Ke=e,Se=lr(e.current,null),Ne=qr=Jo=t,Te=0,fu=null,$f=ei=Ws=0}function i0(e,t){do{var n=Se;try{if(Nf(),bs.current=Zl,Gl){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Gl=!1}if(zs=0,Ce=Ae=he=null,Es=!1,Wf.current=null,n===null||n.return===null){Te=1,fu=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ne,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(de.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var v=d.memoizedState;if(v!==null)h=v.dehydrated!==null;else{var y=d.memoizedProps;h=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(h){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 f=Jn(-1,1);f.tag=2,er(a,f)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new ET,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var _=FT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Fo(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=Vf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var b=JS(d,i,t);cv(d,b);break e;case 1:i=l;var E=d.type,C=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Jt===null||!Jt.has(C)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=e0(d,i,t);cv(d,R);break e}}d=d.return}while(d!==null)}l0(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function s0(){var e=Jl.current;return Jl.current=Zl,e===null?Zl:e}function gs(e,t){var n=F;F|=16;var r=s0();Ke===e&&Ne===t||Wo(e,t);do try{LT();break}catch(o){i0(e,o)}while(1);if(Of(),F=n,Jl.current=r,Se!==null)throw Error(T(261));return Ke=null,Ne=0,Te}function LT(){for(;Se!==null;)a0(Se)}function AT(){for(;Se!==null&&!fT();)a0(Se)}function a0(e){var t=c0(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?l0(e):Se=t,Kf.current=null}function l0(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,Se=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wT(n,t,qr),n!==null){Se=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||qr&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){Se=t;return}Se=t=e}while(t!==null);Te===0&&(Te=5)}function jr(e){var t=Xo();return $r(99,OT.bind(null,e,t)),null}function OT(e,t){do cr();while(Cs!==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(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Ke&&(Se=Ke=null,Ne=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,Kf.current=null,lp=El,s=Yy(),Mp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,h=0,v=0,y=s,m=null;t:for(;;){for(var g;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(g=y.firstChild)!==null;)m=y,y=g;for(;;){if(y===s)break t;if(m===a&&++h===i&&(p=c),m===l&&++v===u&&(d=c),(g=y.nextSibling)!==null)break;y=m,m=y.parentNode}y=g}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;up={focusedElem:s,selectionRange:a},El=!1,ks=null,Ll=!1,A=r;do try{NT()}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);ks=null,A=r;do try{for(s=e;A!==null;){var f=A.flags;if(f&16&&Rs(A.stateNode,""),f&128){var S=A.alternate;if(S!==null){var _=S.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Mv(A),A.flags&=-3;break;case 6:Mv(A),A.flags&=-3,hp(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,hp(A.alternate,A);break;case 4:hp(A.alternate,A);break;case 8:a=A,t0(s,a);var b=a.alternate;Ov(a),b!==null&&Ov(b)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);if(_=up,S=Yy(),f=_.focusedElem,s=_.selectionRange,S!==f&&f&&f.ownerDocument&&SS(f.ownerDocument.documentElement,f)){for(s!==null&&Mp(f)&&(S=s.start,_=s.end,_===void 0&&(_=S),"selectionStart"in f?(f.selectionStart=S,f.selectionEnd=Math.min(_,f.value.length)):(_=(S=f.ownerDocument||document)&&S.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.textContent.length,b=Math.min(s.start,a),s=s.end===void 0?b:Math.min(s.end,a),!_.extend&&b>s&&(a=s,s=b,b=a),a=Qy(f,b),i=Qy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),_.removeAllRanges(),b>s?(_.addRange(S),_.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),_.addRange(S)))))),S=[],_=f;_=_.parentNode;)_.nodeType===1&&S.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<S.length;f++)_=S[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}El=!!lp,up=lp=null,e.current=n,A=r;do try{for(f=e;A!==null;){var E=A.flags;if(E&36&&kT(f,A.alternate,A),E&128){S=void 0;var C=A.ref;if(C!==null){var R=A.stateNode;switch(A.tag){case 5:S=R;break;default:S=R}typeof C=="function"?C(S):C.current=S}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);A=null,gT(),F=o}else e.current=n;if(ar)ar=!1,Cs=e,ms=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===of?Ts++:(Ts=0,of=e):Ts=0,n=n.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(Lf,n,void 0,(n.current.flags&64)===64)}catch{}if(bt(e,Oe()),eu)throw eu=!1,e=tf,tf=null,e;return F&8||nn(),null}function NT(){for(;A!==null;){var e=A.alternate;Ll||ks===null||(A.flags&8?Fy(A,ks)&&(Ll=!0):A.tag===13&&PT(e,A)&&Fy(A,ks)&&(Ll=!0));var t=A.flags;t&256&&TT(e,A),!(t&512)||ar||(ar=!0,Fs(97,function(){return cr(),null})),A=A.nextEffect}}function cr(){if(ms!==90){var e=97<ms?97:ms;return ms=90,$r(e,DT)}return!1}function MT(e,t){nf.push(t,e),ar||(ar=!0,Fs(97,function(){return cr(),null}))}function u0(e,t){rf.push(t,e),ar||(ar=!0,Fs(97,function(){return cr(),null}))}function DT(){if(Cs===null)return!1;var e=Cs;if(Cs=null,F&48)throw Error(T(331));var t=F;F|=32;var n=rf;rf=[];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=nf,nf=[],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 Fv(e,t,n){t=Vf(n,t),t=JS(e,t,1),er(e,t),t=ot(),e=mu(e,1),e!==null&&(su(e,1,t),bt(e,t))}function rr(e,t){if(e.tag===3)Fv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Fv(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=Vf(t,e);var o=e0(n,e,1);if(er(n,o),o=ot(),n=mu(n,1),n!==null)su(n,1,o),bt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function FT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Ke===e&&(Ne&n)===n&&(Te===4||Te===3&&(Ne&62914560)===Ne&&500>Oe()-$f?Wo(e,0):Wf|=n),bt(e,t)}function jT(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=Jo),t=Io(62914560&~fn),t===0&&(t=4194304)):t=Xo()===99?1:2:t=1),n=ot(),e=mu(e,t),e!==null&&(su(e,t,n),bt(e,n))}var c0;c0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:bv(t),fp();break;case 5:mv(t);break;case 1:Je(t.type)&&kl(t);break;case 4:Vp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;pe(Ul,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Ev(e,t,n):(pe(de,de.current&1),t=gn(e,t,n),t!==null?t.sibling:null);pe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Rv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(de,de.current),r)break;return null;case 23:case 24:return t.lanes=0,mp(e,t,n)}return gn(e,t,n)}else Mt=!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=Go(t,Me.current),Uo(t,n),o=Bf(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,Je(r)){var i=!0;kl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Mf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Wl(t,r,s,e),o.updater=pu,t.stateNode=o,o._reactInternals=t,Up(t,r,e,n),t=qp(null,t,r,!0,i,n)}else t.tag=0,Ye(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=HT(o),e=Nt(o,e),i){case 0:t=$p(null,t,o,e,n);break e;case 1:t=wv(null,t,o,e,n);break e;case 11:t=xv(null,t,o,e,n);break e;case 14:t=_v(null,t,o,Nt(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:Nt(r,o),$p(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),wv(e,t,r,o,n);case 3:if(bv(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,MS(e,t),js(t,r,null,n),r=t.memoizedState.element,r===o)fp(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Xn=zo(t.stateNode.containerInfo.firstChild),mn=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],Vo.push(i);for(n=BS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Ye(e,t,r,n),fp();t=t.child}return t;case 5:return mv(t),e===null&&Kp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,jp(r,o)?s=null:i!==null&&jp(r,i)&&(t.flags|=16),XS(e,t),Ye(e,t,s,n),t.child;case 6:return e===null&&Kp(t),null;case 13:return Ev(e,t,n);case 4:return Vp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$l(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),xv(e,t,r,o,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(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(pe(Ul,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=St(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!Ze.current){t=gn(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),NS(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}Ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Uo(t,n),o=wt(o,i.unstable_observedBits),r=r(o),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),_v(e,t,o,i,r,n);case 15:return GS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Je(r)?(e=!0,kl(t)):e=!1,Uo(t,n),FS(t,r,o),Up(t,r,o,n),qp(null,t,r,!0,e,n);case 19:return Rv(e,t,n);case 23:return mp(e,t,n);case 24:return mp(e,t,n)}throw Error(T(156,t.tag))};function BT(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 xt(e,t,n,r){return new BT(e,t,n,r)}function Gf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HT(e){if(typeof e=="function")return Gf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ru)return 11;if(e===ou)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=xt(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 Al(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Gf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case $n:return $o(n.children,o,i,t);case Hv:s=8,o|=16;break;case cf:s=8,o|=1;break;case hs:return e=xt(12,n,t,o|8),e.elementType=hs,e.type=hs,e.lanes=i,e;case ys:return e=xt(13,n,t,o),e.type=ys,e.elementType=ys,e.lanes=i,e;case Ol:return e=xt(19,n,t,o),e.elementType=Ol,e.lanes=i,e;case hf:return Xf(n,o,i,t);case xp:return e=xt(24,n,t,o),e.elementType=xp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case df:s=10;break e;case pf:s=9;break e;case ru:s=11;break e;case ou:s=14;break e;case ff:s=16,r=null;break e;case mf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=xt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function $o(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Xf(e,t,n,r){return e=xt(23,e,r,t),e.elementType=hf,e.lanes=n,e}function yp(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function vp(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zT(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=np(0),this.expirationTimes=np(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=np(0),this.mutableSourceEagerHydrationData=null}function UT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Br,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tu(e,t,n,r){var o=t.current,i=ot(),s=tr(o);e:if(n){n=n._reactInternals;t:{if(Qr(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(Je(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(Je(l)){n=kS(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 Sp(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 jv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qf(e,t){jv(e,t),(e=e.alternate)&&jv(e,t)}function VT(){return null}function Yf(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new zT(e,t,n!=null&&n.hydrate===!0),t=xt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Mf(t),e[Zo]=n.current,wS(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}Yf.prototype.render=function(e){tu(e,this._internalRoot,null,null)};Yf.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;tu(null,e,null,function(){t[Zo]=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 KT(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 Yf(e,0,t?{hydrate:!0}:void 0)}function gu(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=Sp(s);a.call(u)}}tu(t,s,e,o)}else{if(i=n._reactRootContainer=KT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Sp(s);l.call(u)}}o0(function(){tu(t,s,e,o)})}return Sp(s)}tS=function(e){if(e.tag===13){var t=ot();nr(e,4,t),Qf(e,4)}};_f=function(e){if(e.tag===13){var t=ot();nr(e,67108864,t),Qf(e,67108864)}};nS=function(e){if(e.tag===13){var t=ot(),n=tr(e);nr(e,n,t),Qf(e,n)}};rS=function(e,t){return t()};Ip=function(e,t,n){switch(t){case"input":if(wp(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=cu(r);if(!o)throw Error(T(90));Uv(r),wp(r,o)}}}break;case"textarea":Kv(e,n);break;case"select":t=n.value,t!=null&&jo(e,!!n.multiple,t,!1)}};vf=r0;Yv=function(e,t,n,r,o){var i=F;F|=4;try{return $r(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(ti(),nn())}};Sf=function(){!(F&49)&&(IT(),cr())};Zv=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}};function d0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$s(t))throw Error(T(200));return UT(e,t,null,n)}var WT={Events:[Vs,No,cu,Xv,Qv,cr,{current:!1}]},us={findFiberByHostInstance:zr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},$T={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:Xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=eS(e),e===null?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||VT,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{Lf=cs.inject($T),Kr=cs}catch{}var cs;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WT;Et.createPortal=d0;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=eS(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 $r(99,e.bind(null,t))}finally{F=n,nn()}};Et.hydrate=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!$s(e))throw Error(T(40));return e._reactRootContainer?(o0(function(){gu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zo]=null})}),!0):!1};Et.unstable_batchedUpdates=r0;Et.unstable_createPortal=function(e,t){return d0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.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 gu(e,t,n,!1,r)};Et.version="17.0.2"});var hu=me((LO,m0)=>{"use strict";function f0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f0)}catch(e){console.error(e)}}f0(),m0.exports=p0()});var U0=me(z0=>{"use strict";var ai=O();function Ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lk=typeof Object.is=="function"?Object.is:Ik,Ak=ai.useState,Ok=ai.useEffect,Nk=ai.useLayoutEffect,Mk=ai.useDebugValue;function Dk(e,t){var n=t(),r=Ak({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Nk(function(){o.value=n,o.getSnapshot=t,Em(o)&&i({inst:o})},[e,n,t]),Ok(function(){return Em(o)&&i({inst:o}),e(function(){Em(o)&&i({inst:o})})},[e]),Mk(n),n}function Em(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lk(e,n)}catch{return!0}}function Fk(e,t){return t()}var jk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fk:Dk;z0.useSyncExternalStore=ai.useSyncExternalStore!==void 0?ai.useSyncExternalStore:jk});var Cm=me((vN,V0)=>{"use strict";V0.exports=U0()});var W0=me(K0=>{"use strict";var Eu=O(),Bk=Cm();function Hk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zk=typeof Object.is=="function"?Object.is:Hk,Uk=Bk.useSyncExternalStore,Vk=Eu.useRef,Kk=Eu.useEffect,Wk=Eu.useMemo,$k=Eu.useDebugValue;K0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Vk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Wk(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var v=s.value;if(o(v,h))return p=v}return p=h}if(v=p,zk(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,p=y)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=Uk(e,i[0],i[1]);return Kk(function(){s.hasValue=!0,s.value=a},[a]),$k(a),a}});var q0=me((xN,$0)=>{"use strict";$0.exports=W0()});var ox=me(Q=>{"use strict";var we=typeof Symbol=="function"&&Symbol.for,km=we?Symbol.for("react.element"):60103,Pm=we?Symbol.for("react.portal"):60106,Pu=we?Symbol.for("react.fragment"):60107,Ru=we?Symbol.for("react.strict_mode"):60108,Iu=we?Symbol.for("react.profiler"):60114,Lu=we?Symbol.for("react.provider"):60109,Au=we?Symbol.for("react.context"):60110,Rm=we?Symbol.for("react.async_mode"):60111,Ou=we?Symbol.for("react.concurrent_mode"):60111,Nu=we?Symbol.for("react.forward_ref"):60112,Mu=we?Symbol.for("react.suspense"):60113,Qk=we?Symbol.for("react.suspense_list"):60120,Du=we?Symbol.for("react.memo"):60115,Fu=we?Symbol.for("react.lazy"):60116,Yk=we?Symbol.for("react.block"):60121,Zk=we?Symbol.for("react.fundamental"):60117,Jk=we?Symbol.for("react.responder"):60118,eP=we?Symbol.for("react.scope"):60119;function at(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case km:switch(e=e.type,e){case Rm:case Ou:case Pu:case Iu:case Ru:case Mu:return e;default:switch(e=e&&e.$$typeof,e){case Au:case Nu:case Fu:case Du:case Lu:return e;default:return t}}case Pm:return t}}}function rx(e){return at(e)===Ou}Q.AsyncMode=Rm;Q.ConcurrentMode=Ou;Q.ContextConsumer=Au;Q.ContextProvider=Lu;Q.Element=km;Q.ForwardRef=Nu;Q.Fragment=Pu;Q.Lazy=Fu;Q.Memo=Du;Q.Portal=Pm;Q.Profiler=Iu;Q.StrictMode=Ru;Q.Suspense=Mu;Q.isAsyncMode=function(e){return rx(e)||at(e)===Rm};Q.isConcurrentMode=rx;Q.isContextConsumer=function(e){return at(e)===Au};Q.isContextProvider=function(e){return at(e)===Lu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===km};Q.isForwardRef=function(e){return at(e)===Nu};Q.isFragment=function(e){return at(e)===Pu};Q.isLazy=function(e){return at(e)===Fu};Q.isMemo=function(e){return at(e)===Du};Q.isPortal=function(e){return at(e)===Pm};Q.isProfiler=function(e){return at(e)===Iu};Q.isStrictMode=function(e){return at(e)===Ru};Q.isSuspense=function(e){return at(e)===Mu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pu||e===Ou||e===Iu||e===Ru||e===Mu||e===Qk||typeof e=="object"&&e!==null&&(e.$$typeof===Fu||e.$$typeof===Du||e.$$typeof===Lu||e.$$typeof===Au||e.$$typeof===Nu||e.$$typeof===Zk||e.$$typeof===Jk||e.$$typeof===eP||e.$$typeof===Yk)};Q.typeOf=at});var sx=me((NN,ix)=>{"use strict";ix.exports=ox()});var fx=me((MN,px)=>{"use strict";var Im=sx(),tP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lm={};Lm[Im.ForwardRef]=rP;Lm[Im.Memo]=cx;function ax(e){return Im.isMemo(e)?cx:Lm[e.$$typeof]||tP}var oP=Object.defineProperty,iP=Object.getOwnPropertyNames,lx=Object.getOwnPropertySymbols,sP=Object.getOwnPropertyDescriptor,aP=Object.getPrototypeOf,ux=Object.prototype;function dx(e,t,n){if(typeof t!="string"){if(ux){var r=aP(t);r&&r!==ux&&dx(e,r,n)}var o=iP(t);lx&&(o=o.concat(lx(t)));for(var i=ax(e),s=ax(t),a=0;a<o.length;++a){var l=o[a];if(!nP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=sP(t,l);try{oP(e,l,u)}catch{}}}}return e}px.exports=dx});var gx=me(Y=>{"use strict";var Am=Symbol.for("react.element"),Om=Symbol.for("react.portal"),ju=Symbol.for("react.fragment"),Bu=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),zu=Symbol.for("react.provider"),Uu=Symbol.for("react.context"),lP=Symbol.for("react.server_context"),Vu=Symbol.for("react.forward_ref"),Ku=Symbol.for("react.suspense"),Wu=Symbol.for("react.suspense_list"),$u=Symbol.for("react.memo"),qu=Symbol.for("react.lazy"),uP=Symbol.for("react.offscreen"),mx;mx=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Am:switch(e=e.type,e){case ju:case Hu:case Bu:case Ku:case Wu:return e;default:switch(e=e&&e.$$typeof,e){case lP:case Uu:case Vu:case qu:case $u:case zu:return e;default:return t}}case Om:return t}}}Y.ContextConsumer=Uu;Y.ContextProvider=zu;Y.Element=Am;Y.ForwardRef=Vu;Y.Fragment=ju;Y.Lazy=qu;Y.Memo=$u;Y.Portal=Om;Y.Profiler=Hu;Y.StrictMode=Bu;Y.Suspense=Ku;Y.SuspenseList=Wu;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Tt(e)===Uu};Y.isContextProvider=function(e){return Tt(e)===zu};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Am};Y.isForwardRef=function(e){return Tt(e)===Vu};Y.isFragment=function(e){return Tt(e)===ju};Y.isLazy=function(e){return Tt(e)===qu};Y.isMemo=function(e){return Tt(e)===$u};Y.isPortal=function(e){return Tt(e)===Om};Y.isProfiler=function(e){return Tt(e)===Hu};Y.isStrictMode=function(e){return Tt(e)===Bu};Y.isSuspense=function(e){return Tt(e)===Ku};Y.isSuspenseList=function(e){return Tt(e)===Wu};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ju||e===Hu||e===Bu||e===Ku||e===Wu||e===uP||typeof e=="object"&&e!==null&&(e.$$typeof===qu||e.$$typeof===$u||e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Vu||e.$$typeof===mx||e.getModuleId!==void 0)};Y.typeOf=Tt});var yx=me((FN,hx)=>{"use strict";hx.exports=gx()});var m_=me((uD,f_)=>{"use strict";var eR=/["'&<>]/;f_.exports=tR;function tR(e){var t=""+e,n=eR.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 Vg=me((U6,Gw)=>{"use strict";var sI="Expected a function",$w=NaN,aI="[object Symbol]",lI=/^\s+|\s+$/g,uI=/^[-+]0x[0-9a-f]+$/i,cI=/^0b[01]+$/i,dI=/^0o[0-7]+$/i,pI=parseInt,fI=typeof global=="object"&&global&&global.Object===Object&&global,mI=typeof self=="object"&&self&&self.Object===Object&&self,gI=fI||mI||Function("return this")(),hI=Object.prototype,yI=hI.toString,vI=Math.max,SI=Math.min,zg=function(){return gI.Date.now()};function xI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(sI);t=qw(t)||0,Ug(n)&&(c=!!n.leading,p="maxWait"in n,i=p?vI(qw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var C=r,R=o;return r=o=void 0,u=E,s=e.apply(R,C),s}function v(E){return u=E,a=setTimeout(g,t),c?h(E):s}function y(E){var C=E-l,R=E-u,P=t-C;return p?SI(P,i-R):P}function m(E){var C=E-l,R=E-u;return l===void 0||C>=t||C<0||p&&R>=i}function g(){var E=zg();if(m(E))return f(E);a=setTimeout(g,y(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(zg())}function b(){var E=zg(),C=m(E);if(r=arguments,o=this,l=E,C){if(a===void 0)return v(l);if(p)return a=setTimeout(g,t),h(l)}return a===void 0&&(a=setTimeout(g,t)),s}return b.cancel=S,b.flush=_,b}function Ug(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _I(e){return!!e&&typeof e=="object"}function wI(e){return typeof e=="symbol"||_I(e)&&yI.call(e)==aI}function qw(e){if(typeof e=="number")return e;if(wI(e))return $w;if(Ug(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ug(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(lI,"");var n=cI.test(e);return n||dI.test(e)?pI(e.slice(2),n?2:8):uI.test(e)?$w:+e}Gw.exports=xI});var nA={};Ie(nA,{Card:()=>ge,ContentEditableInput:()=>go,DeepdeskAPI:()=>Hn,DeepdeskSDK:()=>za,HTTPClient:()=>Wt,InputMediator:()=>Tn,InputType:()=>Vn,KeyboardHint:()=>el,Label:()=>tl,Locale:()=>ea,Section:()=>Un,SectionList:()=>nl,Sources:()=>At,Suggestion:()=>oe,SuggestionList:()=>yt,TextAreaInput:()=>kn,ToggleButton:()=>Dr,attachFile:()=>hE,authenticateWithKey:()=>mE,createFullRange:()=>Bi,createOverlayContainer:()=>io,createRangeFromOffsets:()=>Ir,escapeHTML:()=>_i,fetchPlatformConfig:()=>gE,formatTextMarkup:()=>fE,getRangeOffsets:()=>Fa,getRangeText:()=>ja,insertCKEditor:()=>pE,isSupportedInputElement:()=>Pd,updateContentEditable:()=>dE,updateTextArea:()=>cE,useStyles:()=>k,waitForElementVisibilityChange:()=>Rd});var Ya=x($()),mt=x(O());var Xa=x(O()),Xh=x($()),$i=Xa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Xa.useContext)($i),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Xh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Qh={root:"_root_vr71j_1"};var Nr=x(w()),Qa=()=>(0,Nr.jsxs)("svg",{className:Qh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Nr.jsx)("defs",{children:(0,Nr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Nr.jsx)("title",{children:"Failed loading image"}),(0,Nr.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 Mr=x(w()),Za=(0,mt.createContext)(jd),FE=({title:e,src:t})=>{let n=(0,mt.useContext)(Za),[r,o]=(0,mt.useState)(!1);return(0,mt.useEffect)(()=>{o(!1)},[t]),(0,Mr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Mr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Mr.jsx)(Qa,{})})},jE=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,mt.useContext)(Za);return(0,Mr.jsx)("div",{className:(0,Ya.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},BE=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,mt.useContext)(Za);return mt.default.createElement(e,{className:(0,Ya.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ja=({children:e})=>{let t=k("Card",jd);return(0,Mr.jsx)("div",{className:(0,Ya.default)(t.root),children:(0,Mr.jsx)(Za.Provider,{value:t,children:e})})};Ja.Image=FE;Ja.Content=jE;Ja.Title=BE;var ge=Ja;var ny=x($());var ty={root:"_root_cq1yq_1"};var ry=x(w());var HE={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},zE=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ty);return(0,ry.jsx)("span",{"data-key":HE[t],className:(0,ny.default)(e,r.root),...n})},el=zE;var iy=x($());var oy={root:"_root_4a08n_1"};var sy=x(w()),UE=({className:e,children:t,...n})=>{let r=k("Label",oy);return(0,sy.jsx)("span",{...n,className:(0,iy.default)(e,r.root),children:t})},tl=UE;var ay={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var _o=x(w()),VE=({title:e,children:t,type:n,...r})=>{let o=k("Section",ay);return(0,_o.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,_o.jsx)("div",{className:o.subTitleContainer,children:(0,_o.jsx)("span",{className:o.subtitle,children:e})}),(0,_o.jsx)("div",{className:o.suggestions,children:t})]})},Un=VE;var uy=x($()),cy=x(O());var ly={root:"_root_19wxp_1"};var dy=x(w()),KE=cy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",ly);return(0,dy.jsx)("div",{ref:n,className:(0,uy.default)(r.root,e),children:t})}),nl=KE;var Gi=x($()),ht=x(O());var Bd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var gt=x(w()),wo=(0,ht.createContext)(Bd),WE=({fixed:e,children:t,...n})=>{let r=(0,ht.useContext)(wo);return(0,gt.jsx)("div",{...n,className:(0,Gi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},$E=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ht.useContext)(wo);return(0,gt.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,gt.jsx)("ul",{className:i.dropdownList,children:o})]})},qE=({index:e,label:t,onClick:n})=>{let r=(0,ht.useContext)(wo);return(0,gt.jsx)("li",{className:r.dropdownItem,children:(0,gt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},GE=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ht.useContext)(wo);return(0,gt.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})},Hd=({labels:e})=>{let t=(0,ht.useContext)(wo);return(0,gt.jsx)("div",{className:t.labels,children:e.map(n=>(0,gt.jsx)("span",{className:t.label,children:n},n))})},bo=ht.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Bd),l=(0,ht.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,gt.jsx)(o,{...i,ref:s,className:(0,Gi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,gt.jsx)(wo.Provider,{value:a,children:r})})});bo.Labels=Hd;bo.Actions=WE;bo.ActionButton=GE;bo.DropdownButton=$E;bo.DropdownItem=qE;var oe=bo;var fy=x($());var py={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var my=x(w()),XE=({withDivider:e,children:t})=>{let n=k("SuggestionList",py);return(0,my.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,fy.default)(n.root,{[n.isWithDivider]:e}),children:t})},yt=XE;var hy=x($());var gy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var rl=x(w()),QE=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",gy);return(0,rl.jsx)("button",{type:"button",className:(0,hy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,rl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,rl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Dr=QE;var yy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Eo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var vy=/x-deepdesk-(([a-z0-9\-_])+-version)/,At=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(At||{}),Vn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Vn||{});var $t=x(hu());var S1=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 vn(e){return!!e&&!!e[le]}function Dt(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)===ek}(e)||Array.isArray(e)||!!e[_0]||!!(!((t=e.constructor)===null||t===void 0)&&t[_0])||sm(e)||am(e))}function Zr(e,t,n){n===void 0&&(n=!1),oi(e)===0?(n?Object.keys:ri)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function oi(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:sm(e)?2:am(e)?3:0}function ni(e,t){return oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qT(e,t){return oi(e)===2?e.get(t):e[t]}function w0(e,t,n){var r=oi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function b0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function sm(e){return ZT&&e instanceof Map}function am(e){return JT&&e instanceof Set}function dr(e){return e.o||e.t}function lm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T0(e);delete t[le];for(var n=ri(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 um(e,t){return t===void 0&&(t=!1),cm(e)||vn(e)||!Dt(e)||(oi(e)>1&&(e.set=e.add=e.clear=e.delete=GT),Object.freeze(e),t&&Zr(e,function(n,r){return um(r,!0)},!0)),e}function GT(){Ct(2)}function cm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=im[e];return t||Ct(18,e),t}function XT(e,t){im[e]||(im[e]=t)}function nm(){return Gs}function Zf(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function yu(e){rm(e),e.p.forEach(QT),e.p=null}function rm(e){e===Gs&&(Gs=e.l)}function g0(e){return Gs={p:[],l:Gs,h:e,m:!0,_:0}}function QT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Jf(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&&(yu(t),Ct(4)),Dt(e)&&(e=vu(t,e),t.l||Su(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=vu(t,n,[]),yu(t),t.u&&t.v(t.u,t.s),e!==C0?e:void 0}function vu(e,t,n){if(cm(t))return t;var r=t[le];if(!r)return Zr(t,function(a,l){return h0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Su(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=lm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Zr(i,function(a,l){return h0(e,r,o,a,l,n,s)}),Su(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function h0(e,t,n,r,o,i,s){if(vn(o)){var a=vu(e,o,i&&t&&t.i!==3&&!ni(t.R,r)?i.concat(r):void 0);if(w0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!cm(o)){if(!e.h.D&&e._<1)return;vu(e,o),t&&t.A.l||Su(e,o)}}function Su(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&um(t,n)}function em(e,t){var n=e[le];return(n?dr(n):e)[t]}function y0(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 pr(e){e.P||(e.P=!0,e.l&&pr(e.l))}function tm(e){e.o||(e.o=lm(e.t))}function om(e,t,n){var r=sm(t)?rn("MapSet").F(t,n):am(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:nm(),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),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):rn("ES5").J(t,n);return(n?n.A:nm()).p.push(r),r}function YT(e){return vn(e)||Ct(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=oi(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=v0(n,i),o.I=!1}else r=v0(n,i);return Zr(r,function(s,a){o&&qT(o.t,s)===a||w0(r,s,t(a))}),i===3?new Set(r):r}(e)}function v0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return lm(e)}function E0(){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)&&pr(l);break;case 4:n(l)&&pr(l)}}}function n(s){for(var a=s.t,l=s.k,u=ri(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!ni(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!b0(h,d))return!0}}var y=!!a[le];return u.length!==ri(a).length+(y?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ct(3,JSON.stringify(dr(s)))}var i={};XT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(h,""+v,e(v,!0));return h}var y=T0(d);delete y[le];for(var m=ri(y),g=0;g<m.length;g++){var f=m[g];y[f]=e(f,p||!!y[f].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:nm(),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?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,v=p.R,y=p.i;if(y===4)Zr(h,function(_){_!==le&&(d[_]!==void 0||ni(d,_)?v[_]||u(h[_]):(v[_]=!0,pr(p)))}),Zr(d,function(_){h[_]!==void 0||ni(h,_)||(v[_]=!1,pr(p))});else if(y===5){if(r(p)&&(pr(p),v.length=!0),h.length<d.length)for(var m=h.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<h.length;g++)v[g]=!0;for(var f=Math.min(h.length,d.length),S=0;S<f;S++)h.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(h[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var S0,Gs,dm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ZT=typeof Map<"u",JT=typeof Set<"u",x0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",C0=dm?Symbol.for("immer-nothing"):((S0={})["immer-nothing"]=!0,S0),_0=dm?Symbol.for("immer-draftable"):"__$immer_draftable",le=dm?Symbol.for("immer-state"):"__$immer_state";var ek=""+Object.prototype.constructor,ri=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,T0=Object.getOwnPropertyDescriptors||function(e){var t={};return ri(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},im={},Xs={get:function(e,t){if(t===le)return e;var n=dr(e);if(!ni(n,t))return function(o,i,s){var a,l=y0(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||!Dt(r)?r:r===em(e.t,t)?(tm(e),e.o[t]=om(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=y0(dr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=em(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(b0(n,o)&&(n!==void 0||ni(e.t,t)))return!0;tm(e),pr(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 em(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,tm(e),pr(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)}},qs={};Zr(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 tk=function(){function e(n){var r=this;this.O=x0,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var m=this;y===void 0&&(y=a);for(var g=arguments.length,f=Array(g>1?g-1:0),S=1;S<g;S++)f[S-1]=arguments[S];return l.produce(y,function(_){var b;return(b=i).call.apply(b,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Dt(o)){var c=g0(r),p=om(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?yu(c):rm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Zf(c,s),Jf(y,c)},function(y){throw yu(c),y}):(Zf(c,s),Jf(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===C0&&(u=void 0),r.D&&um(u,!0),s){var h=[],v=[];rn("Patches").M(o,u,h,v),s(h,v)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Dt(n)||Ct(8),vn(n)&&(n=YT(n));var r=g0(this),o=om(this,n,void 0);return o[le].C=!0,rm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Zf(i,r),Jf(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!x0&&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 vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),st=new tk,nk=st.produce,AO=st.produceWithPatches.bind(st),OO=st.setAutoFreeze.bind(st),NO=st.setUseProxies.bind(st),MO=st.applyPatches.bind(st),DO=st.createDraft.bind(st),FO=st.finishDraft.bind(st),xu=nk;function fr(e){"@babel/helpers - typeof";return fr=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},fr(e)}function pm(e,t){if(fr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fm(e){var t=pm(e,"string");return fr(t)==="symbol"?t:String(t)}function mm(e,t,n){return t=fm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(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 _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(n),!0).forEach(function(r){mm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function De(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 P0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),gm=function(){return Math.random().toString(36).substring(7).split("").join(".")},wu={INIT:"@@redux/INIT"+gm(),REPLACE:"@@redux/REPLACE"+gm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gm()}};function rk(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 hm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(De(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(De(1));return n(hm)(e,t)}if(typeof e!="function")throw new Error(De(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(De(3));return i}function p(y){if(typeof y!="function")throw new Error(De(4));if(l)throw new Error(De(5));var m=!0;return u(),a.push(y),function(){if(m){if(l)throw new Error(De(6));m=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!rk(y))throw new Error(De(7));if(typeof y.type>"u")throw new Error(De(8));if(l)throw new Error(De(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var m=s=a,g=0;g<m.length;g++){var f=m[g];f()}return y}function h(y){if(typeof y!="function")throw new Error(De(10));o=y,d({type:wu.REPLACE})}function v(){var y,m=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(De(11));function S(){f.next&&f.next(c())}S();var _=m(S);return{unsubscribe:_}}},y[P0]=function(){return this},y}return d({type:wu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[P0]=v,r}function ok(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:wu.INIT});if(typeof r>"u")throw new Error(De(12));if(typeof n(void 0,{type:wu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(De(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{ok(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},v=0;v<i.length;v++){var y=i[v],m=n[y],g=u[y],f=m(g,c);if(typeof f>"u"){var S=c&&c.type;throw new Error(De(14))}h[y]=f,d=d||f!==g}return d=d||i.length!==Object.keys(u).length,d?h:u}}function ii(){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 R0(){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(De(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ii.apply(void 0,a)(o.dispatch),_u(_u({},o),{},{dispatch:i})}}}function I0(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 L0=I0();L0.withExtraArgument=I0;var ym=L0;var D0=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)}}(),ik=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}}},si=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},sk=Object.defineProperty,ak=Object.defineProperties,lk=Object.getOwnPropertyDescriptors,A0=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable,O0=function(e,t,n){return t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},mr=function(e,t){for(var n in t||(t={}))uk.call(t,n)&&O0(e,n,t[n]);if(A0)for(var r=0,o=A0(t);r<o.length;r++){var n=o[r];ck.call(t,n)&&O0(e,n,t[n])}return e},vm=function(e,t){return ak(e,lk(t))},dk=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 pk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ii:ii.apply(null,arguments)},tN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function fk(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 mk=function(e){D0(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,si([void 0],n[0].concat(this)))):new(t.bind.apply(t,si([void 0],n.concat(this))))},t}(Array),gk=function(e){D0(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,si([void 0],n[0].concat(this)))):new(t.bind.apply(t,si([void 0],n.concat(this))))},t}(Array);function _m(e){return Dt(e)?xu(e,function(){}):e}function hk(e){return typeof e=="boolean"}function yk(){return function(t){return vk(t)}}function vk(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 mk;if(n&&(hk(n)?a.push(ym):a.push(ym.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Sm=!0;function F0(e){var t=yk(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(fk(o))h=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 v=s;if(typeof v=="function"&&(v=v(t),!Sm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=R0.apply(void 0,v),m=ii;l&&(m=pk(mr({trace:!Sm},typeof l=="object"&&l)));var g=new gk(y),f=g;Array.isArray(d)?f=si([y],d):typeof d=="function"&&(f=d(g));var S=m.apply(void 0,f);return hm(h,c,S)}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 j0(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 Sk(e){return typeof e=="function"}function xk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?j0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Sk(e))l=function(){return _m(e())};else{var u=_m(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=si([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return h.filter(function(v){return!!v}).length===0&&(h=[a]),h.reduce(function(v,y){if(y)if(vn(v)){var m=v,g=y(m,d);return g===void 0?v:g}else{if(Dt(v))return xu(v,function(f){return y(f,d)});var g=y(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},p)}return c.getInitialState=l,c}function _k(e,t){return e+"/"+t}function j(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:_m(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=_k(t,c),h,v;"reducer"in p?(h=p.reducer,v=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?j0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],m=y===void 0?void 0:y,g=mr(mr({},d),s);return xk(n,function(f){for(var S in g)f.addCase(S,g[S]);for(var _=0,b=v;_<b.length;_++){var E=b[_];f.addMatcher(E.matcher,E.reducer)}m&&f.addDefaultCase(m)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var wk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wk[Math.random()*64|0];return t},Ek=["name","message","stack","code"],xm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),N0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Ck=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Ek;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},D=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:vm(mr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:vm(mr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||Ck)(c||"Rejected"),meta:vm(mr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,h){var v=r!=null&&r.idGenerator?r.idGenerator(c):bk(),y=new l,m,g=!1;function f(_){m=_,y.abort()}var S=function(){return dk(this,null,function(){var _,b,E,C,R,P,N;return ik(this,function(H){switch(H.label){case 0:return H.trys.push([0,4,,5]),C=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:h}),kk(C)?[4,C]:[3,2];case 1:C=H.sent(),H.label=2;case 2:if(C===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(z,Ve){return y.signal.addEventListener("abort",function(){return Ve({name:"AbortError",message:m||"Aborted"})})}),p(i(v,c,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:v,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:v,signal:y.signal,abort:f,rejectWithValue:function(z,Ve){return new xm(z,Ve)},fulfillWithValue:function(z,Ve){return new N0(z,Ve)}})).then(function(z){if(z instanceof xm)throw z;return z instanceof N0?o(z.payload,v,c,z.meta):o(z,v,c)})])];case 3:return E=H.sent(),[3,5];case 4:return P=H.sent(),E=P instanceof xm?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||p(E),[2,E]}})})}();return Object.assign(S,{abort:f,requestId:v,arg:c,unwrap:function(){return S.then(Tk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Tk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pk="task",B0="listener",H0="completed",wm="cancelled",iN="task-"+wm,sN="task-"+H0,aN=B0+"-"+wm,lN=B0+"-"+H0,uN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Pk+" "+wm+" (reason: "+t+")"}return e}();var bm="listenerMiddleware";var cN=fe(bm+"/add"),dN=fe(bm+"/removeAll"),pN=fe(bm+"/remove");var M0,fN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(M0||(M0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rk=function(e){return function(t){setTimeout(t,e)}},mN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rk(10);E0();var Px=x(Cm()),Rx=x(q0());var Tm=x(hu());function qk(e){e()}var G0=qk,X0=e=>G0=e,Q0=()=>G0;var li=x(O());var J0=x(O());var Cu=x(O()),Y0=Symbol.for(`react-redux-context-${Cu.version}`),Z0=globalThis;function Gk(){let e=Z0[Y0];return e||(e=(0,Cu.createContext)(null),Z0[Y0]=e),e}var Fe=new Proxy({},new Proxy({},{get(e,t){let n=Gk();return(r,...o)=>Reflect[t](n,...o)}}));function Qs(e=Fe){return function(){return(0,J0.useContext)(e)}}var Tu=Qs();var ku=()=>{throw new Error("uSES not initialized!")};var ex=ku,tx=e=>{ex=e},Xk=(e,t)=>e===t;function nx(e=Fe){let t=e===Fe?Tu:Qs(e);return function(r,o={}){let{equalityFn:i=Xk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,li.useRef)(!0),v=(0,li.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),y=ex(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,li.useDebugValue)(y),y}}var L=nx();function Sn(){return Sn=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},Sn.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 Dm=x(fx()),Z=x(O()),Ex=x(yx());var dP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function pP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,S){return l=f,u=S,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function m(){let f=e(l,u),S=!s(f,c);return c=f,S&&(d=n(c,p,u)),d}function g(f,S){let _=!i(S,u),b=!o(f,l,S,u);return l=f,u=S,_&&b?v():_?y():b?m():d}return function(S,_){return a?g(S,_):h(S,_)}}function Nm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ys(t,dP),s=n(e,i),a=r(e,i),l=o(e,i);return pP(s,a,l,e,i)}function Mm(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 vx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Gu(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=vx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=vx(u),u=i(a,l)),u},i}}function ui(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Sx(e){return e&&typeof e=="object"?Zs(t=>Mm(e,t)):e?typeof e=="function"?Gu(e,"mapDispatchToProps"):ui(e,"mapDispatchToProps"):Zs(t=>({dispatch:t}))}function xx(e){return e?typeof e=="function"?Gu(e,"mapStateToProps"):ui(e,"mapStateToProps"):Zs(()=>({}))}function fP(e,t,n){return Sn({},n,e,t)}function mP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function _x(e){return e?typeof e=="function"?mP(e):ui(e,"mergeProps"):()=>fP}function gP(){let e=Q0(),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 wx={notify(){},get:()=>[]};function Xu(e,t){let n,r=wx;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=gP())}function u(){n&&(n(),n=void 0,r.clear(),r=wx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Qu=x(O()),hP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ci=hP?Qu.useLayoutEffect:Qu.useEffect;function bx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function di(e,t){if(bx(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])||!bx(e[n[o]],t[n[o]]))return!1;return!0}var yP=["reactReduxForwardedRef"],Cx=ku,Tx=e=>{Cx=e};var vP=[null,null];function SP(e,t,n){ci(()=>e(...t),n)}function xP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function _P(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let y=t.getState(),m,g;try{m=r(y,o.current)}catch(f){g=f,d=f}g||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wP(e,t){return e===t}function bP(e,t,n,{pure:r,areStatesEqual:o=wP,areOwnPropsEqual:i=di,areStatePropsEqual:s=di,areMergedPropsEqual:a=di,forwardRef:l=!1,context:u=Fe}={}){let c=u,p=xx(e),d=Sx(t),h=_x(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",f=`Connect(${g})`,S={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:g,WrappedComponent:m,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(C){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:ce}=C,Or=Ys(C,yP);return[C.context,ce,Or]},[C]),H=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Ex.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Z.useContext)(H),Ve=!!C.store&&!!C.store.getState&&!!C.store.dispatch,cn=!!z&&!!z.store,qt=Ve?C.store:z.store,yo=cn?z.getServerState:qt.getState,Ui=(0,Z.useMemo)(()=>Nm(qt.dispatch,S),[qt]),[Lr,Ua]=(0,Z.useMemo)(()=>{if(!v)return vP;let ce=Xu(qt,Ve?void 0:z.subscription),Or=ce.notifyNestedSubs.bind(ce);return[ce,Or]},[qt,Ve,z]),Va=(0,Z.useMemo)(()=>Ve?z:Sn({},z,{subscription:Lr}),[Ve,z,Lr]),Vi=(0,Z.useRef)(),Ki=(0,Z.useRef)(N),Ar=(0,Z.useRef)(),vo=(0,Z.useRef)(!1),Id=(0,Z.useRef)(!1),Gt=(0,Z.useRef)(!1),I=(0,Z.useRef)();ci(()=>(Gt.current=!0,()=>{Gt.current=!1}),[]);let X=(0,Z.useMemo)(()=>()=>Ar.current&&N===Ki.current?Ar.current:Ui(qt.getState(),N),[qt,N]),Xt=(0,Z.useMemo)(()=>Or=>Lr?_P(v,qt,Lr,Ui,Ki,Vi,vo,Gt,Ar,Ua,Or):()=>{},[Lr]);SP(xP,[Ki,Vi,vo,N,Ar,Ua]);let Lt;try{Lt=Cx(Xt,X,yo?()=>Ui(yo(),N):X)}catch(ce){throw I.current&&(ce.message+=`
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=Kf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var b=JS(d,i,t);cv(d,b);break e;case 1:i=l;var E=d.type,C=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Jt===null||!Jt.has(C)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=e0(d,i,t);cv(d,R);break e}}d=d.return}while(d!==null)}l0(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function s0(){var e=Jl.current;return Jl.current=Zl,e===null?Zl:e}function gs(e,t){var n=F;F|=16;var r=s0();Ke===e&&Ne===t||Wo(e,t);do try{LT();break}catch(o){i0(e,o)}while(1);if(Nf(),F=n,Jl.current=r,Se!==null)throw Error(T(261));return Ke=null,Ne=0,Te}function LT(){for(;Se!==null;)a0(Se)}function AT(){for(;Se!==null&&!fT();)a0(Se)}function a0(e){var t=c0(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?l0(e):Se=t,Wf.current=null}function l0(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,Se=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wT(n,t,qr),n!==null){Se=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||qr&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){Se=t;return}Se=t=e}while(t!==null);Te===0&&(Te=5)}function jr(e){var t=Xo();return $r(99,OT.bind(null,e,t)),null}function OT(e,t){do cr();while(Cs!==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(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Ke&&(Se=Ke=null,Ne=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,Wf.current=null,up=El,s=Yy(),Dp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,h=0,v=0,y=s,m=null;t:for(;;){for(var g;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(g=y.firstChild)!==null;)m=y,y=g;for(;;){if(y===s)break t;if(m===a&&++h===i&&(p=c),m===l&&++v===u&&(d=c),(g=y.nextSibling)!==null)break;y=m,m=y.parentNode}y=g}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;cp={focusedElem:s,selectionRange:a},El=!1,ks=null,Ll=!1,A=r;do try{NT()}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);ks=null,A=r;do try{for(s=e;A!==null;){var f=A.flags;if(f&16&&Rs(A.stateNode,""),f&128){var S=A.alternate;if(S!==null){var _=S.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Mv(A),A.flags&=-3;break;case 6:Mv(A),A.flags&=-3,yp(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,yp(A.alternate,A);break;case 4:yp(A.alternate,A);break;case 8:a=A,t0(s,a);var b=a.alternate;Ov(a),b!==null&&Ov(b)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);if(_=cp,S=Yy(),f=_.focusedElem,s=_.selectionRange,S!==f&&f&&f.ownerDocument&&SS(f.ownerDocument.documentElement,f)){for(s!==null&&Dp(f)&&(S=s.start,_=s.end,_===void 0&&(_=S),"selectionStart"in f?(f.selectionStart=S,f.selectionEnd=Math.min(_,f.value.length)):(_=(S=f.ownerDocument||document)&&S.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.textContent.length,b=Math.min(s.start,a),s=s.end===void 0?b:Math.min(s.end,a),!_.extend&&b>s&&(a=s,s=b,b=a),a=Qy(f,b),i=Qy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),_.removeAllRanges(),b>s?(_.addRange(S),_.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),_.addRange(S)))))),S=[],_=f;_=_.parentNode;)_.nodeType===1&&S.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<S.length;f++)_=S[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}El=!!up,cp=up=null,e.current=n,A=r;do try{for(f=e;A!==null;){var E=A.flags;if(E&36&&kT(f,A.alternate,A),E&128){S=void 0;var C=A.ref;if(C!==null){var R=A.stateNode;switch(A.tag){case 5:S=R;break;default:S=R}typeof C=="function"?C(S):C.current=S}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));rr(A,P),A=A.nextEffect}while(A!==null);A=null,gT(),F=o}else e.current=n;if(ar)ar=!1,Cs=e,ms=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===sf?Ts++:(Ts=0,sf=e):Ts=0,n=n.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(Af,n,void 0,(n.current.flags&64)===64)}catch{}if(bt(e,Oe()),eu)throw eu=!1,e=nf,nf=null,e;return F&8||nn(),null}function NT(){for(;A!==null;){var e=A.alternate;Ll||ks===null||(A.flags&8?Fy(A,ks)&&(Ll=!0):A.tag===13&&PT(e,A)&&Fy(A,ks)&&(Ll=!0));var t=A.flags;t&256&&TT(e,A),!(t&512)||ar||(ar=!0,Fs(97,function(){return cr(),null})),A=A.nextEffect}}function cr(){if(ms!==90){var e=97<ms?97:ms;return ms=90,$r(e,DT)}return!1}function MT(e,t){rf.push(t,e),ar||(ar=!0,Fs(97,function(){return cr(),null}))}function u0(e,t){of.push(t,e),ar||(ar=!0,Fs(97,function(){return cr(),null}))}function DT(){if(Cs===null)return!1;var e=Cs;if(Cs=null,F&48)throw Error(T(331));var t=F;F|=32;var n=of;of=[];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=rf,rf=[],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 Fv(e,t,n){t=Kf(n,t),t=JS(e,t,1),er(e,t),t=ot(),e=mu(e,1),e!==null&&(su(e,1,t),bt(e,t))}function rr(e,t){if(e.tag===3)Fv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Fv(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=Kf(t,e);var o=e0(n,e,1);if(er(n,o),o=ot(),n=mu(n,1),n!==null)su(n,1,o),bt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function FT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Ke===e&&(Ne&n)===n&&(Te===4||Te===3&&(Ne&62914560)===Ne&&500>Oe()-qf?Wo(e,0):$f|=n),bt(e,t)}function jT(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=Jo),t=Io(62914560&~fn),t===0&&(t=4194304)):t=Xo()===99?1:2:t=1),n=ot(),e=mu(e,t),e!==null&&(su(e,t,n),bt(e,n))}var c0;c0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:bv(t),mp();break;case 5:mv(t);break;case 1:Je(t.type)&&kl(t);break;case 4:Kp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;pe(Ul,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Ev(e,t,n):(pe(de,de.current&1),t=gn(e,t,n),t!==null?t.sibling:null);pe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Rv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(de,de.current),r)break;return null;case 23:case 24:return t.lanes=0,gp(e,t,n)}return gn(e,t,n)}else Mt=!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=Go(t,Me.current),Uo(t,n),o=Hf(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,Je(r)){var i=!0;kl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Df(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Wl(t,r,s,e),o.updater=pu,t.stateNode=o,o._reactInternals=t,Vp(t,r,e,n),t=Gp(null,t,r,!0,i,n)}else t.tag=0,Ye(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=HT(o),e=Nt(o,e),i){case 0:t=qp(null,t,o,e,n);break e;case 1:t=wv(null,t,o,e,n);break e;case 11:t=xv(null,t,o,e,n);break e;case 14:t=_v(null,t,o,Nt(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:Nt(r,o),qp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),wv(e,t,r,o,n);case 3:if(bv(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,MS(e,t),js(t,r,null,n),r=t.memoizedState.element,r===o)mp(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Xn=zo(t.stateNode.containerInfo.firstChild),mn=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],Vo.push(i);for(n=BS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Ye(e,t,r,n),mp();t=t.child}return t;case 5:return mv(t),e===null&&Wp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Bp(r,o)?s=null:i!==null&&Bp(r,i)&&(t.flags|=16),XS(e,t),Ye(e,t,s,n),t.child;case 6:return e===null&&Wp(t),null;case 13:return Ev(e,t,n);case 4:return Kp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$l(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),xv(e,t,r,o,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(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(pe(Ul,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=St(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!Ze.current){t=gn(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),NS(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}Ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Uo(t,n),o=wt(o,i.unstable_observedBits),r=r(o),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),_v(e,t,o,i,r,n);case 15:return GS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Je(r)?(e=!0,kl(t)):e=!1,Uo(t,n),FS(t,r,o),Vp(t,r,o,n),Gp(null,t,r,!0,e,n);case 19:return Rv(e,t,n);case 23:return gp(e,t,n);case 24:return gp(e,t,n)}throw Error(T(156,t.tag))};function BT(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 xt(e,t,n,r){return new BT(e,t,n,r)}function Xf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HT(e){if(typeof e=="function")return Xf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ru)return 11;if(e===ou)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=xt(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 Al(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Xf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case $n:return $o(n.children,o,i,t);case Hv:s=8,o|=16;break;case df:s=8,o|=1;break;case hs:return e=xt(12,n,t,o|8),e.elementType=hs,e.type=hs,e.lanes=i,e;case ys:return e=xt(13,n,t,o),e.type=ys,e.elementType=ys,e.lanes=i,e;case Ol:return e=xt(19,n,t,o),e.elementType=Ol,e.lanes=i,e;case yf:return Qf(n,o,i,t);case _p:return e=xt(24,n,t,o),e.elementType=_p,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pf:s=10;break e;case ff:s=9;break e;case ru:s=11;break e;case ou:s=14;break e;case mf:s=16,r=null;break e;case gf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=xt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function $o(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Qf(e,t,n,r){return e=xt(23,e,r,t),e.elementType=yf,e.lanes=n,e}function vp(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function Sp(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zT(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=rp(0),this.expirationTimes=rp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rp(0),this.mutableSourceEagerHydrationData=null}function UT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Br,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tu(e,t,n,r){var o=t.current,i=ot(),s=tr(o);e:if(n){n=n._reactInternals;t:{if(Qr(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(Je(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(Je(l)){n=kS(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 xp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function jv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yf(e,t){jv(e,t),(e=e.alternate)&&jv(e,t)}function VT(){return null}function Zf(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new zT(e,t,n!=null&&n.hydrate===!0),t=xt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Df(t),e[Zo]=n.current,wS(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}Zf.prototype.render=function(e){tu(e,this._internalRoot,null,null)};Zf.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;tu(null,e,null,function(){t[Zo]=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 KT(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 Zf(e,0,t?{hydrate:!0}:void 0)}function gu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=xp(s);a.call(u)}}tu(t,s,e,o)}else{if(i=n._reactRootContainer=KT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=xp(s);l.call(u)}}o0(function(){tu(t,s,e,o)})}return xp(s)}tS=function(e){if(e.tag===13){var t=ot();nr(e,4,t),Yf(e,4)}};wf=function(e){if(e.tag===13){var t=ot();nr(e,67108864,t),Yf(e,67108864)}};nS=function(e){if(e.tag===13){var t=ot(),n=tr(e);nr(e,n,t),Yf(e,n)}};rS=function(e,t){return t()};Lp=function(e,t,n){switch(t){case"input":if(bp(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=cu(r);if(!o)throw Error(T(90));Uv(r),bp(r,o)}}}break;case"textarea":Kv(e,n);break;case"select":t=n.value,t!=null&&jo(e,!!n.multiple,t,!1)}};Sf=r0;Yv=function(e,t,n,r,o){var i=F;F|=4;try{return $r(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(ti(),nn())}};xf=function(){!(F&49)&&(IT(),cr())};Zv=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(ti(),nn())}};function d0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$s(t))throw Error(T(200));return UT(e,t,null,n)}var WT={Events:[Vs,No,cu,Xv,Qv,cr,{current:!1}]},us={findFiberByHostInstance:zr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},$T={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:Xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=eS(e),e===null?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||VT,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{Af=cs.inject($T),Kr=cs}catch{}var cs;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WT;Et.createPortal=d0;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=eS(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 $r(99,e.bind(null,t))}finally{F=n,nn()}};Et.hydrate=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!$s(e))throw Error(T(40));return e._reactRootContainer?(o0(function(){gu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zo]=null})}),!0):!1};Et.unstable_batchedUpdates=r0;Et.unstable_createPortal=function(e,t){return d0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.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 gu(e,t,n,!1,r)};Et.version="17.0.2"});var hu=me((LO,m0)=>{"use strict";function f0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f0)}catch(e){console.error(e)}}f0(),m0.exports=p0()});var U0=me(z0=>{"use strict";var ai=O();function Ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lk=typeof Object.is=="function"?Object.is:Ik,Ak=ai.useState,Ok=ai.useEffect,Nk=ai.useLayoutEffect,Mk=ai.useDebugValue;function Dk(e,t){var n=t(),r=Ak({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Nk(function(){o.value=n,o.getSnapshot=t,Cm(o)&&i({inst:o})},[e,n,t]),Ok(function(){return Cm(o)&&i({inst:o}),e(function(){Cm(o)&&i({inst:o})})},[e]),Mk(n),n}function Cm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lk(e,n)}catch{return!0}}function Fk(e,t){return t()}var jk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fk:Dk;z0.useSyncExternalStore=ai.useSyncExternalStore!==void 0?ai.useSyncExternalStore:jk});var Tm=me((vN,V0)=>{"use strict";V0.exports=U0()});var W0=me(K0=>{"use strict";var Eu=O(),Bk=Tm();function Hk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zk=typeof Object.is=="function"?Object.is:Hk,Uk=Bk.useSyncExternalStore,Vk=Eu.useRef,Kk=Eu.useEffect,Wk=Eu.useMemo,$k=Eu.useDebugValue;K0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Vk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Wk(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var v=s.value;if(o(v,h))return p=v}return p=h}if(v=p,zk(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,p=y)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=Uk(e,i[0],i[1]);return Kk(function(){s.hasValue=!0,s.value=a},[a]),$k(a),a}});var q0=me((xN,$0)=>{"use strict";$0.exports=W0()});var ox=me(Q=>{"use strict";var we=typeof Symbol=="function"&&Symbol.for,Pm=we?Symbol.for("react.element"):60103,Rm=we?Symbol.for("react.portal"):60106,Pu=we?Symbol.for("react.fragment"):60107,Ru=we?Symbol.for("react.strict_mode"):60108,Iu=we?Symbol.for("react.profiler"):60114,Lu=we?Symbol.for("react.provider"):60109,Au=we?Symbol.for("react.context"):60110,Im=we?Symbol.for("react.async_mode"):60111,Ou=we?Symbol.for("react.concurrent_mode"):60111,Nu=we?Symbol.for("react.forward_ref"):60112,Mu=we?Symbol.for("react.suspense"):60113,Qk=we?Symbol.for("react.suspense_list"):60120,Du=we?Symbol.for("react.memo"):60115,Fu=we?Symbol.for("react.lazy"):60116,Yk=we?Symbol.for("react.block"):60121,Zk=we?Symbol.for("react.fundamental"):60117,Jk=we?Symbol.for("react.responder"):60118,eP=we?Symbol.for("react.scope"):60119;function at(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Pm:switch(e=e.type,e){case Im:case Ou:case Pu:case Iu:case Ru:case Mu:return e;default:switch(e=e&&e.$$typeof,e){case Au:case Nu:case Fu:case Du:case Lu:return e;default:return t}}case Rm:return t}}}function rx(e){return at(e)===Ou}Q.AsyncMode=Im;Q.ConcurrentMode=Ou;Q.ContextConsumer=Au;Q.ContextProvider=Lu;Q.Element=Pm;Q.ForwardRef=Nu;Q.Fragment=Pu;Q.Lazy=Fu;Q.Memo=Du;Q.Portal=Rm;Q.Profiler=Iu;Q.StrictMode=Ru;Q.Suspense=Mu;Q.isAsyncMode=function(e){return rx(e)||at(e)===Im};Q.isConcurrentMode=rx;Q.isContextConsumer=function(e){return at(e)===Au};Q.isContextProvider=function(e){return at(e)===Lu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pm};Q.isForwardRef=function(e){return at(e)===Nu};Q.isFragment=function(e){return at(e)===Pu};Q.isLazy=function(e){return at(e)===Fu};Q.isMemo=function(e){return at(e)===Du};Q.isPortal=function(e){return at(e)===Rm};Q.isProfiler=function(e){return at(e)===Iu};Q.isStrictMode=function(e){return at(e)===Ru};Q.isSuspense=function(e){return at(e)===Mu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pu||e===Ou||e===Iu||e===Ru||e===Mu||e===Qk||typeof e=="object"&&e!==null&&(e.$$typeof===Fu||e.$$typeof===Du||e.$$typeof===Lu||e.$$typeof===Au||e.$$typeof===Nu||e.$$typeof===Zk||e.$$typeof===Jk||e.$$typeof===eP||e.$$typeof===Yk)};Q.typeOf=at});var sx=me((NN,ix)=>{"use strict";ix.exports=ox()});var fx=me((MN,px)=>{"use strict";var Lm=sx(),tP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Am={};Am[Lm.ForwardRef]=rP;Am[Lm.Memo]=cx;function ax(e){return Lm.isMemo(e)?cx:Am[e.$$typeof]||tP}var oP=Object.defineProperty,iP=Object.getOwnPropertyNames,lx=Object.getOwnPropertySymbols,sP=Object.getOwnPropertyDescriptor,aP=Object.getPrototypeOf,ux=Object.prototype;function dx(e,t,n){if(typeof t!="string"){if(ux){var r=aP(t);r&&r!==ux&&dx(e,r,n)}var o=iP(t);lx&&(o=o.concat(lx(t)));for(var i=ax(e),s=ax(t),a=0;a<o.length;++a){var l=o[a];if(!nP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=sP(t,l);try{oP(e,l,u)}catch{}}}}return e}px.exports=dx});var gx=me(Y=>{"use strict";var Om=Symbol.for("react.element"),Nm=Symbol.for("react.portal"),ju=Symbol.for("react.fragment"),Bu=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),zu=Symbol.for("react.provider"),Uu=Symbol.for("react.context"),lP=Symbol.for("react.server_context"),Vu=Symbol.for("react.forward_ref"),Ku=Symbol.for("react.suspense"),Wu=Symbol.for("react.suspense_list"),$u=Symbol.for("react.memo"),qu=Symbol.for("react.lazy"),uP=Symbol.for("react.offscreen"),mx;mx=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Om:switch(e=e.type,e){case ju:case Hu:case Bu:case Ku:case Wu:return e;default:switch(e=e&&e.$$typeof,e){case lP:case Uu:case Vu:case qu:case $u:case zu:return e;default:return t}}case Nm:return t}}}Y.ContextConsumer=Uu;Y.ContextProvider=zu;Y.Element=Om;Y.ForwardRef=Vu;Y.Fragment=ju;Y.Lazy=qu;Y.Memo=$u;Y.Portal=Nm;Y.Profiler=Hu;Y.StrictMode=Bu;Y.Suspense=Ku;Y.SuspenseList=Wu;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Tt(e)===Uu};Y.isContextProvider=function(e){return Tt(e)===zu};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Om};Y.isForwardRef=function(e){return Tt(e)===Vu};Y.isFragment=function(e){return Tt(e)===ju};Y.isLazy=function(e){return Tt(e)===qu};Y.isMemo=function(e){return Tt(e)===$u};Y.isPortal=function(e){return Tt(e)===Nm};Y.isProfiler=function(e){return Tt(e)===Hu};Y.isStrictMode=function(e){return Tt(e)===Bu};Y.isSuspense=function(e){return Tt(e)===Ku};Y.isSuspenseList=function(e){return Tt(e)===Wu};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ju||e===Hu||e===Bu||e===Ku||e===Wu||e===uP||typeof e=="object"&&e!==null&&(e.$$typeof===qu||e.$$typeof===$u||e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Vu||e.$$typeof===mx||e.getModuleId!==void 0)};Y.typeOf=Tt});var yx=me((FN,hx)=>{"use strict";hx.exports=gx()});var m_=me((uD,f_)=>{"use strict";var eR=/["'&<>]/;f_.exports=tR;function tR(e){var t=""+e,n=eR.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 Vg=me((U6,Gw)=>{"use strict";var sI="Expected a function",$w=NaN,aI="[object Symbol]",lI=/^\s+|\s+$/g,uI=/^[-+]0x[0-9a-f]+$/i,cI=/^0b[01]+$/i,dI=/^0o[0-7]+$/i,pI=parseInt,fI=typeof global=="object"&&global&&global.Object===Object&&global,mI=typeof self=="object"&&self&&self.Object===Object&&self,gI=fI||mI||Function("return this")(),hI=Object.prototype,yI=hI.toString,vI=Math.max,SI=Math.min,zg=function(){return gI.Date.now()};function xI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(sI);t=qw(t)||0,Ug(n)&&(c=!!n.leading,p="maxWait"in n,i=p?vI(qw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var C=r,R=o;return r=o=void 0,u=E,s=e.apply(R,C),s}function v(E){return u=E,a=setTimeout(g,t),c?h(E):s}function y(E){var C=E-l,R=E-u,P=t-C;return p?SI(P,i-R):P}function m(E){var C=E-l,R=E-u;return l===void 0||C>=t||C<0||p&&R>=i}function g(){var E=zg();if(m(E))return f(E);a=setTimeout(g,y(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(zg())}function b(){var E=zg(),C=m(E);if(r=arguments,o=this,l=E,C){if(a===void 0)return v(l);if(p)return a=setTimeout(g,t),h(l)}return a===void 0&&(a=setTimeout(g,t)),s}return b.cancel=S,b.flush=_,b}function Ug(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _I(e){return!!e&&typeof e=="object"}function wI(e){return typeof e=="symbol"||_I(e)&&yI.call(e)==aI}function qw(e){if(typeof e=="number")return e;if(wI(e))return $w;if(Ug(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ug(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(lI,"");var n=cI.test(e);return n||dI.test(e)?pI(e.slice(2),n?2:8):uI.test(e)?$w:+e}Gw.exports=xI});var nA={};Ie(nA,{Card:()=>ge,ContentEditableInput:()=>go,DeepdeskAPI:()=>Hn,DeepdeskSDK:()=>za,HTTPClient:()=>Wt,InputMediator:()=>Tn,InputType:()=>Vn,KeyboardHint:()=>el,Label:()=>tl,Locale:()=>ea,Section:()=>Un,SectionList:()=>nl,Sources:()=>At,Suggestion:()=>oe,SuggestionList:()=>yt,TextAreaInput:()=>kn,ToggleButton:()=>Dr,attachFile:()=>hE,authenticateWithKey:()=>mE,createFullRange:()=>Bi,createOverlayContainer:()=>io,createRangeFromOffsets:()=>Ir,escapeHTML:()=>_i,fetchPlatformConfig:()=>gE,formatTextMarkup:()=>fE,getRangeOffsets:()=>Fa,getRangeText:()=>ja,insertCKEditor:()=>pE,isSupportedInputElement:()=>Rd,updateContentEditable:()=>dE,updateTextArea:()=>cE,useStyles:()=>k,waitForElementVisibilityChange:()=>Id});var Ya=x($()),mt=x(O());var Xa=x(O()),Xh=x($()),$i=Xa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Xa.useContext)($i),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Xh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Qh={root:"_root_vr71j_1"};var Nr=x(w()),Qa=()=>(0,Nr.jsxs)("svg",{className:Qh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Nr.jsx)("defs",{children:(0,Nr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Nr.jsx)("title",{children:"Failed loading image"}),(0,Nr.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 Bd={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 Mr=x(w()),Za=(0,mt.createContext)(Bd),FE=({title:e,src:t})=>{let n=(0,mt.useContext)(Za),[r,o]=(0,mt.useState)(!1);return(0,mt.useEffect)(()=>{o(!1)},[t]),(0,Mr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Mr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Mr.jsx)(Qa,{})})},jE=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,mt.useContext)(Za);return(0,Mr.jsx)("div",{className:(0,Ya.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},BE=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,mt.useContext)(Za);return mt.default.createElement(e,{className:(0,Ya.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ja=({children:e})=>{let t=k("Card",Bd);return(0,Mr.jsx)("div",{className:(0,Ya.default)(t.root),children:(0,Mr.jsx)(Za.Provider,{value:t,children:e})})};Ja.Image=FE;Ja.Content=jE;Ja.Title=BE;var ge=Ja;var ny=x($());var ty={root:"_root_cq1yq_1"};var ry=x(w());var HE={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},zE=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ty);return(0,ry.jsx)("span",{"data-key":HE[t],className:(0,ny.default)(e,r.root),...n})},el=zE;var iy=x($());var oy={root:"_root_4a08n_1"};var sy=x(w()),UE=({className:e,children:t,...n})=>{let r=k("Label",oy);return(0,sy.jsx)("span",{...n,className:(0,iy.default)(e,r.root),children:t})},tl=UE;var ay={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var _o=x(w()),VE=({title:e,children:t,type:n,...r})=>{let o=k("Section",ay);return(0,_o.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,_o.jsx)("div",{className:o.subTitleContainer,children:(0,_o.jsx)("span",{className:o.subtitle,children:e})}),(0,_o.jsx)("div",{className:o.suggestions,children:t})]})},Un=VE;var uy=x($()),cy=x(O());var ly={root:"_root_19wxp_1"};var dy=x(w()),KE=cy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",ly);return(0,dy.jsx)("div",{ref:n,className:(0,uy.default)(r.root,e),children:t})}),nl=KE;var Gi=x($()),ht=x(O());var Hd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var gt=x(w()),wo=(0,ht.createContext)(Hd),WE=({fixed:e,children:t,...n})=>{let r=(0,ht.useContext)(wo);return(0,gt.jsx)("div",{...n,className:(0,Gi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},$E=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ht.useContext)(wo);return(0,gt.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,gt.jsx)("ul",{className:i.dropdownList,children:o})]})},qE=({index:e,label:t,onClick:n})=>{let r=(0,ht.useContext)(wo);return(0,gt.jsx)("li",{className:r.dropdownItem,children:(0,gt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},GE=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ht.useContext)(wo);return(0,gt.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})},zd=({labels:e})=>{let t=(0,ht.useContext)(wo);return(0,gt.jsx)("div",{className:t.labels,children:e.map(n=>(0,gt.jsx)("span",{className:t.label,children:n},n))})},bo=ht.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Hd),l=(0,ht.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,gt.jsx)(o,{...i,ref:s,className:(0,Gi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,gt.jsx)(wo.Provider,{value:a,children:r})})});bo.Labels=zd;bo.Actions=WE;bo.ActionButton=GE;bo.DropdownButton=$E;bo.DropdownItem=qE;var oe=bo;var fy=x($());var py={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var my=x(w()),XE=({withDivider:e,children:t})=>{let n=k("SuggestionList",py);return(0,my.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,fy.default)(n.root,{[n.isWithDivider]:e}),children:t})},yt=XE;var hy=x($());var gy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var rl=x(w()),QE=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",gy);return(0,rl.jsx)("button",{type:"button",className:(0,hy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,rl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,rl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Dr=QE;var yy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Eo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var vy=/x-deepdesk-(([a-z0-9\-_])+-version)/,At=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(At||{}),Vn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Vn||{});var $t=x(hu());var S1=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 vn(e){return!!e&&!!e[le]}function Dt(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)===ek}(e)||Array.isArray(e)||!!e[_0]||!!(!((t=e.constructor)===null||t===void 0)&&t[_0])||am(e)||lm(e))}function Zr(e,t,n){n===void 0&&(n=!1),oi(e)===0?(n?Object.keys:ri)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function oi(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:am(e)?2:lm(e)?3:0}function ni(e,t){return oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qT(e,t){return oi(e)===2?e.get(t):e[t]}function w0(e,t,n){var r=oi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function b0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function am(e){return ZT&&e instanceof Map}function lm(e){return JT&&e instanceof Set}function dr(e){return e.o||e.t}function um(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T0(e);delete t[le];for(var n=ri(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 cm(e,t){return t===void 0&&(t=!1),dm(e)||vn(e)||!Dt(e)||(oi(e)>1&&(e.set=e.add=e.clear=e.delete=GT),Object.freeze(e),t&&Zr(e,function(n,r){return cm(r,!0)},!0)),e}function GT(){Ct(2)}function dm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=sm[e];return t||Ct(18,e),t}function XT(e,t){sm[e]||(sm[e]=t)}function rm(){return Gs}function Jf(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function yu(e){om(e),e.p.forEach(QT),e.p=null}function om(e){e===Gs&&(Gs=e.l)}function g0(e){return Gs={p:[],l:Gs,h:e,m:!0,_:0}}function QT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function em(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&&(yu(t),Ct(4)),Dt(e)&&(e=vu(t,e),t.l||Su(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=vu(t,n,[]),yu(t),t.u&&t.v(t.u,t.s),e!==C0?e:void 0}function vu(e,t,n){if(dm(t))return t;var r=t[le];if(!r)return Zr(t,function(a,l){return h0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Su(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=um(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Zr(i,function(a,l){return h0(e,r,o,a,l,n,s)}),Su(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function h0(e,t,n,r,o,i,s){if(vn(o)){var a=vu(e,o,i&&t&&t.i!==3&&!ni(t.R,r)?i.concat(r):void 0);if(w0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!dm(o)){if(!e.h.D&&e._<1)return;vu(e,o),t&&t.A.l||Su(e,o)}}function Su(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&cm(t,n)}function tm(e,t){var n=e[le];return(n?dr(n):e)[t]}function y0(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 pr(e){e.P||(e.P=!0,e.l&&pr(e.l))}function nm(e){e.o||(e.o=um(e.t))}function im(e,t,n){var r=am(t)?rn("MapSet").F(t,n):lm(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:rm(),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),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):rn("ES5").J(t,n);return(n?n.A:rm()).p.push(r),r}function YT(e){return vn(e)||Ct(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=oi(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=v0(n,i),o.I=!1}else r=v0(n,i);return Zr(r,function(s,a){o&&qT(o.t,s)===a||w0(r,s,t(a))}),i===3?new Set(r):r}(e)}function v0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return um(e)}function E0(){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)&&pr(l);break;case 4:n(l)&&pr(l)}}}function n(s){for(var a=s.t,l=s.k,u=ri(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!ni(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!b0(h,d))return!0}}var y=!!a[le];return u.length!==ri(a).length+(y?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ct(3,JSON.stringify(dr(s)))}var i={};XT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(h,""+v,e(v,!0));return h}var y=T0(d);delete y[le];for(var m=ri(y),g=0;g<m.length;g++){var f=m[g];y[f]=e(f,p||!!y[f].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:rm(),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?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,v=p.R,y=p.i;if(y===4)Zr(h,function(_){_!==le&&(d[_]!==void 0||ni(d,_)?v[_]||u(h[_]):(v[_]=!0,pr(p)))}),Zr(d,function(_){h[_]!==void 0||ni(h,_)||(v[_]=!1,pr(p))});else if(y===5){if(r(p)&&(pr(p),v.length=!0),h.length<d.length)for(var m=h.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<h.length;g++)v[g]=!0;for(var f=Math.min(h.length,d.length),S=0;S<f;S++)h.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(h[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var S0,Gs,pm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ZT=typeof Map<"u",JT=typeof Set<"u",x0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",C0=pm?Symbol.for("immer-nothing"):((S0={})["immer-nothing"]=!0,S0),_0=pm?Symbol.for("immer-draftable"):"__$immer_draftable",le=pm?Symbol.for("immer-state"):"__$immer_state";var ek=""+Object.prototype.constructor,ri=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,T0=Object.getOwnPropertyDescriptors||function(e){var t={};return ri(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},sm={},Xs={get:function(e,t){if(t===le)return e;var n=dr(e);if(!ni(n,t))return function(o,i,s){var a,l=y0(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||!Dt(r)?r:r===tm(e.t,t)?(nm(e),e.o[t]=im(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=y0(dr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=tm(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(b0(n,o)&&(n!==void 0||ni(e.t,t)))return!0;nm(e),pr(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 tm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,nm(e),pr(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)}},qs={};Zr(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 tk=function(){function e(n){var r=this;this.O=x0,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var m=this;y===void 0&&(y=a);for(var g=arguments.length,f=Array(g>1?g-1:0),S=1;S<g;S++)f[S-1]=arguments[S];return l.produce(y,function(_){var b;return(b=i).call.apply(b,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Dt(o)){var c=g0(r),p=im(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?yu(c):om(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Jf(c,s),em(y,c)},function(y){throw yu(c),y}):(Jf(c,s),em(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===C0&&(u=void 0),r.D&&cm(u,!0),s){var h=[],v=[];rn("Patches").M(o,u,h,v),s(h,v)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Dt(n)||Ct(8),vn(n)&&(n=YT(n));var r=g0(this),o=im(this,n,void 0);return o[le].C=!0,om(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Jf(i,r),em(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!x0&&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 vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),st=new tk,nk=st.produce,AO=st.produceWithPatches.bind(st),OO=st.setAutoFreeze.bind(st),NO=st.setUseProxies.bind(st),MO=st.applyPatches.bind(st),DO=st.createDraft.bind(st),FO=st.finishDraft.bind(st),xu=nk;function fr(e){"@babel/helpers - typeof";return fr=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},fr(e)}function fm(e,t){if(fr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mm(e){var t=fm(e,"string");return fr(t)==="symbol"?t:String(t)}function gm(e,t,n){return t=mm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(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 _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(n),!0).forEach(function(r){gm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function De(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 P0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),hm=function(){return Math.random().toString(36).substring(7).split("").join(".")},wu={INIT:"@@redux/INIT"+hm(),REPLACE:"@@redux/REPLACE"+hm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+hm()}};function rk(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 ym(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(De(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(De(1));return n(ym)(e,t)}if(typeof e!="function")throw new Error(De(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(De(3));return i}function p(y){if(typeof y!="function")throw new Error(De(4));if(l)throw new Error(De(5));var m=!0;return u(),a.push(y),function(){if(m){if(l)throw new Error(De(6));m=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!rk(y))throw new Error(De(7));if(typeof y.type>"u")throw new Error(De(8));if(l)throw new Error(De(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var m=s=a,g=0;g<m.length;g++){var f=m[g];f()}return y}function h(y){if(typeof y!="function")throw new Error(De(10));o=y,d({type:wu.REPLACE})}function v(){var y,m=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(De(11));function S(){f.next&&f.next(c())}S();var _=m(S);return{unsubscribe:_}}},y[P0]=function(){return this},y}return d({type:wu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[P0]=v,r}function ok(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:wu.INIT});if(typeof r>"u")throw new Error(De(12));if(typeof n(void 0,{type:wu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(De(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{ok(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},v=0;v<i.length;v++){var y=i[v],m=n[y],g=u[y],f=m(g,c);if(typeof f>"u"){var S=c&&c.type;throw new Error(De(14))}h[y]=f,d=d||f!==g}return d=d||i.length!==Object.keys(u).length,d?h:u}}function ii(){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 R0(){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(De(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ii.apply(void 0,a)(o.dispatch),_u(_u({},o),{},{dispatch:i})}}}function I0(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 L0=I0();L0.withExtraArgument=I0;var vm=L0;var D0=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)}}(),ik=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}}},si=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},sk=Object.defineProperty,ak=Object.defineProperties,lk=Object.getOwnPropertyDescriptors,A0=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable,O0=function(e,t,n){return t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},mr=function(e,t){for(var n in t||(t={}))uk.call(t,n)&&O0(e,n,t[n]);if(A0)for(var r=0,o=A0(t);r<o.length;r++){var n=o[r];ck.call(t,n)&&O0(e,n,t[n])}return e},Sm=function(e,t){return ak(e,lk(t))},dk=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 pk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ii:ii.apply(null,arguments)},tN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function fk(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 mk=function(e){D0(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,si([void 0],n[0].concat(this)))):new(t.bind.apply(t,si([void 0],n.concat(this))))},t}(Array),gk=function(e){D0(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,si([void 0],n[0].concat(this)))):new(t.bind.apply(t,si([void 0],n.concat(this))))},t}(Array);function wm(e){return Dt(e)?xu(e,function(){}):e}function hk(e){return typeof e=="boolean"}function yk(){return function(t){return vk(t)}}function vk(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 mk;if(n&&(hk(n)?a.push(vm):a.push(vm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var xm=!0;function F0(e){var t=yk(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(fk(o))h=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 v=s;if(typeof v=="function"&&(v=v(t),!xm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=R0.apply(void 0,v),m=ii;l&&(m=pk(mr({trace:!xm},typeof l=="object"&&l)));var g=new gk(y),f=g;Array.isArray(d)?f=si([y],d):typeof d=="function"&&(f=d(g));var S=m.apply(void 0,f);return ym(h,c,S)}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 j0(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 Sk(e){return typeof e=="function"}function xk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?j0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Sk(e))l=function(){return wm(e())};else{var u=wm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=si([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return h.filter(function(v){return!!v}).length===0&&(h=[a]),h.reduce(function(v,y){if(y)if(vn(v)){var m=v,g=y(m,d);return g===void 0?v:g}else{if(Dt(v))return xu(v,function(f){return y(f,d)});var g=y(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},p)}return c.getInitialState=l,c}function _k(e,t){return e+"/"+t}function j(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:wm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=_k(t,c),h,v;"reducer"in p?(h=p.reducer,v=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?j0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],m=y===void 0?void 0:y,g=mr(mr({},d),s);return xk(n,function(f){for(var S in g)f.addCase(S,g[S]);for(var _=0,b=v;_<b.length;_++){var E=b[_];f.addMatcher(E.matcher,E.reducer)}m&&f.addDefaultCase(m)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var wk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wk[Math.random()*64|0];return t},Ek=["name","message","stack","code"],_m=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),N0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Ck=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Ek;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},D=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:Sm(mr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:Sm(mr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||Ck)(c||"Rejected"),meta:Sm(mr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,h){var v=r!=null&&r.idGenerator?r.idGenerator(c):bk(),y=new l,m,g=!1;function f(_){m=_,y.abort()}var S=function(){return dk(this,null,function(){var _,b,E,C,R,P,N;return ik(this,function(H){switch(H.label){case 0:return H.trys.push([0,4,,5]),C=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:h}),kk(C)?[4,C]:[3,2];case 1:C=H.sent(),H.label=2;case 2:if(C===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(z,Ve){return y.signal.addEventListener("abort",function(){return Ve({name:"AbortError",message:m||"Aborted"})})}),p(i(v,c,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:v,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:v,signal:y.signal,abort:f,rejectWithValue:function(z,Ve){return new _m(z,Ve)},fulfillWithValue:function(z,Ve){return new N0(z,Ve)}})).then(function(z){if(z instanceof _m)throw z;return z instanceof N0?o(z.payload,v,c,z.meta):o(z,v,c)})])];case 3:return E=H.sent(),[3,5];case 4:return P=H.sent(),E=P instanceof _m?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||p(E),[2,E]}})})}();return Object.assign(S,{abort:f,requestId:v,arg:c,unwrap:function(){return S.then(Tk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Tk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pk="task",B0="listener",H0="completed",bm="cancelled",iN="task-"+bm,sN="task-"+H0,aN=B0+"-"+bm,lN=B0+"-"+H0,uN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Pk+" "+bm+" (reason: "+t+")"}return e}();var Em="listenerMiddleware";var cN=fe(Em+"/add"),dN=fe(Em+"/removeAll"),pN=fe(Em+"/remove");var M0,fN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(M0||(M0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rk=function(e){return function(t){setTimeout(t,e)}},mN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rk(10);E0();var Px=x(Tm()),Rx=x(q0());var km=x(hu());function qk(e){e()}var G0=qk,X0=e=>G0=e,Q0=()=>G0;var li=x(O());var J0=x(O());var Cu=x(O()),Y0=Symbol.for(`react-redux-context-${Cu.version}`),Z0=globalThis;function Gk(){let e=Z0[Y0];return e||(e=(0,Cu.createContext)(null),Z0[Y0]=e),e}var Fe=new Proxy({},new Proxy({},{get(e,t){let n=Gk();return(r,...o)=>Reflect[t](n,...o)}}));function Qs(e=Fe){return function(){return(0,J0.useContext)(e)}}var Tu=Qs();var ku=()=>{throw new Error("uSES not initialized!")};var ex=ku,tx=e=>{ex=e},Xk=(e,t)=>e===t;function nx(e=Fe){let t=e===Fe?Tu:Qs(e);return function(r,o={}){let{equalityFn:i=Xk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,li.useRef)(!0),v=(0,li.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),y=ex(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,li.useDebugValue)(y),y}}var L=nx();function Sn(){return Sn=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},Sn.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 Fm=x(fx()),Z=x(O()),Ex=x(yx());var dP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function pP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,S){return l=f,u=S,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function m(){let f=e(l,u),S=!s(f,c);return c=f,S&&(d=n(c,p,u)),d}function g(f,S){let _=!i(S,u),b=!o(f,l,S,u);return l=f,u=S,_&&b?v():_?y():b?m():d}return function(S,_){return a?g(S,_):h(S,_)}}function Mm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ys(t,dP),s=n(e,i),a=r(e,i),l=o(e,i);return pP(s,a,l,e,i)}function Dm(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 vx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Gu(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=vx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=vx(u),u=i(a,l)),u},i}}function ui(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Sx(e){return e&&typeof e=="object"?Zs(t=>Dm(e,t)):e?typeof e=="function"?Gu(e,"mapDispatchToProps"):ui(e,"mapDispatchToProps"):Zs(t=>({dispatch:t}))}function xx(e){return e?typeof e=="function"?Gu(e,"mapStateToProps"):ui(e,"mapStateToProps"):Zs(()=>({}))}function fP(e,t,n){return Sn({},n,e,t)}function mP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function _x(e){return e?typeof e=="function"?mP(e):ui(e,"mergeProps"):()=>fP}function gP(){let e=Q0(),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 wx={notify(){},get:()=>[]};function Xu(e,t){let n,r=wx;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=gP())}function u(){n&&(n(),n=void 0,r.clear(),r=wx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Qu=x(O()),hP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ci=hP?Qu.useLayoutEffect:Qu.useEffect;function bx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function di(e,t){if(bx(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])||!bx(e[n[o]],t[n[o]]))return!1;return!0}var yP=["reactReduxForwardedRef"],Cx=ku,Tx=e=>{Cx=e};var vP=[null,null];function SP(e,t,n){ci(()=>e(...t),n)}function xP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function _P(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let y=t.getState(),m,g;try{m=r(y,o.current)}catch(f){g=f,d=f}g||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wP(e,t){return e===t}function bP(e,t,n,{pure:r,areStatesEqual:o=wP,areOwnPropsEqual:i=di,areStatePropsEqual:s=di,areMergedPropsEqual:a=di,forwardRef:l=!1,context:u=Fe}={}){let c=u,p=xx(e),d=Sx(t),h=_x(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",f=`Connect(${g})`,S={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:g,WrappedComponent:m,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(C){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:ce}=C,Or=Ys(C,yP);return[C.context,ce,Or]},[C]),H=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Ex.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Z.useContext)(H),Ve=!!C.store&&!!C.store.getState&&!!C.store.dispatch,cn=!!z&&!!z.store,qt=Ve?C.store:z.store,yo=cn?z.getServerState:qt.getState,Ui=(0,Z.useMemo)(()=>Mm(qt.dispatch,S),[qt]),[Lr,Ua]=(0,Z.useMemo)(()=>{if(!v)return vP;let ce=Xu(qt,Ve?void 0:z.subscription),Or=ce.notifyNestedSubs.bind(ce);return[ce,Or]},[qt,Ve,z]),Va=(0,Z.useMemo)(()=>Ve?z:Sn({},z,{subscription:Lr}),[Ve,z,Lr]),Vi=(0,Z.useRef)(),Ki=(0,Z.useRef)(N),Ar=(0,Z.useRef)(),vo=(0,Z.useRef)(!1),Ld=(0,Z.useRef)(!1),Gt=(0,Z.useRef)(!1),I=(0,Z.useRef)();ci(()=>(Gt.current=!0,()=>{Gt.current=!1}),[]);let X=(0,Z.useMemo)(()=>()=>Ar.current&&N===Ki.current?Ar.current:Ui(qt.getState(),N),[qt,N]),Xt=(0,Z.useMemo)(()=>Or=>Lr?_P(v,qt,Lr,Ui,Ki,Vi,vo,Gt,Ar,Ua,Or):()=>{},[Lr]);SP(xP,[Ki,Vi,vo,N,Ar,Ua]);let Lt;try{Lt=Cx(Xt,X,yo?()=>Ui(yo(),N):X)}catch(ce){throw I.current&&(ce.message+=`
10
10
  The error may be correlated with this previous error:
11
11
  ${I.current.stack}
12
12
 
13
- `),ce}ci(()=>{I.current=void 0,Ar.current=void 0,Vi.current=Lt});let zn=(0,Z.useMemo)(()=>Z.default.createElement(m,Sn({},Lt,{ref:P})),[P,m,Lt]);return(0,Z.useMemo)(()=>v?Z.default.createElement(H.Provider,{value:Va},zn):zn,[H,zn,Va])}let E=Z.default.memo(_);if(E.WrappedComponent=m,E.displayName=_.displayName=f,l){let R=Z.default.forwardRef(function(N,H){return Z.default.createElement(E,Sn({},N,{reactReduxForwardedRef:H}))});return R.displayName=f,R.WrappedComponent=m,(0,Dm.default)(R,m)}return(0,Dm.default)(E,m)}}var xn=bP;var Js=x(O());function EP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Js.useMemo)(()=>{let u=Xu(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]);ci(()=>{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||Fe;return Js.default.createElement(l.Provider,{value:s},n)}var Fm=EP;function Yu(e=Fe){let t=e===Fe?Tu:Qs(e);return function(){let{store:r}=t();return r}}var jm=Yu();function kx(e=Fe){let t=e===Fe?jm:Yu(e);return function(){return t().dispatch}}var U=kx();tx(Rx.useSyncExternalStoreWithSelector);Tx(Px.useSyncExternalStore);X0(Tm.unstable_batchedUpdates);var ea=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ea||{});var CP={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"},Ix=j({name:"settings",initialState:CP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ta}=Ix.actions,Bm=e=>t=>t.settings[e],M=e=>L(Bm(e)),Lx=Ix.reducer;var Fw=x(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function h(){for(var y=-1*u;y<=u;y+=2){var m=void 0,g=p[y-1],f=p[y+1],S=(f?f.newPos:0)-y;g&&(p[y-1]=void 0);var _=g&&g.newPos+1<a,b=f&&0<=S&&S<l;if(!_&&!b){p[y]=void 0;continue}if(!_||b&&g.newPos<f.newPos?(m=kP(f),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),S=i.extractCommon(m,n,t,y),m.newPos+1>=a&&S+1>=l)return s(TP(i,m.components,n,t,i.useLongestToken));p[y]=m}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();h()||y()},0)})();else for(;u<=c;){var v=h();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 TP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,v){var y=r[l+v];return y.length>h.length?y:h}),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 kP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var PP=new _n;function Nx(e,t,n){return PP.diff(e,t,n)}var Ax=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ox=/\S/,Mx=new _n;Mx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Ox.test(e)&&!Ox.test(t)};Mx.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]&&Ax.test(t[n])&&Ax.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Dx=new _n;Dx.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 RP=new _n;RP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var IP=new _n;IP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Zu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zu=function(t){return typeof t}:Zu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}var LP=Object.prototype.toString,na=new _n;na.useLongestToken=!0;na.tokenize=Dx.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(Hm(e,null,null,o),o," ")};na.equals=function(e,t){return _n.prototype.equals.call(na,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Hm(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(LP.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]=Hm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Zu(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]=Hm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var zm=new _n;zm.tokenize=function(e){return e.slice()};zm.join=zm.removeEmpty=function(e){return e};function Fx(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)):Fx(e)&&Fx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>gr(e[s],t[s],n-1)):!1}function AP(e){return Math.max(...e.map(t=>t.length))}function OP(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 jx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AP(r);o++){let i=OP(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 NP=2;function Um(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=jx(e,NP);return n&&n.text!==t?n:e[0]}var Bx={current:null,isSupported:null},J=fe("resetConversation"),Ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},ec=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},pi=e=>e.conversation.isSupported,Vm=D("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),tc=D("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),nc=D("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),rc=D("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Km=D("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})})}),oc=D("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),MP=[tc.rejected,nc.rejected,rc.rejected,oc.rejected].map(e=>e==null?void 0:e.toString()),DP=j({name:"conversation",initialState:Bx,reducers:{},extraReducers:e=>{e.addCase(Vm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(tc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(nc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Km.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(rc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(oc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Bx).addMatcher(t=>MP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Hx=DP.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 sc(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 ac=fe("input/replaceText"),lc=fe("input/keyDown"),Jr=fe("input/sendMessage"),uc=fe("input/sendEditSuggestionMessage"),cc=fe("input/uiInputChange"),dc=fe("input/applyImageSuggestion"),je=fe("input/sendEvent");function ic(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var zx=e=>j({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=Um(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&&ic(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:p,ctrlKey:d,metaKey:h,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=t,{text:m}=n.payload,g=Nx(y,m);y.length-m.length>1&&t.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-m.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}break;case"Shift":break;default:if(!d&&!h&&!v){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}}}!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&&ic(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"&&ic(t)},commitSuggestion(t){ic(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=Um(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})}}),Wm=zx("input"),fi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),FP=e=>e.input.selection,Ux=()=>L(FP),{userInput:Vx,changeSelection:$m,initialInput:Kx,mergeMetrics:Wx,nextTextSuggestionIndex:$x,offeredTextSuggestion:qx,previousTextSuggestionIndex:Gx,registerCut:Xx,registerKeyDown:Qx,registerPaste:Yx,reset:Zx,resetToCommitted:ra,platformInput:Jx,setSelectedTextSuggestionIndex:yr,setTextSuggestions:on,stageSuggestion:Ft,commitSuggestion:vr}=Wm.actions,et=zx("overlay");var mi=x(O());var e_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var qm=x(w()),jP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,mi.useRef)(null),l=(0,mi.useRef)(null),u=k("Dialog",e_);return(0,mi.useEffect)(()=>{var d,h;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let y=window.getSelection();y!=null&&y.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var v,y;(v=a.current)==null||v.removeEventListener("click",p),(y=a.current)==null||y.removeEventListener("keyup",c)}},[a,l,o,r]),(0,mi.useEffect)(()=>{var c,p;!a.current||!e||!t||(p=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||p.focus()},[e,t,a]),e?(0,qm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,qm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},gi=jP;var Og=x(O());var Gm={};Ie(Gm,{enUS:()=>BP,nlNL:()=>HP});var BP={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?"}]},HP={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 t_={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 Cc=x(O());var Xm=function(e,t){return Xm=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])},Xm(e,t)};function oa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Xm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lt=function(){return lt=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},lt.apply(this,arguments)};function n_(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 pc(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 fc;(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"})(fc||(fc={}));var mc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var jt;(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"})(jt||(jt={}));var gc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(gc||(gc={}));function Qm(e){return e.type===jt.literal}function r_(e){return e.type===jt.argument}function hc(e){return e.type===jt.number}function yc(e){return e.type===jt.date}function vc(e){return e.type===jt.time}function Sc(e){return e.type===jt.select}function xc(e){return e.type===jt.plural}function o_(e){return e.type===jt.pound}function _c(e){return e.type===jt.tag}function wc(e){return!!(e&&typeof e=="object"&&e.type===gc.number)}function ia(e){return!!(e&&typeof e=="object"&&e.type===gc.dateTime)}function Ym(e){e.forEach(function(t){if(delete t.location,Sc(t)||xc(t))for(var n in t.options)delete t.options[n].location,Ym(t.options[n].value);else hc(t)&&wc(t.style)||(yc(t)||vc(t))&&ia(t.style)?delete t.style.location:_c(t)&&Ym(t.children)})}function i_(e,t){t===void 0&&(t={}),t=lt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new mc(e,t).parse();if(n.err){var r=SyntaxError(fc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ym(n.val),n.val}function bc(e,t){var n=t&&t.cache?t.cache:$P,r=t&&t.serializer?t.serializer:WP,o=t&&t.strategy?t.strategy:UP;return o(e,{cache:n,serializer:r})}function zP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function s_(e,t,n,r){var o=zP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function a_(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 Zm(e,t,n,r,o){return n.bind(t,e,r,o)}function UP(e,t){var n=e.length===1?s_:a_;return Zm(e,this,n,t.cache.create(),t.serializer)}function VP(e,t){return Zm(e,this,a_,t.cache.create(),t.serializer)}function KP(e,t){return Zm(e,this,s_,t.cache.create(),t.serializer)}var WP=function(){return JSON.stringify(arguments)};function Jm(){this.cache=Object.create(null)}Jm.prototype.get=function(e){return this.cache[e]};Jm.prototype.set=function(e,t){this.cache[e]=t};var $P={create:function(){return new Jm}},Ec={variadic:VP,monadic:KP};var eo;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(eo||(eo={}));var sa=function(e){oa(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 eg=function(e){oa(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('", "'),'"'),eo.INVALID_VALUE,i)||this}return t}(sa);var l_=function(e){oa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),eo.INVALID_VALUE,o)||this}return t}(sa);var u_=function(e){oa(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,'"'),eo.MISSING_VALUE,r)||this}return t}(sa);var Be;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Be||(Be={}));function qP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Be.literal||n.type!==Be.literal?t.push(n):r.value+=n.value,t},[])}function GP(e){return typeof e=="function"}function aa(e,t,n,r,o,i,s){if(e.length===1&&Qm(e[0]))return[{type:Be.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Qm(c)){a.push({type:Be.literal,value:c.value});continue}if(o_(c)){typeof i=="number"&&a.push({type:Be.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new u_(p,s);var d=o[p];if(r_(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Be.literal:Be.object,value:d});continue}if(yc(c)){var h=typeof c.style=="string"?r.date[c.style]:ia(c.style)?c.style.parsedOptions:void 0;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(vc(c)){var h=typeof c.style=="string"?r.time[c.style]:ia(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(hc(c)){var h=typeof c.style=="string"?r.number[c.style]:wc(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:Be.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(_c(c)){var v=c.children,y=c.value,m=o[y];if(!GP(m))throw new l_(y,"function",s);var g=aa(v,t,n,r,o,i),f=m(g.map(function(b){return b.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(b){return{type:typeof b=="string"?Be.literal:Be.object,value:b}}))}if(Sc(c)){var S=c.options[d]||c.options.other;if(!S)throw new eg(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o));continue}if(xc(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new sa(`Intl.PluralRules is not available in this environment.
13
+ `),ce}ci(()=>{I.current=void 0,Ar.current=void 0,Vi.current=Lt});let zn=(0,Z.useMemo)(()=>Z.default.createElement(m,Sn({},Lt,{ref:P})),[P,m,Lt]);return(0,Z.useMemo)(()=>v?Z.default.createElement(H.Provider,{value:Va},zn):zn,[H,zn,Va])}let E=Z.default.memo(_);if(E.WrappedComponent=m,E.displayName=_.displayName=f,l){let R=Z.default.forwardRef(function(N,H){return Z.default.createElement(E,Sn({},N,{reactReduxForwardedRef:H}))});return R.displayName=f,R.WrappedComponent=m,(0,Fm.default)(R,m)}return(0,Fm.default)(E,m)}}var xn=bP;var Js=x(O());function EP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Js.useMemo)(()=>{let u=Xu(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]);ci(()=>{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||Fe;return Js.default.createElement(l.Provider,{value:s},n)}var jm=EP;function Yu(e=Fe){let t=e===Fe?Tu:Qs(e);return function(){let{store:r}=t();return r}}var Bm=Yu();function kx(e=Fe){let t=e===Fe?Bm:Yu(e);return function(){return t().dispatch}}var U=kx();tx(Rx.useSyncExternalStoreWithSelector);Tx(Px.useSyncExternalStore);X0(km.unstable_batchedUpdates);var ea=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ea||{});var CP={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"},Ix=j({name:"settings",initialState:CP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ta}=Ix.actions,Hm=e=>t=>t.settings[e],M=e=>L(Hm(e)),Lx=Ix.reducer;var Fw=x(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function h(){for(var y=-1*u;y<=u;y+=2){var m=void 0,g=p[y-1],f=p[y+1],S=(f?f.newPos:0)-y;g&&(p[y-1]=void 0);var _=g&&g.newPos+1<a,b=f&&0<=S&&S<l;if(!_&&!b){p[y]=void 0;continue}if(!_||b&&g.newPos<f.newPos?(m=kP(f),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),S=i.extractCommon(m,n,t,y),m.newPos+1>=a&&S+1>=l)return s(TP(i,m.components,n,t,i.useLongestToken));p[y]=m}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();h()||y()},0)})();else for(;u<=c;){var v=h();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 TP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,v){var y=r[l+v];return y.length>h.length?y:h}),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 kP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var PP=new _n;function Nx(e,t,n){return PP.diff(e,t,n)}var Ax=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ox=/\S/,Mx=new _n;Mx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Ox.test(e)&&!Ox.test(t)};Mx.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]&&Ax.test(t[n])&&Ax.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Dx=new _n;Dx.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 RP=new _n;RP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var IP=new _n;IP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Zu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zu=function(t){return typeof t}:Zu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}var LP=Object.prototype.toString,na=new _n;na.useLongestToken=!0;na.tokenize=Dx.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(zm(e,null,null,o),o," ")};na.equals=function(e,t){return _n.prototype.equals.call(na,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function zm(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(LP.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]=zm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Zu(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]=zm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Um=new _n;Um.tokenize=function(e){return e.slice()};Um.join=Um.removeEmpty=function(e){return e};function Fx(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)):Fx(e)&&Fx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>gr(e[s],t[s],n-1)):!1}function AP(e){return Math.max(...e.map(t=>t.length))}function OP(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 jx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AP(r);o++){let i=OP(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 NP=2;function Vm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=jx(e,NP);return n&&n.text!==t?n:e[0]}var Bx={current:null,isSupported:null},J=fe("resetConversation"),Ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},ec=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},pi=e=>e.conversation.isSupported,Km=D("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),tc=D("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),nc=D("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),rc=D("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Wm=D("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})})}),oc=D("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),MP=[tc.rejected,nc.rejected,rc.rejected,oc.rejected].map(e=>e==null?void 0:e.toString()),DP=j({name:"conversation",initialState:Bx,reducers:{},extraReducers:e=>{e.addCase(Km.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(tc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(nc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Wm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(rc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(oc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Bx).addMatcher(t=>MP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Hx=DP.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 sc(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 ac=fe("input/replaceText"),lc=fe("input/keyDown"),Jr=fe("input/sendMessage"),uc=fe("input/sendEditSuggestionMessage"),cc=fe("input/uiInputChange"),dc=fe("input/applyImageSuggestion"),je=fe("input/sendEvent");function ic(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var zx=e=>j({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=Vm(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&&ic(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:p,ctrlKey:d,metaKey:h,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=t,{text:m}=n.payload,g=Nx(y,m);y.length-m.length>1&&t.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-m.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}break;case"Shift":break;default:if(!d&&!h&&!v){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}}}!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&&ic(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"&&ic(t)},commitSuggestion(t){ic(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=Vm(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})}}),$m=zx("input"),fi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),FP=e=>e.input.selection,Ux=()=>L(FP),{userInput:Vx,changeSelection:qm,initialInput:Kx,mergeMetrics:Wx,nextTextSuggestionIndex:$x,offeredTextSuggestion:qx,previousTextSuggestionIndex:Gx,registerCut:Xx,registerKeyDown:Qx,registerPaste:Yx,reset:Zx,resetToCommitted:ra,platformInput:Jx,setSelectedTextSuggestionIndex:yr,setTextSuggestions:on,stageSuggestion:Ft,commitSuggestion:vr}=$m.actions,et=zx("overlay");var mi=x(O());var e_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Gm=x(w()),jP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,mi.useRef)(null),l=(0,mi.useRef)(null),u=k("Dialog",e_);return(0,mi.useEffect)(()=>{var d,h;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let y=window.getSelection();y!=null&&y.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var v,y;(v=a.current)==null||v.removeEventListener("click",p),(y=a.current)==null||y.removeEventListener("keyup",c)}},[a,l,o,r]),(0,mi.useEffect)(()=>{var c,p;!a.current||!e||!t||(p=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||p.focus()},[e,t,a]),e?(0,Gm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Gm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},gi=jP;var Og=x(O());var Xm={};Ie(Xm,{enUS:()=>BP,nlNL:()=>HP});var BP={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?"}]},HP={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 t_={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 Cc=x(O());var Qm=function(e,t){return Qm=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])},Qm(e,t)};function oa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lt=function(){return lt=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},lt.apply(this,arguments)};function n_(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 pc(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 fc;(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"})(fc||(fc={}));var mc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var jt;(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"})(jt||(jt={}));var gc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(gc||(gc={}));function Ym(e){return e.type===jt.literal}function r_(e){return e.type===jt.argument}function hc(e){return e.type===jt.number}function yc(e){return e.type===jt.date}function vc(e){return e.type===jt.time}function Sc(e){return e.type===jt.select}function xc(e){return e.type===jt.plural}function o_(e){return e.type===jt.pound}function _c(e){return e.type===jt.tag}function wc(e){return!!(e&&typeof e=="object"&&e.type===gc.number)}function ia(e){return!!(e&&typeof e=="object"&&e.type===gc.dateTime)}function Zm(e){e.forEach(function(t){if(delete t.location,Sc(t)||xc(t))for(var n in t.options)delete t.options[n].location,Zm(t.options[n].value);else hc(t)&&wc(t.style)||(yc(t)||vc(t))&&ia(t.style)?delete t.style.location:_c(t)&&Zm(t.children)})}function i_(e,t){t===void 0&&(t={}),t=lt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new mc(e,t).parse();if(n.err){var r=SyntaxError(fc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Zm(n.val),n.val}function bc(e,t){var n=t&&t.cache?t.cache:$P,r=t&&t.serializer?t.serializer:WP,o=t&&t.strategy?t.strategy:UP;return o(e,{cache:n,serializer:r})}function zP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function s_(e,t,n,r){var o=zP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function a_(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 Jm(e,t,n,r,o){return n.bind(t,e,r,o)}function UP(e,t){var n=e.length===1?s_:a_;return Jm(e,this,n,t.cache.create(),t.serializer)}function VP(e,t){return Jm(e,this,a_,t.cache.create(),t.serializer)}function KP(e,t){return Jm(e,this,s_,t.cache.create(),t.serializer)}var WP=function(){return JSON.stringify(arguments)};function eg(){this.cache=Object.create(null)}eg.prototype.get=function(e){return this.cache[e]};eg.prototype.set=function(e,t){this.cache[e]=t};var $P={create:function(){return new eg}},Ec={variadic:VP,monadic:KP};var eo;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(eo||(eo={}));var sa=function(e){oa(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 tg=function(e){oa(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('", "'),'"'),eo.INVALID_VALUE,i)||this}return t}(sa);var l_=function(e){oa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),eo.INVALID_VALUE,o)||this}return t}(sa);var u_=function(e){oa(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,'"'),eo.MISSING_VALUE,r)||this}return t}(sa);var Be;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Be||(Be={}));function qP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Be.literal||n.type!==Be.literal?t.push(n):r.value+=n.value,t},[])}function GP(e){return typeof e=="function"}function aa(e,t,n,r,o,i,s){if(e.length===1&&Ym(e[0]))return[{type:Be.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Ym(c)){a.push({type:Be.literal,value:c.value});continue}if(o_(c)){typeof i=="number"&&a.push({type:Be.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new u_(p,s);var d=o[p];if(r_(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Be.literal:Be.object,value:d});continue}if(yc(c)){var h=typeof c.style=="string"?r.date[c.style]:ia(c.style)?c.style.parsedOptions:void 0;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(vc(c)){var h=typeof c.style=="string"?r.time[c.style]:ia(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(hc(c)){var h=typeof c.style=="string"?r.number[c.style]:wc(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:Be.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(_c(c)){var v=c.children,y=c.value,m=o[y];if(!GP(m))throw new l_(y,"function",s);var g=aa(v,t,n,r,o,i),f=m(g.map(function(b){return b.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(b){return{type:typeof b=="string"?Be.literal:Be.object,value:b}}))}if(Sc(c)){var S=c.options[d]||c.options.other;if(!S)throw new tg(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o));continue}if(xc(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new sa(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,eo.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[_]||c.options.other}if(!S)throw new eg(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o,d-(c.offset||0)));continue}}return qP(a)}function XP(e,t){return t?lt(lt(lt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=lt(lt({},e[r]),t[r]||{}),n},{})):e}function QP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=XP(e[r],t[r]),n},lt({},e)):e}function tg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function YP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:tg(e.number),strategy:Ec.variadic}),getDateTimeFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:tg(e.dateTime),strategy:Ec.variadic}),getPluralRules:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,pc([void 0],n,!1)))},{cache:tg(e.pluralRules),strategy:Ec.variadic})}}var c_=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,h){return!d.length||h.type!==Be.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return aa(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=n_(s,["formatters"]);this.ast=e.__parse(t,lt(lt({},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=QP(e.formats,r),this.formatters=o&&o.formatters||YP(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=i_,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 ZP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var JP="dummy",ng=(0,Cc.createContext)(null);function B(e){let t=(0,Cc.useContext)(ng);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=ZP(n,r);return i?new c_(i).format(o):(t!==JP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var la=x(w()),Tc=()=>(0,la.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,la.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,la.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 ua=x(w()),d_=()=>(0,ua.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ua.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ua.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 kc=x(O());function ca(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,og=2,ig=4,xe=8,Pc=16,da=32,Bt=64,rg={a:{content:G|xe,self:!1,type:G|xe|da|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|xe,void:!0},body:{content:G|og|ig|xe|Pc|da|Bt},button:{content:xe,type:G|xe|da|Bt},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|da|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|xe|Pc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:xe,parent:["ruby","rtc"]},rtc:{content:xe,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:xe,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|xe,void:!0}};function no(e){return t=>{rg[t]={...e,...rg[t]}}}["address","main","div","figure","p","pre"].forEach(no({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(no({content:xe,type:G|xe|Bt}));["p","pre"].forEach(no({content:xe,type:G|Bt}));["s","small","span","del","ins"].forEach(no({content:xe,type:G|xe}));["article","aside","footer","header","nav","section","blockquote"].forEach(no({content:G,type:G|og|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(no({content:xe,type:G|ig|Bt}));["audio","canvas","iframe","img","video"].forEach(no({type:G|xe|Pc|Bt}));var fa=Object.freeze(rg),sg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ag=Object.keys(fa).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,lg=2,to=3,Sr=4,Ic=5,Lc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:to,controls:Sr,datetime:ee,default:Sr,disabled:Sr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:Sr,media:ee,muted:Sr,poster:ee,rel:ee,role:ee,rowspan:to,scope:ee,sizes:ee,span:to,start:to,style:Ic,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),ug=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Rc(){return Rc=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},Rc.apply(this,arguments)}function Ac({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?kc.default.createElement(i,Rc({className:t},e)):kc.default.createElement(i,Rc({className:t},e),n)}var pa=class{attribute(t,n){return n}node(t,n){return n}};function p_(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 wn=class{constructor(t,n,r){ca(this,"greedy",!1),ca(this,"options",void 0),ca(this,"propName",void 0),ca(this,"inverseName",void 0),ca(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?kc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return p_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ro=x(O()),h_=x(m_());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nR=/(url|image|image-set)\(/i,cg=class extends pa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(nR)&&delete n[r]}),n}},g_=1,rR=3,oR=/^<(!doctype|(html|head|body)(\s|>))/i,iR=/^(aria-|data-|\w+:)/iu,sR=/{{{(\w+)\/?}}}/;function aR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Oc=class{constructor(t,n={},r=[],o=[]){var i;bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new cg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ag),this.banned=new Set(sg),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:v,valid:y,void:m,...g}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=m?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...g,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||v.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
15
+ `,eo.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[_]||c.options.other}if(!S)throw new tg(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o,d-(c.offset||0)));continue}}return qP(a)}function XP(e,t){return t?lt(lt(lt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=lt(lt({},e[r]),t[r]||{}),n},{})):e}function QP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=XP(e[r],t[r]),n},lt({},e)):e}function ng(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function YP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:ng(e.number),strategy:Ec.variadic}),getDateTimeFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:ng(e.dateTime),strategy:Ec.variadic}),getPluralRules:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,pc([void 0],n,!1)))},{cache:ng(e.pluralRules),strategy:Ec.variadic})}}var c_=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,h){return!d.length||h.type!==Be.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return aa(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=n_(s,["formatters"]);this.ast=e.__parse(t,lt(lt({},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=QP(e.formats,r),this.formatters=o&&o.formatters||YP(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=i_,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 ZP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var JP="dummy",rg=(0,Cc.createContext)(null);function B(e){let t=(0,Cc.useContext)(rg);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=ZP(n,r);return i?new c_(i).format(o):(t!==JP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var la=x(w()),Tc=()=>(0,la.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,la.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,la.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 ua=x(w()),d_=()=>(0,ua.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ua.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ua.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 kc=x(O());function ca(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,ig=2,sg=4,xe=8,Pc=16,da=32,Bt=64,og={a:{content:G|xe,self:!1,type:G|xe|da|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|xe,void:!0},body:{content:G|ig|sg|xe|Pc|da|Bt},button:{content:xe,type:G|xe|da|Bt},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|da|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|xe|Pc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:xe,parent:["ruby","rtc"]},rtc:{content:xe,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:xe,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|xe,void:!0}};function no(e){return t=>{og[t]={...e,...og[t]}}}["address","main","div","figure","p","pre"].forEach(no({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(no({content:xe,type:G|xe|Bt}));["p","pre"].forEach(no({content:xe,type:G|Bt}));["s","small","span","del","ins"].forEach(no({content:xe,type:G|xe}));["article","aside","footer","header","nav","section","blockquote"].forEach(no({content:G,type:G|ig|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(no({content:xe,type:G|sg|Bt}));["audio","canvas","iframe","img","video"].forEach(no({type:G|xe|Pc|Bt}));var fa=Object.freeze(og),ag=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],lg=Object.keys(fa).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,ug=2,to=3,Sr=4,Ic=5,Lc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:to,controls:Sr,datetime:ee,default:Sr,disabled:Sr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:Sr,media:ee,muted:Sr,poster:ee,rel:ee,role:ee,rowspan:to,scope:ee,sizes:ee,span:to,start:to,style:Ic,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),cg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Rc(){return Rc=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},Rc.apply(this,arguments)}function Ac({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?kc.default.createElement(i,Rc({className:t},e)):kc.default.createElement(i,Rc({className:t},e),n)}var pa=class{attribute(t,n){return n}node(t,n){return n}};function p_(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 wn=class{constructor(t,n,r){ca(this,"greedy",!1),ca(this,"options",void 0),ca(this,"propName",void 0),ca(this,"inverseName",void 0),ca(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?kc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return p_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ro=x(O()),h_=x(m_());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nR=/(url|image|image-set)\(/i,dg=class extends pa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(nR)&&delete n[r]}),n}},g_=1,rR=3,oR=/^<(!doctype|(html|head|body)(\s|>))/i,iR=/^(aria-|data-|\w+:)/iu,sR=/{{{(\w+)\/?}}}/;function aR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Oc=class{constructor(t,n={},r=[],o=[]){var i;bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new dg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:lg),this.banned=new Set(ag),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:v,valid:y,void:m,...g}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=m?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...g,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||v.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||aR)();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(oR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,h_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==g_||!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(iR)&&(!n&&(!u||u===lg)||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===Sr?c=!0:u===to?c=Number.parseFloat(String(c)):u!==Ic&&(c=String(c)),r[ug[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 fa[t]?{...n,...fa[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===g_){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let m=this.keyIndex;y=this.parseNode(v,h);let g=s(v,y,h);if(g===null)return;if(typeof g<"u"){l.push(ro.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,h))){var p;this.keyIndex+=1;let m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),h.void&&(g.selfClose=h.void),l.push(ro.default.createElement(Ac,{...g,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,h)))}else l=[...l,...this.parseNode(v,h.tagName?h:n)]}else if(c.nodeType===rR){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(sR);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));h=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function lR(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Oc(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?ro.default.createElement(ro.default.Fragment,null,d):ro.default.createElement(Ac,{attributes:n,className:r,tagName:c},d)}function En(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...h}=e,v=i?[]:l,y=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(b=>{b.onBeforeParse&&m.push(b.onBeforeParse.bind(b)),b.onAfterParse&&g.push(b.onAfterParse.bind(b))});let f=m.reduce((b,E)=>E(b,e),r??""),S=new Oc(f,h,v,y),_=g.reduce((b,E)=>E(b,e),S.parse());return ro.default.createElement(lR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var wg=x($());var dg={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 v_=x($());var hi=x(O());function y_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Nc(e){let t=(0,hi.useRef)(null),[n,r]=(0,hi.useState)(!1);return(0,hi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=y_((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),m=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=y_(()=>{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 Cn={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 pg=x(w()),uR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Cn),[r,o]=Nc(e);return(0,pg.jsx)("mark",{ref:r,className:(0,v_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},yi=class extends wn{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,pg.jsx)(uR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var vi=x(O());function Mc(e){return e.contentEditable==="true"}function cR(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 S_(e){let{selectionStart:t,selectionEnd:n}=Mc(e)?cR(e):e;return[t,n]}function Dc(e){let[,t]=(0,vi.useState)(),n=(0,vi.useRef)(null);return n.current=S_(e),(0,vi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=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 Fc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Eo);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 x_=x(O());function Si(e){(0,x_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function oo(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var __,sn=new Map,dR=["bottom","height","left","right","top","width"],pR=(e={},t={})=>dR.some(n=>e[n]!==t[n]);function w_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...w_(t)]:[]}function b_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var fg=!1,E_=()=>{fg=!0;let e=[];sn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),sn.delete(n);return}let r=n.getBoundingClientRect();pR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(b_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),sn.size!==0&&(__=window.requestAnimationFrame(E_))};function mg(e,t){let n=w_(e),r=[],o=n.map((i,s)=>mg(i,a=>{r[s]=a;let l=sn.get(e);if(!l)return;let u=r.reduce(b_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),sn.has(e)){let s=sn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else sn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!fg&&E_()},unobserve(){o.forEach(s=>s.unobserve());let i=sn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||sn.delete(e),sn.size||(cancelAnimationFrame(__),fg=!1)}}}}var C_,an=new Map,T_=()=>{an.forEach((e,t)=>{if(!t.isConnected){an.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),an.size!==0&&(C_=window.requestAnimationFrame(T_))};function k_(e,t){return{observe(){let n=an.size===0;an.has(e)?an.get(e).callbacks.push(t):an.set(e,{visible:void 0,callbacks:[t]}),n&&T_()},unobserve(){let n=an.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||an.delete(e),an.size||cancelAnimationFrame(C_)}}}}var gg=["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 hg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function xi(e){return parseFloat(e)}function jc(e){return Math.round(e*1e6)}function P_(e){return e/1e6}function yg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=xi(e.width),i=xi(e.borderLeftWidth),s=xi(e.borderRightWidth),a=xi(e.paddingRight),l=P_(jc(o)-jc(i)-jc(s)),u=P_(jc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function io(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",oo(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};hg(r,n,gg),yg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=k_(e,()=>{hg(r,n,gg),yg(r,e,n),i(),setTimeout(i,0)}),a=mg(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(hg(r,n,gg),yg(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(),p=window.getComputedStyle(t.closestScrollElement),d=xi(p.borderTopWidth),h=xi(p.borderBottomWidth),v=c.top+d-u.top,y=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${v}px 0px ${y}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 vg={};Ie(vg,{enUS:()=>fR,nlNL:()=>mR});var fR={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"}]},mR={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 ma=x(w()),R_=()=>(0,ma.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ma.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ma.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 Sg=x(w()),I_=()=>(0,Sg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Sg.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 gR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Bc(e){return e?e instanceof ShadowRoot?Bc(e.host):e===e.ownerDocument.body?e.ownerDocument:gR(e)?e:Bc(e.parentNode):document.body}var L_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(L_||{}),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(L_).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=Bc(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)})}this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};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 hR=/[.*+?^${}()|[\]\\]/g,yR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function vR(e){return e.replace(hR,"\\$&")}function SR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function xR(e){return e.search(yR)}function A_(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${vR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function O_(e){return e.replace(Eo,'<mark data-type="placeholder">$1</mark>')}function _i(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function _R(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 xg(e,t,n={}){if(t){let r=SR(t.toLowerCase(),e.toLowerCase()),o=_i(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=xR(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(yy).length>3||t.length>30?_R(t.trim(),r):0;return`${`${s>0?"\u2026":""}${_i(e.substring(s,r))}`}<strong>${o}</strong>`}return e}function _g(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function Hc(e){if(_g(e)){let n=/<body[^>]*>([\s\S]*)<\/body>/gi.exec(e);return n?n[1]:""}return e}var He=x(w()),wR=({value:e,onUse:t,...n})=>{var p;let r=B(vg),o=U(),i=_g(e),s=k("EditSuggestionTextInput",dg),[a,l]=(0,kt.useState)(null),u=(0,kt.useRef)(null),c=((p=e.match(Eo))==null?void 0:p.length)||0;return(0,kt.useEffect)(()=>{let d;return u.current&&(l(u.current),d=new kn(u.current),d.on("change",({plainText:h})=>{o(et.actions.userInput({text:h,selection:d.getSelection()}))}),d.on("keydown",h=>{o(et.actions.registerKeyDown(sc(h))),h.code==="Enter"&&h.shiftKey&&t(d.getText())}),d.on("paste",({pastedText:h,selectionText:v})=>{o(et.actions.registerPaste({text:h,selectionText:v}))}),d.on("cut",({selectionText:h})=>{o(et.actions.registerCut(h))})),()=>{o(et.actions.reset()),d.dispose(),d.deactivate()}},[u]),(0,kt.useEffect)(()=>{e&&u.current&&(u.current.value=e)},[e,u]),(0,kt.useEffect)(()=>{u.current&&setTimeout(()=>{if(!u.current)return;let d=u.current.value.length;u.current.setSelectionRange(d,d),u.current.focus()},0)},[u]),i?(0,He.jsx)("div",{className:s.textInputWrapper,children:(0,He.jsx)(En,{className:s.textInput,tagName:"div",content:e})}):(0,He.jsxs)("div",{className:s.textInputWrapper,children:[(0,He.jsx)("textarea",{...n,ref:u,"data-testid":"edit-suggestion-dialog-textarea",className:s.textInput,defaultValue:e,onChange:()=>{}}),a&&(0,He.jsx)(bR,{inputElement:u.current,value:e}),(0,He.jsxs)("div",{className:(0,wg.default)(s.alert,c===0?s.success:s.warning),children:[(0,He.jsx)("div",{className:s.alertText,children:r("placeholders",{placeholderSize:c})}),c===0?(0,He.jsx)(R_,{}):(0,He.jsx)(I_,{})]})]})},bR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",dg),r=(0,kt.useRef)(null),o=Dc(e);return(0,kt.useEffect)(()=>{Fc(e,o)},[o,e]),(0,He.jsx)(ER,{inputElement:e,children:(0,He.jsxs)("div",{ref:r,className:(0,wg.default)(n.root,n.agentText),children:[(0,He.jsx)(En,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new yi("placeholders")],inputElement:e,boundaryRef:r}),(0,He.jsx)("br",{})]})})},ER=({inputElement:e,children:t})=>{let n=(0,kt.useRef)(null);return(0,kt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=io(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,He.jsx)("div",{ref:n,children:t})},N_=wR;var Ei=x(O());var M_=x(O()),zc=x($());var tt={root:"_root_pc5uy_1",list:"_list_pc5uy_2",listWrapper:"_listWrapper_pc5uy_6",listHorizontal:"_listHorizontal_pc5uy_10",page:"_page_pc5uy_19",search:"_search_pc5uy_25",pageNav:"_pageNav_pc5uy_33",pageTitle:"_pageTitle_pc5uy_41",pageBackButton:"_pageBackButton_pc5uy_48",listHeading:"_listHeading_pc5uy_62",listItem:"_listItem_pc5uy_70",listItemContent:"_listItemContent_pc5uy_79",listItemText:"_listItemText_pc5uy_97",listItemDescription:"_listItemDescription_pc5uy_105",listItemActions:"_listItemActions_pc5uy_112",truncate:"_truncate_pc5uy_123",lineClamp:"_lineClamp_pc5uy_129",listItemTitle:"_listItemTitle_pc5uy_136",listItemAction:"_listItemAction_pc5uy_112",listItemPrimaryAction:"_listItemPrimaryAction_pc5uy_157",listItemSelected:"_listItemSelected_pc5uy_162",sources:"_sources_pc5uy_166",sourcesTitle:"_sourcesTitle_pc5uy_173",source:"_source_pc5uy_166",icon:"_icon_pc5uy_188",searchIcon:"_searchIcon_pc5uy_205",searchInputWrapper:"_searchInputWrapper_pc5uy_210",searchInput:"_searchInput_pc5uy_210",select:"_select_pc5uy_231",selectType:"_selectType_pc5uy_248",selectWrapper:"_selectWrapper_pc5uy_252",image:"_image_pc5uy_282",imageSrc:"_imageSrc_pc5uy_289",imageSrcHidden:"_imageSrcHidden_pc5uy_300",imageSrcStatus:"_imageSrcStatus_pc5uy_304",imageTitle:"_imageTitle_pc5uy_314",actions:"_actions_pc5uy_319",actionsWrapper:"_actionsWrapper_pc5uy_323",actionsBar:"_actionsBar_pc5uy_329",actionButton:"_actionButton_pc5uy_338",actionShortcut:"_actionShortcut_pc5uy_356",actionShortcutFixKerning:"_actionShortcutFixKerning_pc5uy_363"};var so={};Ie(so,{enUS:()=>CR,nlNL:()=>TR});var CR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},TR={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()),kR=({src:e,title:t})=>{let n=k("CommandPalette",tt),[r,o]=(0,M_.useState)("loading"),i=B(so);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,zc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,zc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,zc.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(Qa,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},D_=kR;var F_=x(O()),j_=x($());var ga=x(w());function bg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",tt);return F_.default.Children.count(e)===0?null:(0,ga.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ga.jsx)("h4",{className:r.listHeading,children:t}),(0,ga.jsx)("div",{className:(0,j_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ha=x($());var Uc=x(O()),z_=x(w()),B_=Uc.default.createContext(void 0);function _r(){let e=Uc.default.useContext(B_);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=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,z_.jsx)(B_.Provider,{value:s,children:e})};var Re=x(O()),U_=x($());var Eg={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var ao=x(w()),PR=0,V_=Re.default.createContext(null),RR=()=>{let e=(0,Re.useContext)(V_);if(!e)throw new Error("Invalid DropdownContext");return e},K_=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Re.useMemo)(()=>++PR,[]),o=(0,Re.useRef)(null),i=(0,Re.useRef)(null),s=k("Dropdown",Eg),[a,l]=(0,Re.useState)(!1),[u,c]=(0,Re.useState)(n),p=h=>{h.preventDefault(),h.stopPropagation(),l(!a)},d=(0,Re.useCallback)(([h])=>{!h.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Re.useEffect)(()=>{let h=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}},[]),(0,Re.useEffect)(()=>{if(!i.current&&!a)return()=>{};let h=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&h.observe(i.current),()=>{i.current&&h.unobserve(i.current)}},[i,a]),(0,ao.jsx)(V_.Provider,{value:{setIsOpen:l},children:(0,ao.jsxs)("div",{ref:o,className:s.root,children:[(0,ao.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,ao.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,U_.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function IR({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",Eg),{setIsOpen:s}=RR(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,ao.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}K_.Item=IR;var Cg=K_;var Tg=x(w()),W_=e=>(0,Tg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Tg.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var lo={};Ie(lo,{enUS:()=>LR,nlNL:()=>AR});var LR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},AR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Vc=x(w()),OR="%0d%0a%0d%0a%0d%0a",NR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(OR)}`},MR=({suggestion:e,onFeedback:t})=>{let n=B(lo),r=M("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Vc.jsx)(Cg,{trigger:(0,Vc.jsx)(W_,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Vc.jsx)(Cg.Item,{as:"a",href:NR(r,e),onClick:t,children:n("giveFeedback")})})},Kc=MR;var ut=x(w());function kg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,index:s,description:a,sources:l,styles:u,...c}){let{selected:p,setSelected:d,onChangeOpen:h}=_r(),v=k("CommandPalette",tt);function y(m){r(m),e&&h(!1)}return(0,ut.jsxs)("div",{className:(0,ha.default)(v.listItem,p===s&&v.listItemSelected),children:[(0,ut.jsx)("button",{onMouseEnter:()=>d(s),type:"button",className:(0,ha.default)("command-palette-list-item",v.listItemAction,v.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,...c,children:(0,ut.jsxs)("div",{className:v.listItemContent,children:[typeof n=="string"?(0,ut.jsx)("p",{className:(0,ha.default)(v.listItemText,v.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,ut.jsx)(En,{tagName:"p",allowList:[],content:Hc(a),className:(0,ha.default)(v.listItemDescription,u==null?void 0:u.description,t?v.lineClamp:v.truncate)})]})}),o&&p===s&&(0,ut.jsx)("div",{className:v.listItemActions,children:(0,ut.jsx)(Kc,{suggestion:String(n),onFeedback:o})}),l&&(0,ut.jsxs)("div",{className:v.sources,children:[(0,ut.jsx)("span",{className:v.sourcesTitle,children:"Sources"}),l.map(m=>m.url?(0,ut.jsx)("a",{className:v.source,href:m.url,target:"_blank",title:m.url,rel:"noopener noreferrer",onClick:()=>i&&i(m),children:m.name},m.url):(0,ut.jsx)("span",{className:v.source,children:m.name},m.name))]})]})}var uo=x(w());function Pg({children:e,title:t,id:n,onDismiss:r}){let o=B(so),i=k("CommandPalette",tt),{page:s}=_r();return s!==n?null:(0,uo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,uo.jsxs)("div",{className:i.pageNav,children:[(0,uo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,uo.jsx)(Tc,{}),o("back")]}),t&&(0,uo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wr=x(O());var Wc=()=>/Mac/i.test(navigator.platform);var DR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=DR;function FR(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,[FR(n)]:re(e[n])}),{}):e}function Rg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function be(e){return Array.isArray(e)?e.map(be):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Rg(n)]:be(e[n])}),{}):e}var jR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},va=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)||""}},ya=D("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))}),Ig=D("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}),Lg=D("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),$_=e=>e.info.agentInfo,q_=j({name:"info",initialState:jR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ya.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ya.rejected,t=>{t.fetchState="error"}).addCase(ya.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(Ig.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Lg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:G_}=q_.actions,X_=q_.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search"},Q_=e=>e.search.isOpen,Y_=e=>e.search.page,Z_=e=>e.search.list;function J_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var co=D("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:va(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),ew=j({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(co.pending,t=>{t.fetchState="loading"}).addCase(co.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(co.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>$c)}}),{resetSearch:qc,setIsOpen:ct,setPage:$e}=ew.actions,tw=ew.reducer;var BR=/(https?:\/\/[^\s]+)/,Gc=e=>e.split(" ").find(t=>BR.test(t));var Ag=x($());var Xc=x(w()),HR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",tt);return(0,Xc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Ag.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Xc.jsx)("span",{className:(0,Ag.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},wi=HR;var Pn=x(w()),zR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",tt),a=B(so),{selected:l,setSelected:u}=_r(),c=i[l],p=c&&typeof c.text=="string"&&Gc(c.text),d=(0,wr.useRef)(null);function h(S){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),b=0,E=0;S==="down"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b===_.length-1?0:b+1):S==="up"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b?b-1:_.length-1):u(0);let C=_[E];C&&typeof E=="number"&&(u(E),C.scrollIntoView&&C.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let S=d.current.querySelectorAll(".command-palette-list-item"),_=0;S.forEach((E,C)=>{C===l&&(_=C)});let b=S[_];b&&b.click()}let y=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,wr.useCallback)(S=>{if(S.key==="Enter"&&S.altKey&&p){y();return}if(S.key==="Enter"&&S.shiftKey){g();return}if(S.key==="ArrowDown"){S.preventDefault(),S.stopPropagation(),h("down");return}if(S.key==="ArrowUp"){S.preventDefault(),S.stopPropagation(),h("up");return}S.key==="Enter"&&l!==-1&&(S.preventDefault(),S.stopPropagation(),v())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(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:[p&&(0,Pn.jsx)(wi,{onClick:y,shortKeys:[Wc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Pn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Pn.jsx)(wi,{onClick:g,shortKeys:[8679,8629],children:n}),(0,Pn.jsx)(wi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},rw=zR;var ow=x(O());var Sa=x(w()),bi=()=>(0,Sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Sa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Sa.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 Ht=x(w());function UR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",tt);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(bi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.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,Ht.jsx)("div",{className:l.selectWrapper,children:(0,Ht.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,Ht.jsx)("option",{children:r}),o.map(u=>(0,Ht.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var iw=(0,ow.forwardRef)(UR);var xa=x(w());function po({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[h,v]=(0,Ei.useState)(0),y=(0,Ei.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=y.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Ei.useEffect)(()=>{v(0)},[d,r]),(0,xa.jsx)(gi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:g,onClose:m,children:(0,xa.jsxs)(H_,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,xa.jsx)(iw,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}po.Page=Pg;po.List=bg;po.Image=D_;po.ListItem=kg;po.ActionsBar=rw;po.Button=wi;var te=po;var ze=x(w()),VR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",t_),l=U(),u=B(Gm),c=L(v=>v.overlayInput.text);(0,Og.useEffect)(()=>{e&&(l(et.actions.reset()),l(et.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(et.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(uc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,Og.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,ze.jsxs)("div",{className:a.root,children:[(0,ze.jsxs)("div",{className:a.content,children:[e.title&&(0,ze.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,ze.jsx)(Hd,{labels:e.searchKeywords}),(0,ze.jsx)(N_,{onUse:d,value:Hc(c)})]}),(0,ze.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,ze.jsxs)("div",{children:[(0,ze.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,ze.jsx)(Tc,{})}),(0,ze.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,ze.jsx)(d_,{})})]}),(0,ze.jsxs)("div",{className:a.primaryButtons,children:[(0,ze.jsx)(te.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,ze.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Qc=VR;var KR=["{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}"],WR=new RegExp(KR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function sw(e,t){let n=e.split(WR),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function aw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var uw={suggestions:[],fetchState:"idle",isInitialRequest:null},lw={default:uw},cw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},dw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},pw=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")},Ci=e=>e.textSuggestions,fw=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Yc=fe("textSuggestions/refresh"),Rn=D("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=fi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,va(r),e);if(e==="default"){let c=s?l.filter(fw(a)):l;t.dispatch(on(c.slice(0,i)))}return l}),_a=D("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,{...va(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(fw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?sw(c.text,e):c.text}))),l=aw(l,i),t.dispatch(on(l)),l}),mw=j({name:"textSuggestions",initialState:lw,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]||uw;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(_a.pending,t=>{t.default.fetchState="loading"}).addCase(_a.rejected,t=>{t.default.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>lw)}}),{setTextSuggestions:gw,setSuggestionState:hw}=mw.actions,yw=mw.reducer;var vw={contentType:null,suggestion:null},Sw=e=>e.activeSuggestion.suggestion,xw=e=>e.activeSuggestion.contentType,_w=j({name:"activeSuggestion",initialState:vw,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,()=>vw)}}),{setActiveSuggestion:In,resetActiveSuggestion:Ng}=_w.actions,ww=_w.reducer;var Mg={};Ie(Mg,{enUS:()=>$R,nlNL:()=>qR});var $R={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"}]},qR={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 GR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Zc=({ui:e})=>e.overlayCollapsed;var bw=j({name:"ui",initialState:GR,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:wa,setInputHasFocus:Ti,setOverlayCollapsed:br,setOpenOverlayWhenTyping:Ew,setOverlayCollapsedUserOverwrite:Cw}=bw.actions,Tw=bw.reducer;var ba=x(O()),Pw=x(w()),kw=ba.default.createContext(null),ki=({broadcastEvents:e,children:t})=>{let n=ba.default.useMemo(()=>e,[]);return(0,Pw.jsx)(kw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,ba.useContext)(kw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var XR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},zt=e=>e.auth.isLoggedIn,Rw=e=>e.auth.loginFetchState,Iw=e=>e.auth.verifyFetchState,Lw=e=>e.auth.showLoginOverlay,Er=D("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Aw=D("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ea=D("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Ow=j({name:"auth",initialState:XR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Er.pending,t=>{t.loginFetchState="loading"}),e.addCase(Er.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Er.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ea.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ea.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ea.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Pi,setShowLoginOverlay:Nw}=Ow.actions,Mw=Ow.reducer;var Dg="SetActiveSuggestion",Ri="ShowLoginOverlay",Fg="UserLoggedIn",QR="UserLoggedOut",Ln="ApplySuggestion",jg="ApplyImageSuggestion",YR="ShowCommandPalette",ZR=e=>({[Dg]:t=>{e.dispatch(hw(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[YR]:t=>{e.dispatch(ct(t.isOpen)),t.page&&e.dispatch($e(t.page))},[Ri]:t=>{e.dispatch(Nw(t))},[Fg]:()=>{e.dispatch(Er())},[QR]:()=>{e.dispatch(Er())},[jg]:t=>{e.dispatch(dc({suggestion:t.suggestion}))},[Ln]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(vr())}}),Dw=ZR;var Bg=x(w()),JR=()=>{var v;let[e,t]=(0,Fw.useState)(!1),n=L(Sw),r=L(xw),o=L(Ci),i=U(),s=Pt(),a=B(Mg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Ng()),i(Ti(!0)),i(et.actions.reset())},c=(y,m)=>{i(Ng()),i(Ti(!0)),s.send(Ln,{text:y,suggestion:{...m,source:`${m.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let p=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Bg.jsx)(gi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Bg.jsx)(Qc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},jw=JR;var Jc=x($()),Ut=x(O());var Hw=x($());var Bw={root:"_root_1ukx5_1"};var zw=x(w()),eI=({className:e,value:t,...n})=>{let r=k("TextInput",Bw);return(0,zw.jsx)("input",{className:(0,Hw.default)(e,r.root),type:"text",value:t,...n})},Ca=eI;var Hg={};Ie(Hg,{enUS:()=>tI,nlNL:()=>nI});var tI={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"}]},nI={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 Uw={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 ye=x(w());var rI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},oI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=B(Hg),s=k("LoginTokenDialog",Uw),a=L(Iw),l=U(),u=M("productName"),[c,p]=(0,Ut.useState)(e||""),[d,h]=(0,Ut.useState)(0),[v,y]=(0,Ut.useState)(""),m=(0,Ut.useCallback)(async _=>{_.preventDefault(),l(Aw({email:c})),h(1)},[n,c]),g=()=>{y(""),h(0)},f=(0,Ut.useCallback)(async _=>{_.preventDefault();let b=rI(_.target.elements.token.value);if(!b){y(i("verifyCodeError",{login:S}));return}l(Ea({token:b}))},[n]),S=(0,Ut.useMemo)(()=>_=>(0,ye.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,Ut.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ye.jsx)(gi,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ye.jsxs)("div",{className:s.root,children:[(0,ye.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ye.jsxs)("form",{onSubmit:m,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ye.jsx)(Ca,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,ye.jsx)("div",{className:s.actions,children:(0,ye.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ye.jsxs)("form",{onSubmit:f,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ye.jsx)(Ca,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,ye.jsx)("div",{className:s.errorMessage,children:v}),(0,ye.jsxs)("div",{className:s.actions,children:[(0,ye.jsx)("button",{type:"button",className:(0,Jc.default)(s.button),onClick:g,children:i("back")}),(0,ye.jsx)("button",{type:"submit",className:(0,Jc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Vw=oI;var Ww=x(w()),iI=()=>{let e=L(Lw),t=L($_),n=M("adminUrl"),r=Pt(),o=()=>r.send(Ri,!1),i=()=>{r.send(Ri,!1),r.send(Fg)};return(0,Ww.jsx)(Vw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Kw=iI;var y1=x(Vg()),qe=x(O());var bI={data:null,fetchState:"idle"},Xw=e=>e.contentTypes.data,Ta=D("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),EI=j({name:"contentTypes",initialState:bI,reducers:{},extraReducers:e=>{e.addCase(Ta.pending,t=>{t.fetchState="loading"}).addCase(Ta.rejected,t=>{t.fetchState="error"}).addCase(Ta.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Qw=EI.reducer;function ka(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 Yw=x(O());function Zw(e,t){(0,Yw.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 Pa=x(O());var Jw={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},Vt=D("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)}),CI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),TI=j({name:"entities",initialState:Jw,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=CI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Jw)}}),e1=TI.reducer;var Kg={};Ie(Kg,{enUS:()=>kI,nlNL:()=>PI});var kI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},PI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var t1={root:"_root_17kae_1",empty:"_empty_17kae_5"};var fo=x(w()),RI=({onCopy:e,onUse:t})=>{let n=(0,Pa.useRef)(null),r=k("EntitiesList",t1),o=B(Kg),i=L(ed),s=U();return(0,Pa.useEffect)(()=>{s(Vt())},[]),(0,Pa.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,fo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,fo.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,fo.jsx)(te.List,{children:i.map((a,l)=>(0,fo.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,fo.jsx)("p",{className:r.empty,children:o("noResults")})]})},n1=RI;var Kt=x(O());var r1={data:null,fetchState:"idle"},o1=e=>e.summary.data,i1=e=>e.summary.fetchState==="error",An=D("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})}}),II=j({name:"summary",initialState:r1,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,()=>r1)}}),s1=II.reducer;var Wg={};Ie(Wg,{enUS:()=>LI,nlNL:()=>AI});var LI={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."}]},AI={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 a1={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()),OI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",a1),[r,o]=(0,Kt.useState)(""),i=B(Wg),s=L(o1),a=L(i1),l=U(),u=()=>{l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(An())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[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)(Kt.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:p=>o(p.target.value)})}),(0,On.jsx)("div",{className:n.actions,children:(0,On.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},l1=OI;var $g={};Ie($g,{enUS:()=>NI,nlNL:()=>MI});var NI={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?"}]},MI={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 Cr=x(O());var qg={};Ie(qg,{enUS:()=>DI,nlNL:()=>FI});var DI={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"}]},FI={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 u1={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 Gg={data:[],fetchState:"idle"},c1=e=>{var t;return(t=e.answer)==null?void 0:t.data},d1=e=>e.answer.fetchState,Li=fe("answer/resetKnowledgeSearch"),Ii=D("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}}),jI=j({name:"answer",initialState:Gg,reducers:{},extraReducers:e=>{e.addCase(Ii.pending,t=>{t.fetchState="loading"}).addCase(Ii.rejected,t=>{t.fetchState="error"}).addCase(Ii.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Gg).addCase(Li,()=>Gg)}}),p1=jI.reducer;var Ra=x(w()),f1=()=>(0,Ra.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ra.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ra.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 nt=x(w()),BI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Cr.default.useState(""),{setSelected:s}=_r(),a=(0,Cr.useRef)(null),l=k("EntitiesList",u1),u=B(qg),c=U(),p=L(c1),d=L(d1),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(Ii({question:o,promptInstruction:r}))},v=(y,m)=>{c(je({name:"knowledge assist source viewed",data:{question:m,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Cr.useEffect)(()=>{var y;n&&d==="idle"?c(Ii({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,Cr.useEffect)(()=>{d==="done"&&(c(je({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,answer:p[p.length-1].answer.answer,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(p.length-1),i(""))},[d,p]),(0,Cr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,p]),(0,nt.jsxs)("div",{className:l.root,children:[p.length>0&&(0,nt.jsx)("div",{className:l.alignRight,children:(0,nt.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,nt.jsxs)(te.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:m},g)=>(0,nt.jsx)(te.List,{children:(0,nt.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:f=>v(f,y),sources:m.sources,styles:{title:l.question,description:l.answer},children:y})},`${m.answer}_${g}`)),d==="loading"&&(0,nt.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,nt.jsx)("p",{className:l.status,children:u("error")}),(0,nt.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,nt.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,nt.jsx)("button",{type:"submit",className:l.submit,children:(0,nt.jsx)(f1,{})})]})]})]})},m1=BI;var HI={data:null,fetchState:"idle"},Ai=e=>e.profile.data,td=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ia=D("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)}),zI=j({name:"profile",initialState:HI,reducers:{},extraReducers:e=>{e.addCase(Ia.pending,t=>{t.fetchState="loading"}).addCase(Ia.rejected,t=>{t.fetchState="error"}).addCase(Ia.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),g1=zI.reducer;var Ee=x(w()),UI=200,VI=5,KI=4,WI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),h1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),$I=()=>{let e=U(),t=Pt(),n=B($g),[r,o]=(0,qe.useState)(!1),[i,s]=(0,qe.useState)(""),a=L(Y_),l=L(Ai),[u,c]=(0,qe.useState)(null),[p,d]=(0,qe.useState)([]),[h,v]=(0,qe.useState)(),y=L(zt),m=M("showSearch"),g=M("showEntitiesCommand"),f=M("showSummaryCommand"),S=M("showKnowledgeSearch"),_=M("showImageSearch"),b=M("searchTriggerKey"),E=L(Xw),C=L(Z_),R=L(Q_),P=I=>vo(C.filter(X=>X.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),H=[{label:n("entitiesClipboard"),onClick:()=>e($e("entities")),shouldShow:g&&h1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e($e("summary")),shouldShow:f&&h1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e($e("knowledgeAssist")),shouldShow:S}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],Ve=(0,qe.useCallback)((0,y1.default)((I,X)=>{e(co({query:I,type:X,tags:["search-overlay"]}))},UI),[]),cn=WI([...z,...N]),qt=(0,qe.useCallback)((I,X)=>{if(!X)return;let Xt=[...N,...z].find(({value:Lt})=>Lt===X);Xt&&(e($e("edit")),c({...I,searchTerm:void 0}),d(Xt.list))},[e,u,z]),yo=(0,qe.useCallback)((I,X)=>{switch(X.type){case"IMAGE":t.send(jg,{suggestion:X});break;default:t.send(Ln,{text:I,suggestion:X})}e(ct(!1))},[e]),Ui=I=>{ka(I.text),e(je({name:"entity copied",data:{entity:I,type:"copy"}})),e(ct(!1))},Lr=(0,qe.useCallback)(I=>{e(je({name:"suggestion feedback",data:{text:I.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),Ua=I=>{t.send(Ln,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(je({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e($e("search")),e(Li()),e(ct(!1))},Va=I=>{ka(I),e(ct(!1))},Vi=I=>{t.send(Ln,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(ct(!1))},Ki=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ar=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function vo(I,X){return I.slice(0,h?10:X.toLowerCase()==="image"?KI:VI)}function Id(I,X,Xt){return X.reduce((Lt,zn)=>Xt&&h===Xt?zn.length+Lt:vo(zn,Xt).length+Lt,I)}function Gt(I){return X=>{r?window.confirm(n("warning"))&&(I(X),o(!1)):I(X)}}return(0,qe.useEffect)(()=>{i?Ve(i,h):e(qc())},[i,h]),(0,qe.useEffect)(()=>{a==="search"&&e(Li())},[a]),(0,qe.useEffect)(()=>{y&&e(Ta())},[y]),Zw(b,()=>e(ct(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Gt(I=>e(ct(I))),onChangeType:I=>v(I),onChangePage:Gt(I=>e($e(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...H.map(I=>({text:I.label,type:"command"})),...cn.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},X)=>yo(I,cn[X]),onSecondary:(I,X)=>{qt(cn[X-H.length],cn[X-H.length].type)},children:[H.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:H.map((I,X)=>(0,Ee.jsx)(te.ListItem,{index:Id(X,[],"commands"),closeOnSelect:!1,onClick:I.onClick,children:I.label},I.label))}),[...z,...N].map(({value:I,label:X,list:Xt,lineClamp:Lt,listOrientation:zn},Ph)=>(0,Ee.jsx)(te.List,{heading:X,orientation:zn==="horizontal"?"horizontal":"vertical",children:vo(Xt,I).map((ce,Or)=>(0,Ee.jsx)(te.ListItem,{index:Id(H.length+Or,[...z,...N].slice(0,Ph).map(({list:yE})=>yE),I),closeOnSelect:!1,lineClamp:Lt,onClick:()=>yo(ce.text,ce),description:I!=="IMAGE"?ce.title&&ce.text:void 0,onFeedback:I!=="IMAGE"?()=>Lr(ce):void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ce.title||ce.text,src:ce.image}):ce.title||ce.text},`${ce.id}-${ce.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Gt(()=>{e($e("search")),c(null)}),children:u&&(0,Ee.jsx)(Qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e($e("search")),c(null),d([])},onNext:Ar,onPrevious:Ki,onUse:I=>{e($e("search")),yo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(ct(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Gt(()=>{e($e("search"))}),children:(0,Ee.jsx)(n1,{onUse:Vi,onCopy:Ui})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Gt(()=>{e($e("search"))}),children:(0,Ee.jsx)(l1,{onCopy:Va})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Gt(()=>{e(Li()),e($e("search"))}),children:(0,Ee.jsx)(m1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ua,onResetQuestion:()=>{e(Li()),s("")}})})]})},v1=$I;var Oi=x(w()),qI=()=>{let e=M("showSearch"),t=M("isEmbedded");return(0,Oi.jsxs)(S1.Fragment,{children:[e&&(0,Oi.jsx)(v1,{}),(0,Oi.jsx)(jw,{}),t&&(0,Oi.jsx)(Kw,{})]})},x1=qI;function Ni(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 Mi=x(O());var _1=x(O());function w1(e,t,n){(0,_1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var b1={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var mo=x(w()),XI=["search","personal-collection-search","search-autocomplete"];function QI(e,t,n,r={}){let o="";return XI.includes(t)?o=A_(xg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=xg(e,n,r),r.placeholders===!0&&(o=O_(o)),o}var YI=()=>{},ZI=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=M("inlineSuggestions"),i=L(fi),s=U(),a=k("TextSuggestion",b1),l=(0,Mi.useRef)(null);(0,Mi.useEffect)(()=>{let c=setTimeout(()=>{s(qx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),w1(l,"click",()=>{s(yr(e)),s(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,Mi.useMemo)(()=>QI(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,mo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(yr(e)),children:[(0,mo.jsx)(oe,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:YI,children:(0,mo.jsx)(En,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,mo.jsx)("div",{className:a.actions,children:(0,mo.jsx)(Kc,{onFeedback:()=>r(n),suggestion:n.text})})]})},E1=ZI;var Xg=x(w()),JI=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,nd.useMemo)(()=>{let i=t.map((s,a)=>(0,Xg.jsx)(E1,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,Xg.jsx)(nd.Fragment,{children:o})},rd=JI;var C1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var La=x(w()),eL=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",C1),r=L(Ni),o=U(),i=L(zt),s=L(pi),a=L(Zc),l=M("showTextSuggestions");return Si(()=>{o(br({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,La.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,La.jsx)("div",{className:n.paper,children:(0,La.jsx)(yt,{children:(0,La.jsx)(rd,{suggestions:e,selectedIndex:t})})})})},tL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),T1=xn(tL)(eL);var id=x($()),Di=x(O());var k1=x(O());function P1(e,t){let[n,r]=(0,k1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.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){V.error(s)}}]}var I1=x($()),Nn=x(O());var Qg={};Ie(Qg,{enUS:()=>nL,nlNL:()=>rL});var nL={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"}]}]},rL={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 R1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Tr=x(w()),Yg=(e,t,n)=>r=>(0,Tr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),oL=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=B(Qg),i=Pt(),s=k("Login",R1),a=M("productName"),l=(0,Nn.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,Nn.useCallback)(y=>{y.preventDefault(),i.send(Ri,!0)},[t]),c=(0,Nn.useMemo)(()=>y=>(0,Tr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,Nn.useCallback)(y=>(0,Tr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,Nn.useMemo)(()=>({min:Yg(s,60*10,l),hour:Yg(s,60*60,l),day:Yg(s,60*60*12,l)}),[]);return(0,Tr.jsxs)("div",{className:(0,I1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,Tr.jsxs)(Nn.Fragment,{children:[(0,Tr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},od=oL;var L1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Aa=x(w()),iL=({title:e})=>{let t=k("SearchTrigger",L1),n=U();return(0,Aa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(ct(!0)),children:[(0,Aa.jsx)(bi,{}),(0,Aa.jsx)("span",{className:t.text,children:e})]})},A1=iL;var Zg={};Ie(Zg,{enUS:()=>sL,nlNL:()=>aL});var sL={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"}]},aL={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 O1={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()),lL=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",O1),r=B(Zg),o=L(Ni),i=Ux(),s=U(),a=(0,Di.useRef)(null),l=M("searchTriggerKey"),u=M("productName"),c=L(Zc),p=L(zt),d=L(pi),[h,v]=(0,Di.useState)(null),y=M("showSearch"),m=M("showTextSuggestions"),g=M("adminUrl"),f=M("isEmbedded"),[S,_]=P1("dd-snooze-until-ms",0),b=c||S>Date.now(),E=L(H=>H.input.text),C=e.filter(H=>H.source!=="gpt").length,R=()=>{b&&_(0),s(Cw(!b))},P=H=>{s(je({name:"suggestion feedback",data:{text:H.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},N=H=>{let z=Date.now()+H*1e3;_(z),V.info(`Snooze until: ${new Date(z)}`),s(br({collapse:!0}))};return(0,Di.useEffect)(()=>{C===0&&v(null)},[e,C]),Si(()=>{s(br({collapse:!0,skipWhenInputFocus:!0}))}),p===null||d===!1?null:p===!1?(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(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)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(od,{loginUrl:g,isEmbedded:f,onSnooze:N})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,id.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:y&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(r(Wc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(A1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,id.default)(!h&&n.hintsHidden,n.hints),children:h}),(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),C>0&&m&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(yt,{children:(0,ue.jsx)(rd,{onFeedback:P,suggestions:e,selectedIndex:t,reverse:!0})})})]})},uL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),N1=xn(uL)(lL);var Oa=x(w()),cL=({children:e})=>{let n=M("locale").replace("-","");return(0,Oa.jsx)(ng.Provider,{value:n,children:e})},dL=({store:e,customStyles:t={},children:n})=>(0,Oa.jsx)(Fm,{store:e,children:(0,Oa.jsx)(cL,{children:(0,Oa.jsx)($i.Provider,{value:t,children:n})})}),Fi=dL;var vd=x($());var Fn=x(O());var M1=x(O()),pL=["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(pL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,M1.cloneElement)(r,{children:Jg(s,t,n+1)})]}return[...e,...t]}function kr(e){return e.tagName.toLowerCase()==="textarea"}var D1={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 W1=x($());var md=x(O());function F1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function sd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function j1(e){return e!=null}var th=x($()),Rt=x(O());var ad=x(O()),fL=["bottom","height","left","right","top","width"],mL=(e={},t={})=>fL.some(n=>e[n]!==t[n]),Mn=new Map,B1,H1=()=>{let e=[],t=[];Mn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();mL(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))}),B1=window.requestAnimationFrame(H1)};function gL(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&&H1()},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(B1)}}}}function eh(e){let[t,n]=(0,ad.useState)(null);return(0,ad.useLayoutEffect)(()=>{if(!e.current)return;let r=gL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var ji=x(O()),U1=x(hu());var z1={root:"_root_1jq08_1"};var V1=({children:e})=>{let[t,n]=(0,ji.useState)(null),r=(0,ji.useContext)($i);return(0,ji.useLayoutEffect)(()=>{let o=document.createElement("div");return oo(o),o.classList.add(z1.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,U1.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var ld=x(w()),ud=(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 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 cd=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=nh,...a})=>{let l=eh(t),u=eh(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,ld.jsx)(V1,{children:(0,ld.jsx)("div",{className:(0,th.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,ld.jsx)("div",{className:(0,th.default)(e,ln.root),children:i})})})};var K1=x($()),dd=x(O());var rh=x(w()),pd=(0,dd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,dd.useRef)(null),i=k("TabCompletion",Cn);return(0,rh.jsx)("div",{ref:sd([o,r]),className:(0,K1.default)(e,i.popoverContentContainer),...n,children:(0,rh.jsx)("div",{className:i.popoverContent,children:t})})});var Pr=x(w()),hL=e=>t=>{let n=nh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},yL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Cn),s=ud(),a=(0,md.useMemo)(()=>hL(e.getBoundingClientRect()),[e]),[l,u]=Nc(e);return(0,md.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Pr.jsxs)("span",{children:[(0,Pr.jsx)("mark",{ref:sd([l,s.triggerRef]),className:(0,W1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Pr.jsx)(cd,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Pr.jsx)(pd,{style:n,children:(0,Pr.jsx)("div",{className:i.hintText,children:o})})})]})},fd=class extends wn{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${F1(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(j1);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,Pr.jsx)(yL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var hd=x($());var Xe=x(O());var oh=x(w()),$1=()=>(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 Rr=x(O());var G1=x(Vg());var q1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function gd(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 It=x(w()),vL=3,SL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),xL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=vL})=>{let i=k("LinkSearch",q1),[s,a]=(0,Rr.useState)(""),l=U(),u=L(cw("url")),c=L(J_("URL",SL)),[p,d]=(0,Rr.useState)(c.length-1),h=M("fallbackImage"),v=f=>{let S=f.target;a(S.value)},y=(f,S)=>{f.stopPropagation(),f.preventDefault(),window.open(S,"_blank")},m=f=>{var b;let S=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(S),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((b=c[p])==null?void 0:b.text)||s)},g=(0,Rr.useCallback)((0,G1.default)(f=>{l(co({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Rr.useEffect)(()=>{s&&g(s)},[s]),(0,Rr.useEffect)(()=>()=>{l(qc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(yt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,S)=>(0,It.jsx)(oe,{selected:p===S,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(ge,{children:[(0,It.jsx)(ge.Image,{src:gd(f,"small",h||void 0),title:f.title||f.text}),(0,It.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(ge.Title,{children:f.title||ih(f.text)}),f.title&&ih(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>y(_,f.text)})})]})},f.text))}),(0,It.jsx)(Ca,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},X1=xL;var sh={};Ie(sh,{enUS:()=>_L,nlNL:()=>wL});var _L={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},wL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ge=x(w()),bL=(0,Xe.forwardRef)((e,t)=>{let n=k("TabCompletion",Cn);return(0,Ge.jsx)("mark",{ref:t,className:(0,hd.default)(n.matchSelection)},"selection-start")}),EL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=B(sh),s=k("TabCompletion",Cn),a=(0,Xe.useRef)(null),l=(0,Xe.useRef)(null),[u,c]=(0,Xe.useState)(null),p=U(),d=ud(document.activeElement===r),[h]=(0,Xe.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Xe.useEffect)(()=>()=>h.detach(),[]),(0,Xe.useEffect)(()=>{let y=e.current,m=a.current;!y||!m||(h.setStart(y,0),h.setEnd(m,0))},[e.current,a.current]),Si(()=>{d.close()});let v=(0,Xe.useCallback)(y=>{let m=h.toString(),g=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(ac({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,Ge.jsxs)("span",{children:[(0,Ge.jsx)("mark",{ref:a,className:(0,hd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ge.jsx)(cd,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ge.jsxs)(pd,{style:n,ref:l,children:[(0,Ge.jsx)("div",{className:(0,hd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ge.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ge.jsx)($1,{}),(0,Ge.jsx)("span",{children:"\xA0"}),(0,Ge.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ge.jsx)(X1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},yd=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Xe.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,Ge.jsx)(bL,{ref:this.startRef}):(0,Ge.jsx)(EL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Dn=x(w()),CL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",D1),c=M("insertLink"),p=M("showMidSentenceSuggestions"),d=M("inlineSuggestions"),h=Dc(a),v=(0,Fn.useRef)(null);(0,Fn.useEffect)(()=>{kr(a)&&h&&Fc(a,h)},[h]);let y=(0,Fn.useCallback)(f=>{if(!o||!n)return f;let S=[(0,Dn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Dn.jsx)("span",{"data-testid":"tab-completion",className:(0,vd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&S.push((0,Dn.jsx)("span",{className:(0,vd.default)(u.hint,u.resetIndent),children:(0,Dn.jsx)(el,{keyCode:"tab"},"tabHint")})),Jg(f,S)},[o,n,r]),m=(0,Fn.useMemo)(()=>{let f=[];return c&&f.push(new yd("selection")),f.push(new yi("placeholders")),i&&f.push(new fd("keywords")),f},[d,c,i]),g=(0,Fn.useMemo)(()=>{let f=window.getComputedStyle(a);return{"--dd-color":f.color,"--dd-font-size":f.fontSize,"--dd-font-family":f.fontFamily,"--dd-font-variant":f.fontVariant}},[]);return e?(0,Dn.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:g,children:[(0,Dn.jsx)(En,{tagName:"span",containerTagName:"div",className:(0,vd.default)(u.container,u.agentText),disableLineBreaks:kr(a),content:t||"\u200B",onAfterParse:y,matchers:m,selection:h,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Dn.jsx)("br",{})]}):null},TL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??_i(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:h&&p!==!1}},Q1=xn(TL)(CL);var jb=x($()),Bb=x(O());var Y1={list:[],fetchState:"idle",isInitialRequest:null},J1=e=>e.autoflows.list||[],Z1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},jn=D("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),ah=D("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=D("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))}),kL=j({name:"autoflows",initialState:Y1,reducers:{},extraReducers:e=>{e.addCase(ah.pending,(t,n)=>{let r=Z1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(lh.pending,(t,n)=>{let r=Z1(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,()=>Y1)}}),eb=D("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))})}),tb=D("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),nb=kL.reducer;var rb={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},ob=e=>e.customMessages.list,ib=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),sb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),ab=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Na=D("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Sd=D("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)}),xd=D("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),lb=j({name:"customMessages",initialState:rb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Na.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Na.rejected,t=>{t.fetchState="error"}).addCase(Na.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Sd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Sd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(xd.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,()=>rb)}}),ub=D("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(lb.actions.onCustomMessage(i))})}),cb=D("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),db=lb.reducer;var PL={jwt:null,accountUrl:null,interval:null},pb=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},uh=D("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ch=D("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(uh()),setInterval(()=>r(uh()),n)}),fb=j({name:"exchangeToken",initialState:PL,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:mb}=fb.actions,gb=fb.reducer;function hb(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var Cb=x(O());var wb=x($()),bb=x(O());var vb=x($());var yb={root:"_root_838fd_1"};var xb=x(w()),RL=({className:e,children:t})=>{let n=k("Unicode",yb);return(0,xb.jsx)("span",{className:(0,vb.default)(e,n.root),children:t})},Sb=RL;var _b={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={};Ie(dh,{enUS:()=>IL,nlNL:()=>LL});var IL={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"}]},LL={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 dt=x(w()),OL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",_b),a=B(dh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,dt.jsxs)(oe,{className:(0,wb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,dt.jsx)(ge,{children:(0,dt.jsxs)(ge.Content,{children:[(0,dt.jsxs)(ge.Title,{children:[t&&(0,dt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,dt.jsx)("span",{children:r})]})}),(0,dt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,dt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,dt.jsxs)(bb.Fragment,{children:[(0,dt.jsx)(Sb,{children:u})," ",(0,dt.jsx)("span",{children:a(l)})]})})})]})},Eb=OL;var ph=x(w()),NL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},ML=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ph.jsx)(Cb.Fragment,{children:e.map(o=>(0,ph.jsx)(Eb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||NL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),DL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},FL={onStartAutoflow:ah,onStopAutoflow:lh},Tb=xn(DL,FL)(ML);var _d=x(O());var gh=x($());var fh=x(w()),mh=()=>(0,fh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,fh.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 kb={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=x(w()),jL=({entities:e})=>{let t=k("EntitiesWidgetList",kb),[n,r]=(0,_d.useState)(void 0),o=U(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ka(a.text),o(je({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,_d.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,gh.default)(t.icon),children:(0,un.jsx)(mh,{})}),(0,un.jsx)("span",{className:(0,gh.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(mh,{})})]})]},a.text))})},Pb=jL;var Rb=x($()),hh=x(O());var Bn={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 rt=x(w()),BL=({suggestion:e})=>{let t=B(lo),n=U(),r=L(ib(e.text)),o=L(sb(e.text)),i=L(ab(e.text)),s=L(Ju),{replyOptions:a}=e,l=(0,hh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Sd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,hh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(xd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,rt.jsxs)(oe,{onClick:l,className:(0,Rb.default)(Bn.root,{[Bn.isUsed]:r,[Bn.hasError]:i}),children:[(0,rt.jsx)(ge,{children:(0,rt.jsxs)(ge.Content,{children:[(0,rt.jsxs)(ge.Title,{className:Bn.title,children:[e.text," ",(0,rt.jsx)(tl,{className:Bn.label,children:"analyse tool"})," ",i&&(0,rt.jsx)("span",{className:Bn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,rt.jsx)("ul",{className:Bn.quickReplies,children:a.map(c=>(0,rt.jsx)("li",{className:Bn.quickReply,children:c.title},c.title))})]})}),(0,rt.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,rt.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,rt.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,rt.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Ib=BL;var yh=x(w()),Lb=()=>(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 Ab=x(O());var pt=x(w()),HL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Gc(o),s=B(lo),a=M("showImages"),l=M("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,Ab.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,pt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,pt.jsxs)(ge,{children:[a&&e.image&&(0,pt.jsx)(ge.Image,{src:gd(e,"small",l||void 0),title:e.title}),(0,pt.jsxs)(ge.Content,{children:[e.title&&(0,pt.jsx)(ge.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,pt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,pt.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,pt.jsxs)(oe.Actions,{children:[i&&(0,pt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},Ob=HL;var Ma=x(w()),zL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=L(Ci),i=a=>{r.send(Dg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Ln,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Ma.jsx)(Ma.Fragment,{children:n.map(a=>(0,Ma.jsx)(Ob,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},Nb=zL;var vh={};Ie(vh,{enUS:()=>UL,nlNL:()=>VL});var UL={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"}]},VL={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 Mb={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()),Db=()=>(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()),Fb=()=>(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 K=x(w()),wd=(e,t)=>{let n=L(zt);(0,Bb.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},KL=()=>{let e=B(vh),t=U(),n=M("isEmbedded"),r=k("Widget",Mb),o=M("showAutoflows"),i=M("showCustomMessages"),s=M("showPersonalCollectionLink"),a=M("showSummaryCommand"),l=M("showKnowledgeSearch"),u=M("showSearch"),c=L(Ai),p=L(td),d=L(J1),h=L(ed),v=L(ob),y=L(ec),m=L(pi),g=L(zt),f=L(Ju),S=L(hb),_=L(Ci),b=Pt(),E=L(pw),C=L(pb("/admin/personal-collection")),R=M("adminUrl");if(wd(()=>(t(Na(f)),t(ub(f)),()=>{t(cb(f))}),[t,m,i,f]),wd(()=>(t(jn(f)),t(eb(f)),()=>{t(tb(f))}),[t,m,o,f]),wd(()=>{p.forEach(({type:N})=>{t(N==="entities"?Vt():Rn(N))})},[t,m,y,c]),wd(()=>(t(ch()),()=>{t(mb())}),[t,m,s,y]),m===!1)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,K.jsx)("div",{className:r.loginText,children:(0,K.jsx)("div",{children:(0,K.jsx)(od,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||g===null||E||S)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||C;return(0,K.jsx)("div",{className:(0,jb.default)(r.root),"data-testid":"widget",children:(0,K.jsxs)(nl,{className:r.sectionList,children:[P&&(0,K.jsx)(Un,{title:e("actions"),type:"shortcuts",children:(0,K.jsxs)("div",{className:r.shortcutList,children:[u&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,K.jsx)(bi,{}),e("linkSearch")]}),a&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,K.jsx)(Fb,{}),e("linkSummary")]}),l&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,K.jsx)(Db,{}),e("linkKnowledgeSearch")]}),C&&(0,K.jsxs)("a",{className:r.shortcut,target:"_blank",href:C,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,K.jsx)(Lb,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,K.jsx)(Un,{type:"custom-messages","data-testid":"custom-messages",children:(0,K.jsx)(yt,{withDivider:!0,children:v.map(N=>(0,K.jsx)(Ib,{suggestion:N},N.text))})}),o&&d.length>0&&(0,K.jsx)(Un,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Tb,{})})}),p.map(({type:N,title:H,amount:z,lines:Ve})=>{var cn;switch(N){case"entities":return h&&h.length>0&&(0,K.jsx)(Un,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(Pb,{entities:h})},N);default:return((cn=_[N])==null?void 0:cn.fetchState)==="done"&&_[N].suggestions.length>0&&(0,K.jsx)(Un,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Nb,{lines:Ve,contentType:N,suggestions:_[N].suggestions.slice(0,z)||[]})})},N)}})]})})},Hb=KL;function Bi(e){let t=new Range;return t.selectNodeContents(e),t}function zb(e,t,n){try{return Ir(e,t,n),!0}catch{return!1}}function bd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Ed(e){return"tagName"in e&&e.tagName==="BR"}var Da=/[\u200B-\u200D\uFEFF]/g;function Ir(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Da,""),p=o+c.length,d=t>=o&&t<=p,h=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!h?r.setStartBefore(l):r.setStart(l,v)}h&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(Ed(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;bd(l)&&u&&!bd(u)&&!Ed(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Fa(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,h=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(Da,"").length),h&&(l=u+v.substring(0,i).replace(Da,"").length),u+=v.replace(Da,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;Ed(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let m=d&&y===r,g=h&&y===i;if(m&&(a=u),g&&(l=u),l!==void 0||((!m||!s)&&c(p.childNodes[y]),h&&y===i-1&&(l=u),l!==void 0))break}!h&&bd(p)&&!v&&u++,h&&(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 ja(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,v=u.textContent.replace(Da,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&Ed(u)&&!d&&(a+=`
20
- `);for(let h=c?r:0;h<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[h]),s!==1);h++);!p&&s===0&&bd(u)&&!d&&(a+=`
21
- `);break}default:break}p&&s++}return l(e),a}function Ub(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var go=class extends Tn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),ja(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!Ub(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!Ub(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Fa(this.element,t);let n=this.lastKnownSelection;if(n&&zb(this.element,n.start,n.end))return n;let r=Bi(this.element);return r.collapse(!1),Fa(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return ja(this.element,Ir(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()}},bh=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(),V.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&&(V.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;V.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)}},Vb=bh;var Hi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Eh=e=>new Promise(t=>{setTimeout(t,e)});var zi=class extends Hi{name="ClientError"},Ch=class extends Hi{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:p=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:h=_=>_.status>=500,version:v="v1",...y}=n,m={credentials:"include",...y,headers:{"Content-Type":"application/json",...y.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,f=!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 S=async()=>(g--,a(s,m).then(async _=>h(_)&&!i.isAborted&&g>0?(await Eh(c),S()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),S()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await Eh(c),S();throw _}));S().then(_=>_.json().catch(()=>null).then(b=>{_.status>=500?o(new Ch("Server Error",b)):_.status===401?o(new zi("Unauthorized",b)):_.status===403?o(new zi("Forbidden",b)):_.status===404?o(new zi("Not Found",b)):_.status>=400&&o(new zi("Bad Request",b)),delete this.latestRequestByUrl[s],r(b)})).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 WL;(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||={})})(WL||={});function Cd(e){return{...re(e),tags:e.tags}}var Hn=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(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...be(t),tags:t.tags},{version:"v2"});return Cd(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(),V.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 Cd(i)}async isConversationSupported(t,n={}){V.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=be(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Cd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...be(o),tags:o.tags})),{version:"v2"})).map(o=>Cd(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",be({...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:be({...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 V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",be(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}`,be(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`,be(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",be(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,be(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",be({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(vy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ba=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Rg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{V.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 $L;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})($L||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=V;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`,be(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,be(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",be(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Ba(`${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 Kb={startTime:null,stopTime:null},Wb=j({name:"handlingTime",initialState:Kb,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,()=>Kb)}}),{handlingTimeStart:$b,handlingTimeStop:Td,handlingTimeReset:qb}=Wb.actions,Gb=Wb.reducer;var Xb=(e={})=>{let t={onAuthError:Pi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var kd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var ho=D("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 kd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),qL=j({name:"styleSuggestions",initialState:kd,reducers:{},extraReducers:e=>{e.addCase(ho.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(ho.rejected,t=>{t.fetchState="error"}).addCase(ho.fulfilled,(t,n)=>{t.fetchState="done",gr(t.list,n.payload)||(t.list=n.payload)}).addCase(Jr,t=>{t.list=kd.list}).addCase(J,()=>kd)}}),Qb=qL.reducer;var Yb=(e={})=>{let t,n=!0,r={getStyleSuggestions:ho,debounce:500,...e};return o=>i=>s=>{var h;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(!((h=u.conversation.current)==null?void 0:h.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 GL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var Zb=(e={})=>{let t={getTextSuggestions:Rn,getAutocompleteSuggestions:_a,debounce:200,check:Ni,...e},n;return r=>o=>i=>{var y;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Yc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:h}}=l;return GL(h,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=fi(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var Jb=ho.fulfilled.toString();function XL(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 eE=e=>t=>n=>r=>{var u;if(r.type!==Jb){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=XL(o,s);r.type===Jb&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var QL=bu({activeSuggestion:ww,answer:p1,auth:Mw,autoflows:nb,conversation:Hx,contentTypes:Qw,customMessages:db,exchangeToken:gb,entities:e1,handlingTime:Gb,info:X_,input:Wm.reducer,overlayInput:et.reducer,settings:Lx,profile:g1,search:tw,summary:s1,styleSuggestions:Qb,ui:Tw,textSuggestions:yw});function tE(e){return F0({reducer:QL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),Xb(),Zb({debounce:200}),Yb({debounce:500}),eE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var YL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},ZL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Bm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=dw(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 Pi.toString():{!r.payload&&e.emit("logout",void 0);break}case Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:YL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ac.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 dc.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 An.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case je.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 lc.toString():e.handleKeyDown(r.payload);break;case Jr.toString():e.logSendMessage(r.payload);break;case uc.toString():e.logSendEditSuggestionMessage(r.payload);break;case cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Jr.toString():e.handleAfterSendMessage(r.payload);break;case wa.toString():e.onUpdateShowTabHint(r.payload);break;case Td.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(on([])),t.dispatch(vr()));break}case on.toString():{i&&r.payload.length>0&&t.dispatch(yr(0));break}default:break}return s},nE=ZL;function Th(e){return e.toISOString().replace("T"," ").replace("Z","")}function rE(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 C,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:h,textSuggestions:v,offeredTextSuggestions:y}}=t[e],m=r.length,f=v.reduce((N,{text:H,searchTerm:z})=>N+H.length-(z?z.length:0),0),S=u??Date.now(),_=(Date.now()-S)/1e3+(c||0),b=o/_,E=v.reduce((N,{searchTerm:H})=>N+(H?H.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:h,lenTextTyped:o+E,lenTextTotal:m,lenTextAssisted:f,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:b,numPastes:l,textSuggestionsV2:v,suggestionsCounters:[{source:"gpt",countOffered:y.filter(N=>N.source==="gpt").length}],agentId:(C=t.info.agentInfo)==null?void 0:C.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function oE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?oE(r,t):null}function iE(e,t){return oE(e,t)}function sE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function JL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Pd(e){return JL(e)&&(kr(e)||Mc(e))}var aE=(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{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function eA(e){return e.offsetParent!==null}function lE(e){if(!eA(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 Rd(e,t,n=100){let r=lE(e);t({isVisible:r});let o=setInterval(()=>{let i=lE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Ue=x(w()),uE=aE("showTabHint",!0),za=class e{static version="10.6.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Hn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[nE({emit:(p,d,h)=>this.emit(p,d,h),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),logSendEditSuggestionMessage:p=>this.logSendEditMessage(p),onUpdateShowTabHint:p=>uE.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=tE(c),this.broadcastEvents=new Vb({debug:!0,deepdeskUrl:u,eventMap:Dw(this.store),createCustomChannel:l}),this.store.dispatch(ta),this.store.dispatch(wa(uE.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?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Pi(null)),this.store.dispatch(Er()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();zt(r)&&Rw(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){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Vm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(tc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(nc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Km(t))).payload}async postMessages(t){return(await this.store.dispatch(oc(t))).payload}async updateConversation(t){return(await this.store.dispatch(rc(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(ta(t))}setVisitorInfo(t){this.store.dispatch(G_(t))}async setAgentInfo(t){await this.store.dispatch(ya(t))}async setAgentSettings(t){await this.store.dispatch(Ig(t))}async getAgentSettings(){return(await this.store.dispatch(Lg())).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(cc(t))}notifyKeyDown(t){this.store.dispatch(lc(t))}notifyPaste(t,n){this.store.dispatch(Yx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Xx(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(vr())}notifyEditSuggestion(t){this.store.dispatch(gw(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(br({collapse:!1})),this.inputMediator&&this.store.dispatch(Vx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(on([])))}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(Qx(sc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch($x()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Gx());let{selectedSuggestionIndex:p}=this.state.input;t.preventDefault(),!s&&(p===-1?this.store.dispatch(ra()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(yr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(yr(-1)),this.store.dispatch(ra()),t.preventDefault()):n||(this.store.dispatch(br({collapse:!0})),this.store.dispatch(Ew(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:h}=this.state.input;this.store.dispatch(wa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&h&&h.text.startsWith(d)&&(this.store.dispatch(Ft({text:h.text,suggestion:h,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(vr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Zx()),this.store.dispatch(on([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch($b()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.info("Stop handling time"),this.store.dispatch(Td()))}logSendMessage(t){let n=kh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),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(Wx(this.state.overlayInput.metrics))}logHandlingTime(){let t=rE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(qb())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(vr()),this.store.dispatch(Jr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ft({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){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.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]=io(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=io(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return oo(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Pd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:h,inputMediator:v,closestScrollSelector:y,appendOverlayTo:m,inlineSuggestions:g}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:g}),n.automaticHandlingTime&&this.setupHandlingTime(t),oo(t),this.inputMediator=v||(kr(t)?new kn(t):new go(t)),this.inputMediator.on("change",({plainText:S})=>{this.notifyInputChanged(S)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(Jx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",S=>{this.notifyKeyDown(S)}),this.inputMediator.on("paste",({pastedText:S,selectionText:_})=>{this.notifyPaste(S,_)}),this.inputMediator.on("cut",({selectionText:S})=>{this.notifyCut(S)}),g){if(kr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let S=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(T1,{})})}),S),this.inputMediator.on("caret",_=>{this.store.dispatch(on([])),_?(S.style.display="block",S.style.top=`${_.top}px`,S.style.left=`${_.left}px`):S.style.display="none"})}else{let S=y&&iE(t,y)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:m,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(Q1,{inputElement:t})})}),_),(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(N1,{})})}),b)}(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(x1,{})})}),this.createContainer("deepdesk-overlays"));let f;this.inputMediator.on("selection",S=>{clearTimeout(f),S===null?f=setTimeout(()=>{S!==null&&this.store.dispatch($m(S))},500):this.store.dispatch($m(S))}),this.inputMediator.on("disabled",()=>{var S;(S=this.inputMediator)==null||S.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(Ti(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Ti(!0))),this.store.dispatch(Kx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var S;this.refresh(),this.broadcastEvents.setSessionId((S=this.state.conversation.current)==null?void 0:S.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&&V.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,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(Hb,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Rd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){sE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ia());let t=Ai(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(V.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;V.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(Vt()):this.store.dispatch(Rn(r))})}catch(r){this.handleError(r)}}};async function cE(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 dE(e,t,n={}){let r=n.replace?Ir(e,n.replace.start,n.replace.end):Bi(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(`
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||aR)();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(oR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,h_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==g_||!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(iR)&&(!n&&(!u||u===ug)||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===Sr?c=!0:u===to?c=Number.parseFloat(String(c)):u!==Ic&&(c=String(c)),r[cg[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 fa[t]?{...n,...fa[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===g_){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let m=this.keyIndex;y=this.parseNode(v,h);let g=s(v,y,h);if(g===null)return;if(typeof g<"u"){l.push(ro.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,h))){var p;this.keyIndex+=1;let m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),h.void&&(g.selfClose=h.void),l.push(ro.default.createElement(Ac,{...g,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,h)))}else l=[...l,...this.parseNode(v,h.tagName?h:n)]}else if(c.nodeType===rR){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(sR);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));h=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function lR(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Oc(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?ro.default.createElement(ro.default.Fragment,null,d):ro.default.createElement(Ac,{attributes:n,className:r,tagName:c},d)}function En(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...h}=e,v=i?[]:l,y=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(b=>{b.onBeforeParse&&m.push(b.onBeforeParse.bind(b)),b.onAfterParse&&g.push(b.onAfterParse.bind(b))});let f=m.reduce((b,E)=>E(b,e),r??""),S=new Oc(f,h,v,y),_=g.reduce((b,E)=>E(b,e),S.parse());return ro.default.createElement(lR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var wg=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 v_=x($());var hi=x(O());function y_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Nc(e){let t=(0,hi.useRef)(null),[n,r]=(0,hi.useState)(!1);return(0,hi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=y_((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),m=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=y_(()=>{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 Cn={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 fg=x(w()),uR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Cn),[r,o]=Nc(e);return(0,fg.jsx)("mark",{ref:r,className:(0,v_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},yi=class extends wn{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,fg.jsx)(uR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var vi=x(O());function Mc(e){return e.contentEditable==="true"}function cR(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 S_(e){let{selectionStart:t,selectionEnd:n}=Mc(e)?cR(e):e;return[t,n]}function Dc(e){let[,t]=(0,vi.useState)(),n=(0,vi.useRef)(null);return n.current=S_(e),(0,vi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=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 Fc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Eo);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 x_=x(O());function Si(e){(0,x_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function oo(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var __,sn=new Map,dR=["bottom","height","left","right","top","width"],pR=(e={},t={})=>dR.some(n=>e[n]!==t[n]);function w_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...w_(t)]:[]}function b_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var jc=!1,E_=()=>{jc=!0;let e=[];if(sn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),sn.delete(n);return}let r=n.getBoundingClientRect();pR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(b_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),sn.size===0){jc=!1;return}__=window.requestAnimationFrame(E_)};function mg(e,t){let n=w_(e),r=[],o=n.map((i,s)=>mg(i,a=>{r[s]=a;let l=sn.get(e);if(!l)return;let u=r.reduce(b_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),sn.has(e)){let s=sn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else sn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!jc&&E_()},unobserve(){o.forEach(s=>s.unobserve());let i=sn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||sn.delete(e),sn.size||(cancelAnimationFrame(__),jc=!1)}}}}var C_,an=new Map,T_=()=>{an.forEach((e,t)=>{if(!t.isConnected){an.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),an.size!==0&&(C_=window.requestAnimationFrame(T_))};function k_(e,t){return{observe(){let n=an.size===0;an.has(e)?an.get(e).callbacks.push(t):an.set(e,{visible:void 0,callbacks:[t]}),n&&T_()},unobserve(){let n=an.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||an.delete(e),an.size||cancelAnimationFrame(C_)}}}}var gg=["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 hg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function xi(e){return parseFloat(e)}function Bc(e){return Math.round(e*1e6)}function P_(e){return e/1e6}function yg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=xi(e.width),i=xi(e.borderLeftWidth),s=xi(e.borderRightWidth),a=xi(e.paddingRight),l=P_(Bc(o)-Bc(i)-Bc(s)),u=P_(Bc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function io(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",oo(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};hg(r,n,gg),yg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=k_(e,()=>{hg(r,n,gg),yg(r,e,n),i(),setTimeout(i,0)}),a=mg(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(hg(r,n,gg),yg(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(),p=window.getComputedStyle(t.closestScrollElement),d=xi(p.borderTopWidth),h=xi(p.borderBottomWidth),v=c.top+d-u.top,y=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${v}px 0px ${y}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 vg={};Ie(vg,{enUS:()=>fR,nlNL:()=>mR});var fR={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"}]},mR={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 ma=x(w()),R_=()=>(0,ma.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ma.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ma.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 Sg=x(w()),I_=()=>(0,Sg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Sg.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 gR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Hc(e){return e?e instanceof ShadowRoot?Hc(e.host):e===e.ownerDocument.body?e.ownerDocument:gR(e)?e:Hc(e.parentNode):document.body}var L_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(L_||{}),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(L_).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=Hc(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)})}this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};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 hR=/[.*+?^${}()|[\]\\]/g,yR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function vR(e){return e.replace(hR,"\\$&")}function SR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function xR(e){return e.search(yR)}function A_(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${vR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function O_(e){return e.replace(Eo,'<mark data-type="placeholder">$1</mark>')}function _i(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function _R(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 xg(e,t,n={}){if(t){let r=SR(t.toLowerCase(),e.toLowerCase()),o=_i(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=xR(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(yy).length>3||t.length>30?_R(t.trim(),r):0;return`${`${s>0?"\u2026":""}${_i(e.substring(s,r))}`}<strong>${o}</strong>`}return e}function _g(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function zc(e){if(_g(e)){let n=/<body[^>]*>([\s\S]*)<\/body>/gi.exec(e);return n?n[1]:""}return e}var He=x(w()),wR=({value:e,onUse:t,...n})=>{var p;let r=B(vg),o=U(),i=_g(e),s=k("EditSuggestionTextInput",pg),[a,l]=(0,kt.useState)(null),u=(0,kt.useRef)(null),c=((p=e.match(Eo))==null?void 0:p.length)||0;return(0,kt.useEffect)(()=>{let d;return u.current&&(l(u.current),d=new kn(u.current),d.on("change",({plainText:h})=>{o(et.actions.userInput({text:h,selection:d.getSelection()}))}),d.on("keydown",h=>{o(et.actions.registerKeyDown(sc(h))),h.code==="Enter"&&h.shiftKey&&t(d.getText())}),d.on("paste",({pastedText:h,selectionText:v})=>{o(et.actions.registerPaste({text:h,selectionText:v}))}),d.on("cut",({selectionText:h})=>{o(et.actions.registerCut(h))})),()=>{o(et.actions.reset()),d.dispose(),d.deactivate()}},[u]),(0,kt.useEffect)(()=>{e&&u.current&&(u.current.value=e)},[e,u]),(0,kt.useEffect)(()=>{u.current&&setTimeout(()=>{if(!u.current)return;let d=u.current.value.length;u.current.setSelectionRange(d,d),u.current.focus()},0)},[u]),i?(0,He.jsx)("div",{className:s.textInputWrapper,children:(0,He.jsx)(En,{className:s.textInput,tagName:"div",content:e})}):(0,He.jsxs)("div",{className:s.textInputWrapper,children:[(0,He.jsx)("textarea",{...n,ref:u,"data-testid":"edit-suggestion-dialog-textarea",className:s.textInput,defaultValue:e,onChange:()=>{}}),a&&(0,He.jsx)(bR,{inputElement:u.current,value:e}),(0,He.jsxs)("div",{className:(0,wg.default)(s.alert,c===0?s.success:s.warning),children:[(0,He.jsx)("div",{className:s.alertText,children:r("placeholders",{placeholderSize:c})}),c===0?(0,He.jsx)(R_,{}):(0,He.jsx)(I_,{})]})]})},bR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",pg),r=(0,kt.useRef)(null),o=Dc(e);return(0,kt.useEffect)(()=>{Fc(e,o)},[o,e]),(0,He.jsx)(ER,{inputElement:e,children:(0,He.jsxs)("div",{ref:r,className:(0,wg.default)(n.root,n.agentText),children:[(0,He.jsx)(En,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new yi("placeholders")],inputElement:e,boundaryRef:r}),(0,He.jsx)("br",{})]})})},ER=({inputElement:e,children:t})=>{let n=(0,kt.useRef)(null);return(0,kt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=io(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,He.jsx)("div",{ref:n,children:t})},N_=wR;var Ei=x(O());var M_=x(O()),Uc=x($());var tt={root:"_root_pc5uy_1",list:"_list_pc5uy_2",listWrapper:"_listWrapper_pc5uy_6",listHorizontal:"_listHorizontal_pc5uy_10",page:"_page_pc5uy_19",search:"_search_pc5uy_25",pageNav:"_pageNav_pc5uy_33",pageTitle:"_pageTitle_pc5uy_41",pageBackButton:"_pageBackButton_pc5uy_48",listHeading:"_listHeading_pc5uy_62",listItem:"_listItem_pc5uy_70",listItemContent:"_listItemContent_pc5uy_79",listItemText:"_listItemText_pc5uy_97",listItemDescription:"_listItemDescription_pc5uy_105",listItemActions:"_listItemActions_pc5uy_112",truncate:"_truncate_pc5uy_123",lineClamp:"_lineClamp_pc5uy_129",listItemTitle:"_listItemTitle_pc5uy_136",listItemAction:"_listItemAction_pc5uy_112",listItemPrimaryAction:"_listItemPrimaryAction_pc5uy_157",listItemSelected:"_listItemSelected_pc5uy_162",sources:"_sources_pc5uy_166",sourcesTitle:"_sourcesTitle_pc5uy_173",source:"_source_pc5uy_166",icon:"_icon_pc5uy_188",searchIcon:"_searchIcon_pc5uy_205",searchInputWrapper:"_searchInputWrapper_pc5uy_210",searchInput:"_searchInput_pc5uy_210",select:"_select_pc5uy_231",selectType:"_selectType_pc5uy_248",selectWrapper:"_selectWrapper_pc5uy_252",image:"_image_pc5uy_282",imageSrc:"_imageSrc_pc5uy_289",imageSrcHidden:"_imageSrcHidden_pc5uy_300",imageSrcStatus:"_imageSrcStatus_pc5uy_304",imageTitle:"_imageTitle_pc5uy_314",actions:"_actions_pc5uy_319",actionsWrapper:"_actionsWrapper_pc5uy_323",actionsBar:"_actionsBar_pc5uy_329",actionButton:"_actionButton_pc5uy_338",actionShortcut:"_actionShortcut_pc5uy_356",actionShortcutFixKerning:"_actionShortcutFixKerning_pc5uy_363"};var so={};Ie(so,{enUS:()=>CR,nlNL:()=>TR});var CR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},TR={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()),kR=({src:e,title:t})=>{let n=k("CommandPalette",tt),[r,o]=(0,M_.useState)("loading"),i=B(so);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,Uc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,Uc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,Uc.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(Qa,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},D_=kR;var F_=x(O()),j_=x($());var ga=x(w());function bg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",tt);return F_.default.Children.count(e)===0?null:(0,ga.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ga.jsx)("h4",{className:r.listHeading,children:t}),(0,ga.jsx)("div",{className:(0,j_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ha=x($());var Vc=x(O()),z_=x(w()),B_=Vc.default.createContext(void 0);function _r(){let e=Vc.default.useContext(B_);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=Vc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,z_.jsx)(B_.Provider,{value:s,children:e})};var Re=x(O()),U_=x($());var Eg={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var ao=x(w()),PR=0,V_=Re.default.createContext(null),RR=()=>{let e=(0,Re.useContext)(V_);if(!e)throw new Error("Invalid DropdownContext");return e},K_=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Re.useMemo)(()=>++PR,[]),o=(0,Re.useRef)(null),i=(0,Re.useRef)(null),s=k("Dropdown",Eg),[a,l]=(0,Re.useState)(!1),[u,c]=(0,Re.useState)(n),p=h=>{h.preventDefault(),h.stopPropagation(),l(!a)},d=(0,Re.useCallback)(([h])=>{!h.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Re.useEffect)(()=>{let h=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}},[]),(0,Re.useEffect)(()=>{if(!i.current&&!a)return()=>{};let h=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&h.observe(i.current),()=>{i.current&&h.unobserve(i.current)}},[i,a]),(0,ao.jsx)(V_.Provider,{value:{setIsOpen:l},children:(0,ao.jsxs)("div",{ref:o,className:s.root,children:[(0,ao.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,ao.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,U_.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function IR({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",Eg),{setIsOpen:s}=RR(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,ao.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}K_.Item=IR;var Cg=K_;var Tg=x(w()),W_=e=>(0,Tg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Tg.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var lo={};Ie(lo,{enUS:()=>LR,nlNL:()=>AR});var LR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},AR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Kc=x(w()),OR="%0d%0a%0d%0a%0d%0a",NR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(OR)}`},MR=({suggestion:e,onFeedback:t})=>{let n=B(lo),r=M("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Kc.jsx)(Cg,{trigger:(0,Kc.jsx)(W_,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Kc.jsx)(Cg.Item,{as:"a",href:NR(r,e),onClick:t,children:n("giveFeedback")})})},Wc=MR;var ut=x(w());function kg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,index:s,description:a,sources:l,styles:u,...c}){let{selected:p,setSelected:d,onChangeOpen:h}=_r(),v=k("CommandPalette",tt);function y(m){r(m),e&&h(!1)}return(0,ut.jsxs)("div",{className:(0,ha.default)(v.listItem,p===s&&v.listItemSelected),children:[(0,ut.jsx)("button",{onMouseEnter:()=>d(s),type:"button",className:(0,ha.default)("command-palette-list-item",v.listItemAction,v.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,...c,children:(0,ut.jsxs)("div",{className:v.listItemContent,children:[typeof n=="string"?(0,ut.jsx)("p",{className:(0,ha.default)(v.listItemText,v.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,ut.jsx)(En,{tagName:"p",allowList:[],content:zc(a),className:(0,ha.default)(v.listItemDescription,u==null?void 0:u.description,t?v.lineClamp:v.truncate)})]})}),o&&p===s&&(0,ut.jsx)("div",{className:v.listItemActions,children:(0,ut.jsx)(Wc,{suggestion:String(n),onFeedback:o})}),l&&(0,ut.jsxs)("div",{className:v.sources,children:[(0,ut.jsx)("span",{className:v.sourcesTitle,children:"Sources"}),l.map(m=>m.url?(0,ut.jsx)("a",{className:v.source,href:m.url,target:"_blank",title:m.url,rel:"noopener noreferrer",onClick:()=>i&&i(m),children:m.name},m.url):(0,ut.jsx)("span",{className:v.source,children:m.name},m.name))]})]})}var uo=x(w());function Pg({children:e,title:t,id:n,onDismiss:r}){let o=B(so),i=k("CommandPalette",tt),{page:s}=_r();return s!==n?null:(0,uo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,uo.jsxs)("div",{className:i.pageNav,children:[(0,uo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,uo.jsx)(Tc,{}),o("back")]}),t&&(0,uo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wr=x(O());var $c=()=>/Mac/i.test(navigator.platform);var DR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=DR;function FR(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,[FR(n)]:re(e[n])}),{}):e}function Rg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function be(e){return Array.isArray(e)?e.map(be):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Rg(n)]:be(e[n])}),{}):e}var jR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},va=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)||""}},ya=D("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))}),Ig=D("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}),Lg=D("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),$_=e=>e.info.agentInfo,q_=j({name:"info",initialState:jR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ya.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ya.rejected,t=>{t.fetchState="error"}).addCase(ya.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(Ig.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Lg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:G_}=q_.actions,X_=q_.reducer;var qc={list:[],fetchState:"idle",isOpen:!1,page:"search"},Q_=e=>e.search.isOpen,Y_=e=>e.search.page,Z_=e=>e.search.list;function J_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var co=D("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:va(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),ew=j({name:"search",initialState:qc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=qc.fetchState,e.list=qc.list}},extraReducers:e=>{e.addCase(co.pending,t=>{t.fetchState="loading"}).addCase(co.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(co.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>qc)}}),{resetSearch:Gc,setIsOpen:ct,setPage:$e}=ew.actions,tw=ew.reducer;var BR=/(https?:\/\/[^\s]+)/,Xc=e=>e.split(" ").find(t=>BR.test(t));var Ag=x($());var Qc=x(w()),HR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",tt);return(0,Qc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Ag.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Qc.jsx)("span",{className:(0,Ag.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},wi=HR;var Pn=x(w()),zR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",tt),a=B(so),{selected:l,setSelected:u}=_r(),c=i[l],p=c&&typeof c.text=="string"&&Xc(c.text),d=(0,wr.useRef)(null);function h(S){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),b=0,E=0;S==="down"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b===_.length-1?0:b+1):S==="up"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b?b-1:_.length-1):u(0);let C=_[E];C&&typeof E=="number"&&(u(E),C.scrollIntoView&&C.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let S=d.current.querySelectorAll(".command-palette-list-item"),_=0;S.forEach((E,C)=>{C===l&&(_=C)});let b=S[_];b&&b.click()}let y=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,wr.useCallback)(S=>{if(S.key==="Enter"&&S.altKey&&p){y();return}if(S.key==="Enter"&&S.shiftKey){g();return}if(S.key==="ArrowDown"){S.preventDefault(),S.stopPropagation(),h("down");return}if(S.key==="ArrowUp"){S.preventDefault(),S.stopPropagation(),h("up");return}S.key==="Enter"&&l!==-1&&(S.preventDefault(),S.stopPropagation(),v())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(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:[p&&(0,Pn.jsx)(wi,{onClick:y,shortKeys:[$c()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Pn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Pn.jsx)(wi,{onClick:g,shortKeys:[8679,8629],children:n}),(0,Pn.jsx)(wi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},rw=zR;var ow=x(O());var Sa=x(w()),bi=()=>(0,Sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Sa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Sa.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 Ht=x(w());function UR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",tt);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(bi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.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,Ht.jsx)("div",{className:l.selectWrapper,children:(0,Ht.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,Ht.jsx)("option",{children:r}),o.map(u=>(0,Ht.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var iw=(0,ow.forwardRef)(UR);var xa=x(w());function po({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[h,v]=(0,Ei.useState)(0),y=(0,Ei.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=y.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Ei.useEffect)(()=>{v(0)},[d,r]),(0,xa.jsx)(gi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:g,onClose:m,children:(0,xa.jsxs)(H_,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,xa.jsx)(iw,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}po.Page=Pg;po.List=bg;po.Image=D_;po.ListItem=kg;po.ActionsBar=rw;po.Button=wi;var te=po;var ze=x(w()),VR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",t_),l=U(),u=B(Xm),c=L(v=>v.overlayInput.text);(0,Og.useEffect)(()=>{e&&(l(et.actions.reset()),l(et.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(et.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(uc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,Og.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,ze.jsxs)("div",{className:a.root,children:[(0,ze.jsxs)("div",{className:a.content,children:[e.title&&(0,ze.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,ze.jsx)(zd,{labels:e.searchKeywords}),(0,ze.jsx)(N_,{onUse:d,value:zc(c)})]}),(0,ze.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,ze.jsxs)("div",{children:[(0,ze.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,ze.jsx)(Tc,{})}),(0,ze.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,ze.jsx)(d_,{})})]}),(0,ze.jsxs)("div",{className:a.primaryButtons,children:[(0,ze.jsx)(te.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,ze.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Yc=VR;var KR=["{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}"],WR=new RegExp(KR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function sw(e,t){let n=e.split(WR),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function aw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var uw={suggestions:[],fetchState:"idle",isInitialRequest:null},lw={default:uw},cw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},dw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},pw=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")},Ci=e=>e.textSuggestions,fw=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Zc=fe("textSuggestions/refresh"),Rn=D("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=fi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,va(r),e);if(e==="default"){let c=s?l.filter(fw(a)):l;t.dispatch(on(c.slice(0,i)))}return l}),_a=D("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,{...va(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(fw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?sw(c.text,e):c.text}))),l=aw(l,i),t.dispatch(on(l)),l}),mw=j({name:"textSuggestions",initialState:lw,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]||uw;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(_a.pending,t=>{t.default.fetchState="loading"}).addCase(_a.rejected,t=>{t.default.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>lw)}}),{setTextSuggestions:gw,setSuggestionState:hw}=mw.actions,yw=mw.reducer;var vw={contentType:null,suggestion:null},Sw=e=>e.activeSuggestion.suggestion,xw=e=>e.activeSuggestion.contentType,_w=j({name:"activeSuggestion",initialState:vw,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,()=>vw)}}),{setActiveSuggestion:In,resetActiveSuggestion:Ng}=_w.actions,ww=_w.reducer;var Mg={};Ie(Mg,{enUS:()=>$R,nlNL:()=>qR});var $R={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"}]},qR={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 GR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Jc=({ui:e})=>e.overlayCollapsed;var bw=j({name:"ui",initialState:GR,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:wa,setInputHasFocus:Ti,setOverlayCollapsed:br,setOpenOverlayWhenTyping:Ew,setOverlayCollapsedUserOverwrite:Cw}=bw.actions,Tw=bw.reducer;var ba=x(O()),Pw=x(w()),kw=ba.default.createContext(null),ki=({broadcastEvents:e,children:t})=>{let n=ba.default.useMemo(()=>e,[]);return(0,Pw.jsx)(kw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,ba.useContext)(kw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var XR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},zt=e=>e.auth.isLoggedIn,Rw=e=>e.auth.loginFetchState,Iw=e=>e.auth.verifyFetchState,Lw=e=>e.auth.showLoginOverlay,Er=D("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Aw=D("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ea=D("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Ow=j({name:"auth",initialState:XR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Er.pending,t=>{t.loginFetchState="loading"}),e.addCase(Er.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Er.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ea.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ea.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ea.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Pi,setShowLoginOverlay:Nw}=Ow.actions,Mw=Ow.reducer;var Dg="SetActiveSuggestion",Ri="ShowLoginOverlay",Fg="UserLoggedIn",QR="UserLoggedOut",Ln="ApplySuggestion",jg="ApplyImageSuggestion",YR="ShowCommandPalette",ZR=e=>({[Dg]:t=>{e.dispatch(hw(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[YR]:t=>{e.dispatch(ct(t.isOpen)),t.page&&e.dispatch($e(t.page))},[Ri]:t=>{e.dispatch(Nw(t))},[Fg]:()=>{e.dispatch(Er())},[QR]:()=>{e.dispatch(Er())},[jg]:t=>{e.dispatch(dc({suggestion:t.suggestion}))},[Ln]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(vr())}}),Dw=ZR;var Bg=x(w()),JR=()=>{var v;let[e,t]=(0,Fw.useState)(!1),n=L(Sw),r=L(xw),o=L(Ci),i=U(),s=Pt(),a=B(Mg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Ng()),i(Ti(!0)),i(et.actions.reset())},c=(y,m)=>{i(Ng()),i(Ti(!0)),s.send(Ln,{text:y,suggestion:{...m,source:`${m.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let p=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Bg.jsx)(gi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Bg.jsx)(Yc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},jw=JR;var ed=x($()),Ut=x(O());var Hw=x($());var Bw={root:"_root_1ukx5_1"};var zw=x(w()),eI=({className:e,value:t,...n})=>{let r=k("TextInput",Bw);return(0,zw.jsx)("input",{className:(0,Hw.default)(e,r.root),type:"text",value:t,...n})},Ca=eI;var Hg={};Ie(Hg,{enUS:()=>tI,nlNL:()=>nI});var tI={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"}]},nI={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 Uw={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 ye=x(w());var rI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},oI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=B(Hg),s=k("LoginTokenDialog",Uw),a=L(Iw),l=U(),u=M("productName"),[c,p]=(0,Ut.useState)(e||""),[d,h]=(0,Ut.useState)(0),[v,y]=(0,Ut.useState)(""),m=(0,Ut.useCallback)(async _=>{_.preventDefault(),l(Aw({email:c})),h(1)},[n,c]),g=()=>{y(""),h(0)},f=(0,Ut.useCallback)(async _=>{_.preventDefault();let b=rI(_.target.elements.token.value);if(!b){y(i("verifyCodeError",{login:S}));return}l(Ea({token:b}))},[n]),S=(0,Ut.useMemo)(()=>_=>(0,ye.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,Ut.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ye.jsx)(gi,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ye.jsxs)("div",{className:s.root,children:[(0,ye.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ye.jsxs)("form",{onSubmit:m,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ye.jsx)(Ca,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,ye.jsx)("div",{className:s.actions,children:(0,ye.jsx)("button",{type:"submit",className:(0,ed.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ye.jsxs)("form",{onSubmit:f,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ye.jsx)(Ca,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,ye.jsx)("div",{className:s.errorMessage,children:v}),(0,ye.jsxs)("div",{className:s.actions,children:[(0,ye.jsx)("button",{type:"button",className:(0,ed.default)(s.button),onClick:g,children:i("back")}),(0,ye.jsx)("button",{type:"submit",className:(0,ed.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Vw=oI;var Ww=x(w()),iI=()=>{let e=L(Lw),t=L($_),n=M("adminUrl"),r=Pt(),o=()=>r.send(Ri,!1),i=()=>{r.send(Ri,!1),r.send(Fg)};return(0,Ww.jsx)(Vw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Kw=iI;var y1=x(Vg()),qe=x(O());var bI={data:null,fetchState:"idle"},Xw=e=>e.contentTypes.data,Ta=D("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),EI=j({name:"contentTypes",initialState:bI,reducers:{},extraReducers:e=>{e.addCase(Ta.pending,t=>{t.fetchState="loading"}).addCase(Ta.rejected,t=>{t.fetchState="error"}).addCase(Ta.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Qw=EI.reducer;function ka(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 Yw=x(O());function Zw(e,t){(0,Yw.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 Pa=x(O());var Jw={data:null,fetchState:"idle"},td=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=D("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)}),CI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),TI=j({name:"entities",initialState:Jw,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=CI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Jw)}}),e1=TI.reducer;var Kg={};Ie(Kg,{enUS:()=>kI,nlNL:()=>PI});var kI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},PI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var t1={root:"_root_17kae_1",empty:"_empty_17kae_5"};var fo=x(w()),RI=({onCopy:e,onUse:t})=>{let n=(0,Pa.useRef)(null),r=k("EntitiesList",t1),o=B(Kg),i=L(td),s=U();return(0,Pa.useEffect)(()=>{s(Vt())},[]),(0,Pa.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,fo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,fo.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,fo.jsx)(te.List,{children:i.map((a,l)=>(0,fo.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,fo.jsx)("p",{className:r.empty,children:o("noResults")})]})},n1=RI;var Kt=x(O());var r1={data:null,fetchState:"idle"},o1=e=>e.summary.data,i1=e=>e.summary.fetchState==="error",An=D("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})}}),II=j({name:"summary",initialState:r1,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,()=>r1)}}),s1=II.reducer;var Wg={};Ie(Wg,{enUS:()=>LI,nlNL:()=>AI});var LI={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."}]},AI={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 a1={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()),OI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",a1),[r,o]=(0,Kt.useState)(""),i=B(Wg),s=L(o1),a=L(i1),l=U(),u=()=>{l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(An())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[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)(Kt.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:p=>o(p.target.value)})}),(0,On.jsx)("div",{className:n.actions,children:(0,On.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},l1=OI;var $g={};Ie($g,{enUS:()=>NI,nlNL:()=>MI});var NI={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?"}]},MI={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 Cr=x(O());var qg={};Ie(qg,{enUS:()=>DI,nlNL:()=>FI});var DI={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"}]},FI={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 u1={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 Gg={data:[],fetchState:"idle"},c1=e=>{var t;return(t=e.answer)==null?void 0:t.data},d1=e=>e.answer.fetchState,Li=fe("answer/resetKnowledgeSearch"),Ii=D("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}}),jI=j({name:"answer",initialState:Gg,reducers:{},extraReducers:e=>{e.addCase(Ii.pending,t=>{t.fetchState="loading"}).addCase(Ii.rejected,t=>{t.fetchState="error"}).addCase(Ii.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Gg).addCase(Li,()=>Gg)}}),p1=jI.reducer;var Ra=x(w()),f1=()=>(0,Ra.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ra.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ra.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 nt=x(w()),BI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Cr.default.useState(""),{setSelected:s}=_r(),a=(0,Cr.useRef)(null),l=k("EntitiesList",u1),u=B(qg),c=U(),p=L(c1),d=L(d1),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(Ii({question:o,promptInstruction:r}))},v=(y,m)=>{c(je({name:"knowledge assist source viewed",data:{question:m,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Cr.useEffect)(()=>{var y;n&&d==="idle"?c(Ii({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,Cr.useEffect)(()=>{d==="done"&&(c(je({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,answer:p[p.length-1].answer.answer,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(p.length-1),i(""))},[d,p]),(0,Cr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,p]),(0,nt.jsxs)("div",{className:l.root,children:[p.length>0&&(0,nt.jsx)("div",{className:l.alignRight,children:(0,nt.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,nt.jsxs)(te.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:m},g)=>(0,nt.jsx)(te.List,{children:(0,nt.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:f=>v(f,y),sources:m.sources,styles:{title:l.question,description:l.answer},children:y})},`${m.answer}_${g}`)),d==="loading"&&(0,nt.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,nt.jsx)("p",{className:l.status,children:u("error")}),(0,nt.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,nt.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,nt.jsx)("button",{type:"submit",className:l.submit,children:(0,nt.jsx)(f1,{})})]})]})]})},m1=BI;var HI={data:null,fetchState:"idle"},Ai=e=>e.profile.data,nd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ia=D("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)}),zI=j({name:"profile",initialState:HI,reducers:{},extraReducers:e=>{e.addCase(Ia.pending,t=>{t.fetchState="loading"}).addCase(Ia.rejected,t=>{t.fetchState="error"}).addCase(Ia.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),g1=zI.reducer;var Ee=x(w()),UI=200,VI=5,KI=4,WI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),h1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),$I=()=>{let e=U(),t=Pt(),n=B($g),[r,o]=(0,qe.useState)(!1),[i,s]=(0,qe.useState)(""),a=L(Y_),l=L(Ai),[u,c]=(0,qe.useState)(null),[p,d]=(0,qe.useState)([]),[h,v]=(0,qe.useState)(),y=L(zt),m=M("showSearch"),g=M("showEntitiesCommand"),f=M("showSummaryCommand"),S=M("showKnowledgeSearch"),_=M("showImageSearch"),b=M("searchTriggerKey"),E=L(Xw),C=L(Z_),R=L(Q_),P=I=>vo(C.filter(X=>X.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),H=[{label:n("entitiesClipboard"),onClick:()=>e($e("entities")),shouldShow:g&&h1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e($e("summary")),shouldShow:f&&h1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e($e("knowledgeAssist")),shouldShow:S}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],Ve=(0,qe.useCallback)((0,y1.default)((I,X)=>{e(co({query:I,type:X,tags:["search-overlay"]}))},UI),[]),cn=WI([...z,...N]),qt=(0,qe.useCallback)((I,X)=>{if(!X)return;let Xt=[...N,...z].find(({value:Lt})=>Lt===X);Xt&&(e($e("edit")),c({...I,searchTerm:void 0}),d(Xt.list))},[e,u,z]),yo=(0,qe.useCallback)((I,X)=>{switch(X.type){case"IMAGE":t.send(jg,{suggestion:X});break;default:t.send(Ln,{text:I,suggestion:X})}e(ct(!1))},[e]),Ui=I=>{ka(I.text),e(je({name:"entity copied",data:{entity:I,type:"copy"}})),e(ct(!1))},Lr=(0,qe.useCallback)(I=>{e(je({name:"suggestion feedback",data:{text:I.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),Ua=I=>{t.send(Ln,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(je({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e($e("search")),e(Li()),e(ct(!1))},Va=I=>{ka(I),e(ct(!1))},Vi=I=>{t.send(Ln,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(ct(!1))},Ki=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ar=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function vo(I,X){return I.slice(0,h?10:X.toLowerCase()==="image"?KI:VI)}function Ld(I,X,Xt){return X.reduce((Lt,zn)=>Xt&&h===Xt?zn.length+Lt:vo(zn,Xt).length+Lt,I)}function Gt(I){return X=>{r?window.confirm(n("warning"))&&(I(X),o(!1)):I(X)}}return(0,qe.useEffect)(()=>{i?Ve(i,h):e(Gc())},[i,h]),(0,qe.useEffect)(()=>{a==="search"&&e(Li())},[a]),(0,qe.useEffect)(()=>{y&&e(Ta())},[y]),Zw(b,()=>e(ct(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Gt(I=>e(ct(I))),onChangeType:I=>v(I),onChangePage:Gt(I=>e($e(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...H.map(I=>({text:I.label,type:"command"})),...cn.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},X)=>yo(I,cn[X]),onSecondary:(I,X)=>{qt(cn[X-H.length],cn[X-H.length].type)},children:[H.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:H.map((I,X)=>(0,Ee.jsx)(te.ListItem,{index:Ld(X,[],"commands"),closeOnSelect:!1,onClick:I.onClick,children:I.label},I.label))}),[...z,...N].map(({value:I,label:X,list:Xt,lineClamp:Lt,listOrientation:zn},Ph)=>(0,Ee.jsx)(te.List,{heading:X,orientation:zn==="horizontal"?"horizontal":"vertical",children:vo(Xt,I).map((ce,Or)=>(0,Ee.jsx)(te.ListItem,{index:Ld(H.length+Or,[...z,...N].slice(0,Ph).map(({list:yE})=>yE),I),closeOnSelect:!1,lineClamp:Lt,onClick:()=>yo(ce.text,ce),description:I!=="IMAGE"?ce.title&&ce.text:void 0,onFeedback:I!=="IMAGE"?()=>Lr(ce):void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ce.title||ce.text,src:ce.image}):ce.title||ce.text},`${ce.id}-${ce.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Gt(()=>{e($e("search")),c(null)}),children:u&&(0,Ee.jsx)(Yc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e($e("search")),c(null),d([])},onNext:Ar,onPrevious:Ki,onUse:I=>{e($e("search")),yo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(ct(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Gt(()=>{e($e("search"))}),children:(0,Ee.jsx)(n1,{onUse:Vi,onCopy:Ui})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Gt(()=>{e($e("search"))}),children:(0,Ee.jsx)(l1,{onCopy:Va})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Gt(()=>{e(Li()),e($e("search"))}),children:(0,Ee.jsx)(m1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ua,onResetQuestion:()=>{e(Li()),s("")}})})]})},v1=$I;var Oi=x(w()),qI=()=>{let e=M("showSearch"),t=M("isEmbedded");return(0,Oi.jsxs)(S1.Fragment,{children:[e&&(0,Oi.jsx)(v1,{}),(0,Oi.jsx)(jw,{}),t&&(0,Oi.jsx)(Kw,{})]})},x1=qI;function Ni(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 rd=x(O());var Mi=x(O());var _1=x(O());function w1(e,t,n){(0,_1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var b1={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var mo=x(w()),XI=["search","personal-collection-search","search-autocomplete"];function QI(e,t,n,r={}){let o="";return XI.includes(t)?o=A_(xg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=xg(e,n,r),r.placeholders===!0&&(o=O_(o)),o}var YI=()=>{},ZI=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=M("inlineSuggestions"),i=L(fi),s=U(),a=k("TextSuggestion",b1),l=(0,Mi.useRef)(null);(0,Mi.useEffect)(()=>{let c=setTimeout(()=>{s(qx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),w1(l,"click",()=>{s(yr(e)),s(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,Mi.useMemo)(()=>QI(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,mo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(yr(e)),children:[(0,mo.jsx)(oe,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:YI,children:(0,mo.jsx)(En,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,mo.jsx)("div",{className:a.actions,children:(0,mo.jsx)(Wc,{onFeedback:()=>r(n),suggestion:n.text})})]})},E1=ZI;var Xg=x(w()),JI=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,rd.useMemo)(()=>{let i=t.map((s,a)=>(0,Xg.jsx)(E1,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,Xg.jsx)(rd.Fragment,{children:o})},od=JI;var C1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var La=x(w()),eL=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",C1),r=L(Ni),o=U(),i=L(zt),s=L(pi),a=L(Jc),l=M("showTextSuggestions");return Si(()=>{o(br({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,La.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,La.jsx)("div",{className:n.paper,children:(0,La.jsx)(yt,{children:(0,La.jsx)(od,{suggestions:e,selectedIndex:t})})})})},tL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),T1=xn(tL)(eL);var sd=x($()),Di=x(O());var k1=x(O());function P1(e,t){let[n,r]=(0,k1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.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){V.error(s)}}]}var I1=x($()),Nn=x(O());var Qg={};Ie(Qg,{enUS:()=>nL,nlNL:()=>rL});var nL={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"}]}]},rL={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 R1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Tr=x(w()),Yg=(e,t,n)=>r=>(0,Tr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),oL=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=B(Qg),i=Pt(),s=k("Login",R1),a=M("productName"),l=(0,Nn.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,Nn.useCallback)(y=>{y.preventDefault(),i.send(Ri,!0)},[t]),c=(0,Nn.useMemo)(()=>y=>(0,Tr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,Nn.useCallback)(y=>(0,Tr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,Nn.useMemo)(()=>({min:Yg(s,60*10,l),hour:Yg(s,60*60,l),day:Yg(s,60*60*12,l)}),[]);return(0,Tr.jsxs)("div",{className:(0,I1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,Tr.jsxs)(Nn.Fragment,{children:[(0,Tr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},id=oL;var L1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Aa=x(w()),iL=({title:e})=>{let t=k("SearchTrigger",L1),n=U();return(0,Aa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(ct(!0)),children:[(0,Aa.jsx)(bi,{}),(0,Aa.jsx)("span",{className:t.text,children:e})]})},A1=iL;var Zg={};Ie(Zg,{enUS:()=>sL,nlNL:()=>aL});var sL={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"}]},aL={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 O1={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()),lL=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",O1),r=B(Zg),o=L(Ni),i=Ux(),s=U(),a=(0,Di.useRef)(null),l=M("searchTriggerKey"),u=M("productName"),c=L(Jc),p=L(zt),d=L(pi),[h,v]=(0,Di.useState)(null),y=M("showSearch"),m=M("showTextSuggestions"),g=M("adminUrl"),f=M("isEmbedded"),[S,_]=P1("dd-snooze-until-ms",0),b=c||S>Date.now(),E=L(H=>H.input.text),C=e.filter(H=>H.source!=="gpt").length,R=()=>{b&&_(0),s(Cw(!b))},P=H=>{s(je({name:"suggestion feedback",data:{text:H.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},N=H=>{let z=Date.now()+H*1e3;_(z),V.info(`Snooze until: ${new Date(z)}`),s(br({collapse:!0}))};return(0,Di.useEffect)(()=>{C===0&&v(null)},[e,C]),Si(()=>{s(br({collapse:!0,skipWhenInputFocus:!0}))}),p===null||d===!1?null:p===!1?(0,ue.jsxs)("div",{ref:a,className:(0,sd.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(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)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(id,{loginUrl:g,isEmbedded:f,onSnooze:N})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,sd.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:y&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(r($c()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(A1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,sd.default)(!h&&n.hintsHidden,n.hints),children:h}),(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),C>0&&m&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(yt,{children:(0,ue.jsx)(od,{onFeedback:P,suggestions:e,selectedIndex:t,reverse:!0})})})]})},uL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),N1=xn(uL)(lL);var Oa=x(w()),cL=({children:e})=>{let n=M("locale").replace("-","");return(0,Oa.jsx)(rg.Provider,{value:n,children:e})},dL=({store:e,customStyles:t={},children:n})=>(0,Oa.jsx)(jm,{store:e,children:(0,Oa.jsx)(cL,{children:(0,Oa.jsx)($i.Provider,{value:t,children:n})})}),Fi=dL;var Sd=x($());var Fn=x(O());var M1=x(O()),pL=["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(pL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,M1.cloneElement)(r,{children:Jg(s,t,n+1)})]}return[...e,...t]}function kr(e){return e.tagName.toLowerCase()==="textarea"}var D1={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 W1=x($());var gd=x(O());function F1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function ad(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function j1(e){return e!=null}var th=x($()),Rt=x(O());var ld=x(O()),fL=["bottom","height","left","right","top","width"],mL=(e={},t={})=>fL.some(n=>e[n]!==t[n]),Mn=new Map,B1,H1=()=>{let e=[],t=[];Mn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();mL(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))}),B1=window.requestAnimationFrame(H1)};function gL(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&&H1()},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(B1)}}}}function eh(e){let[t,n]=(0,ld.useState)(null);return(0,ld.useLayoutEffect)(()=>{if(!e.current)return;let r=gL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var ji=x(O()),U1=x(hu());var z1={root:"_root_1jq08_1"};var V1=({children:e})=>{let[t,n]=(0,ji.useState)(null),r=(0,ji.useContext)($i);return(0,ji.useLayoutEffect)(()=>{let o=document.createElement("div");return oo(o),o.classList.add(z1.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,U1.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var ud=x(w()),cd=(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 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 dd=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=nh,...a})=>{let l=eh(t),u=eh(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,ud.jsx)(V1,{children:(0,ud.jsx)("div",{className:(0,th.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,ud.jsx)("div",{className:(0,th.default)(e,ln.root),children:i})})})};var K1=x($()),pd=x(O());var rh=x(w()),fd=(0,pd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,pd.useRef)(null),i=k("TabCompletion",Cn);return(0,rh.jsx)("div",{ref:ad([o,r]),className:(0,K1.default)(e,i.popoverContentContainer),...n,children:(0,rh.jsx)("div",{className:i.popoverContent,children:t})})});var Pr=x(w()),hL=e=>t=>{let n=nh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},yL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Cn),s=cd(),a=(0,gd.useMemo)(()=>hL(e.getBoundingClientRect()),[e]),[l,u]=Nc(e);return(0,gd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Pr.jsxs)("span",{children:[(0,Pr.jsx)("mark",{ref:ad([l,s.triggerRef]),className:(0,W1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Pr.jsx)(dd,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Pr.jsx)(fd,{style:n,children:(0,Pr.jsx)("div",{className:i.hintText,children:o})})})]})},md=class extends wn{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${F1(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(j1);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,Pr.jsx)(yL,{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($());var Xe=x(O());var oh=x(w()),$1=()=>(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 Rr=x(O());var G1=x(Vg());var q1={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 It=x(w()),vL=3,SL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),xL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=vL})=>{let i=k("LinkSearch",q1),[s,a]=(0,Rr.useState)(""),l=U(),u=L(cw("url")),c=L(J_("URL",SL)),[p,d]=(0,Rr.useState)(c.length-1),h=M("fallbackImage"),v=f=>{let S=f.target;a(S.value)},y=(f,S)=>{f.stopPropagation(),f.preventDefault(),window.open(S,"_blank")},m=f=>{var b;let S=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(S),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((b=c[p])==null?void 0:b.text)||s)},g=(0,Rr.useCallback)((0,G1.default)(f=>{l(co({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Rr.useEffect)(()=>{s&&g(s)},[s]),(0,Rr.useEffect)(()=>()=>{l(Gc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(yt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,S)=>(0,It.jsx)(oe,{selected:p===S,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(ge,{children:[(0,It.jsx)(ge.Image,{src:hd(f,"small",h||void 0),title:f.title||f.text}),(0,It.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(ge.Title,{children:f.title||ih(f.text)}),f.title&&ih(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>y(_,f.text)})})]})},f.text))}),(0,It.jsx)(Ca,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},X1=xL;var sh={};Ie(sh,{enUS:()=>_L,nlNL:()=>wL});var _L={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},wL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ge=x(w()),bL=(0,Xe.forwardRef)((e,t)=>{let n=k("TabCompletion",Cn);return(0,Ge.jsx)("mark",{ref:t,className:(0,yd.default)(n.matchSelection)},"selection-start")}),EL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=B(sh),s=k("TabCompletion",Cn),a=(0,Xe.useRef)(null),l=(0,Xe.useRef)(null),[u,c]=(0,Xe.useState)(null),p=U(),d=cd(document.activeElement===r),[h]=(0,Xe.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Xe.useEffect)(()=>()=>h.detach(),[]),(0,Xe.useEffect)(()=>{let y=e.current,m=a.current;!y||!m||(h.setStart(y,0),h.setEnd(m,0))},[e.current,a.current]),Si(()=>{d.close()});let v=(0,Xe.useCallback)(y=>{let m=h.toString(),g=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(ac({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,Ge.jsxs)("span",{children:[(0,Ge.jsx)("mark",{ref:a,className:(0,yd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ge.jsx)(dd,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ge.jsxs)(fd,{style:n,ref:l,children:[(0,Ge.jsx)("div",{className:(0,yd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ge.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ge.jsx)($1,{}),(0,Ge.jsx)("span",{children:"\xA0"}),(0,Ge.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ge.jsx)(X1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},vd=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Xe.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,Ge.jsx)(bL,{ref:this.startRef}):(0,Ge.jsx)(EL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Dn=x(w()),CL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",D1),c=M("insertLink"),p=M("showMidSentenceSuggestions"),d=M("inlineSuggestions"),h=Dc(a),v=(0,Fn.useRef)(null);(0,Fn.useEffect)(()=>{kr(a)&&h&&Fc(a,h)},[h]);let y=(0,Fn.useCallback)(f=>{if(!o||!n)return f;let S=[(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&&S.push((0,Dn.jsx)("span",{className:(0,Sd.default)(u.hint,u.resetIndent),children:(0,Dn.jsx)(el,{keyCode:"tab"},"tabHint")})),Jg(f,S)},[o,n,r]),m=(0,Fn.useMemo)(()=>{let f=[];return c&&f.push(new vd("selection")),f.push(new yi("placeholders")),i&&f.push(new md("keywords")),f},[d,c,i]),g=(0,Fn.useMemo)(()=>{let f=window.getComputedStyle(a);return{"--dd-color":f.color,"--dd-font-size":f.fontSize,"--dd-font-family":f.fontFamily,"--dd-font-variant":f.fontVariant}},[]);return e?(0,Dn.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:g,children:[(0,Dn.jsx)(En,{tagName:"span",containerTagName:"div",className:(0,Sd.default)(u.container,u.agentText),disableLineBreaks:kr(a),content:t||"\u200B",onAfterParse:y,matchers:m,selection:h,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Dn.jsx)("br",{})]}):null},TL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??_i(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:h&&p!==!1}},Q1=xn(TL)(CL);var jb=x($()),Bb=x(O());var Y1={list:[],fetchState:"idle",isInitialRequest:null},J1=e=>e.autoflows.list||[],Z1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},jn=D("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),ah=D("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=D("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))}),kL=j({name:"autoflows",initialState:Y1,reducers:{},extraReducers:e=>{e.addCase(ah.pending,(t,n)=>{let r=Z1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(lh.pending,(t,n)=>{let r=Z1(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,()=>Y1)}}),eb=D("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))})}),tb=D("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),nb=kL.reducer;var rb={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},ob=e=>e.customMessages.list,ib=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),sb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),ab=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Na=D("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),xd=D("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=D("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),lb=j({name:"customMessages",initialState:rb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Na.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Na.rejected,t=>{t.fetchState="error"}).addCase(Na.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,()=>rb)}}),ub=D("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(lb.actions.onCustomMessage(i))})}),cb=D("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),db=lb.reducer;var PL={jwt:null,accountUrl:null,interval:null},pb=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},uh=D("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ch=D("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(uh()),setInterval(()=>r(uh()),n)}),fb=j({name:"exchangeToken",initialState:PL,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:mb}=fb.actions,gb=fb.reducer;function hb(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var Cb=x(O());var wb=x($()),bb=x(O());var vb=x($());var yb={root:"_root_838fd_1"};var xb=x(w()),RL=({className:e,children:t})=>{let n=k("Unicode",yb);return(0,xb.jsx)("span",{className:(0,vb.default)(e,n.root),children:t})},Sb=RL;var _b={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={};Ie(dh,{enUS:()=>IL,nlNL:()=>LL});var IL={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"}]},LL={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 dt=x(w()),OL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",_b),a=B(dh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,dt.jsxs)(oe,{className:(0,wb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,dt.jsx)(ge,{children:(0,dt.jsxs)(ge.Content,{children:[(0,dt.jsxs)(ge.Title,{children:[t&&(0,dt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,dt.jsx)("span",{children:r})]})}),(0,dt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,dt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,dt.jsxs)(bb.Fragment,{children:[(0,dt.jsx)(Sb,{children:u})," ",(0,dt.jsx)("span",{children:a(l)})]})})})]})},Eb=OL;var ph=x(w()),NL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},ML=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ph.jsx)(Cb.Fragment,{children:e.map(o=>(0,ph.jsx)(Eb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||NL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),DL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},FL={onStartAutoflow:ah,onStopAutoflow:lh},Tb=xn(DL,FL)(ML);var wd=x(O());var gh=x($());var fh=x(w()),mh=()=>(0,fh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,fh.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 kb={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=x(w()),jL=({entities:e})=>{let t=k("EntitiesWidgetList",kb),[n,r]=(0,wd.useState)(void 0),o=U(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ka(a.text),o(je({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,wd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,gh.default)(t.icon),children:(0,un.jsx)(mh,{})}),(0,un.jsx)("span",{className:(0,gh.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(mh,{})})]})]},a.text))})},Pb=jL;var Rb=x($()),hh=x(O());var Bn={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 rt=x(w()),BL=({suggestion:e})=>{let t=B(lo),n=U(),r=L(ib(e.text)),o=L(sb(e.text)),i=L(ab(e.text)),s=L(Ju),{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 p=parseInt(c.target.dataset.index,10),d=a[p];n(_d({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,rt.jsxs)(oe,{onClick:l,className:(0,Rb.default)(Bn.root,{[Bn.isUsed]:r,[Bn.hasError]:i}),children:[(0,rt.jsx)(ge,{children:(0,rt.jsxs)(ge.Content,{children:[(0,rt.jsxs)(ge.Title,{className:Bn.title,children:[e.text," ",(0,rt.jsx)(tl,{className:Bn.label,children:"analyse tool"})," ",i&&(0,rt.jsx)("span",{className:Bn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,rt.jsx)("ul",{className:Bn.quickReplies,children:a.map(c=>(0,rt.jsx)("li",{className:Bn.quickReply,children:c.title},c.title))})]})}),(0,rt.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,rt.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,rt.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,rt.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Ib=BL;var yh=x(w()),Lb=()=>(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 Ab=x(O());var pt=x(w()),HL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Xc(o),s=B(lo),a=M("showImages"),l=M("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,Ab.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,pt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,pt.jsxs)(ge,{children:[a&&e.image&&(0,pt.jsx)(ge.Image,{src:hd(e,"small",l||void 0),title:e.title}),(0,pt.jsxs)(ge.Content,{children:[e.title&&(0,pt.jsx)(ge.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,pt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,pt.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,pt.jsxs)(oe.Actions,{children:[i&&(0,pt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},Ob=HL;var Ma=x(w()),zL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=L(Ci),i=a=>{r.send(Dg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Ln,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Ma.jsx)(Ma.Fragment,{children:n.map(a=>(0,Ma.jsx)(Ob,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},Nb=zL;var vh={};Ie(vh,{enUS:()=>UL,nlNL:()=>VL});var UL={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"}]},VL={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 Mb={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()),Db=()=>(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()),Fb=()=>(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 K=x(w()),bd=(e,t)=>{let n=L(zt);(0,Bb.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},KL=()=>{let e=B(vh),t=U(),n=M("isEmbedded"),r=k("Widget",Mb),o=M("showAutoflows"),i=M("showCustomMessages"),s=M("showPersonalCollectionLink"),a=M("showSummaryCommand"),l=M("showKnowledgeSearch"),u=M("showSearch"),c=L(Ai),p=L(nd),d=L(J1),h=L(td),v=L(ob),y=L(ec),m=L(pi),g=L(zt),f=L(Ju),S=L(hb),_=L(Ci),b=Pt(),E=L(pw),C=L(pb("/admin/personal-collection")),R=M("adminUrl");if(bd(()=>(t(Na(f)),t(ub(f)),()=>{t(cb(f))}),[t,m,i,f]),bd(()=>(t(jn(f)),t(eb(f)),()=>{t(tb(f))}),[t,m,o,f]),bd(()=>{p.forEach(({type:N})=>{t(N==="entities"?Vt():Rn(N))})},[t,m,y,c]),bd(()=>(t(ch()),()=>{t(mb())}),[t,m,s,y]),m===!1)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,K.jsx)("div",{className:r.loginText,children:(0,K.jsx)("div",{children:(0,K.jsx)(id,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||g===null||E||S)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||C;return(0,K.jsx)("div",{className:(0,jb.default)(r.root),"data-testid":"widget",children:(0,K.jsxs)(nl,{className:r.sectionList,children:[P&&(0,K.jsx)(Un,{title:e("actions"),type:"shortcuts",children:(0,K.jsxs)("div",{className:r.shortcutList,children:[u&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,K.jsx)(bi,{}),e("linkSearch")]}),a&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,K.jsx)(Fb,{}),e("linkSummary")]}),l&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,K.jsx)(Db,{}),e("linkKnowledgeSearch")]}),C&&(0,K.jsxs)("a",{className:r.shortcut,target:"_blank",href:C,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,K.jsx)(Lb,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,K.jsx)(Un,{type:"custom-messages","data-testid":"custom-messages",children:(0,K.jsx)(yt,{withDivider:!0,children:v.map(N=>(0,K.jsx)(Ib,{suggestion:N},N.text))})}),o&&d.length>0&&(0,K.jsx)(Un,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Tb,{})})}),p.map(({type:N,title:H,amount:z,lines:Ve})=>{var cn;switch(N){case"entities":return h&&h.length>0&&(0,K.jsx)(Un,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(Pb,{entities:h})},N);default:return((cn=_[N])==null?void 0:cn.fetchState)==="done"&&_[N].suggestions.length>0&&(0,K.jsx)(Un,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Nb,{lines:Ve,contentType:N,suggestions:_[N].suggestions.slice(0,z)||[]})})},N)}})]})})},Hb=KL;function Bi(e){let t=new Range;return t.selectNodeContents(e),t}function zb(e,t,n){try{return Ir(e,t,n),!0}catch{return!1}}function Ed(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Cd(e){return"tagName"in e&&e.tagName==="BR"}var Da=/[\u200B-\u200D\uFEFF]/g;function Ir(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Da,""),p=o+c.length,d=t>=o&&t<=p,h=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!h?r.setStartBefore(l):r.setStart(l,v)}h&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(Cd(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;Ed(l)&&u&&!Ed(u)&&!Cd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Fa(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,h=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(Da,"").length),h&&(l=u+v.substring(0,i).replace(Da,"").length),u+=v.replace(Da,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;Cd(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let m=d&&y===r,g=h&&y===i;if(m&&(a=u),g&&(l=u),l!==void 0||((!m||!s)&&c(p.childNodes[y]),h&&y===i-1&&(l=u),l!==void 0))break}!h&&Ed(p)&&!v&&u++,h&&(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 ja(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,v=u.textContent.replace(Da,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&Cd(u)&&!d&&(a+=`
20
+ `);for(let h=c?r:0;h<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[h]),s!==1);h++);!p&&s===0&&Ed(u)&&!d&&(a+=`
21
+ `);break}default:break}p&&s++}return l(e),a}function Ub(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var go=class extends Tn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),ja(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!Ub(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!Ub(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Fa(this.element,t);let n=this.lastKnownSelection;if(n&&zb(this.element,n.start,n.end))return n;let r=Bi(this.element);return r.collapse(!1),Fa(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return ja(this.element,Ir(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()}},bh=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(),V.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&&(V.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;V.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)}},Vb=bh;var Hi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Eh=e=>new Promise(t=>{setTimeout(t,e)});var zi=class extends Hi{name="ClientError"},Ch=class extends Hi{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:p=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:h=_=>_.status>=500,version:v="v1",...y}=n,m={credentials:"include",...y,headers:{"Content-Type":"application/json",...y.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,f=!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 S=async()=>(g--,a(s,m).then(async _=>h(_)&&!i.isAborted&&g>0?(await Eh(c),S()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),S()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await Eh(c),S();throw _}));S().then(_=>_.json().catch(()=>null).then(b=>{_.status>=500?o(new Ch("Server Error",b)):_.status===401?o(new zi("Unauthorized",b)):_.status===403?o(new zi("Forbidden",b)):_.status===404?o(new zi("Not Found",b)):_.status>=400&&o(new zi("Bad Request",b)),delete this.latestRequestByUrl[s],r(b)})).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 WL;(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||={})})(WL||={});function Td(e){return{...re(e),tags:e.tags}}var Hn=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(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...be(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(),V.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={}){V.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=be(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=>({...be(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",be({...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:be({...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 V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",be(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}`,be(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`,be(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",be(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,be(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",be({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(vy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ba=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Rg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{V.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 $L;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})($L||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=V;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`,be(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,be(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",be(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Ba(`${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 Kb={startTime:null,stopTime:null},Wb=j({name:"handlingTime",initialState:Kb,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,()=>Kb)}}),{handlingTimeStart:$b,handlingTimeStop:kd,handlingTimeReset:qb}=Wb.actions,Gb=Wb.reducer;var Xb=(e={})=>{let t={onAuthError:Pi(!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 ho=D("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})}),qL=j({name:"styleSuggestions",initialState:Pd,reducers:{},extraReducers:e=>{e.addCase(ho.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(ho.rejected,t=>{t.fetchState="error"}).addCase(ho.fulfilled,(t,n)=>{t.fetchState="done",gr(t.list,n.payload)||(t.list=n.payload)}).addCase(Jr,t=>{t.list=Pd.list}).addCase(J,()=>Pd)}}),Qb=qL.reducer;var Yb=(e={})=>{let t,n=!0,r={getStyleSuggestions:ho,debounce:500,...e};return o=>i=>s=>{var h;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(!((h=u.conversation.current)==null?void 0:h.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 GL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var Zb=(e={})=>{let t={getTextSuggestions:Rn,getAutocompleteSuggestions:_a,debounce:200,check:Ni,...e},n;return r=>o=>i=>{var y;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Zc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:h}}=l;return GL(h,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=fi(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var Jb=ho.fulfilled.toString();function XL(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 eE=e=>t=>n=>r=>{var u;if(r.type!==Jb){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=XL(o,s);r.type===Jb&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var QL=bu({activeSuggestion:ww,answer:p1,auth:Mw,autoflows:nb,conversation:Hx,contentTypes:Qw,customMessages:db,exchangeToken:gb,entities:e1,handlingTime:Gb,info:X_,input:$m.reducer,overlayInput:et.reducer,settings:Lx,profile:g1,search:tw,summary:s1,styleSuggestions:Qb,ui:Tw,textSuggestions:yw});function tE(e){return F0({reducer:QL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),Xb(),Zb({debounce:200}),Yb({debounce:500}),eE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var YL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},ZL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Hm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=dw(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 Pi.toString():{!r.payload&&e.emit("logout",void 0);break}case Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:YL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ac.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 dc.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 An.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case je.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 lc.toString():e.handleKeyDown(r.payload);break;case Jr.toString():e.logSendMessage(r.payload);break;case uc.toString():e.logSendEditSuggestionMessage(r.payload);break;case cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Jr.toString():e.handleAfterSendMessage(r.payload);break;case wa.toString():e.onUpdateShowTabHint(r.payload);break;case kd.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(on([])),t.dispatch(vr()));break}case on.toString():{i&&r.payload.length>0&&t.dispatch(yr(0));break}default:break}return s},nE=ZL;function Th(e){return e.toISOString().replace("T"," ").replace("Z","")}function rE(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 C,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:h,textSuggestions:v,offeredTextSuggestions:y}}=t[e],m=r.length,f=v.reduce((N,{text:H,searchTerm:z})=>N+H.length-(z?z.length:0),0),S=u??Date.now(),_=(Date.now()-S)/1e3+(c||0),b=o/_,E=v.reduce((N,{searchTerm:H})=>N+(H?H.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:h,lenTextTyped:o+E,lenTextTotal:m,lenTextAssisted:f,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:b,numPastes:l,textSuggestionsV2:v,suggestionsCounters:[{source:"gpt",countOffered:y.filter(N=>N.source==="gpt").length}],agentId:(C=t.info.agentInfo)==null?void 0:C.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function oE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?oE(r,t):null}function iE(e,t){return oE(e,t)}function sE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function JL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Rd(e){return JL(e)&&(kr(e)||Mc(e))}var aE=(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{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function eA(e){return e.offsetParent!==null}function lE(e){if(!eA(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=lE(e);t({isVisible:r});let o=setInterval(()=>{let i=lE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Ue=x(w()),uE=aE("showTabHint",!0),za=class e{static version="10.6.1";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 Hn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[nE({emit:(p,d,h)=>this.emit(p,d,h),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),logSendEditSuggestionMessage:p=>this.logSendEditMessage(p),onUpdateShowTabHint:p=>uE.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=tE(c),this.broadcastEvents=new Vb({debug:!0,deepdeskUrl:u,eventMap:Dw(this.store),createCustomChannel:l}),this.store.dispatch(ta),this.store.dispatch(wa(uE.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?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Pi(null)),this.store.dispatch(Er()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();zt(r)&&Rw(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){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Km({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(tc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(nc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Wm(t))).payload}async postMessages(t){return(await this.store.dispatch(oc(t))).payload}async updateConversation(t){return(await this.store.dispatch(rc(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(ta(t))}setVisitorInfo(t){this.store.dispatch(G_(t))}async setAgentInfo(t){await this.store.dispatch(ya(t))}async setAgentSettings(t){await this.store.dispatch(Ig(t))}async getAgentSettings(){return(await this.store.dispatch(Lg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Zc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(cc(t))}notifyKeyDown(t){this.store.dispatch(lc(t))}notifyPaste(t,n){this.store.dispatch(Yx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Xx(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(vr())}notifyEditSuggestion(t){this.store.dispatch(gw(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(br({collapse:!1})),this.inputMediator&&this.store.dispatch(Vx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(on([])))}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(Qx(sc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch($x()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Gx());let{selectedSuggestionIndex:p}=this.state.input;t.preventDefault(),!s&&(p===-1?this.store.dispatch(ra()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(yr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(yr(-1)),this.store.dispatch(ra()),t.preventDefault()):n||(this.store.dispatch(br({collapse:!0})),this.store.dispatch(Ew(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:h}=this.state.input;this.store.dispatch(wa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&h&&h.text.startsWith(d)&&(this.store.dispatch(Ft({text:h.text,suggestion:h,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(vr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Zx()),this.store.dispatch(on([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch($b()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.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}),Object.assign(n,{lenTextTotal:t.length})),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(Wx(this.state.overlayInput.metrics))}logHandlingTime(){let t=rE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(qb())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(vr()),this.store.dispatch(Jr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ft({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){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.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]=io(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=io(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return oo(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}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:p,detectSubmit:d,insertLink:h,inputMediator:v,closestScrollSelector:y,appendOverlayTo:m,inlineSuggestions:g}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:g}),n.automaticHandlingTime&&this.setupHandlingTime(t),oo(t),this.inputMediator=v||(kr(t)?new kn(t):new go(t)),this.inputMediator.on("change",({plainText:S})=>{this.notifyInputChanged(S)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(Jx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",S=>{this.notifyKeyDown(S)}),this.inputMediator.on("paste",({pastedText:S,selectionText:_})=>{this.notifyPaste(S,_)}),this.inputMediator.on("cut",({selectionText:S})=>{this.notifyCut(S)}),g){if(kr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let S=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(T1,{})})}),S),this.inputMediator.on("caret",_=>{this.store.dispatch(on([])),_?(S.style.display="block",S.style.top=`${_.top}px`,S.style.left=`${_.left}px`):S.style.display="none"})}else{let S=y&&iE(t,y)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:m,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(Q1,{inputElement:t})})}),_),(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(N1,{})})}),b)}(0,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(x1,{})})}),this.createContainer("deepdesk-overlays"));let f;this.inputMediator.on("selection",S=>{clearTimeout(f),S===null?f=setTimeout(()=>{S!==null&&this.store.dispatch(qm(S))},500):this.store.dispatch(qm(S))}),this.inputMediator.on("disabled",()=>{var S;(S=this.inputMediator)==null||S.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(Ti(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Ti(!0))),this.store.dispatch(Kx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var S;this.refresh(),this.broadcastEvents.setSessionId((S=this.state.conversation.current)==null?void 0:S.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&&V.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,$t.render)((0,Ue.jsx)(Fi,{store:this.store,customStyles:r,children:(0,Ue.jsx)(ki,{broadcastEvents:this.broadcastEvents,children:(0,Ue.jsx)(Hb,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.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){sE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ia());let t=Ai(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(V.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;V.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=nd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Rn(r))})}catch(r){this.handleError(r)}}};async function cE(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 dE(e,t,n={}){let r=n.replace?Ir(e,n.replace.start,n.replace.end):Bi(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
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?Ir(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 pE(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
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 fE(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function mE(e,t,n){await new Hn(e).authenticateWithKey(t,n)}async function gE(e){let n=await new Wt(e).get("/platform/config/",{version:null});return re(n)}async function tA(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 hE(e,t){let n=await tA(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 bE(nA);})();
24
24
  /*! Bundled license information: