@deepdesk/deepdesk-sdk 10.1.0 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,34 @@
1
- "use strict";var Deepdesk=(()=>{var t1=Object.create;var Ha=Object.defineProperty;var n1=Object.getOwnPropertyDescriptor;var r1=Object.getOwnPropertyNames;var o1=Object.getPrototypeOf,i1=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})},yh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of r1(t))!i1.call(e,o)&&o!==n&&Ha(e,o,{get:()=>t[o],enumerable:!(r=n1(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?t1(o1(e)):{},yh(t||!e||!e.__esModule?Ha(n,"default",{value:e,enumerable:!0}):n,e)),s1=e=>yh(Ha({},"__esModule",{value:!0}),e);var Ba=pe((AL,xh)=>{"use strict";var wh=Object.getOwnPropertySymbols,a1=Object.prototype.hasOwnProperty,l1=Object.prototype.propertyIsEnumerable;function u1(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function c1(){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}}xh.exports=c1()?Object.assign:function(e,t){for(var n,r=u1(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)a1.call(n,s)&&(r[s]=n[s]);if(wh){o=wh(n);for(var a=0;a<o.length;a++)l1.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Fh=pe(V=>{"use strict";var xd=Ba(),uo=60103,Th=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var _h=60109,bh=60110,kh=60112;V.Suspense=60113;var Ph=60115,Rh=60116;typeof Symbol=="function"&&Symbol.for&&(dt=Symbol.for,uo=dt("react.element"),Th=dt("react.portal"),V.Fragment=dt("react.fragment"),V.StrictMode=dt("react.strict_mode"),V.Profiler=dt("react.profiler"),_h=dt("react.provider"),bh=dt("react.context"),kh=dt("react.forward_ref"),V.Suspense=dt("react.suspense"),Ph=dt("react.memo"),Rh=dt("react.lazy"));var dt,Eh=typeof Symbol=="function"&&Symbol.iterator;function d1(e){return e===null||typeof e!="object"?null:(e=Eh&&e[Eh]||e["@@iterator"],typeof e=="function"?e:null)}function Mi(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 Ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lh={};function co(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}co.prototype.isReactComponent={};co.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Mi(85));this.updater.enqueueSetState(this,e,t,"setState")};co.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ah(){}Ah.prototype=co.prototype;function Ed(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}var Cd=Ed.prototype=new Ah;Cd.constructor=Ed;xd(Cd,co.prototype);Cd.isPureReactComponent=!0;var Td={current:null},Oh=Object.prototype.hasOwnProperty,Nh={key:!0,ref:!0,__self:!0,__source:!0};function Mh(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)Oh.call(t,r)&&!Nh.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:uo,type:e,key:i,ref:s,props:o,_owner:Td.current}}function f1(e,t){return{$$typeof:uo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _d(e){return typeof e=="object"&&e!==null&&e.$$typeof===uo}function p1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ch=/\/+/g;function wd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p1(""+e.key):t.toString(36)}function za(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 uo:case Th:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+wd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ch,"$&/")+"/"),za(o,t,n,"",function(u){return u})):o!=null&&(_d(o)&&(o=f1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ch,"$&/")+"/")+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+wd(i,a);s+=za(i,t,n,l,o)}else if(l=d1(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+wd(i,a++),s+=za(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Mi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ua(e,t,n){if(e==null)return e;var r=[],o=0;return za(e,r,"","",function(i){return t.call(n,i,o++)}),r}function m1(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 Dh={current:null};function an(){var e=Dh.current;if(e===null)throw Error(Mi(321));return e}var g1={ReactCurrentDispatcher:Dh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Td,IsSomeRendererActing:{current:!1},assign:xd};V.Children={map:Ua,forEach:function(e,t,n){Ua(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ua(e,function(){t++}),t},toArray:function(e){return Ua(e,function(t){return t})||[]},only:function(e){if(!_d(e))throw Error(Mi(143));return e}};V.Component=co;V.PureComponent=Ed;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;V.cloneElement=function(e,t,n){if(e==null)throw Error(Mi(267,e));var r=xd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Td.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oh.call(t,l)&&!Nh.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:uo,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:bh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:_h,_context:e},e.Consumer=e};V.createElement=Mh;V.createFactory=function(e){var t=Mh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:kh,render:e}};V.isValidElement=_d;V.lazy=function(e){return{$$typeof:Rh,_payload:{_status:-1,_result:e},_init:m1}};V.memo=function(e,t){return{$$typeof:Ph,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return an().useCallback(e,t)};V.useContext=function(e,t){return an().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return an().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return an().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return an().useLayoutEffect(e,t)};V.useMemo=function(e,t){return an().useMemo(e,t)};V.useReducer=function(e,t,n){return an().useReducer(e,t,n)};V.useRef=function(e){return an().useRef(e)};V.useState=function(e){return an().useState(e)};V.version="17.0.2"});var O=pe((NL,jh)=>{"use strict";jh.exports=Fh()});var Kh=pe($=>{"use strict";var po,ji,$a,Ad;typeof performance=="object"&&typeof performance.now=="function"?(Hh=performance,$.unstable_now=function(){return Hh.now()}):(bd=Date,Bh=bd.now(),$.unstable_now=function(){return bd.now()-Bh});var Hh,bd,Bh;typeof window>"u"||typeof MessageChannel!="function"?(fo=null,kd=null,Pd=function(){if(fo!==null)try{var e=$.unstable_now();fo(!0,e),fo=null}catch(t){throw setTimeout(Pd,0),t}},po=function(e){fo!==null?setTimeout(po,0,e):(fo=e,setTimeout(Pd,0))},ji=function(e,t){kd=setTimeout(e,t)},$a=function(){clearTimeout(kd)},$.unstable_shouldYield=function(){return!1},Ad=$.unstable_forceFrameRate=function(){}):(Uh=window.setTimeout,zh=window.clearTimeout,typeof console<"u"&&(Vh=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 Vh!="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")),Di=!1,Fi=null,Va=-1,Rd=5,Id=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Id},Ad=function(){},$.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Rd=0<e?Math.floor(1e3/e):5},Ld=new MessageChannel,Ka=Ld.port2,Ld.port1.onmessage=function(){if(Fi!==null){var e=$.unstable_now();Id=e+Rd;try{Fi(!0,e)?Ka.postMessage(null):(Di=!1,Fi=null)}catch(t){throw Ka.postMessage(null),t}}else Di=!1},po=function(e){Fi=e,Di||(Di=!0,Ka.postMessage(null))},ji=function(e,t){Va=Uh(function(){e($.unstable_now())},t)},$a=function(){zh(Va),Va=-1});var fo,kd,Pd,Uh,zh,Vh,Di,Fi,Va,Rd,Id,Ld,Ka;function Od(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Wa(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Lt(e){return e=e[0],e===void 0?null:e}function qa(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>Wa(s,n))l!==void 0&&0>Wa(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Wa(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Wa(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Kt=[],Hn=[],h1=1,ft=null,Re=3,Ga=!1,kr=!1,Hi=!1;function Nd(e){for(var t=Lt(Hn);t!==null;){if(t.callback===null)qa(Hn);else if(t.startTime<=e)qa(Hn),t.sortIndex=t.expirationTime,Od(Kt,t);else break;t=Lt(Hn)}}function Md(e){if(Hi=!1,Nd(e),!kr)if(Lt(Kt)!==null)kr=!0,po(Dd);else{var t=Lt(Hn);t!==null&&ji(Md,t.startTime-e)}}function Dd(e,t){kr=!1,Hi&&(Hi=!1,$a()),Ga=!0;var n=Re;try{for(Nd(t),ft=Lt(Kt);ft!==null&&(!(ft.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=ft.callback;if(typeof r=="function"){ft.callback=null,Re=ft.priorityLevel;var o=r(ft.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?ft.callback=o:ft===Lt(Kt)&&qa(Kt),Nd(t)}else qa(Kt);ft=Lt(Kt)}if(ft!==null)var i=!0;else{var s=Lt(Hn);s!==null&&ji(Md,s.startTime-t),i=!1}return i}finally{ft=null,Re=n,Ga=!1}}var y1=Ad;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){kr||Ga||(kr=!0,po(Dd))};$.unstable_getCurrentPriorityLevel=function(){return Re};$.unstable_getFirstCallbackNode=function(){return Lt(Kt)};$.unstable_next=function(e){switch(Re){case 1:case 2:case 3:var t=3;break;default:t=Re}var n=Re;Re=t;try{return e()}finally{Re=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=y1;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Re;Re=e;try{return t()}finally{Re=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:h1++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Od(Hn,e),Lt(Kt)===null&&e===Lt(Hn)&&(Hi?$a():Hi=!0,ji(Md,n-r))):(e.sortIndex=o,Od(Kt,e),kr||Ga||(kr=!0,po(Dd))),e};$.unstable_wrapCallback=function(e){var t=Re;return function(){var n=Re;Re=t;try{return e.apply(this,arguments)}finally{Re=n}}}});var $h=pe((DL,Wh)=>{"use strict";Wh.exports=Kh()});var AS=pe(vt=>{"use strict";var Ul=O(),ae=Ba(),we=$h();function k(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(!Ul)throw Error(k(227));var iv=new Set,gs={};function jr(e,t){No(e,t),No(e+"Capture",t)}function No(e,t){for(gs[e]=t,e=0;e<t.length;e++)iv.add(t[e])}var pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v1=/^[: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]*$/,qh=Object.prototype.hasOwnProperty,Gh={},Xh={};function S1(e){return qh.call(Xh,e)?!0:qh.call(Gh,e)?!1:v1.test(e)?Xh[e]=!0:(Gh[e]=!0,!1)}function w1(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 x1(e,t,n,r){if(t===null||typeof t>"u"||w1(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 Be(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 Be(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 Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Be(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 Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var $f=/[\-:]([a-z])/g;function qf(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($f,qf);ke[t]=new Be(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($f,qf);ke[t]=new Be(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($f,qf);ke[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gf(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||(x1(t,n,o,r)&&(n=null),r||o===null?S1(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 Hr=Ul.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Zi=60103,Rr=60106,Un=60107,Xf=60108,rs=60114,Qf=60109,Yf=60110,zl=60112,os=60113,vl=60120,Vl=60115,Zf=60116,Jf=60121,ep=60128,sv=60129,tp=60130,sf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,Zi=ye("react.element"),Rr=ye("react.portal"),Un=ye("react.fragment"),Xf=ye("react.strict_mode"),rs=ye("react.profiler"),Qf=ye("react.provider"),Yf=ye("react.context"),zl=ye("react.forward_ref"),os=ye("react.suspense"),vl=ye("react.suspense_list"),Vl=ye("react.memo"),Zf=ye("react.lazy"),Jf=ye("react.block"),ye("react.scope"),ep=ye("react.opaque.id"),sv=ye("react.debug_trace_mode"),tp=ye("react.offscreen"),sf=ye("react.legacy_hidden"));var ye,Qh=typeof Symbol=="function"&&Symbol.iterator;function Bi(e){return e===null||typeof e!="object"?null:(e=Qh&&e[Qh]||e["@@iterator"],typeof e=="function"?e:null)}var Fd;function Ji(e){if(Fd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fd=t&&t[1]||""}return`
2
- `+Fd+e}var jd=!1;function Xa(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 t1=Object.create;var Ha=Object.defineProperty;var n1=Object.getOwnPropertyDescriptor;var r1=Object.getOwnPropertyNames;var o1=Object.getPrototypeOf,i1=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})},yh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of r1(t))!i1.call(e,o)&&o!==n&&Ha(e,o,{get:()=>t[o],enumerable:!(r=n1(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?t1(o1(e)):{},yh(t||!e||!e.__esModule?Ha(n,"default",{value:e,enumerable:!0}):n,e)),s1=e=>yh(Ha({},"__esModule",{value:!0}),e);var X=pe((AL,Ba)=>{"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 Ba<"u"&&Ba.exports?(n.default=n,Ba.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ua=pe((OL,Sh)=>{"use strict";var vh=Object.getOwnPropertySymbols,a1=Object.prototype.hasOwnProperty,l1=Object.prototype.propertyIsEnumerable;function u1(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function c1(){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}}Sh.exports=c1()?Object.assign:function(e,t){for(var n,r=u1(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)a1.call(n,s)&&(r[s]=n[s]);if(vh){o=vh(n);for(var a=0;a<o.length;a++)l1.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Mh=pe(V=>{"use strict";var xd=Ua(),lo=60103,Eh=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var Ch=60109,Th=60110,_h=60112;V.Suspense=60113;var bh=60115,Ph=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,lo=ft("react.element"),Eh=ft("react.portal"),V.Fragment=ft("react.fragment"),V.StrictMode=ft("react.strict_mode"),V.Profiler=ft("react.profiler"),Ch=ft("react.provider"),Th=ft("react.context"),_h=ft("react.forward_ref"),V.Suspense=ft("react.suspense"),bh=ft("react.memo"),Ph=ft("react.lazy"));var ft,wh=typeof Symbol=="function"&&Symbol.iterator;function d1(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function Mi(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 kh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rh={};function uo(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}uo.prototype.isReactComponent={};uo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Mi(85));this.updater.enqueueSetState(this,e,t,"setState")};uo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ih(){}Ih.prototype=uo.prototype;function Ed(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}var Cd=Ed.prototype=new Ih;Cd.constructor=Ed;xd(Cd,uo.prototype);Cd.isPureReactComponent=!0;var Td={current:null},Lh=Object.prototype.hasOwnProperty,Ah={key:!0,ref:!0,__self:!0,__source:!0};function Oh(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)Lh.call(t,r)&&!Ah.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:lo,type:e,key:i,ref:s,props:o,_owner:Td.current}}function f1(e,t){return{$$typeof:lo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _d(e){return typeof e=="object"&&e!==null&&e.$$typeof===lo}function p1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xh=/\/+/g;function wd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p1(""+e.key):t.toString(36)}function Va(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 lo:case Eh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+wd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(xh,"$&/")+"/"),Va(o,t,n,"",function(u){return u})):o!=null&&(_d(o)&&(o=f1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(xh,"$&/")+"/")+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+wd(i,a);s+=Va(i,t,n,l,o)}else if(l=d1(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+wd(i,a++),s+=Va(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Mi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function za(e,t,n){if(e==null)return e;var r=[],o=0;return Va(e,r,"","",function(i){return t.call(n,i,o++)}),r}function m1(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 Nh={current:null};function ln(){var e=Nh.current;if(e===null)throw Error(Mi(321));return e}var g1={ReactCurrentDispatcher:Nh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Td,IsSomeRendererActing:{current:!1},assign:xd};V.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!_d(e))throw Error(Mi(143));return e}};V.Component=uo;V.PureComponent=Ed;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;V.cloneElement=function(e,t,n){if(e==null)throw Error(Mi(267,e));var r=xd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Td.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Lh.call(t,l)&&!Ah.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:lo,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Th,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Ch,_context:e},e.Consumer=e};V.createElement=Oh;V.createFactory=function(e){var t=Oh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:_h,render:e}};V.isValidElement=_d;V.lazy=function(e){return{$$typeof:Ph,_payload:{_status:-1,_result:e},_init:m1}};V.memo=function(e,t){return{$$typeof:bh,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return ln().useCallback(e,t)};V.useContext=function(e,t){return ln().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return ln().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return ln().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return ln().useLayoutEffect(e,t)};V.useMemo=function(e,t){return ln().useMemo(e,t)};V.useReducer=function(e,t,n){return ln().useReducer(e,t,n)};V.useRef=function(e){return ln().useRef(e)};V.useState=function(e){return ln().useState(e)};V.version="17.0.2"});var O=pe((ML,Dh)=>{"use strict";Dh.exports=Mh()});var Uh=pe(Fi=>{"use strict";Ua();var h1=O(),Hh=60103;Fi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(bd=Symbol.for,Hh=bd("react.element"),Fi.Fragment=bd("react.fragment"));var bd,y1=h1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v1=Object.prototype.hasOwnProperty,S1={key:!0,ref:!0,__self:!0,__source:!0};function Bh(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)v1.call(t,r)&&!S1.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:Hh,type:e,key:i,ref:s,props:o,_owner:y1.current}}Fi.jsx=Bh;Fi.jsxs=Bh});var C=pe((zL,zh)=>{"use strict";zh.exports=Uh()});var _y=pe($=>{"use strict";var ho,Wi,hl,$d;typeof performance=="object"&&typeof performance.now=="function"?(wy=performance,$.unstable_now=function(){return wy.now()}):(Bd=Date,xy=Bd.now(),$.unstable_now=function(){return Bd.now()-xy});var wy,Bd,xy;typeof window>"u"||typeof MessageChannel!="function"?(go=null,Ud=null,zd=function(){if(go!==null)try{var e=$.unstable_now();go(!0,e),go=null}catch(t){throw setTimeout(zd,0),t}},ho=function(e){go!==null?setTimeout(ho,0,e):(go=e,setTimeout(zd,0))},Wi=function(e,t){Ud=setTimeout(e,t)},hl=function(){clearTimeout(Ud)},$.unstable_shouldYield=function(){return!1},$d=$.unstable_forceFrameRate=function(){}):(Ey=window.setTimeout,Cy=window.clearTimeout,typeof console<"u"&&(Ty=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 Ty!="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")),Vi=!1,Ki=null,pl=-1,Vd=5,Kd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Kd},$d=function(){},$.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Vd=0<e?Math.floor(1e3/e):5},Wd=new MessageChannel,ml=Wd.port2,Wd.port1.onmessage=function(){if(Ki!==null){var e=$.unstable_now();Kd=e+Vd;try{Ki(!0,e)?ml.postMessage(null):(Vi=!1,Ki=null)}catch(t){throw ml.postMessage(null),t}}else Vi=!1},ho=function(e){Ki=e,Vi||(Vi=!0,ml.postMessage(null))},Wi=function(e,t){pl=Ey(function(){e($.unstable_now())},t)},hl=function(){Cy(pl),pl=-1});var go,Ud,zd,Ey,Cy,Ty,Vi,Ki,pl,Vd,Kd,Wd,ml;function qd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<gl(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 yl(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>gl(s,n))l!==void 0&&0>gl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>gl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function gl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var $t=[],zn=[],Q1=1,ht=null,Re=3,vl=!1,Ar=!1,$i=!1;function Gd(e){for(var t=Ot(zn);t!==null;){if(t.callback===null)yl(zn);else if(t.startTime<=e)yl(zn),t.sortIndex=t.expirationTime,qd($t,t);else break;t=Ot(zn)}}function Qd(e){if($i=!1,Gd(e),!Ar)if(Ot($t)!==null)Ar=!0,ho(Xd);else{var t=Ot(zn);t!==null&&Wi(Qd,t.startTime-e)}}function Xd(e,t){Ar=!1,$i&&($i=!1,hl()),vl=!0;var n=Re;try{for(Gd(t),ht=Ot($t);ht!==null&&(!(ht.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Re=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?ht.callback=o:ht===Ot($t)&&yl($t),Gd(t)}else yl($t);ht=Ot($t)}if(ht!==null)var i=!0;else{var s=Ot(zn);s!==null&&Wi(Qd,s.startTime-t),i=!1}return i}finally{ht=null,Re=n,vl=!1}}var X1=$d;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Ar||vl||(Ar=!0,ho(Xd))};$.unstable_getCurrentPriorityLevel=function(){return Re};$.unstable_getFirstCallbackNode=function(){return Ot($t)};$.unstable_next=function(e){switch(Re){case 1:case 2:case 3:var t=3;break;default:t=Re}var n=Re;Re=t;try{return e()}finally{Re=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=X1;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Re;Re=e;try{return t()}finally{Re=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:Q1++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,qd(zn,e),Ot($t)===null&&e===Ot(zn)&&($i?hl():$i=!0,Wi(Qd,n-r))):(e.sortIndex=o,qd($t,e),Ar||vl||(Ar=!0,ho(Xd))),e};$.unstable_wrapCallback=function(e){var t=Re;return function(){var n=Re;Re=t;try{return e.apply(this,arguments)}finally{Re=n}}}});var Py=pe((NO,by)=>{"use strict";by.exports=_y()});var pw=pe(Et=>{"use strict";var du=O(),ae=Ua(),we=Py();function b(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(!du)throw Error(b(227));var Bv=new Set,Es={};function Vr(e,t){Fo(e,t),Fo(e+"Capture",t)}function Fo(e,t){for(Es[e]=t,e=0;e<t.length;e++)Bv.add(t[e])}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y1=/^[: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,Ry={},Iy={};function Z1(e){return ky.call(Iy,e)?!0:ky.call(Ry,e)?!1:Y1.test(e)?Iy[e]=!0:(Ry[e]=!0,!1)}function J1(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 e_(e,t,n,r){if(t===null||typeof t>"u"||J1(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 Be(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 Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new Be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new Be(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){Pe[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var sp=/[\-:]([a-z])/g;function ap(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(sp,ap);Pe[t]=new Be(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(sp,ap);Pe[t]=new Be(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(sp,ap);Pe[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function lp(e,t,n,r){var o=Pe.hasOwnProperty(t)?Pe[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||(e_(t,n,o,r)&&(n=null),r||o===null?Z1(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 Kr=du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,is=60103,Nr=60106,Kn=60107,up=60108,cs=60114,cp=60109,dp=60110,fu=60112,ds=60113,zl=60120,pu=60115,fp=60116,pp=60121,mp=60128,Uv=60129,gp=60130,wf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,is=ye("react.element"),Nr=ye("react.portal"),Kn=ye("react.fragment"),up=ye("react.strict_mode"),cs=ye("react.profiler"),cp=ye("react.provider"),dp=ye("react.context"),fu=ye("react.forward_ref"),ds=ye("react.suspense"),zl=ye("react.suspense_list"),pu=ye("react.memo"),fp=ye("react.lazy"),pp=ye("react.block"),ye("react.scope"),mp=ye("react.opaque.id"),Uv=ye("react.debug_trace_mode"),gp=ye("react.offscreen"),wf=ye("react.legacy_hidden"));var ye,Ly=typeof Symbol=="function"&&Symbol.iterator;function qi(e){return e===null||typeof e!="object"?null:(e=Ly&&e[Ly]||e["@@iterator"],typeof e=="function"?e:null)}var Yd;function ss(e){if(Yd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yd=t&&t[1]||""}return`
2
+ `+Yd+e}var Zd=!1;function Sl(e,t){if(!e||Zd)return"";Zd=!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:"")?Ji(e):""}function E1(e){switch(e.tag){case 5:return Ji(e.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 2:case 15:return e=Xa(e.type,!1),e;case 11:return e=Xa(e.type.render,!1),e;case 22:return e=Xa(e.type._render,!1),e;case 1:return e=Xa(e.type,!0),e;default:return""}}function To(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 Un:return"Fragment";case Rr:return"Portal";case rs:return"Profiler";case Xf:return"StrictMode";case os:return"Suspense";case vl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case zl:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Vl:return To(e.type);case Jf:return To(e._render);case Zf:t=e._payload,e=e._init;try{return To(e(t))}catch{}}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function av(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C1(e){var t=av(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 Qa(e){e._valueTracker||(e._valueTracker=C1(e))}function lv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=av(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function af(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(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 uv(e,t){t=t.checked,t!=null&&Gf(e,"checked",t,!1)}function lf(e,t){uv(e,t);var n=Jn(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")?uf(e,t.type,n):t.hasOwnProperty("defaultValue")&&uf(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zh(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 uf(e,t,n){(t!=="number"||Sl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function T1(e){var t="";return Ul.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function cf(e,t){return e=ae({children:void 0},t),(t=T1(t.children))&&(e.children=t),e}function _o(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=""+Jn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function df(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(k(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(k(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(k(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Jn(n)}}function cv(e,t){var n=Jn(t.value),r=Jn(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 ey(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var ff={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function dv(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 pf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ya,fv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==ff.svg||"innerHTML"in e)e.innerHTML=t;else{for(Ya=Ya||document.createElement("div"),Ya.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ya.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var is={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},_1=["Webkit","ms","Moz","O"];Object.keys(is).forEach(function(e){_1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),is[t]=is[e]})});function pv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||is.hasOwnProperty(e)&&is[e]?(""+t).trim():t+"px"}function mv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=pv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var b1=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 mf(e,t){if(t){if(b1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function gf(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 np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hf=null,bo=null,ko=null;function ty(e){if(e=Is(e)){if(typeof hf!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Xl(t),hf(e.stateNode,e.type,t))}}function gv(e){bo?ko?ko.push(e):ko=[e]:bo=e}function hv(){if(bo){var e=bo,t=ko;if(ko=bo=null,ty(e),t)for(e=0;e<t.length;e++)ty(t[e])}}function rp(e,t){return e(t)}function yv(e,t,n,r,o){return e(t,n,r,o)}function op(){}var vv=rp,Ir=!1,Hd=!1;function ip(){(bo!==null||ko!==null)&&(op(),hv())}function k1(e,t,n){if(Hd)return e(t,n);Hd=!0;try{return vv(e,t,n)}finally{Hd=!1,ip()}}function ys(e,t){var n=e.stateNode;if(n===null)return null;var r=Xl(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(k(231,t,typeof n));return n}var yf=!1;if(pn)try{mo={},Object.defineProperty(mo,"passive",{get:function(){yf=!0}}),window.addEventListener("test",mo,mo),window.removeEventListener("test",mo,mo)}catch{yf=!1}var mo;function P1(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,wl=null,xl=!1,vf=null,R1={onError:function(e){ss=!0,wl=e}};function I1(e,t,n,r,o,i,s,a,l){ss=!1,wl=null,P1.apply(R1,arguments)}function L1(e,t,n,r,o,i,s,a,l){if(I1.apply(this,arguments),ss){if(ss){var u=wl;ss=!1,wl=null}else throw Error(k(198));xl||(xl=!0,vf=u)}}function Br(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 Sv(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 ny(e){if(Br(e)!==e)throw Error(k(188))}function A1(e){var t=e.alternate;if(!t){if(t=Br(e),t===null)throw Error(k(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 ny(o),e;if(i===r)return ny(o),t;i=i.sibling}throw Error(k(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(k(189))}}if(n.alternate!==r)throw Error(k(190))}if(n.tag!==3)throw Error(k(188));return n.stateNode.current===n?e:t}function wv(e){if(e=A1(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 ry(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var xv,sp,Ev,Cv,Sf=!1,Wt=[],Wn=null,$n=null,qn=null,vs=new Map,Ss=new Map,Ui=[],oy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function iy(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ss.delete(t.pointerId)}}function zi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=wf(t,n,r,o,i),t!==null&&(t=Is(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function O1(e,t,n,r,o){switch(t){case"focusin":return Wn=zi(Wn,e,t,n,r,o),!0;case"dragenter":return $n=zi($n,e,t,n,r,o),!0;case"mouseover":return qn=zi(qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return vs.set(i,zi(vs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ss.set(i,zi(Ss.get(i)||null,e,t,n,r,o)),!0}return!1}function N1(e){var t=Lr(e.target);if(t!==null){var n=Br(t);if(n!==null){if(t=n.tag,t===13){if(t=Sv(n),t!==null){e.blockedOn=t,Cv(e.lanePriority,function(){we.unstable_runWithPriority(e.priority,function(){Ev(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ll(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Is(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function sy(e,t,n){ll(e)&&n.delete(t)}function M1(){for(Sf=!1;0<Wt.length;){var e=Wt[0];if(e.blockedOn!==null){e=Is(e.blockedOn),e!==null&&xv(e);break}for(var t=e.targetContainers;0<t.length;){var n=cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Wt.shift()}Wn!==null&&ll(Wn)&&(Wn=null),$n!==null&&ll($n)&&($n=null),qn!==null&&ll(qn)&&(qn=null),vs.forEach(sy),Ss.forEach(sy)}function Vi(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,we.unstable_scheduleCallback(we.unstable_NormalPriority,M1)))}function Tv(e){function t(o){return Vi(o,e)}if(0<Wt.length){Vi(Wt[0],e);for(var n=1;n<Wt.length;n++){var r=Wt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Wn!==null&&Vi(Wn,e),$n!==null&&Vi($n,e),qn!==null&&Vi(qn,e),vs.forEach(t),Ss.forEach(t),n=0;n<Ui.length;n++)r=Ui[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ui.length&&(n=Ui[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&Ui.shift()}function Za(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vo={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Bd={},_v={};pn&&(_v=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Kl(e){if(Bd[e])return Bd[e];if(!vo[e])return e;var t=vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _v)return Bd[e]=t[n];return e}var bv=Kl("animationend"),kv=Kl("animationiteration"),Pv=Kl("animationstart"),Rv=Kl("transitionend"),Iv=new Map,ap=new Map,D1=["abort","abort",bv,"animationEnd",kv,"animationIteration",Pv,"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",Rv,"transitionEnd","waiting","waiting"];function lp(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),ap.set(r,t),Iv.set(r,o),jr(o,[r])}}var F1=we.unstable_now;F1();var te=8;function ho(e){if(1&e)return te=15,1;if(2&e)return te=14,2;if(4&e)return te=13,4;var t=24&e;return t!==0?(te=12,t):e&32?(te=11,32):(t=192&e,t!==0?(te=10,t):e&256?(te=9,256):(t=3584&e,t!==0?(te=8,t):e&4096?(te=7,4096):(t=4186112&e,t!==0?(te=6,t):(t=62914560&e,t!==0?(te=5,t):e&67108864?(te=4,67108864):e&134217728?(te=3,134217728):(t=805306368&e,t!==0?(te=2,t):1073741824&e?(te=1,1073741824):(te=8,e))))))}function j1(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 H1(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(k(358,e))}}function ws(e,t){var n=e.pendingLanes;if(n===0)return te=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=te=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ho(l),o=te):(a&=i,a!==0&&(r=ho(a),o=te))}else i=n&~s,i!==0?(r=ho(i),o=te):a!==0&&(r=ho(a),o=te);if(r===0)return 0;if(r=31-er(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(ho(t),o<=te)return t;te=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-er(t),o=1<<n,r|=e[n],t&=~o;return r}function Lv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function El(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=yo(24&~t),e===0?El(10,t):e;case 10:return e=yo(192&~t),e===0?El(8,t):e;case 8:return e=yo(3584&~t),e===0&&(e=yo(4186112&~t),e===0&&(e=512)),e;case 2:return t=yo(805306368&~t),t===0&&(t=268435456),t}throw Error(k(358,e))}function yo(e){return e&-e}function Ud(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wl(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-er(t),e[t]=n}var er=Math.clz32?Math.clz32:z1,B1=Math.log,U1=Math.LN2;function z1(e){return e===0?32:31-(B1(e)/U1|0)|0}var V1=we.unstable_UserBlockingPriority,K1=we.unstable_runWithPriority,ul=!0;function W1(e,t,n,r){Ir||op();var o=up,i=Ir;Ir=!0;try{yv(o,e,t,n,r)}finally{(Ir=i)||ip()}}function $1(e,t,n,r){K1(V1,up.bind(null,e,t,n,r))}function up(e,t,n,r){if(ul){var o;if((o=(t&4)===0)&&0<Wt.length&&-1<oy.indexOf(e))e=wf(null,e,t,n,r),Wt.push(e);else{var i=cp(e,t,n,r);if(i===null)o&&iy(e,r);else{if(o){if(-1<oy.indexOf(e)){e=wf(i,e,t,n,r),Wt.push(e);return}if(O1(i,e,t,n,r))return;iy(e,r)}Kv(e,t,r,null,n)}}}}function cp(e,t,n,r){var o=np(r);if(o=Lr(o),o!==null){var i=Br(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Sv(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 Kv(e,t,r,o,n),null}var zn=null,dp=null,cl=null;function Av(){if(cl)return cl;var e,t=dp,n=t.length,r,o="value"in zn?zn.value:zn.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 dl(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 Ja(){return!0}function ay(){return!1}function et(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)?Ja:ay,this.isPropagationStopped=ay,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=Ja)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ja)},persist:function(){},isPersistent:Ja}),t}var jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fp=et(jo),Rs=ae({},jo,{view:0,detail:0}),q1=et(Rs),zd,Vd,Ki,$l=ae({},Rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pp,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!==Ki&&(Ki&&e.type==="mousemove"?(zd=e.screenX-Ki.screenX,Vd=e.screenY-Ki.screenY):Vd=zd=0,Ki=e),zd)},movementY:function(e){return"movementY"in e?e.movementY:Vd}}),ly=et($l),G1=ae({},$l,{dataTransfer:0}),X1=et(G1),Q1=ae({},Rs,{relatedTarget:0}),Kd=et(Q1),Y1=ae({},jo,{animationName:0,elapsedTime:0,pseudoElement:0}),Z1=et(Y1),J1=ae({},jo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),e_=et(J1),t_=ae({},jo,{data:0}),uy=et(t_),n_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r_={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"},o_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=o_[e])?!!t[e]:!1}function pp(){return i_}var s_=ae({},Rs,{key:function(e){if(e.key){var t=n_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pp,charCode:function(e){return e.type==="keypress"?dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),a_=et(s_),l_=ae({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=et(l_),u_=ae({},Rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pp}),c_=et(u_),d_=ae({},jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),f_=et(d_),p_=ae({},$l,{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}),m_=et(p_),g_=[9,13,27,32],mp=pn&&"CompositionEvent"in window,as=null;pn&&"documentMode"in document&&(as=document.documentMode);var h_=pn&&"TextEvent"in window&&!as,Ov=pn&&(!mp||as&&8<as&&11>=as),dy=String.fromCharCode(32),fy=!1;function Nv(e,t){switch(e){case"keyup":return g_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=!1;function y_(e,t){switch(e){case"compositionend":return Mv(t);case"keypress":return t.which!==32?null:(fy=!0,dy);case"textInput":return e=t.data,e===dy&&fy?null:e;default:return null}}function v_(e,t){if(So)return e==="compositionend"||!mp&&Nv(e,t)?(e=Av(),cl=dp=zn=null,So=!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 Ov&&t.locale!=="ko"?null:t.data;default:return null}}var S_={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 py(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!S_[e.type]:t==="textarea"}function Dv(e,t,n,r){gv(r),t=Cl(t,"onChange"),0<t.length&&(n=new fp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,xs=null;function w_(e){Uv(e,0)}function ql(e){var t=xo(e);if(lv(t))return e}function x_(e,t){if(e==="change")return t}var Fv=!1;pn&&(pn?(tl="oninput"in document,tl||(Wd=document.createElement("div"),Wd.setAttribute("oninput","return;"),tl=typeof Wd.oninput=="function"),el=tl):el=!1,Fv=el&&(!document.documentMode||9<document.documentMode));var el,tl,Wd;function my(){ls&&(ls.detachEvent("onpropertychange",jv),xs=ls=null)}function jv(e){if(e.propertyName==="value"&&ql(xs)){var t=[];if(Dv(t,xs,e,np(e)),e=w_,Ir)e(t);else{Ir=!0;try{rp(e,t)}finally{Ir=!1,ip()}}}}function E_(e,t,n){e==="focusin"?(my(),ls=t,xs=n,ls.attachEvent("onpropertychange",jv)):e==="focusout"&&my()}function C_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql(xs)}function T_(e,t){if(e==="click")return ql(t)}function __(e,t){if(e==="input"||e==="change")return ql(t)}function b_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:b_,k_=Object.prototype.hasOwnProperty;function Es(e,t){if(pt(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(!k_.call(t,n[r])||!pt(e[n[r]],t[n[r]]))return!1;return!0}function gy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hy(e,t){var n=gy(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=gy(n)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yy(){for(var e=window,t=Sl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sl(e.document)}return t}function xf(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 P_=pn&&"documentMode"in document&&11>=document.documentMode,wo=null,Ef=null,us=null,Cf=!1;function vy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cf||wo==null||wo!==Sl(r)||(r=wo,"selectionStart"in r&&xf(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}),us&&Es(us,r)||(us=r,r=Cl(Ef,"onSelect"),0<r.length&&(t=new fp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wo)))}lp("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);lp("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);lp(D1,2);for($d="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),nl=0;nl<$d.length;nl++)ap.set($d[nl],0);var $d,nl;No("onMouseEnter",["mouseout","mouseover"]);No("onMouseLeave",["mouseout","mouseover"]);No("onPointerEnter",["pointerout","pointerover"]);No("onPointerLeave",["pointerout","pointerover"]);jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jr("onBeforeInput",["compositionend","keypress","textInput","paste"]);jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bv=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function Sy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,L1(r,t,void 0,e),e.currentTarget=null}function Uv(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;Sy(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;Sy(o,a,u),i=l}}}if(xl)throw e=vf,xl=!1,vf=null,e}function oe(e,t){var n=$v(t),r=e+"__bubble";n.has(r)||(Vv(t,e,2,!1),n.add(r))}var wy="_reactListening"+Math.random().toString(36).slice(2);function zv(e){e[wy]||(e[wy]=!0,iv.forEach(function(t){Bv.has(t)||xy(t,!1,e,null),xy(t,!0,e,null)}))}function xy(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&&Bv.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=$v(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),Vv(i,e,o,t),s.add(a))}function Vv(e,t,n,r){var o=ap.get(t);switch(o===void 0?2:o){case 0:o=W1;break;case 1:o=$1;break;default:o=up}n=o.bind(null,t,n,e),o=void 0,!yf||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 Kv(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=Lr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}k1(function(){var u=i,c=np(n),p=[];e:{var d=Iv.get(e);if(d!==void 0){var h=fp,y=e;switch(e){case"keypress":if(dl(n)===0)break e;case"keydown":case"keyup":h=a_;break;case"focusin":y="focus",h=Kd;break;case"focusout":y="blur",h=Kd;break;case"beforeblur":case"afterblur":h=Kd;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=ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=c_;break;case bv:case kv:case Pv:h=Z1;break;case Rv:h=f_;break;case"scroll":h=q1;break;case"wheel":h=m_;break;case"copy":case"cut":case"paste":h=e_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cy}var v=(t&4)!==0,g=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var f=u,w;f!==null;){w=f;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,m!==null&&(x=ys(f,m),x!=null&&v.push(Cs(f,x,w)))),g)break;f=f.return}0<v.length&&(d=new h(d,y,null,n,c),p.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(Lr(y)||y[Ho]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Lr(y):null,y!==null&&(g=Br(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(v=ly,x="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(v=cy,x="onPointerLeave",m="onPointerEnter",f="pointer"),g=h==null?d:xo(h),w=y==null?d:xo(y),d=new v(x,f+"leave",h,n,c),d.target=g,d.relatedTarget=w,x=null,Lr(c)===u&&(v=new v(m,f+"enter",y,n,c),v.target=w,v.relatedTarget=g,x=v),g=x,h&&y)t:{for(v=h,m=y,f=0,w=v;w;w=go(w))f++;for(w=0,x=m;x;x=go(x))w++;for(;0<f-w;)v=go(v),f--;for(;0<w-f;)m=go(m),w--;for(;f--;){if(v===m||m!==null&&v===m.alternate)break t;v=go(v),m=go(m)}v=null}else v=null;h!==null&&Ey(p,d,h,v,!1),y!==null&&g!==null&&Ey(p,g,y,v,!0)}}e:{if(d=u?xo(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var T=x_;else if(py(d))if(Fv)T=__;else{T=C_;var E=E_}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=T_);if(T&&(T=T(e,u))){Dv(p,T,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&uf(d,"number",d.value)}switch(E=u?xo(u):window,e){case"focusin":(py(E)||E.contentEditable==="true")&&(wo=E,Ef=u,us=null);break;case"focusout":us=Ef=wo=null;break;case"mousedown":Cf=!0;break;case"contextmenu":case"mouseup":case"dragend":Cf=!1,vy(p,n,c);break;case"selectionchange":if(P_)break;case"keydown":case"keyup":vy(p,n,c)}var _;if(mp)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 So?Nv(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Ov&&n.locale!=="ko"&&(So||R!=="onCompositionStart"?R==="onCompositionEnd"&&So&&(_=Av()):(zn=c,dp="value"in zn?zn.value:zn.textContent,So=!0)),E=Cl(u,R),0<E.length&&(R=new uy(R,e,null,n,c),p.push({event:R,listeners:E}),_?R.data=_:(_=Mv(n),_!==null&&(R.data=_)))),(_=h_?y_(e,n):v_(e,n))&&(u=Cl(u,"onBeforeInput"),0<u.length&&(c=new uy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=_))}Uv(p,t)})}function Cs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ys(e,n),i!=null&&r.unshift(Cs(e,i,o)),i=ys(e,t),i!=null&&r.push(Cs(e,i,o))),e=e.return}return r}function go(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ey(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=ys(n,i),l!=null&&s.unshift(Cs(n,l,a))):o||(l=ys(n,i),l!=null&&s.push(Cs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Tl(){}var qd=null,Gd=null;function Wv(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Tf(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 Cy=typeof setTimeout=="function"?setTimeout:void 0,R_=typeof clearTimeout=="function"?clearTimeout:void 0;function gp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Po(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function Ty(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 Xd=0;function I_(e){return{$$typeof:ep,toString:e,valueOf:e}}var Gl=Math.random().toString(36).slice(2),Vn="__reactFiber$"+Gl,_l="__reactProps$"+Gl,Ho="__reactContainer$"+Gl,_y="__reactEvents$"+Gl;function Lr(e){var t=e[Vn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ho]||n[Vn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ty(e);e!==null;){if(n=e[Vn])return n;e=Ty(e)}return t}e=n,n=e.parentNode}return null}function Is(e){return e=e[Vn]||e[Ho],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(k(33))}function Xl(e){return e[_l]||null}function $v(e){var t=e[_y];return t===void 0&&(t=e[_y]=new Set),t}var _f=[],Eo=-1;function or(e){return{current:e}}function ie(e){0>Eo||(e.current=_f[Eo],_f[Eo]=null,Eo--)}function de(e,t){Eo++,_f[Eo]=e.current,e.current=t}var tr={},Oe=or(tr),$e=or(!1),Mr=tr;function Mo(e,t){var n=e.type.contextTypes;if(!n)return tr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function bl(){ie($e),ie(Oe)}function by(e,t,n){if(Oe.current!==tr)throw Error(k(168));de(Oe,t),de($e,n)}function qv(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(k(108,To(t)||"Unknown",o));return ae({},n,r)}function fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tr,Mr=Oe.current,de(Oe,e),de($e,$e.current),!0}function ky(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=qv(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,ie($e),ie(Oe),de(Oe,e)):ie($e),de($e,n)}var hp=null,Nr=null,L_=we.unstable_runWithPriority,yp=we.unstable_scheduleCallback,bf=we.unstable_cancelCallback,A_=we.unstable_shouldYield,Py=we.unstable_requestPaint,kf=we.unstable_now,O_=we.unstable_getCurrentPriorityLevel,Ql=we.unstable_ImmediatePriority,Gv=we.unstable_UserBlockingPriority,Xv=we.unstable_NormalPriority,Qv=we.unstable_LowPriority,Yv=we.unstable_IdlePriority,Qd={},N_=Py!==void 0?Py:function(){},ln=null,pl=null,Yd=!1,Ry=kf(),Le=1e4>Ry?kf:function(){return kf()-Ry};function Do(){switch(O_()){case Ql:return 99;case Gv:return 98;case Xv:return 97;case Qv:return 96;case Yv:return 95;default:throw Error(k(332))}}function Zv(e){switch(e){case 99:return Ql;case 98:return Gv;case 97:return Xv;case 96:return Qv;case 95:return Yv;default:throw Error(k(332))}}function Dr(e,t){return e=Zv(e),L_(e,t)}function Ts(e,t,n){return e=Zv(e),yp(e,t,n)}function Qt(){if(pl!==null){var e=pl;pl=null,bf(e)}Jv()}function Jv(){if(!Yd&&ln!==null){Yd=!0;var e=0;try{var t=ln;Dr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),ln=null}catch(n){throw ln!==null&&(ln=ln.slice(e+1)),yp(Ql,Qt),n}finally{Yd=!1}}}var M_=Hr.ReactCurrentBatchConfig;function At(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 kl=or(null),Pl=null,Co=null,Rl=null;function vp(){Rl=Co=Pl=null}function Sp(e){var t=kl.current;ie(kl),e.type._context._currentValue=t}function eS(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 Ro(e,t){Pl=e,Rl=Co=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function ht(e,t){if(Rl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Rl=e,t=1073741823),t={context:e,observedBits:t,next:null},Co===null){if(Pl===null)throw Error(k(308));Co=t,Pl.dependencies={lanes:0,firstContext:t,responders:null}}else Co=Co.next=t;return e._currentValue}var Bn=!1;function wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function tS(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 Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xn(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 Iy(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 _s(e,t,n,r){var o=e.updateQueue;Bn=!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,y=i;switch(a=t,d=n,y.tag){case 1:if(h=y.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=y.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,a);break e;case 2:Bn=!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,As|=s,e.lanes=s,e.memoizedState=p}}function Ly(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(k(191,o));o.call(r)}}}var nS=new Ul.Component().refs;function Il(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 Yl={isMounted:function(e){return(e=e._reactInternals)?Br(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Qn(e),i=Gn(r,o);i.payload=t,n!=null&&(i.callback=n),Xn(e,i),Yn(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Qn(e),i=Gn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Xn(e,i),Yn(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),r=Qn(e),o=Gn(n,r);o.tag=2,t!=null&&(o.callback=t),Xn(e,o),Yn(e,r,n)}};function Ay(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?!Es(n,r)||!Es(o,i):!0}function rS(e,t,n){var r=!1,o=tr,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=qe(t)?Mr:Oe.current,r=t.contextTypes,i=(r=r!=null)?Mo(e,o):tr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Yl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Oy(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&&Yl.enqueueReplaceState(t,t.state,null)}function Pf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=nS,wp(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=qe(t)?Mr:Oe.current,o.context=Mo(e,i)),_s(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Il(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&&Yl.enqueueReplaceState(o,o.state,null),_s(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var rl=Array.isArray;function Wi(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(k(309));var r=n.stateNode}if(!r)throw Error(k(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===nS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(k(284));if(!n._owner)throw Error(k(290,e))}return e}function ol(e,t){if(e.type!=="textarea")throw Error(k(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function oS(e){function t(g,m){if(e){var f=g.lastEffect;f!==null?(f.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=rr(g,m),g.index=0,g.sibling=null,g}function i(g,m,f){return g.index=f,e?(f=g.alternate,f!==null?(f=f.index,f<m?(g.flags=2,m):f):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,f,w){return m===null||m.tag!==6?(m=nf(f,g.mode,w),m.return=g,m):(m=o(m,f),m.return=g,m)}function l(g,m,f,w){return m!==null&&m.elementType===f.type?(w=o(m,f.props),w.ref=Wi(g,m,f),w.return=g,w):(w=yl(f.type,f.key,f.props,null,g.mode,w),w.ref=Wi(g,m,f),w.return=g,w)}function u(g,m,f,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==f.containerInfo||m.stateNode.implementation!==f.implementation?(m=rf(f,g.mode,w),m.return=g,m):(m=o(m,f.children||[]),m.return=g,m)}function c(g,m,f,w,x){return m===null||m.tag!==7?(m=Oo(f,g.mode,w,x),m.return=g,m):(m=o(m,f),m.return=g,m)}function p(g,m,f){if(typeof m=="string"||typeof m=="number")return m=nf(""+m,g.mode,f),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Zi:return f=yl(m.type,m.key,m.props,null,g.mode,f),f.ref=Wi(g,null,m),f.return=g,f;case Rr:return m=rf(m,g.mode,f),m.return=g,m}if(rl(m)||Bi(m))return m=Oo(m,g.mode,f,null),m.return=g,m;ol(g,m)}return null}function d(g,m,f,w){var x=m!==null?m.key:null;if(typeof f=="string"||typeof f=="number")return x!==null?null:a(g,m,""+f,w);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Zi:return f.key===x?f.type===Un?c(g,m,f.props.children,w,x):l(g,m,f,w):null;case Rr:return f.key===x?u(g,m,f,w):null}if(rl(f)||Bi(f))return x!==null?null:c(g,m,f,w,null);ol(g,f)}return null}function h(g,m,f,w,x){if(typeof w=="string"||typeof w=="number")return g=g.get(f)||null,a(m,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Zi:return g=g.get(w.key===null?f:w.key)||null,w.type===Un?c(m,g,w.props.children,x,w.key):l(m,g,w,x);case Rr:return g=g.get(w.key===null?f:w.key)||null,u(m,g,w,x)}if(rl(w)||Bi(w))return g=g.get(f)||null,c(m,g,w,x,null);ol(m,w)}return null}function y(g,m,f,w){for(var x=null,T=null,E=m,_=m=0,R=null;E!==null&&_<f.length;_++){E.index>_?(R=E,E=null):R=E.sibling;var b=d(g,E,f[_],w);if(b===null){E===null&&(E=R);break}e&&E&&b.alternate===null&&t(g,E),m=i(b,m,_),T===null?x=b:T.sibling=b,T=b,E=R}if(_===f.length)return n(g,E),x;if(E===null){for(;_<f.length;_++)E=p(g,f[_],w),E!==null&&(m=i(E,m,_),T===null?x=E:T.sibling=E,T=E);return x}for(E=r(g,E);_<f.length;_++)R=h(E,g,_,f[_],w),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),m=i(R,m,_),T===null?x=R:T.sibling=R,T=R);return e&&E.forEach(function(B){return t(g,B)}),x}function v(g,m,f,w){var x=Bi(f);if(typeof x!="function")throw Error(k(150));if(f=x.call(f),f==null)throw Error(k(151));for(var T=x=null,E=m,_=m=0,R=null,b=f.next();E!==null&&!b.done;_++,b=f.next()){E.index>_?(R=E,E=null):R=E.sibling;var B=d(g,E,b.value,w);if(B===null){E===null&&(E=R);break}e&&E&&B.alternate===null&&t(g,E),m=i(B,m,_),T===null?x=B:T.sibling=B,T=B,E=R}if(b.done)return n(g,E),x;if(E===null){for(;!b.done;_++,b=f.next())b=p(g,b.value,w),b!==null&&(m=i(b,m,_),T===null?x=b:T.sibling=b,T=b);return x}for(E=r(g,E);!b.done;_++,b=f.next())b=h(E,g,_,b.value,w),b!==null&&(e&&b.alternate!==null&&E.delete(b.key===null?_:b.key),m=i(b,m,_),T===null?x=b:T.sibling=b,T=b);return e&&E.forEach(function(re){return t(g,re)}),x}return function(g,m,f,w){var x=typeof f=="object"&&f!==null&&f.type===Un&&f.key===null;x&&(f=f.props.children);var T=typeof f=="object"&&f!==null;if(T)switch(f.$$typeof){case Zi:e:{for(T=f.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(f.type===Un){n(g,x.sibling),m=o(x,f.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===f.type){n(g,x.sibling),m=o(x,f.props),m.ref=Wi(g,x,f),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}f.type===Un?(m=Oo(f.props.children,g.mode,w,f.key),m.return=g,g=m):(w=yl(f.type,f.key,f.props,null,g.mode,w),w.ref=Wi(g,m,f),w.return=g,g=w)}return s(g);case Rr:e:{for(x=f.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===f.containerInfo&&m.stateNode.implementation===f.implementation){n(g,m.sibling),m=o(m,f.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=rf(f,g.mode,w),m.return=g,g=m}return s(g)}if(typeof f=="string"||typeof f=="number")return f=""+f,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,f),m.return=g,g=m):(n(g,m),m=nf(f,g.mode,w),m.return=g,g=m),s(g);if(rl(f))return y(g,m,f,w);if(Bi(f))return v(g,m,f,w);if(T&&ol(g,f),typeof f>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(k(152,To(g.type)||"Component"))}return n(g,m)}}var Ll=oS(!0),iS=oS(!1),Ls={},Gt=or(Ls),bs=or(Ls),ks=or(Ls);function Ar(e){if(e===Ls)throw Error(k(174));return e}function Rf(e,t){switch(de(ks,t),de(bs,e),de(Gt,Ls),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pf(t,e)}ie(Gt),de(Gt,t)}function Fo(){ie(Gt),ie(bs),ie(ks)}function Ny(e){Ar(ks.current);var t=Ar(Gt.current),n=pf(t,e.type);t!==n&&(de(bs,e),de(Gt,n))}function xp(e){bs.current===e&&(ie(Gt),ie(bs))}var ce=or(0);function Al(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 cn=null,Kn=null,Xt=!1;function sS(e,t){var n=mt(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function My(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 If(e){if(Xt){var t=Kn;if(t){var n=t;if(!My(e,t)){if(t=Po(n.nextSibling),!t||!My(e,t)){e.flags=e.flags&-1025|2,Xt=!1,cn=e;return}sS(cn,n)}cn=e,Kn=Po(t.firstChild)}else e.flags=e.flags&-1025|2,Xt=!1,cn=e}}function Dy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;cn=e}function il(e){if(e!==cn)return!1;if(!Xt)return Dy(e),Xt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Tf(t,e.memoizedProps))for(t=Kn;t;)sS(e,t),t=Po(t.nextSibling);if(Dy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kn=Po(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kn=null}}else Kn=cn?Po(e.stateNode.nextSibling):null;return!0}function Zd(){Kn=cn=null,Xt=!1}var Io=[];function Ep(){for(var e=0;e<Io.length;e++)Io[e]._workInProgressVersionPrimary=null;Io.length=0}var cs=Hr.ReactCurrentDispatcher,gt=Hr.ReactCurrentBatchConfig,Ps=0,me=null,Ie=null,_e=null,Ol=!1,ds=!1;function Ke(){throw Error(k(321))}function Cp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pt(e[n],t[n]))return!1;return!0}function Tp(e,t,n,r,o,i){if(Ps=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=e===null||e.memoizedState===null?F_:j_,e=n(r,o),ds){i=0;do{if(ds=!1,!(25>i))throw Error(k(301));i+=1,_e=Ie=null,t.updateQueue=null,cs.current=H_,e=n(r,o)}while(ds)}if(cs.current=Fl,t=Ie!==null&&Ie.next!==null,Ps=0,_e=Ie=me=null,Ol=!1,t)throw Error(k(300));return e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?me.memoizedState=_e=e:_e=_e.next=e,_e}function Ur(){if(Ie===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=_e===null?me.memoizedState:_e.next;if(t!==null)_e=t,Ie=e;else{if(e===null)throw Error(k(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},_e===null?me.memoizedState=_e=e:_e=_e.next=e}return _e}function $t(e,t){return typeof t=="function"?t(e):t}function $i(e){var t=Ur(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var r=Ie,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((Ps&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,me.lanes|=u,As|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,pt(r,t.memoizedState)||(Ot=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function qi(e){var t=Ur(),n=t.queue;if(n===null)throw Error(k(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);pt(i,t.memoizedState)||(Ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Fy(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=(Ps&e)===e)&&(t._workInProgressVersionPrimary=r,Io.push(t))),e)return n(t._source);throw Io.push(t),Error(k(350))}function aS(e,t,n,r){var o=He;if(o===null)throw Error(k(349));var i=t._getVersion,s=i(t._source),a=cs.current,l=a.useState(function(){return Fy(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,y=p.source;p=p.subscribe;var v=me;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!pt(s,g)){g=n(t._source),pt(c,g)||(u(g),g=Qn(v),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,f=g;0<f;){var w=31-er(f),x=1<<w;m[w]|=g,f&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var f=Qn(v);o.mutableReadLanes|=f&o.pendingLanes}catch(w){m(function(){throw w})}})},[t,r]),pt(h,n)&&pt(y,t)&&pt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:$t,lastRenderedState:c},e.dispatch=u=kp.bind(null,me,e),l.queue=e,l.baseQueue=null,c=Fy(o,t,n),l.memoizedState=l.baseState=c),c}function lS(e,t,n){var r=Ur();return aS(r,e,t,n)}function Gi(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:$t,lastRenderedState:e},e=e.dispatch=kp.bind(null,me,e),[t.memoizedState,e]}function Nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null},me.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 jy(e){var t=Or();return e={current:e},t.memoizedState=e}function Ml(){return Ur().memoizedState}function Lf(e,t,n,r){var o=Or();me.flags|=e,o.memoizedState=Nl(1|t,n,void 0,r===void 0?null:r)}function _p(e,t,n,r){var o=Ur();r=r===void 0?null:r;var i=void 0;if(Ie!==null){var s=Ie.memoizedState;if(i=s.destroy,r!==null&&Cp(r,s.deps)){Nl(t,n,i,r);return}}me.flags|=e,o.memoizedState=Nl(1|t,n,i,r)}function Hy(e,t){return Lf(516,4,e,t)}function Dl(e,t){return _p(516,4,e,t)}function uS(e,t){return _p(4,2,e,t)}function cS(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 dS(e,t,n){return n=n!=null?n.concat([e]):null,_p(4,2,cS.bind(null,t,e),n)}function bp(){}function fS(e,t){var n=Ur();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pS(e,t){var n=Ur();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function D_(e,t){var n=Do();Dr(98>n?98:n,function(){e(!0)}),Dr(97<n?97:n,function(){var r=gt.transition;gt.transition=1;try{e(!1),t()}finally{gt.transition=r}})}function kp(e,t,n){var r=Je(),o=Qn(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===me||s!==null&&s===me)ds=Ol=!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,pt(l,a))return}catch{}finally{}Yn(e,o,r)}}var Fl={readContext:ht,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},F_={readContext:ht,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Hy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lf(4,2,cS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lf(4,2,e,t)},useMemo:function(e,t){var n=Or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Or();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=kp.bind(null,me,e),[r.memoizedState,e]},useRef:jy,useState:Gi,useDebugValue:bp,useDeferredValue:function(e){var t=Gi(e),n=t[0],r=t[1];return Hy(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=Gi(!1),t=e[0];return e=D_.bind(null,e[1]),jy(e),[e,t]},useMutableSource:function(e,t,n){var r=Or();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},aS(r,e,t,n)},useOpaqueIdentifier:function(){if(Xt){var e=!1,t=I_(function(){throw e||(e=!0,n("r:"+(Xd++).toString(36))),Error(k(355))}),n=Gi(t)[1];return!(me.mode&2)&&(me.flags|=516,Nl(5,function(){n("r:"+(Xd++).toString(36))},void 0,null)),t}return t="r:"+(Xd++).toString(36),Gi(t),t},unstable_isNewReconciler:!1},j_={readContext:ht,useCallback:fS,useContext:ht,useEffect:Dl,useImperativeHandle:dS,useLayoutEffect:uS,useMemo:pS,useReducer:$i,useRef:Ml,useState:function(){return $i($t)},useDebugValue:bp,useDeferredValue:function(e){var t=$i($t),n=t[0],r=t[1];return Dl(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=$i($t)[0];return[Ml().current,e]},useMutableSource:lS,useOpaqueIdentifier:function(){return $i($t)[0]},unstable_isNewReconciler:!1},H_={readContext:ht,useCallback:fS,useContext:ht,useEffect:Dl,useImperativeHandle:dS,useLayoutEffect:uS,useMemo:pS,useReducer:qi,useRef:Ml,useState:function(){return qi($t)},useDebugValue:bp,useDeferredValue:function(e){var t=qi($t),n=t[0],r=t[1];return Dl(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=qi($t)[0];return[Ml().current,e]},useMutableSource:lS,useOpaqueIdentifier:function(){return qi($t)[0]},unstable_isNewReconciler:!1},B_=Hr.ReactCurrentOwner,Ot=!1;function We(e,t,n,r){t.child=e===null?iS(t,null,n,r):Ll(t,e.child,n,r)}function By(e,t,n,r,o){n=n.render;var i=t.ref;return Ro(t,o),r=Tp(e,t,n,r,i,o),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,dn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Uy(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Op(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mS(e,t,s,r,o,i)):(e=yl(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:Es,n(o,r)&&e.ref===t.ref)?dn(e,t,i):(t.flags|=1,e=rr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function mS(e,t,n,r,o,i){if(e!==null&&Es(e.memoizedProps,r)&&e.ref===t.ref)if(Ot=!1,(i&o)!==0)e.flags&16384&&(Ot=!0);else return t.lanes=e.lanes,dn(e,t,i);return Af(e,t,n,r,i)}function Jd(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},al(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},al(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},al(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,al(t,r);return We(e,t,o,n),t.child}function gS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Af(e,t,n,r,o){var i=qe(n)?Mr:Oe.current;return i=Mo(t,i),Ro(t,o),n=Tp(e,t,n,r,i,o),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,dn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function zy(e,t,n,r,o){if(qe(n)){var i=!0;fl(t)}else i=!1;if(Ro(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),rS(t,n,r),Pf(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=ht(u):(u=qe(n)?Mr:Oe.current,u=Mo(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)&&Oy(t,s,r,u),Bn=!1;var d=t.memoizedState;s.state=d,_s(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Bn?(typeof c=="function"&&(Il(t,n,c,r),l=t.memoizedState),(a=Bn||Ay(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,tS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:At(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=ht(l):(l=qe(n)?Mr:Oe.current,l=Mo(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)&&Oy(t,s,r,l),Bn=!1,d=t.memoizedState,s.state=d,_s(t,r,s,o);var y=t.memoizedState;a!==p||d!==y||$e.current||Bn?(typeof h=="function"&&(Il(t,n,h,r),y=t.memoizedState),(u=Bn||Ay(t,n,u,r,d,y,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,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=y),s.props=r,s.state=y,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 Of(e,t,n,r,i,o)}function Of(e,t,n,r,o,i){gS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&ky(t,n,!1),dn(e,t,i);r=t.stateNode,B_.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ll(t,e.child,null,i),t.child=Ll(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&ky(t,n,!0),t.child}function Vy(e){var t=e.stateNode;t.pendingContext?by(e,t.pendingContext,t.pendingContext!==t.context):t.context&&by(e,t.context,!1),Rf(e,t.containerInfo)}var sl={dehydrated:null,retryLane:0};function Ky(e,t,n){var r=t.pendingProps,o=ce.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),de(ce,o&1),e===null?(r.fallback!==void 0&&If(t),e=r.children,o=r.fallback,i?(e=Wy(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=sl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Wy(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=sl,t.lanes=33554432,e):(n=Np({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=qy(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=sl,r):(n=$y(e,t,r.children,n),t.memoizedState=null,n):i?(r=qy(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=sl,r):(n=$y(e,t,r.children,n),t.memoizedState=null,n)}function Wy(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=Np(t,o,0,null),n=Oo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function $y(e,t,n,r){var o=e.child;return e=o.sibling,n=rr(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 qy(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=rr(s,a),e!==null?r=rr(e,r):(r=Oo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Gy(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),eS(e.return,t)}function ef(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 Xy(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gy(e,n);else if(e.tag===19)Gy(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Al(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ef(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&&Al(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ef(t,!0,n,null,i,t.lastEffect);break;case"together":ef(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),As|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,n=rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var hS,Nf,yS,vS;hS=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}};Nf=function(){};yS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ar(Gt.current);var i=null;switch(n){case"input":o=af(e,o),r=af(e,r),i=[];break;case"option":o=cf(e,o),r=cf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=df(e,o),r=df(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tl)}mf(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"&&(gs.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"&&(gs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&oe("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===ep?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};vS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xi(e,t){if(!Xt)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 U_(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return qe(t.type)&&bl(),null;case 3:return Fo(),ie($e),ie(Oe),Ep(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(il(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Nf(t),null;case 5:xp(t);var o=Ar(ks.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(k(166));return null}if(e=Ar(Gt.current),il(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Vn]=t,r[_l]=i,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(e=0;e<es.length;e++)oe(es[e],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Yh(r,i),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},oe("invalid",r);break;case"textarea":Jh(r,i),oe("invalid",r)}mf(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]):gs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&oe("scroll",r));switch(n){case"input":Qa(r),Zh(r,i,!0);break;case"textarea":Qa(r),ey(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Tl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===ff.html&&(e=dv(n)),e===ff.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Vn]=t,e[_l]=r,hS(e,t,!1,!1),t.stateNode=e,s=gf(n,r),n){case"dialog":oe("cancel",e),oe("close",e),o=r;break;case"iframe":case"object":case"embed":oe("load",e),o=r;break;case"video":case"audio":for(o=0;o<es.length;o++)oe(es[o],e);o=r;break;case"source":oe("error",e),o=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),o=r;break;case"details":oe("toggle",e),o=r;break;case"input":Yh(e,r),o=af(e,r),oe("invalid",e);break;case"option":o=cf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Jh(e,r),o=df(e,r),oe("invalid",e);break;default:o=r}mf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?mv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&hs(e,l):typeof l=="number"&&hs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(gs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&oe("scroll",e):l!=null&&Gf(e,i,l,s))}switch(n){case"input":Qa(e),Zh(e,r,!1);break;case"textarea":Qa(e),ey(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Jn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?_o(e,!!r.multiple,i,!1):r.defaultValue!=null&&_o(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Tl)}Wv(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)vS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(k(166));n=Ar(ks.current),Ar(Gt.current),il(t)?(r=t.stateNode,n=t.memoizedProps,r[Vn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vn]=t,t.stateNode=r)}return null;case 13:return ie(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&il(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?be===0&&(be=3):((be===0||be===3)&&(be=4),He===null||!(As&134217727)&&!(Uo&134217727)||Lo(He,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Fo(),Nf(t),e===null&&zv(t.stateNode.containerInfo),null;case 10:return Sp(t),null;case 17:return qe(t.type)&&bl(),null;case 19:if(ie(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Xi(r,!1);else{if(be!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Al(e),s!==null){for(t.flags|=64,Xi(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Le()>Bf&&(t.flags|=64,i=!0,Xi(r,!1),t.lanes=33554432)}else{if(!i)if(e=Al(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Xt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>Bf&&n!==1073741824&&(t.flags|=64,i=!0,Xi(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Ap(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(k(156,t.tag))}function z_(e){switch(e.tag){case 1:qe(e.type)&&bl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Fo(),ie($e),ie(Oe),Ep(),t=e.flags,t&64)throw Error(k(285));return e.flags=t&-4097|64,e;case 5:return xp(e),null;case 13:return ie(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ie(ce),null;case 4:return Fo(),null;case 10:return Sp(e),null;case 23:case 24:return Ap(),null;default:return null}}function Pp(e,t){try{var n="",r=t;do n+=E1(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{Zd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function t_(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=Sl(e.type,!1),e;case 11:return e=Sl(e.type.render,!1),e;case 22:return e=Sl(e.type._render,!1),e;case 1:return e=Sl(e.type,!0),e;default:return""}}function Po(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kn:return"Fragment";case Nr:return"Portal";case cs:return"Profiler";case up:return"StrictMode";case ds:return"Suspense";case zl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dp:return(e.displayName||"Context")+".Consumer";case cp:return(e._context.displayName||"Context")+".Provider";case fu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case pu:return Po(e.type);case pp:return Po(e._render);case fp:t=e._payload,e=e._init;try{return Po(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function zv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n_(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 wl(e){e._valueTracker||(e._valueTracker=n_(e))}function Vv(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 Vl(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 xf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ay(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Kv(e,t){t=t.checked,t!=null&&lp(e,"checked",t,!1)}function Ef(e,t){Kv(e,t);var n=nr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cf(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oy(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 Cf(e,t,n){(t!=="number"||Vl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function r_(e){var t="";return du.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Tf(e,t){return e=ae({children:void 0},t),(t=r_(t.children))&&(e.children=t),e}function ko(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+nr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function _f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(b(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ny(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(b(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(b(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nr(n)}}function Wv(e,t){var n=nr(t.value),r=nr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function My(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var bf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function $v(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 Pf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$v(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xl,qv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==bf.svg||"innerHTML"in e)e.innerHTML=t;else{for(xl=xl||document.createElement("div"),xl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fs={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},o_=["Webkit","ms","Moz","O"];Object.keys(fs).forEach(function(e){o_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fs[t]=fs[e]})});function Gv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}function Qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Gv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var i_=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 kf(e,t){if(t){if(i_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Rf(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 hp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var If=null,Ro=null,Io=null;function Dy(e){if(e=Fs(e)){if(typeof If!="function")throw Error(b(280));var t=e.stateNode;t&&(t=Su(t),If(e.stateNode,e.type,t))}}function Xv(e){Ro?Io?Io.push(e):Io=[e]:Ro=e}function Yv(){if(Ro){var e=Ro,t=Io;if(Io=Ro=null,Dy(e),t)for(e=0;e<t.length;e++)Dy(t[e])}}function yp(e,t){return e(t)}function Zv(e,t,n,r,o){return e(t,n,r,o)}function vp(){}var Jv=yp,Mr=!1,Jd=!1;function Sp(){(Ro!==null||Io!==null)&&(vp(),Yv())}function s_(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Jv(e,t,n)}finally{Jd=!1,Sp()}}function Ts(e,t){var n=e.stateNode;if(n===null)return null;var r=Su(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(b(231,t,typeof n));return n}var Lf=!1;if(mn)try{yo={},Object.defineProperty(yo,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{Lf=!1}var yo;function a_(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 ps=!1,Kl=null,Wl=!1,Af=null,l_={onError:function(e){ps=!0,Kl=e}};function u_(e,t,n,r,o,i,s,a,l){ps=!1,Kl=null,a_.apply(l_,arguments)}function c_(e,t,n,r,o,i,s,a,l){if(u_.apply(this,arguments),ps){if(ps){var u=Kl;ps=!1,Kl=null}else throw Error(b(198));Wl||(Wl=!0,Af=u)}}function Wr(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 eS(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 Fy(e){if(Wr(e)!==e)throw Error(b(188))}function d_(e){var t=e.alternate;if(!t){if(t=Wr(e),t===null)throw Error(b(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 Fy(o),e;if(i===r)return Fy(o),t;i=i.sibling}throw Error(b(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(b(189))}}if(n.alternate!==r)throw Error(b(190))}if(n.tag!==3)throw Error(b(188));return n.stateNode.current===n?e:t}function tS(e){if(e=d_(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 jy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var nS,wp,rS,oS,Of=!1,qt=[],Gn=null,Qn=null,Xn=null,_s=new Map,bs=new Map,Gi=[],Hy="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 Nf(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":Gn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":_s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Qi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Nf(t,n,r,o,i),t!==null&&(t=Fs(t),t!==null&&wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function f_(e,t,n,r,o){switch(t){case"focusin":return Gn=Qi(Gn,e,t,n,r,o),!0;case"dragenter":return Qn=Qi(Qn,e,t,n,r,o),!0;case"mouseover":return Xn=Qi(Xn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return _s.set(i,Qi(_s.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,bs.set(i,Qi(bs.get(i)||null,e,t,n,r,o)),!0}return!1}function p_(e){var t=Dr(e.target);if(t!==null){var n=Wr(t);if(n!==null){if(t=n.tag,t===13){if(t=eS(n),t!==null){e.blockedOn=t,oS(e.lanePriority,function(){we.unstable_runWithPriority(e.priority,function(){rS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Fs(n),t!==null&&wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Uy(e,t,n){Al(e)&&n.delete(t)}function m_(){for(Of=!1;0<qt.length;){var e=qt[0];if(e.blockedOn!==null){e=Fs(e.blockedOn),e!==null&&nS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Tp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&qt.shift()}Gn!==null&&Al(Gn)&&(Gn=null),Qn!==null&&Al(Qn)&&(Qn=null),Xn!==null&&Al(Xn)&&(Xn=null),_s.forEach(Uy),bs.forEach(Uy)}function Xi(e,t){e.blockedOn===t&&(e.blockedOn=null,Of||(Of=!0,we.unstable_scheduleCallback(we.unstable_NormalPriority,m_)))}function iS(e){function t(o){return Xi(o,e)}if(0<qt.length){Xi(qt[0],e);for(var n=1;n<qt.length;n++){var r=qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&Xi(Gn,e),Qn!==null&&Xi(Qn,e),Xn!==null&&Xi(Xn,e),_s.forEach(t),bs.forEach(t),n=0;n<Gi.length;n++)r=Gi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gi.length&&(n=Gi[0],n.blockedOn===null);)p_(n),n.blockedOn===null&&Gi.shift()}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xo={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionend:El("Transition","TransitionEnd")},ef={},sS={};mn&&(sS=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function mu(e){if(ef[e])return ef[e];if(!xo[e])return e;var t=xo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sS)return ef[e]=t[n];return e}var aS=mu("animationend"),lS=mu("animationiteration"),uS=mu("animationstart"),cS=mu("transitionend"),dS=new Map,xp=new Map,g_=["abort","abort",aS,"animationEnd",lS,"animationIteration",uS,"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",cS,"transitionEnd","waiting","waiting"];function Ep(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)),xp.set(r,t),dS.set(r,o),Vr(o,[r])}}var h_=we.unstable_now;h_();var ne=8;function So(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 y_(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 v_(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(b(358,e))}}function Ps(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=So(l),o=ne):(a&=i,a!==0&&(r=So(a),o=ne))}else i=n&~s,i!==0?(r=So(i),o=ne):a!==0&&(r=So(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(So(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function fS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $l(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=wo(24&~t),e===0?$l(10,t):e;case 10:return e=wo(192&~t),e===0?$l(8,t):e;case 8:return e=wo(3584&~t),e===0&&(e=wo(4186112&~t),e===0&&(e=512)),e;case 2:return t=wo(805306368&~t),t===0&&(t=268435456),t}throw Error(b(358,e))}function wo(e){return e&-e}function tf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:x_,S_=Math.log,w_=Math.LN2;function x_(e){return e===0?32:31-(S_(e)/w_|0)|0}var E_=we.unstable_UserBlockingPriority,C_=we.unstable_runWithPriority,Ol=!0;function T_(e,t,n,r){Mr||vp();var o=Cp,i=Mr;Mr=!0;try{Zv(o,e,t,n,r)}finally{(Mr=i)||Sp()}}function __(e,t,n,r){C_(E_,Cp.bind(null,e,t,n,r))}function Cp(e,t,n,r){if(Ol){var o;if((o=(t&4)===0)&&0<qt.length&&-1<Hy.indexOf(e))e=Nf(null,e,t,n,r),qt.push(e);else{var i=Tp(e,t,n,r);if(i===null)o&&By(e,r);else{if(o){if(-1<Hy.indexOf(e)){e=Nf(i,e,t,n,r),qt.push(e);return}if(f_(i,e,t,n,r))return;By(e,r)}_S(e,t,r,null,n)}}}}function Tp(e,t,n,r){var o=hp(r);if(o=Dr(o),o!==null){var i=Wr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=eS(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 _S(e,t,r,o,n),null}var Wn=null,_p=null,Nl=null;function pS(){if(Nl)return Nl;var e,t=_p,n=t.length,r,o="value"in Wn?Wn.value:Wn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Nl=o.slice(e,1<r?1-r:void 0)}function Ml(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 Cl(){return!0}function zy(){return!1}function tt(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)?Cl: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=Cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bp=tt(Uo),Ds=ae({},Uo,{view:0,detail:0}),b_=tt(Ds),nf,rf,Yi,hu=ae({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pp,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!==Yi&&(Yi&&e.type==="mousemove"?(nf=e.screenX-Yi.screenX,rf=e.screenY-Yi.screenY):rf=nf=0,Yi=e),nf)},movementY:function(e){return"movementY"in e?e.movementY:rf}}),Vy=tt(hu),P_=ae({},hu,{dataTransfer:0}),k_=tt(P_),R_=ae({},Ds,{relatedTarget:0}),of=tt(R_),I_=ae({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),L_=tt(I_),A_=ae({},Uo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),O_=tt(A_),N_=ae({},Uo,{data:0}),Ky=tt(N_),M_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D_={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"},F_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F_[e])?!!t[e]:!1}function Pp(){return j_}var H_=ae({},Ds,{key:function(e){if(e.key){var t=M_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pp,charCode:function(e){return e.type==="keypress"?Ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),B_=tt(H_),U_=ae({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wy=tt(U_),z_=ae({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pp}),V_=tt(z_),K_=ae({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),W_=tt(K_),$_=ae({},hu,{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}),q_=tt($_),G_=[9,13,27,32],kp=mn&&"CompositionEvent"in window,ms=null;mn&&"documentMode"in document&&(ms=document.documentMode);var Q_=mn&&"TextEvent"in window&&!ms,mS=mn&&(!kp||ms&&8<ms&&11>=ms),$y=String.fromCharCode(32),qy=!1;function gS(e,t){switch(e){case"keyup":return G_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function X_(e,t){switch(e){case"compositionend":return hS(t);case"keypress":return t.which!==32?null:(qy=!0,$y);case"textInput":return e=t.data,e===$y&&qy?null:e;default:return null}}function Y_(e,t){if(Eo)return e==="compositionend"||!kp&&gS(e,t)?(e=pS(),Nl=_p=Wn=null,Eo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mS&&t.locale!=="ko"?null:t.data;default:return null}}var Z_={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 Gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Z_[e.type]:t==="textarea"}function yS(e,t,n,r){Xv(r),t=ql(t,"onChange"),0<t.length&&(n=new bp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,ks=null;function J_(e){ES(e,0)}function yu(e){var t=To(e);if(Vv(t))return e}function eb(e,t){if(e==="change")return t}var vS=!1;mn&&(mn?(_l="oninput"in document,_l||(sf=document.createElement("div"),sf.setAttribute("oninput","return;"),_l=typeof sf.oninput=="function"),Tl=_l):Tl=!1,vS=Tl&&(!document.documentMode||9<document.documentMode));var Tl,_l,sf;function Qy(){gs&&(gs.detachEvent("onpropertychange",SS),ks=gs=null)}function SS(e){if(e.propertyName==="value"&&yu(ks)){var t=[];if(yS(t,ks,e,hp(e)),e=J_,Mr)e(t);else{Mr=!0;try{yp(e,t)}finally{Mr=!1,Sp()}}}}function tb(e,t,n){e==="focusin"?(Qy(),gs=t,ks=n,gs.attachEvent("onpropertychange",SS)):e==="focusout"&&Qy()}function nb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yu(ks)}function rb(e,t){if(e==="click")return yu(t)}function ob(e,t){if(e==="input"||e==="change")return yu(t)}function ib(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:ib,sb=Object.prototype.hasOwnProperty;function Rs(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!sb.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Xy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yy(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 wS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zy(){for(var e=window,t=Vl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vl(e.document)}return t}function Mf(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 ab=mn&&"documentMode"in document&&11>=document.documentMode,Co=null,Df=null,hs=null,Ff=!1;function Jy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ff||Co==null||Co!==Vl(r)||(r=Co,"selectionStart"in r&&Mf(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}),hs&&Rs(hs,r)||(hs=r,r=ql(Df,"onSelect"),0<r.length&&(t=new bp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Co)))}Ep("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);Ep("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);Ep(g_,2);for(af="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),bl=0;bl<af.length;bl++)xp.set(af[bl],0);var af,bl;Fo("onMouseEnter",["mouseout","mouseover"]);Fo("onMouseLeave",["mouseout","mouseover"]);Fo("onPointerEnter",["pointerout","pointerover"]);Fo("onPointerLeave",["pointerout","pointerover"]);Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(as));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,c_(r,t,void 0,e),e.currentTarget=null}function ES(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;ev(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;ev(o,a,u),i=l}}}if(Wl)throw e=Af,Wl=!1,Af=null,e}function ie(e,t){var n=PS(t),r=e+"__bubble";n.has(r)||(TS(t,e,2,!1),n.add(r))}var tv="_reactListening"+Math.random().toString(36).slice(2);function CS(e){e[tv]||(e[tv]=!0,Bv.forEach(function(t){xS.has(t)||nv(t,!1,e,null),nv(t,!0,e,null)}))}function nv(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=PS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),TS(i,e,o,t),s.add(a))}function TS(e,t,n,r){var o=xp.get(t);switch(o===void 0?2:o){case 0:o=T_;break;case 1:o=__;break;default:o=Cp}n=o.bind(null,t,n,e),o=void 0,!Lf||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 _S(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=Dr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}s_(function(){var u=i,c=hp(n),p=[];e:{var d=dS.get(e);if(d!==void 0){var h=bp,v=e;switch(e){case"keypress":if(Ml(n)===0)break e;case"keydown":case"keyup":h=B_;break;case"focusin":v="focus",h=of;break;case"focusout":v="blur",h=of;break;case"beforeblur":case"afterblur":h=of;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=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=k_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=V_;break;case aS:case lS:case uS:h=L_;break;case cS:h=W_;break;case"scroll":h=b_;break;case"wheel":h=q_;break;case"copy":case"cut":case"paste":h=O_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Wy}var y=(t&4)!==0,g=!y&&e==="scroll",m=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,w;f!==null;){w=f;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,m!==null&&(x=Ts(f,m),x!=null&&y.push(Is(f,x,w)))),g)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)&&(Dr(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?Dr(v):null,v!==null&&(g=Wr(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Vy,x="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Wy,x="onPointerLeave",m="onPointerEnter",f="pointer"),g=h==null?d:To(h),w=v==null?d:To(v),d=new y(x,f+"leave",h,n,c),d.target=g,d.relatedTarget=w,x=null,Dr(c)===u&&(y=new y(m,f+"enter",v,n,c),y.target=w,y.relatedTarget=g,x=y),g=x,h&&v)t:{for(y=h,m=v,f=0,w=y;w;w=vo(w))f++;for(w=0,x=m;x;x=vo(x))w++;for(;0<f-w;)y=vo(y),f--;for(;0<w-f;)m=vo(m),w--;for(;f--;){if(y===m||m!==null&&y===m.alternate)break t;y=vo(y),m=vo(m)}y=null}else y=null;h!==null&&rv(p,d,h,y,!1),v!==null&&g!==null&&rv(p,g,v,y,!0)}}e:{if(d=u?To(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var T=eb;else if(Gy(d))if(vS)T=ob;else{T=nb;var E=tb}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=rb);if(T&&(T=T(e,u))){yS(p,T,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Cf(d,"number",d.value)}switch(E=u?To(u):window,e){case"focusin":(Gy(E)||E.contentEditable==="true")&&(Co=E,Df=u,hs=null);break;case"focusout":hs=Df=Co=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,Jy(p,n,c);break;case"selectionchange":if(ab)break;case"keydown":case"keyup":Jy(p,n,c)}var _;if(kp)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 Eo?gS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(mS&&n.locale!=="ko"&&(Eo||R!=="onCompositionStart"?R==="onCompositionEnd"&&Eo&&(_=pS()):(Wn=c,_p="value"in Wn?Wn.value:Wn.textContent,Eo=!0)),E=ql(u,R),0<E.length&&(R=new Ky(R,e,null,n,c),p.push({event:R,listeners:E}),_?R.data=_:(_=hS(n),_!==null&&(R.data=_)))),(_=Q_?X_(e,n):Y_(e,n))&&(u=ql(u,"onBeforeInput"),0<u.length&&(c=new Ky("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=_))}ES(p,t)})}function Is(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ql(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ts(e,n),i!=null&&r.unshift(Is(e,i,o)),i=Ts(e,t),i!=null&&r.push(Is(e,i,o))),e=e.return}return r}function vo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rv(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=Ts(n,i),l!=null&&s.unshift(Is(n,l,a))):o||(l=Ts(n,i),l!=null&&s.push(Is(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Gl(){}var lf=null,uf=null;function bS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function jf(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 ov=typeof setTimeout=="function"?setTimeout:void 0,lb=typeof clearTimeout=="function"?clearTimeout:void 0;function Rp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Lo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function iv(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 cf=0;function ub(e){return{$$typeof:mp,toString:e,valueOf:e}}var vu=Math.random().toString(36).slice(2),$n="__reactFiber$"+vu,Ql="__reactProps$"+vu,zo="__reactContainer$"+vu,sv="__reactEvents$"+vu;function Dr(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[zo]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Fs(e){return e=e[$n]||e[zo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(b(33))}function Su(e){return e[Ql]||null}function PS(e){var t=e[sv];return t===void 0&&(t=e[sv]=new Set),t}var Hf=[],_o=-1;function ar(e){return{current:e}}function se(e){0>_o||(e.current=Hf[_o],Hf[_o]=null,_o--)}function de(e,t){_o++,Hf[_o]=e.current,e.current=t}var or={},Oe=ar(or),$e=ar(!1),Br=or;function jo(e,t){var n=e.type.contextTypes;if(!n)return or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function Xl(){se($e),se(Oe)}function av(e,t,n){if(Oe.current!==or)throw Error(b(168));de(Oe,t),de($e,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(b(108,Po(t)||"Unknown",o));return ae({},n,r)}function Dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Br=Oe.current,de(Oe,e),de($e,$e.current),!0}function lv(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=kS(e,t,Br),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Oe),de(Oe,e)):se($e),de($e,n)}var Ip=null,Hr=null,cb=we.unstable_runWithPriority,Lp=we.unstable_scheduleCallback,Bf=we.unstable_cancelCallback,db=we.unstable_shouldYield,uv=we.unstable_requestPaint,Uf=we.unstable_now,fb=we.unstable_getCurrentPriorityLevel,wu=we.unstable_ImmediatePriority,RS=we.unstable_UserBlockingPriority,IS=we.unstable_NormalPriority,LS=we.unstable_LowPriority,AS=we.unstable_IdlePriority,df={},pb=uv!==void 0?uv:function(){},un=null,Fl=null,ff=!1,cv=Uf(),Le=1e4>cv?Uf:function(){return Uf()-cv};function Ho(){switch(fb()){case wu:return 99;case RS:return 98;case IS:return 97;case LS:return 96;case AS:return 95;default:throw Error(b(332))}}function OS(e){switch(e){case 99:return wu;case 98:return RS;case 97:return IS;case 96:return LS;case 95:return AS;default:throw Error(b(332))}}function Ur(e,t){return e=OS(e),cb(e,t)}function Ls(e,t,n){return e=OS(e),Lp(e,t,n)}function Zt(){if(Fl!==null){var e=Fl;Fl=null,Bf(e)}NS()}function NS(){if(!ff&&un!==null){ff=!0;var e=0;try{var t=un;Ur(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),un=null}catch(n){throw un!==null&&(un=un.slice(e+1)),Lp(wu,Zt),n}finally{ff=!1}}}var mb=Kr.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 Yl=ar(null),Zl=null,bo=null,Jl=null;function Ap(){Jl=bo=Zl=null}function Op(e){var t=Yl.current;se(Yl),e.type._context._currentValue=t}function MS(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 Ao(e,t){Zl=e,Jl=bo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function wt(e,t){if(Jl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Jl=e,t=1073741823),t={context:e,observedBits:t,next:null},bo===null){if(Zl===null)throw Error(b(308));bo=t,Zl.dependencies={lanes:0,firstContext:t,responders:null}}else bo=bo.next=t;return e._currentValue}var Vn=!1;function Np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function DS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function dv(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 As(e,t,n,r){var o=e.updateQueue;Vn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var 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:Vn=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=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,Hs|=s,e.lanes=s,e.memoizedState=p}}function fv(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(b(191,o));o.call(r)}}}var FS=new du.Component().refs;function eu(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 xu={isMounted:function(e){return(e=e._reactInternals)?Wr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=et(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=et(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=et(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(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?!Rs(n,r)||!Rs(o,i):!0}function jS(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(o=qe(t)?Br:Oe.current,r=t.contextTypes,i=(r=r!=null)?jo(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function mv(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&&xu.enqueueReplaceState(t,t.state,null)}function zf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=FS,Np(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=wt(i):(i=qe(t)?Br:Oe.current,o.context=jo(e,i)),As(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(eu(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&&xu.enqueueReplaceState(o,o.state,null),As(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Pl=Array.isArray;function Zi(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(b(309));var r=n.stateNode}if(!r)throw Error(b(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===FS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(b(284));if(!n._owner)throw Error(b(290,e))}return e}function kl(e,t){if(e.type!=="textarea")throw Error(b(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function HS(e){function t(g,m){if(e){var f=g.lastEffect;f!==null?(f.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=sr(g,m),g.index=0,g.sibling=null,g}function i(g,m,f){return g.index=f,e?(f=g.alternate,f!==null?(f=f.index,f<m?(g.flags=2,m):f):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,f,w){return m===null||m.tag!==6?(m=yf(f,g.mode,w),m.return=g,m):(m=o(m,f),m.return=g,m)}function l(g,m,f,w){return m!==null&&m.elementType===f.type?(w=o(m,f.props),w.ref=Zi(g,m,f),w.return=g,w):(w=Ul(f.type,f.key,f.props,null,g.mode,w),w.ref=Zi(g,m,f),w.return=g,w)}function u(g,m,f,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==f.containerInfo||m.stateNode.implementation!==f.implementation?(m=vf(f,g.mode,w),m.return=g,m):(m=o(m,f.children||[]),m.return=g,m)}function c(g,m,f,w,x){return m===null||m.tag!==7?(m=Do(f,g.mode,w,x),m.return=g,m):(m=o(m,f),m.return=g,m)}function p(g,m,f){if(typeof m=="string"||typeof m=="number")return m=yf(""+m,g.mode,f),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case is:return f=Ul(m.type,m.key,m.props,null,g.mode,f),f.ref=Zi(g,null,m),f.return=g,f;case Nr:return m=vf(m,g.mode,f),m.return=g,m}if(Pl(m)||qi(m))return m=Do(m,g.mode,f,null),m.return=g,m;kl(g,m)}return null}function d(g,m,f,w){var x=m!==null?m.key:null;if(typeof f=="string"||typeof f=="number")return x!==null?null:a(g,m,""+f,w);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case is:return f.key===x?f.type===Kn?c(g,m,f.props.children,w,x):l(g,m,f,w):null;case Nr:return f.key===x?u(g,m,f,w):null}if(Pl(f)||qi(f))return x!==null?null:c(g,m,f,w,null);kl(g,f)}return null}function h(g,m,f,w,x){if(typeof w=="string"||typeof w=="number")return g=g.get(f)||null,a(m,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case is:return g=g.get(w.key===null?f:w.key)||null,w.type===Kn?c(m,g,w.props.children,x,w.key):l(m,g,w,x);case Nr:return g=g.get(w.key===null?f:w.key)||null,u(m,g,w,x)}if(Pl(w)||qi(w))return g=g.get(f)||null,c(m,g,w,x,null);kl(m,w)}return null}function v(g,m,f,w){for(var x=null,T=null,E=m,_=m=0,R=null;E!==null&&_<f.length;_++){E.index>_?(R=E,E=null):R=E.sibling;var k=d(g,E,f[_],w);if(k===null){E===null&&(E=R);break}e&&E&&k.alternate===null&&t(g,E),m=i(k,m,_),T===null?x=k:T.sibling=k,T=k,E=R}if(_===f.length)return n(g,E),x;if(E===null){for(;_<f.length;_++)E=p(g,f[_],w),E!==null&&(m=i(E,m,_),T===null?x=E:T.sibling=E,T=E);return x}for(E=r(g,E);_<f.length;_++)R=h(E,g,_,f[_],w),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),m=i(R,m,_),T===null?x=R:T.sibling=R,T=R);return e&&E.forEach(function(N){return t(g,N)}),x}function y(g,m,f,w){var x=qi(f);if(typeof x!="function")throw Error(b(150));if(f=x.call(f),f==null)throw Error(b(151));for(var T=x=null,E=m,_=m=0,R=null,k=f.next();E!==null&&!k.done;_++,k=f.next()){E.index>_?(R=E,E=null):R=E.sibling;var N=d(g,E,k.value,w);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,_),T===null?x=N:T.sibling=N,T=N,E=R}if(k.done)return n(g,E),x;if(E===null){for(;!k.done;_++,k=f.next())k=p(g,k.value,w),k!==null&&(m=i(k,m,_),T===null?x=k:T.sibling=k,T=k);return x}for(E=r(g,E);!k.done;_++,k=f.next())k=h(E,g,_,k.value,w),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?_:k.key),m=i(k,m,_),T===null?x=k:T.sibling=k,T=k);return e&&E.forEach(function(te){return t(g,te)}),x}return function(g,m,f,w){var x=typeof f=="object"&&f!==null&&f.type===Kn&&f.key===null;x&&(f=f.props.children);var T=typeof f=="object"&&f!==null;if(T)switch(f.$$typeof){case is:e:{for(T=f.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(f.type===Kn){n(g,x.sibling),m=o(x,f.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===f.type){n(g,x.sibling),m=o(x,f.props),m.ref=Zi(g,x,f),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}f.type===Kn?(m=Do(f.props.children,g.mode,w,f.key),m.return=g,g=m):(w=Ul(f.type,f.key,f.props,null,g.mode,w),w.ref=Zi(g,m,f),w.return=g,g=w)}return s(g);case Nr:e:{for(x=f.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===f.containerInfo&&m.stateNode.implementation===f.implementation){n(g,m.sibling),m=o(m,f.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=vf(f,g.mode,w),m.return=g,g=m}return s(g)}if(typeof f=="string"||typeof f=="number")return f=""+f,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,f),m.return=g,g=m):(n(g,m),m=yf(f,g.mode,w),m.return=g,g=m),s(g);if(Pl(f))return v(g,m,f,w);if(qi(f))return y(g,m,f,w);if(T&&kl(g,f),typeof f>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(b(152,Po(g.type)||"Component"))}return n(g,m)}}var tu=HS(!0),BS=HS(!1),js={},Xt=ar(js),Os=ar(js),Ns=ar(js);function Fr(e){if(e===js)throw Error(b(174));return e}function Vf(e,t){switch(de(Ns,t),de(Os,e),de(Xt,js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pf(t,e)}se(Xt),de(Xt,t)}function Bo(){se(Xt),se(Os),se(Ns)}function gv(e){Fr(Ns.current);var t=Fr(Xt.current),n=Pf(t,e.type);t!==n&&(de(Os,e),de(Xt,n))}function Mp(e){Os.current===e&&(se(Xt),se(Os))}var ce=ar(0);function nu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var dn=null,qn=null,Yt=!1;function US(e,t){var n=vt(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function hv(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 Kf(e){if(Yt){var t=qn;if(t){var n=t;if(!hv(e,t)){if(t=Lo(n.nextSibling),!t||!hv(e,t)){e.flags=e.flags&-1025|2,Yt=!1,dn=e;return}US(dn,n)}dn=e,qn=Lo(t.firstChild)}else e.flags=e.flags&-1025|2,Yt=!1,dn=e}}function yv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;dn=e}function Rl(e){if(e!==dn)return!1;if(!Yt)return yv(e),Yt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!jf(t,e.memoizedProps))for(t=qn;t;)US(e,t),t=Lo(t.nextSibling);if(yv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qn=Lo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=dn?Lo(e.stateNode.nextSibling):null;return!0}function pf(){qn=dn=null,Yt=!1}var Oo=[];function Dp(){for(var e=0;e<Oo.length;e++)Oo[e]._workInProgressVersionPrimary=null;Oo.length=0}var ys=Kr.ReactCurrentDispatcher,St=Kr.ReactCurrentBatchConfig,Ms=0,ge=null,Ie=null,_e=null,ru=!1,vs=!1;function Ke(){throw Error(b(321))}function Fp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function jp(e,t,n,r,o,i){if(Ms=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ys.current=e===null||e.memoizedState===null?hb:yb,e=n(r,o),vs){i=0;do{if(vs=!1,!(25>i))throw Error(b(301));i+=1,_e=Ie=null,t.updateQueue=null,ys.current=vb,e=n(r,o)}while(vs)}if(ys.current=au,t=Ie!==null&&Ie.next!==null,Ms=0,_e=Ie=ge=null,ru=!1,t)throw Error(b(300));return e}function jr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?ge.memoizedState=_e=e:_e=_e.next=e,_e}function $r(){if(Ie===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=_e===null?ge.memoizedState:_e.next;if(t!==null)_e=t,Ie=e;else{if(e===null)throw Error(b(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},_e===null?ge.memoizedState=_e=e:_e=_e.next=e}return _e}function Gt(e,t){return typeof t=="function"?t(e):t}function Ji(e){var t=$r(),n=t.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=e;var r=Ie,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((Ms&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,ge.lanes|=u,Hs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function es(e){var t=$r(),n=t.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);yt(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function vv(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=(Ms&e)===e)&&(t._workInProgressVersionPrimary=r,Oo.push(t))),e)return n(t._source);throw Oo.push(t),Error(b(350))}function zS(e,t,n,r){var o=He;if(o===null)throw Error(b(349));var i=t._getVersion,s=i(t._source),a=ys.current,l=a.useState(function(){return vv(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!yt(s,g)){g=n(t._source),yt(c,g)||(u(g),g=Jn(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,f=g;0<f;){var w=31-rr(f),x=1<<w;m[w]|=g,f&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var f=Jn(y);o.mutableReadLanes|=f&o.pendingLanes}catch(w){m(function(){throw w})}})},[t,r]),yt(h,n)&&yt(v,t)&&yt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:c},e.dispatch=u=Up.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=vv(o,t,n),l.memoizedState=l.baseState=c),c}function VS(e,t,n){var r=$r();return zS(r,e,t,n)}function ts(e){var t=jr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:e},e=e.dispatch=Up.bind(null,ge,e),[t.memoizedState,e]}function ou(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Sv(e){var t=jr();return e={current:e},t.memoizedState=e}function iu(){return $r().memoizedState}function Wf(e,t,n,r){var o=jr();ge.flags|=e,o.memoizedState=ou(1|t,n,void 0,r===void 0?null:r)}function Hp(e,t,n,r){var o=$r();r=r===void 0?null:r;var i=void 0;if(Ie!==null){var s=Ie.memoizedState;if(i=s.destroy,r!==null&&Fp(r,s.deps)){ou(t,n,i,r);return}}ge.flags|=e,o.memoizedState=ou(1|t,n,i,r)}function wv(e,t){return Wf(516,4,e,t)}function su(e,t){return Hp(516,4,e,t)}function KS(e,t){return Hp(4,2,e,t)}function WS(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 $S(e,t,n){return n=n!=null?n.concat([e]):null,Hp(4,2,WS.bind(null,t,e),n)}function Bp(){}function qS(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function GS(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gb(e,t){var n=Ho();Ur(98>n?98:n,function(){e(!0)}),Ur(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function Up(e,t,n){var r=et(),o=Jn(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===ge||s!==null&&s===ge)vs=ru=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,yt(l,a))return}catch{}finally{}er(e,o,r)}}var au={readContext:wt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},hb={readContext:wt,useCallback:function(e,t){return jr().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:wv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wf(4,2,WS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wf(4,2,e,t)},useMemo:function(e,t){var n=jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jr();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=Up.bind(null,ge,e),[r.memoizedState,e]},useRef:Sv,useState:ts,useDebugValue:Bp,useDeferredValue:function(e){var t=ts(e),n=t[0],r=t[1];return wv(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ts(!1),t=e[0];return e=gb.bind(null,e[1]),Sv(e),[e,t]},useMutableSource:function(e,t,n){var r=jr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},zS(r,e,t,n)},useOpaqueIdentifier:function(){if(Yt){var e=!1,t=ub(function(){throw e||(e=!0,n("r:"+(cf++).toString(36))),Error(b(355))}),n=ts(t)[1];return!(ge.mode&2)&&(ge.flags|=516,ou(5,function(){n("r:"+(cf++).toString(36))},void 0,null)),t}return t="r:"+(cf++).toString(36),ts(t),t},unstable_isNewReconciler:!1},yb={readContext:wt,useCallback:qS,useContext:wt,useEffect:su,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:Ji,useRef:iu,useState:function(){return Ji(Gt)},useDebugValue:Bp,useDeferredValue:function(e){var t=Ji(Gt),n=t[0],r=t[1];return su(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=Ji(Gt)[0];return[iu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return Ji(Gt)[0]},unstable_isNewReconciler:!1},vb={readContext:wt,useCallback:qS,useContext:wt,useEffect:su,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:es,useRef:iu,useState:function(){return es(Gt)},useDebugValue:Bp,useDeferredValue:function(e){var t=es(Gt),n=t[0],r=t[1];return su(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=es(Gt)[0];return[iu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return es(Gt)[0]},unstable_isNewReconciler:!1},Sb=Kr.ReactCurrentOwner,Mt=!1;function We(e,t,n,r){t.child=e===null?BS(t,null,n,r):tu(t,e.child,n,r)}function xv(e,t,n,r,o){n=n.render;var i=t.ref;return Ao(t,o),r=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Ev(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!qp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,QS(e,t,s,r,o,i)):(e=Ul(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:Rs,n(o,r)&&e.ref===t.ref)?fn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function QS(e,t,n,r,o,i){if(e!==null&&Rs(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,fn(e,t,i);return $f(e,t,n,r,i)}function mf(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},Ll(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Ll(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ll(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ll(t,r);return We(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 $f(e,t,n,r,o){var i=qe(n)?Br:Oe.current;return i=jo(t,i),Ao(t,o),n=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Cv(e,t,n,r,o){if(qe(n)){var i=!0;Dl(t)}else i=!1;if(Ao(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),jS(t,n,r),zf(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=qe(n)?Br:Oe.current,u=jo(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)&&mv(t,s,r,u),Vn=!1;var d=t.memoizedState;s.state=d,As(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Vn?(typeof c=="function"&&(eu(t,n,c,r),l=t.memoizedState),(a=Vn||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,DS(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=qe(n)?Br:Oe.current,l=jo(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)&&mv(t,s,r,l),Vn=!1,d=t.memoizedState,s.state=d,As(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||$e.current||Vn?(typeof h=="function"&&(eu(t,n,h,r),v=t.memoizedState),(u=Vn||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 qf(e,t,n,r,i,o)}function qf(e,t,n,r,o,i){XS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&lv(t,n,!1),fn(e,t,i);r=t.stateNode,Sb.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=tu(t,e.child,null,i),t.child=tu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&lv(t,n,!0),t.child}function Tv(e){var t=e.stateNode;t.pendingContext?av(e,t.pendingContext,t.pendingContext!==t.context):t.context&&av(e,t.context,!1),Vf(e,t.containerInfo)}var Il={dehydrated:null,retryLane:0};function _v(e,t,n){var r=t.pendingProps,o=ce.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),de(ce,o&1),e===null?(r.fallback!==void 0&&Kf(t),e=r.children,o=r.fallback,i?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Il,e):typeof r.unstable_expectedLoadTime=="number"?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Il,t.lanes=33554432,e):(n=Gp({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=Il,r):(n=Pv(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=Il,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n)}function bv(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=Gp(t,o,0,null),n=Do(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Pv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(o,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function 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=sr(s,a),e!==null?r=sr(e,r):(r=Do(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Rv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),MS(e.return,t)}function gf(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 Iv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rv(e,n);else if(e.tag===19)Rv(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&nu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),gf(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&&nu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}gf(t,!0,n,null,i,t.lastEffect);break;case"together":gf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(b(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var YS,Gf,ZS,JS;YS=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}};Gf=function(){};ZS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Fr(Xt.current);var i=null;switch(n){case"input":o=xf(e,o),r=xf(e,r),i=[];break;case"option":o=Tf(e,o),r=Tf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=_f(e,o),r=_f(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}kf(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"&&(Es.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"&&(Es.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===mp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};JS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ns(e,t){if(!Yt)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 wb(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return qe(t.type)&&Xl(),null;case 3:return Bo(),se($e),se(Oe),Dp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Gf(t),null;case 5:Mp(t);var o=Fr(Ns.current);if(n=t.type,e!==null&&t.stateNode!=null)ZS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(b(166));return null}if(e=Fr(Xt.current),Rl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Ql]=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<as.length;e++)ie(as[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":Ay(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ny(r,i),ie("invalid",r)}kf(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]):Es.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":wl(r),Oy(r,i,!0);break;case"textarea":wl(r),My(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Gl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===bf.html&&(e=$v(n)),e===bf.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[$n]=t,e[Ql]=r,YS(e,t,!1,!1),t.stateNode=e,s=Rf(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<as.length;o++)ie(as[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":Ay(e,r),o=xf(e,r),ie("invalid",e);break;case"option":o=Tf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ny(e,r),o=_f(e,r),ie("invalid",e);break;default:o=r}kf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Qv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&qv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Cs(e,l):typeof l=="number"&&Cs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Es.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&lp(e,i,l,s))}switch(n){case"input":wl(e),Oy(e,r,!1);break;case"textarea":wl(e),My(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ko(e,!!r.multiple,i,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gl)}bS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)JS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(b(166));n=Fr(Ns.current),Fr(Xt.current),Rl(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Rl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?be===0&&(be=3):((be===0||be===3)&&(be=4),He===null||!(Hs&134217727)&&!(Ko&134217727)||No(He,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Bo(),Gf(t),e===null&&CS(t.stateNode.containerInfo),null;case 10:return Op(t),null;case 17:return qe(t.type)&&Xl(),null;case 19:if(se(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)ns(r,!1);else{if(be!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=nu(e),s!==null){for(t.flags|=64,ns(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Le()>ep&&(t.flags|=64,i=!0,ns(r,!1),t.lanes=33554432)}else{if(!i)if(e=nu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ns(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Yt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>ep&&n!==1073741824&&(t.flags|=64,i=!0,ns(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return $p(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(b(156,t.tag))}function xb(e){switch(e.tag){case 1:qe(e.type)&&Xl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Bo(),se($e),se(Oe),Dp(),t=e.flags,t&64)throw Error(b(285));return e.flags=t&-4097|64,e;case 5:return Mp(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return Bo(),null;case 10:return Op(e),null;case 23:case 24:return $p(),null;default:return null}}function zp(e,t){try{var n="",r=t;do n+=t_(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 Mf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var V_=typeof WeakMap=="function"?WeakMap:Map;function SS(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Uf=r),Mf(e,t)},n}function wS(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Mf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(qt===null?qt=new Set([this]):qt.add(this),Mf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var K_=typeof WeakSet=="function"?WeakSet:Set;function Qy(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Zn(e,n)}else t.current=null}function W_(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:At(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&gp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(k(163))}function $_(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&&(RS(n,e),eb(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:At(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Ly(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}Ly(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&Wv(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&&Tv(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(k(163))}function Yy(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=pv("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 Zy(e,t){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(hp,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)RS(t,n);else{r=t;try{o()}catch(i){Zn(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Qy(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Zn(t,i)}break;case 5:Qy(t);break;case 4:xS(e,t)}}function Jy(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 ev(e){return e.tag===5||e.tag===3||e.tag===4}function tv(e){e:{for(var t=e.return;t!==null;){if(ev(t))break e;t=t.return}throw Error(k(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(k(161))}n.flags&16&&(hs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||ev(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?Df(e,n,t):Ff(e,n,t)}function Df(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=Tl));else if(r!==4&&(e=e.child,e!==null))for(Df(e,t,n),e=e.sibling;e!==null;)Df(e,t,n),e=e.sibling}function Ff(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(Ff(e,t,n),e=e.sibling;e!==null;)Ff(e,t,n),e=e.sibling}function xS(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(k(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(Zy(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(Zy(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 tf(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[_l]=r,e==="input"&&r.type==="radio"&&r.name!=null&&uv(n,r),gf(e,o),t=gf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?mv(n,a):s==="dangerouslySetInnerHTML"?fv(n,a):s==="children"?hs(n,a):Gf(n,s,a,t)}switch(e){case"input":lf(n,r);break;case"textarea":cv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?_o(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?_o(n,!!r.multiple,r.defaultValue,!0):_o(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(k(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,Tv(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Lp=Le(),Yy(t.child,!0)),nv(t);return;case 19:nv(t);return;case 17:return;case 23:case 24:Yy(t,t.memoizedState!==null);return}throw Error(k(163))}function nv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new K_),t.forEach(function(r){var o=rb.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function q_(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var G_=Math.ceil,jl=Hr.ReactCurrentDispatcher,Rp=Hr.ReactCurrentOwner,M=0,He=null,ve=null,Ae=0,Fr=0,jf=or(0),be=0,Zl=null,Bo=0,As=0,Uo=0,Ip=0,Hf=null,Lp=0,Bf=1/0;function zo(){Bf=Le()+500}var L=null,Hl=!1,Uf=null,qt=null,nr=!1,fs=null,ts=90,zf=[],Vf=[],fn=null,ps=0,Kf=null,ml=-1,un=0,gl=0,ms=null,hl=!1;function Je(){return M&48?Le():ml!==-1?ml:ml=Le()}function Qn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Do()===99?1:2;if(un===0&&(un=Bo),M_.transition!==0){gl!==0&&(gl=Hf!==null?Hf.pendingLanes:0),e=un;var t=4186112&~gl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Do(),M&4&&e===98?e=El(12,un):(e=j1(e),e=El(e,un)),e}function Yn(e,t,n){if(50<ps)throw ps=0,Kf=null,Error(k(185));if(e=Jl(e,t),e===null)return null;Wl(e,t,n),e===He&&(Uo|=t,be===4&&Lo(e,Ae));var r=Do();t===1?M&8&&!(M&48)?Wf(e):(yt(e,n),M===0&&(zo(),Qt())):(!(M&4)||r!==98&&r!==99||(fn===null?fn=new Set([e]):fn.add(e)),yt(e,n)),Hf=e}function Jl(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 yt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-er(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,ho(l);var c=te;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=ws(e,e===He?Ae:0),t=te,r===0)n!==null&&(n!==Qd&&bf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Qd&&bf(n)}t===15?(n=Wf.bind(null,e),ln===null?(ln=[n],pl=yp(Ql,Jv)):ln.push(n),n=Qd):t===14?n=Ts(99,Wf.bind(null,e)):(n=H1(t),n=Ts(n,ES.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ES(e){if(ml=-1,gl=un=0,M&48)throw Error(k(327));var t=e.callbackNode;if(ir()&&e.callbackNode!==t)return null;var n=ws(e,e===He?Ae:0);if(n===0)return null;var r=n,o=M;M|=16;var i=bS();(He!==e||Ae!==r)&&(zo(),Ao(e,r));do try{Y_();break}catch(a){_S(e,a)}while(1);if(vp(),jl.current=i,M=o,ve!==null?r=0:(He=null,Ae=0,r=be),Bo&Uo)Ao(e,0);else if(r!==0){if(r===2&&(M|=64,e.hydrate&&(e.hydrate=!1,gp(e.containerInfo)),n=Lv(e),n!==0&&(r=ns(e,n))),r===1)throw t=Zl,Ao(e,0),Lo(e,n),yt(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(k(345));case 2:Pr(e);break;case 3:if(Lo(e,n),(n&62914560)===n&&(r=Lp+500-Le(),10<r)){if(ws(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Je(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Cy(Pr.bind(null,e),r);break}Pr(e);break;case 4:if(Lo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-er(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*G_(n/1960))-n,10<n){e.timeoutHandle=Cy(Pr.bind(null,e),n);break}Pr(e);break;case 5:Pr(e);break;default:throw Error(k(329))}}return yt(e,Le()),e.callbackNode===t?ES.bind(null,e):null}function Lo(e,t){for(t&=~Ip,t&=~Uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-er(t),r=1<<n;e[n]=-1,t&=~r}}function Wf(e){if(M&48)throw Error(k(327));if(ir(),e===He&&e.expiredLanes&Ae){var t=Ae,n=ns(e,t);Bo&Uo&&(t=ws(e,t),n=ns(e,t))}else t=ws(e,0),n=ns(e,t);if(e.tag!==0&&n===2&&(M|=64,e.hydrate&&(e.hydrate=!1,gp(e.containerInfo)),t=Lv(e),t!==0&&(n=ns(e,t))),n===1)throw n=Zl,Ao(e,0),Lo(e,t),yt(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pr(e),yt(e,Le()),null}function X_(){if(fn!==null){var e=fn;fn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,yt(t,Le())})}Qt()}function CS(e,t){var n=M;M|=1;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}}function TS(e,t){var n=M;M&=-2,M|=8;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}}function al(e,t){de(jf,Fr),Fr|=t,Bo|=t}function Ap(){Fr=jf.current,ie(jf)}function Ao(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,R_(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&bl();break;case 3:Fo(),ie($e),ie(Oe),Ep();break;case 5:xp(r);break;case 4:Fo();break;case 13:ie(ce);break;case 19:ie(ce);break;case 10:Sp(r);break;case 23:case 24:Ap()}n=n.return}He=e,ve=rr(e.current,null),Ae=Fr=Bo=t,be=0,Zl=null,Ip=Uo=As=0}function _S(e,t){do{var n=ve;try{if(vp(),cs.current=Fl,Ol){for(var r=me.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ol=!1}if(Ps=0,_e=Ie=me=null,ds=!1,Rp.current=null,n===null||n.return===null){be=1,Zl=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,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=(ce.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var y=d.memoizedState;if(y!==null)h=y.dehydrated!==null;else{var v=d.memoizedProps;h=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(h){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var f=Gn(-1,1);f.tag=2,Xn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new V_,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=nb.bind(null,i,u,a);u.then(x,x)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((To(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 Qf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Eb=typeof WeakMap=="function"?WeakMap:Map;function ew(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uu||(uu=!0,tp=r),Qf(e,t)},n}function tw(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Qf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Qt===null?Qt=new Set([this]):Qt.add(this),Qf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var Cb=typeof WeakSet=="function"?WeakSet:Set;function Lv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function Tb(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&&Rp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(b(163))}function _b(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&&(cw(n,e),Ob(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&&fv(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}fv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&bS(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&&iS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(b(163))}function Av(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=Gv("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 Ov(e,t){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(Ip,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)cw(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Lv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Lv(t);break;case 4:nw(e,t)}}function Nv(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 Mv(e){return e.tag===5||e.tag===3||e.tag===4}function Dv(e){e:{for(var t=e.return;t!==null;){if(Mv(t))break e;t=t.return}throw Error(b(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(b(161))}n.flags&16&&(Cs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Mv(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?Xf(e,n,t):Yf(e,n,t)}function Xf(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=Gl));else if(r!==4&&(e=e.child,e!==null))for(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}function Yf(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(Yf(e,t,n),e=e.sibling;e!==null;)Yf(e,t,n),e=e.sibling}function nw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(b(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(Ov(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(Ov(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 hf(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[Ql]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Kv(n,r),Rf(e,o),t=Rf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Qv(n,a):s==="dangerouslySetInnerHTML"?qv(n,a):s==="children"?Cs(n,a):lp(n,s,a,t)}switch(e){case"input":Ef(n,r);break;case"textarea":Wv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?ko(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?ko(n,!!r.multiple,r.defaultValue,!0):ko(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(b(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,iS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wp=Le(),Av(t.child,!0)),Fv(t);return;case 19:Fv(t);return;case 17:return;case 23:case 24:Av(t,t.memoizedState!==null);return}throw Error(b(163))}function Fv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cb),t.forEach(function(r){var o=Db.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bb(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var Pb=Math.ceil,lu=Kr.ReactCurrentDispatcher,Vp=Kr.ReactCurrentOwner,D=0,He=null,ve=null,Ae=0,zr=0,Zf=ar(0),be=0,Eu=null,Vo=0,Hs=0,Ko=0,Kp=0,Jf=null,Wp=0,ep=1/0;function Wo(){ep=Le()+500}var L=null,uu=!1,tp=null,Qt=null,ir=!1,Ss=null,ls=90,np=[],rp=[],pn=null,ws=0,op=null,jl=-1,cn=0,Hl=0,xs=null,Bl=!1;function et(){return D&48?Le():jl!==-1?jl:jl=Le()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ho()===99?1:2;if(cn===0&&(cn=Vo),mb.transition!==0){Hl!==0&&(Hl=Jf!==null?Jf.pendingLanes:0),e=cn;var t=4186112&~Hl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ho(),D&4&&e===98?e=$l(12,cn):(e=y_(e),e=$l(e,cn)),e}function er(e,t,n){if(50<ws)throw ws=0,op=null,Error(b(185));if(e=Cu(e,t),e===null)return null;gu(e,t,n),e===He&&(Ko|=t,be===4&&No(e,Ae));var r=Ho();t===1?D&8&&!(D&48)?ip(e):(xt(e,n),D===0&&(Wo(),Zt())):(!(D&4)||r!==98&&r!==99||(pn===null?pn=new Set([e]):pn.add(e)),xt(e,n)),Jf=e}function Cu(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 xt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,So(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=Ps(e,e===He?Ae:0),t=ne,r===0)n!==null&&(n!==df&&Bf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==df&&Bf(n)}t===15?(n=ip.bind(null,e),un===null?(un=[n],Fl=Lp(wu,NS)):un.push(n),n=df):t===14?n=Ls(99,ip.bind(null,e)):(n=v_(t),n=Ls(n,rw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function rw(e){if(jl=-1,Hl=cn=0,D&48)throw Error(b(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Ps(e,e===He?Ae:0);if(n===0)return null;var r=n,o=D;D|=16;var i=aw();(He!==e||Ae!==r)&&(Wo(),Mo(e,r));do try{Ib();break}catch(a){sw(e,a)}while(1);if(Ap(),lu.current=i,D=o,ve!==null?r=0:(He=null,Ae=0,r=be),Vo&Ko)Mo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Rp(e.containerInfo)),n=fS(e),n!==0&&(r=us(e,n))),r===1)throw t=Eu,Mo(e,0),No(e,n),xt(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(b(345));case 2:Or(e);break;case 3:if(No(e,n),(n&62914560)===n&&(r=Wp+500-Le(),10<r)){if(Ps(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ov(Or.bind(null,e),r);break}Or(e);break;case 4:if(No(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Pb(n/1960))-n,10<n){e.timeoutHandle=ov(Or.bind(null,e),n);break}Or(e);break;case 5:Or(e);break;default:throw Error(b(329))}}return xt(e,Le()),e.callbackNode===t?rw.bind(null,e):null}function No(e,t){for(t&=~Kp,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function ip(e){if(D&48)throw Error(b(327));if(lr(),e===He&&e.expiredLanes&Ae){var t=Ae,n=us(e,t);Vo&Ko&&(t=Ps(e,t),n=us(e,t))}else t=Ps(e,0),n=us(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Rp(e.containerInfo)),t=fS(e),t!==0&&(n=us(e,t))),n===1)throw n=Eu,Mo(e,0),No(e,t),xt(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Or(e),xt(e,Le()),null}function kb(){if(pn!==null){var e=pn;pn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,xt(t,Le())})}Zt()}function ow(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function iw(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function Ll(e,t){de(Zf,zr),zr|=t,Vo|=t}function $p(){zr=Zf.current,se(Zf)}function Mo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lb(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xl();break;case 3:Bo(),se($e),se(Oe),Dp();break;case 5:Mp(r);break;case 4:Bo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Op(r);break;case 23:case 24:$p()}n=n.return}He=e,ve=sr(e.current,null),Ae=zr=Vo=t,be=0,Eu=null,Kp=Ko=Hs=0}function sw(e,t){do{var n=ve;try{if(Ap(),ys.current=au,ru){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ru=!1}if(Ms=0,_e=Ie=ge=null,vs=!1,Vp.current=null,n===null||n.return===null){be=1,Eu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,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=(ce.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 g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var f=Yn(-1,1);f.tag=2,Zn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new Eb,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=Mb.bind(null,i,u,a);u.then(x,x)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Po(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.`)}be!==5&&(be=2),l=Pp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=SS(d,i,t);Iy(d,T);break e;case 1:i=l;var E=d.type,_=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(qt===null||!qt.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=wS(d,i,t);Iy(d,R);break e}}d=d.return}while(d!==null)}PS(n)}catch(b){t=b,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function bS(){var e=jl.current;return jl.current=Fl,e===null?Fl:e}function ns(e,t){var n=M;M|=16;var r=bS();He===e&&Ae===t||Ao(e,t);do try{Q_();break}catch(o){_S(e,o)}while(1);if(vp(),M=n,jl.current=r,ve!==null)throw Error(k(261));return He=null,Ae=0,be}function Q_(){for(;ve!==null;)kS(ve)}function Y_(){for(;ve!==null&&!A_();)kS(ve)}function kS(e){var t=IS(e.alternate,e,Fr);e.memoizedProps=e.pendingProps,t===null?PS(e):ve=t,Rp.current=null}function PS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=z_(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=U_(n,t,Fr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Fr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);be===0&&(be=5)}function Pr(e){var t=Do();return Dr(99,Z_.bind(null,e,t)),null}function Z_(e,t){do ir();while(fs!==null);if(M&48)throw Error(k(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(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-er(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(fn!==null&&!(r&24)&&fn.has(e)&&fn.delete(e),e===He&&(ve=He=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=M,M|=32,Rp.current=null,qd=ul,s=yy(),xf(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,y=0,v=s,g=null;t:for(;;){for(var m;v!==a||i!==0&&v.nodeType!==3||(p=c+i),v!==l||u!==0&&v.nodeType!==3||(d=c+u),v.nodeType===3&&(c+=v.nodeValue.length),(m=v.firstChild)!==null;)g=v,v=m;for(;;){if(v===s)break t;if(g===a&&++h===i&&(p=c),g===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Gd={focusedElem:s,selectionRange:a},ul=!1,ms=null,hl=!1,L=r;do try{J_()}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);ms=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&hs(L.stateNode,""),f&128){var w=L.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(f&1038){case 2:tv(L),L.flags&=-3;break;case 6:tv(L),L.flags&=-3,tf(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,tf(L.alternate,L);break;case 4:tf(L.alternate,L);break;case 8:a=L,xS(s,a);var T=a.alternate;Jy(a),T!==null&&Jy(T)}L=L.nextEffect}}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);if(x=Gd,w=yy(),f=x.focusedElem,s=x.selectionRange,w!==f&&f&&f.ownerDocument&&Hv(f.ownerDocument.documentElement,f)){for(s!==null&&xf(f)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in f?(f.selectionStart=w,f.selectionEnd=Math.min(x,f.value.length)):(x=(w=f.ownerDocument||document)&&w.defaultView||window,x.getSelection&&(x=x.getSelection(),a=f.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!x.extend&&T>s&&(a=s,s=T,T=a),a=hy(f,T),i=hy(f,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=f;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<w.length;f++)x=w[f],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}ul=!!qd,Gd=qd=null,e.current=n,L=r;do try{for(f=e;L!==null;){var E=L.flags;if(E&36&&$_(f,L.alternate,L),E&128){w=void 0;var _=L.ref;if(_!==null){var R=L.stateNode;switch(L.tag){case 5:w=R;break;default:w=R}typeof _=="function"?_(w):_.current=w}}L=L.nextEffect}}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);L=null,N_(),M=o}else e.current=n;if(nr)nr=!1,fs=e,ts=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(E=L,E.sibling=null,E.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(qt=null),r===1?e===Kf?ps++:(ps=0,Kf=e):ps=0,n=n.stateNode,Nr&&typeof Nr.onCommitFiberRoot=="function")try{Nr.onCommitFiberRoot(hp,n,void 0,(n.current.flags&64)===64)}catch{}if(yt(e,Le()),Hl)throw Hl=!1,e=Uf,Uf=null,e;return M&8||Qt(),null}function J_(){for(;L!==null;){var e=L.alternate;hl||ms===null||(L.flags&8?ry(L,ms)&&(hl=!0):L.tag===13&&q_(e,L)&&ry(L,ms)&&(hl=!0));var t=L.flags;t&256&&W_(e,L),!(t&512)||nr||(nr=!0,Ts(97,function(){return ir(),null})),L=L.nextEffect}}function ir(){if(ts!==90){var e=97<ts?97:ts;return ts=90,Dr(e,tb)}return!1}function eb(e,t){zf.push(t,e),nr||(nr=!0,Ts(97,function(){return ir(),null}))}function RS(e,t){Vf.push(t,e),nr||(nr=!0,Ts(97,function(){return ir(),null}))}function tb(){if(fs===null)return!1;var e=fs;if(fs=null,M&48)throw Error(k(331));var t=M;M|=32;var n=Vf;Vf=[];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(k(330));Zn(i,l)}}for(n=zf,zf=[],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(k(330));Zn(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 M=t,Qt(),!0}function rv(e,t,n){t=Pp(n,t),t=SS(e,t,1),Xn(e,t),t=Je(),e=Jl(e,1),e!==null&&(Wl(e,1,t),yt(e,t))}function Zn(e,t){if(e.tag===3)rv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){rv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r))){e=Pp(t,e);var o=wS(n,e,1);if(Xn(n,o),o=Je(),n=Jl(n,1),n!==null)Wl(n,1,o),yt(n,o);else if(typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function nb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Ae&n)===n&&(be===4||be===3&&(Ae&62914560)===Ae&&500>Le()-Lp?Ao(e,0):Ip|=n),yt(e,t)}function rb(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(un===0&&(un=Bo),t=yo(62914560&~un),t===0&&(t=4194304)):t=Do()===99?1:2:t=1),n=Je(),e=Jl(e,t),e!==null&&(Wl(e,t,n),yt(e,n))}var IS;IS=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Ot=!0;else if(n&r)Ot=!!(e.flags&16384);else{switch(Ot=!1,t.tag){case 3:Vy(t),Zd();break;case 5:Ny(t);break;case 1:qe(t.type)&&fl(t);break;case 4:Rf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(kl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Ky(e,t,n):(de(ce,ce.current&1),t=dn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Xy(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,Jd(e,t,n)}return dn(e,t,n)}else Ot=!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=Mo(t,Oe.current),Ro(t,n),o=Tp(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)){var i=!0;fl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,wp(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Il(t,r,s,e),o.updater=Yl,t.stateNode=o,o._reactInternals=t,Pf(t,r,e,n),t=Of(null,t,r,!0,i,n)}else t.tag=0,We(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=ib(o),e=At(o,e),i){case 0:t=Af(null,t,o,e,n);break e;case 1:t=zy(null,t,o,e,n);break e;case 11:t=By(null,t,o,e,n);break e;case 14:t=Uy(null,t,o,At(o.type,e),r,n);break e}throw Error(k(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Af(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),zy(e,t,r,o,n);case 3:if(Vy(t),r=t.updateQueue,e===null||r===null)throw Error(k(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,tS(e,t),_s(t,r,null,n),r=t.memoizedState.element,r===o)Zd(),t=dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Kn=Po(t.stateNode.containerInfo.firstChild),cn=t,i=Xt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Io.push(i);for(n=iS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),Zd();t=t.child}return t;case 5:return Ny(t),e===null&&If(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Tf(r,o)?s=null:i!==null&&Tf(r,i)&&(t.flags|=16),gS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&If(t),null;case 13:return Ky(e,t,n);case 4:return Rf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ll(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),By(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(de(kl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=pt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=dn(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=Gn(-1,n&-n),u.tag=2,Xn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),eS(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ro(t,n),o=ht(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=At(o,t.pendingProps),i=At(o.type,i),Uy(e,t,o,i,r,n);case 15:return mS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,fl(t)):e=!1,Ro(t,n),rS(t,r,o),Pf(t,r,o,n),Of(null,t,r,!0,e,n);case 19:return Xy(e,t,n);case 23:return Jd(e,t,n);case 24:return Jd(e,t,n)}throw Error(k(156,t.tag))};function ob(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,r){return new ob(e,t,n,r)}function Op(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ib(e){if(typeof e=="function")return Op(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zl)return 11;if(e===Vl)return 14}return 2}function rr(e,t){var n=e.alternate;return n===null?(n=mt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function yl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Op(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Un:return Oo(n.children,o,i,t);case sv:s=8,o|=16;break;case Xf:s=8,o|=1;break;case rs:return e=mt(12,n,t,o|8),e.elementType=rs,e.type=rs,e.lanes=i,e;case os:return e=mt(13,n,t,o),e.type=os,e.elementType=os,e.lanes=i,e;case vl:return e=mt(19,n,t,o),e.elementType=vl,e.lanes=i,e;case tp:return Np(n,o,i,t);case sf:return e=mt(24,n,t,o),e.elementType=sf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:s=10;break e;case Yf:s=9;break e;case zl:s=11;break e;case Vl:s=14;break e;case Zf:s=16,r=null;break e;case Jf:s=22;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=mt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Oo(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function Np(e,t,n,r){return e=mt(23,e,r,t),e.elementType=tp,e.lanes=n,e}function nf(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function rf(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sb(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=Ud(0),this.expirationTimes=Ud(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ud(0),this.mutableSourceEagerHydrationData=null}function ab(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Bl(e,t,n,r){var o=t.current,i=Je(),s=Qn(o);e:if(n){n=n._reactInternals;t:{if(Br(n)!==n||n.tag!==1)throw Error(k(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(qe(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(k(171))}if(n.tag===1){var l=n.type;if(qe(l)){n=qv(n,l,a);break e}}n=a}else n=tr;return t.context===null?t.context=n:t.pendingContext=n,t=Gn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Xn(o,t),Yn(o,s,i),s}function of(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 ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Mp(e,t){ov(e,t),(e=e.alternate)&&ov(e,t)}function lb(){return null}function Dp(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new sb(e,t,n!=null&&n.hydrate===!0),t=mt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,wp(t),e[Ho]=n.current,zv(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}Dp.prototype.render=function(e){Bl(e,this._internalRoot,null,null)};Dp.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Bl(null,e,null,function(){t[Ho]=null})};function Os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ub(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 Dp(e,0,t?{hydrate:!0}:void 0)}function eu(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=of(s);a.call(u)}}Bl(t,s,e,o)}else{if(i=n._reactRootContainer=ub(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=of(s);l.call(u)}}TS(function(){Bl(t,s,e,o)})}return of(s)}xv=function(e){if(e.tag===13){var t=Je();Yn(e,4,t),Mp(e,4)}};sp=function(e){if(e.tag===13){var t=Je();Yn(e,67108864,t),Mp(e,67108864)}};Ev=function(e){if(e.tag===13){var t=Je(),n=Qn(e);Yn(e,n,t),Mp(e,n)}};Cv=function(e,t){return t()};hf=function(e,t,n){switch(t){case"input":if(lf(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=Xl(r);if(!o)throw Error(k(90));lv(r),lf(r,o)}}}break;case"textarea":cv(e,n);break;case"select":t=n.value,t!=null&&_o(e,!!n.multiple,t,!1)}};rp=CS;yv=function(e,t,n,r,o){var i=M;M|=4;try{return Dr(98,e.bind(null,t,n,r,o))}finally{M=i,M===0&&(zo(),Qt())}};op=function(){!(M&49)&&(X_(),ir())};vv=function(e,t){var n=M;M|=2;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}};function LS(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Os(t))throw Error(k(200));return ab(e,t,null,n)}var cb={Events:[Is,xo,Xl,gv,hv,ir,{current:!1}]},Qi={findFiberByHostInstance:Lr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},db={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wv(e),e===null?null:e.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||lb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Yi=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Yi.isDisabled&&Yi.supportsFiber))try{hp=Yi.inject(db),Nr=Yi}catch{}var Yi;vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cb;vt.createPortal=LS;vt.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(k(188)):Error(k(268,Object.keys(e)));return e=wv(t),e=e===null?null:e.stateNode,e};vt.flushSync=function(e,t){var n=M;if(n&48)return e(t);M|=1;try{if(e)return Dr(99,e.bind(null,t))}finally{M=n,Qt()}};vt.hydrate=function(e,t,n){if(!Os(t))throw Error(k(200));return eu(null,e,t,!0,n)};vt.render=function(e,t,n){if(!Os(t))throw Error(k(200));return eu(null,e,t,!1,n)};vt.unmountComponentAtNode=function(e){if(!Os(e))throw Error(k(40));return e._reactRootContainer?(TS(function(){eu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ho]=null})}),!0):!1};vt.unstable_batchedUpdates=CS;vt.unstable_createPortal=function(e,t){return LS(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};vt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Os(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return eu(e,t,n,!1,r)};vt.version="17.0.2"});var tu=pe((jL,NS)=>{"use strict";function OS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OS)}catch(e){console.error(e)}}OS(),NS.exports=AS()});var lw=pe(aw=>{"use strict";var Go=O();function Xb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qb=typeof Object.is=="function"?Object.is:Xb,Yb=Go.useState,Zb=Go.useEffect,Jb=Go.useLayoutEffect,ek=Go.useDebugValue;function tk(e,t){var n=t(),r=Yb({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Jb(function(){o.value=n,o.getSnapshot=t,um(o)&&i({inst:o})},[e,n,t]),Zb(function(){return um(o)&&i({inst:o}),e(function(){um(o)&&i({inst:o})})},[e]),ek(n),n}function um(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qb(e,n)}catch{return!0}}function nk(e,t){return t()}var rk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?nk:tk;aw.useSyncExternalStore=Go.useSyncExternalStore!==void 0?Go.useSyncExternalStore:rk});var cm=pe((_A,uw)=>{"use strict";uw.exports=lw()});var dw=pe(cw=>{"use strict";var uu=O(),ok=cm();function ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sk=typeof Object.is=="function"?Object.is:ik,ak=ok.useSyncExternalStore,lk=uu.useRef,uk=uu.useEffect,ck=uu.useMemo,dk=uu.useDebugValue;cw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=lk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ck(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return p=y}return p=h}if(y=p,sk(c,h))return y;var v=r(h);return o!==void 0&&o(y,v)?y:(c=h,p=v)}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=ak(e,i[0],i[1]);return uk(function(){s.hasValue=!0,s.value=a},[a]),dk(a),a}});var pw=pe((kA,fw)=>{"use strict";fw.exports=dw()});var Tw=pe(G=>{"use strict";var xe=typeof Symbol=="function"&&Symbol.for,fm=xe?Symbol.for("react.element"):60103,pm=xe?Symbol.for("react.portal"):60106,pu=xe?Symbol.for("react.fragment"):60107,mu=xe?Symbol.for("react.strict_mode"):60108,gu=xe?Symbol.for("react.profiler"):60114,hu=xe?Symbol.for("react.provider"):60109,yu=xe?Symbol.for("react.context"):60110,mm=xe?Symbol.for("react.async_mode"):60111,vu=xe?Symbol.for("react.concurrent_mode"):60111,Su=xe?Symbol.for("react.forward_ref"):60112,wu=xe?Symbol.for("react.suspense"):60113,gk=xe?Symbol.for("react.suspense_list"):60120,xu=xe?Symbol.for("react.memo"):60115,Eu=xe?Symbol.for("react.lazy"):60116,hk=xe?Symbol.for("react.block"):60121,yk=xe?Symbol.for("react.fundamental"):60117,vk=xe?Symbol.for("react.responder"):60118,Sk=xe?Symbol.for("react.scope"):60119;function nt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fm:switch(e=e.type,e){case mm:case vu:case pu:case gu:case mu:case wu:return e;default:switch(e=e&&e.$$typeof,e){case yu:case Su:case Eu:case xu:case hu:return e;default:return t}}case pm:return t}}}function Cw(e){return nt(e)===vu}G.AsyncMode=mm;G.ConcurrentMode=vu;G.ContextConsumer=yu;G.ContextProvider=hu;G.Element=fm;G.ForwardRef=Su;G.Fragment=pu;G.Lazy=Eu;G.Memo=xu;G.Portal=pm;G.Profiler=gu;G.StrictMode=mu;G.Suspense=wu;G.isAsyncMode=function(e){return Cw(e)||nt(e)===mm};G.isConcurrentMode=Cw;G.isContextConsumer=function(e){return nt(e)===yu};G.isContextProvider=function(e){return nt(e)===hu};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fm};G.isForwardRef=function(e){return nt(e)===Su};G.isFragment=function(e){return nt(e)===pu};G.isLazy=function(e){return nt(e)===Eu};G.isMemo=function(e){return nt(e)===xu};G.isPortal=function(e){return nt(e)===pm};G.isProfiler=function(e){return nt(e)===gu};G.isStrictMode=function(e){return nt(e)===mu};G.isSuspense=function(e){return nt(e)===wu};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pu||e===vu||e===gu||e===mu||e===wu||e===gk||typeof e=="object"&&e!==null&&(e.$$typeof===Eu||e.$$typeof===xu||e.$$typeof===hu||e.$$typeof===yu||e.$$typeof===Su||e.$$typeof===yk||e.$$typeof===vk||e.$$typeof===Sk||e.$$typeof===hk)};G.typeOf=nt});var bw=pe((UA,_w)=>{"use strict";_w.exports=Tw()});var Ow=pe((zA,Aw)=>{"use strict";var gm=bw(),wk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},xk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ek={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hm={};hm[gm.ForwardRef]=Ek;hm[gm.Memo]=Iw;function kw(e){return gm.isMemo(e)?Iw:hm[e.$$typeof]||wk}var Ck=Object.defineProperty,Tk=Object.getOwnPropertyNames,Pw=Object.getOwnPropertySymbols,_k=Object.getOwnPropertyDescriptor,bk=Object.getPrototypeOf,Rw=Object.prototype;function Lw(e,t,n){if(typeof t!="string"){if(Rw){var r=bk(t);r&&r!==Rw&&Lw(e,r,n)}var o=Tk(t);Pw&&(o=o.concat(Pw(t)));for(var i=kw(e),s=kw(t),a=0;a<o.length;++a){var l=o[a];if(!xk[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=_k(t,l);try{Ck(e,l,u)}catch{}}}}return e}Aw.exports=Lw});var Mw=pe(X=>{"use strict";var ym=Symbol.for("react.element"),vm=Symbol.for("react.portal"),Cu=Symbol.for("react.fragment"),Tu=Symbol.for("react.strict_mode"),_u=Symbol.for("react.profiler"),bu=Symbol.for("react.provider"),ku=Symbol.for("react.context"),kk=Symbol.for("react.server_context"),Pu=Symbol.for("react.forward_ref"),Ru=Symbol.for("react.suspense"),Iu=Symbol.for("react.suspense_list"),Lu=Symbol.for("react.memo"),Au=Symbol.for("react.lazy"),Pk=Symbol.for("react.offscreen"),Nw;Nw=Symbol.for("react.module.reference");function wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ym:switch(e=e.type,e){case Cu:case _u:case Tu:case Ru:case Iu:return e;default:switch(e=e&&e.$$typeof,e){case kk:case ku:case Pu:case Au:case Lu:case bu:return e;default:return t}}case vm:return t}}}X.ContextConsumer=ku;X.ContextProvider=bu;X.Element=ym;X.ForwardRef=Pu;X.Fragment=Cu;X.Lazy=Au;X.Memo=Lu;X.Portal=vm;X.Profiler=_u;X.StrictMode=Tu;X.Suspense=Ru;X.SuspenseList=Iu;X.isAsyncMode=function(){return!1};X.isConcurrentMode=function(){return!1};X.isContextConsumer=function(e){return wt(e)===ku};X.isContextProvider=function(e){return wt(e)===bu};X.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ym};X.isForwardRef=function(e){return wt(e)===Pu};X.isFragment=function(e){return wt(e)===Cu};X.isLazy=function(e){return wt(e)===Au};X.isMemo=function(e){return wt(e)===Lu};X.isPortal=function(e){return wt(e)===vm};X.isProfiler=function(e){return wt(e)===_u};X.isStrictMode=function(e){return wt(e)===Tu};X.isSuspense=function(e){return wt(e)===Ru};X.isSuspenseList=function(e){return wt(e)===Iu};X.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cu||e===_u||e===Tu||e===Ru||e===Iu||e===Pk||typeof e=="object"&&e!==null&&(e.$$typeof===Au||e.$$typeof===Lu||e.$$typeof===bu||e.$$typeof===ku||e.$$typeof===Pu||e.$$typeof===Nw||e.getModuleId!==void 0)};X.typeOf=wt});var Fw=pe((KA,Dw)=>{"use strict";Dw.exports=Mw()});var Q=pe((AN,Ju)=>{"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 Ju<"u"&&Ju.exports?(n.default=n,Ju.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var T0=pe(qs=>{"use strict";Ba();var rP=O(),E0=60103;qs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Am=Symbol.for,E0=Am("react.element"),qs.Fragment=Am("react.fragment"));var Am,oP=rP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,iP=Object.prototype.hasOwnProperty,sP={key:!0,ref:!0,__self:!0,__source:!0};function C0(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)iP.call(t,r)&&!sP.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:E0,type:e,key:i,ref:s,props:o,_owner:oP.current}}qs.jsx=C0;qs.jsxs=C0});var C=pe((HN,_0)=>{"use strict";_0.exports=T0()});var H0=pe((OM,j0)=>{"use strict";var kP=/["'&<>]/;j0.exports=PP;function PP(e){var t=""+e,n=kP.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var bg=pe((G4,gE)=>{"use strict";var SR="Expected a function",pE=NaN,wR="[object Symbol]",xR=/^\s+|\s+$/g,ER=/^[-+]0x[0-9a-f]+$/i,CR=/^0b[01]+$/i,TR=/^0o[0-7]+$/i,_R=parseInt,bR=typeof global=="object"&&global&&global.Object===Object&&global,kR=typeof self=="object"&&self&&self.Object===Object&&self,PR=bR||kR||Function("return this")(),RR=Object.prototype,IR=RR.toString,LR=Math.max,AR=Math.min,Tg=function(){return PR.Date.now()};function OR(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(SR);t=mE(t)||0,_g(n)&&(c=!!n.leading,p="maxWait"in n,i=p?LR(mE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var _=r,R=o;return r=o=void 0,u=E,s=e.apply(R,_),s}function y(E){return u=E,a=setTimeout(m,t),c?h(E):s}function v(E){var _=E-l,R=E-u,b=t-_;return p?AR(b,i-R):b}function g(E){var _=E-l,R=E-u;return l===void 0||_>=t||_<0||p&&R>=i}function m(){var E=Tg();if(g(E))return f(E);a=setTimeout(m,v(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:f(Tg())}function T(){var E=Tg(),_=g(E);if(r=arguments,o=this,l=E,_){if(a===void 0)return y(l);if(p)return a=setTimeout(m,t),h(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=w,T.flush=x,T}function _g(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NR(e){return!!e&&typeof e=="object"}function MR(e){return typeof e=="symbol"||NR(e)&&IR.call(e)==wR}function mE(e){if(typeof e=="number")return e;if(MR(e))return pE;if(_g(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_g(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(xR,"");var n=CR.test(e);return n||TR.test(e)?_R(e.slice(2),n?2:8):ER.test(e)?pE:+e}gE.exports=OR});var RL={};Te(RL,{Card:()=>ge,Chip:()=>lx,ContentEditableInput:()=>oo,DeepdeskAPI:()=>Nn,DeepdeskSDK:()=>Da,InputMediator:()=>vn,InputType:()=>jn,KeyboardHint:()=>$c,Label:()=>fd,Locale:()=>Us,Section:()=>Cr,SectionList:()=>pd,Sources:()=>Fn,Suggestion:()=>se,SuggestionList:()=>tn,TextAreaInput:()=>Sn,ToggleButton:()=>eo,attachFile:()=>e1,authenticateWithKey:()=>ZT,createOverlayContainer:()=>ci,createRangeFromOffsets:()=>ro,escapeHTML:()=>xi,fetchPlatformConfig:()=>JT,formatTextMarkup:()=>YT,getRangeOffsets:()=>gd,getRangeText:()=>Oa,isSupportedInputElement:()=>vd,updateContentEditable:()=>QT,updateTextArea:()=>XT,useStyles:()=>P,waitForElementVisibilityChange:()=>Sd});var vh=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,lo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Sh=/x-deepdesk-(([a-z0-9\-_])+-version)/,Fn=(d=>(d.SEARCH="search",d.TEMPLATE="template",d.ELASTIC_SEARCH="studio-search",d.GPT="gpt",d.TRIE="trie",d.TRIE_WITH_TYPOS="trie-with-typos",d.SEMANTIC="semantic",d.TEXT_RECOMMENDATION="text_recommendation",d.URL_RECOMMENDATION="url_recommendation",d.LINK_RECOMMENDATION="link_recommendation",d.PERSONAL_COLLECTION="personal-collection",d.PERSONAL_COLLECTION_SEARCH="personal-collection-search",d))(Fn||{}),jn=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(jn||{});var Mn=S(tu());var BE=S(O());function St(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 mn(e){return!!e&&!!e[le]}function Nt(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)===Sb}(e)||Array.isArray(e)||!!e[US]||!!(!((t=e.constructor)===null||t===void 0)&&t[US])||Wp(e)||$p(e))}function zr(e,t,n){n===void 0&&(n=!1),Wo(e)===0?(n?Object.keys:Ko)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Wo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Wp(e)?2:$p(e)?3:0}function Vo(e,t){return Wo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fb(e,t){return Wo(e)===2?e.get(t):e[t]}function zS(e,t,n){var r=Wo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function VS(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Wp(e){return yb&&e instanceof Map}function $p(e){return vb&&e instanceof Set}function sr(e){return e.o||e.t}function qp(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$S(e);delete t[le];for(var n=Ko(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 Gp(e,t){return t===void 0&&(t=!1),Xp(e)||mn(e)||!Nt(e)||(Wo(e)>1&&(e.set=e.add=e.clear=e.delete=pb),Object.freeze(e),t&&zr(e,function(n,r){return Gp(r,!0)},!0)),e}function pb(){St(2)}function Xp(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Yt(e){var t=Kp[e];return t||St(18,e),t}function mb(e,t){Kp[e]||(Kp[e]=t)}function Up(){return Ms}function Fp(e,t){t&&(Yt("Patches"),e.u=[],e.s=[],e.v=t)}function nu(e){zp(e),e.p.forEach(gb),e.p=null}function zp(e){e===Ms&&(Ms=e.l)}function MS(e){return Ms={p:[],l:Ms,h:e,m:!0,_:0}}function gb(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function jp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Yt("ES5").S(t,e,r),r?(n[le].P&&(nu(t),St(4)),Nt(e)&&(e=ru(t,e),t.l||ou(t,e)),t.u&&Yt("Patches").M(n[le].t,e,t.u,t.s)):e=ru(t,n,[]),nu(t),t.u&&t.v(t.u,t.s),e!==WS?e:void 0}function ru(e,t,n){if(Xp(t))return t;var r=t[le];if(!r)return zr(t,function(a,l){return DS(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ou(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=qp(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 DS(e,r,o,a,l,n,s)}),ou(e,o,!1),n&&e.u&&Yt("Patches").N(r,n,e.u,e.s)}return r.o}function DS(e,t,n,r,o,i,s){if(mn(o)){var a=ru(e,o,i&&t&&t.i!==3&&!Vo(t.R,r)?i.concat(r):void 0);if(zS(n,r,a),!mn(a))return;e.m=!1}else s&&n.add(o);if(Nt(o)&&!Xp(o)){if(!e.h.D&&e._<1)return;ru(e,o),t&&t.A.l||ou(e,o)}}function ou(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Gp(t,n)}function Hp(e,t){var n=e[le];return(n?sr(n):e)[t]}function FS(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 ar(e){e.P||(e.P=!0,e.l&&ar(e.l))}function Bp(e){e.o||(e.o=qp(e.t))}function Vp(e,t,n){var r=Wp(t)?Yt("MapSet").F(t,n):$p(t)?Yt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Up(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ds;s&&(l=[a],u=Ns);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Yt("ES5").J(t,n);return(n?n.A:Up()).p.push(r),r}function hb(e){return mn(e)||St(22,e),function t(n){if(!Nt(n))return n;var r,o=n[le],i=Wo(n);if(o){if(!o.P&&(o.i<4||!Yt("ES5").K(o)))return o.t;o.I=!0,r=jS(n,i),o.I=!1}else r=jS(n,i);return zr(r,function(s,a){o&&fb(o.t,s)===a||zS(r,s,t(a))}),i===3?new Set(r):r}(e)}function jS(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return qp(e)}function KS(){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 Ds.get(u,s)},set:function(u){var c=this[le];Ds.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)&&ar(l);break;case 4:n(l)&&ar(l)}}}function n(s){for(var a=s.t,l=s.k,u=Ko(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!Vo(a,p))return!0;var h=l[p],y=h&&h[le];if(y?y.t!==d:!VS(h,d))return!0}}var v=!!a[le];return u.length!==Ko(a).length+(v?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&&St(3,JSON.stringify(sr(s)))}var i={};mb("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(h,""+y,e(y,!0));return h}var v=$S(d);delete v[le];for(var g=Ko(v),m=0;m<g.length;m++){var f=g[m];v[f]=e(f,p||!!v[f].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:Up(),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?mn(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,y=p.R,v=p.i;if(v===4)zr(h,function(x){x!==le&&(d[x]!==void 0||Vo(d,x)?y[x]||u(h[x]):(y[x]=!0,ar(p)))}),zr(d,function(x){h[x]!==void 0||Vo(h,x)||(y[x]=!1,ar(p))});else if(v===5){if(r(p)&&(ar(p),y.length=!0),h.length<d.length)for(var g=h.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<h.length;m++)y[m]=!0;for(var f=Math.min(h.length,d.length),w=0;w<f;w++)h.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&u(h[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var HS,Ms,Qp=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yb=typeof Map<"u",vb=typeof Set<"u",BS=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",WS=Qp?Symbol.for("immer-nothing"):((HS={})["immer-nothing"]=!0,HS),US=Qp?Symbol.for("immer-draftable"):"__$immer_draftable",le=Qp?Symbol.for("immer-state"):"__$immer_state";var Sb=""+Object.prototype.constructor,Ko=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$S=Object.getOwnPropertyDescriptors||function(e){var t={};return Ko(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Kp={},Ds={get:function(e,t){if(t===le)return e;var n=sr(e);if(!Vo(n,t))return function(o,i,s){var a,l=FS(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||!Nt(r)?r:r===Hp(e.t,t)?(Bp(e),e.o[t]=Vp(e.A.h,r,e)):r},has:function(e,t){return t in sr(e)},ownKeys:function(e){return Reflect.ownKeys(sr(e))},set:function(e,t,n){var r=FS(sr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Hp(sr(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(VS(n,o)&&(n!==void 0||Vo(e.t,t)))return!0;Bp(e),ar(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 Hp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bp(e),ar(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=sr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){St(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){St(12)}},Ns={};zr(Ds,function(e,t){Ns[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ns.deleteProperty=function(e,t){return Ns.set.call(this,e,t,void 0)},Ns.set=function(e,t,n){return Ds.set.call(this,e[0],t,n,e[0])};var wb=function(){function e(n){var r=this;this.O=BS,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(v){var g=this;v===void 0&&(v=a);for(var m=arguments.length,f=Array(m>1?m-1:0),w=1;w<m;w++)f[w-1]=arguments[w];return l.produce(v,function(x){var T;return(T=i).call.apply(T,[g,x].concat(f))})}}var u;if(typeof i!="function"&&St(6),s!==void 0&&typeof s!="function"&&St(7),Nt(o)){var c=MS(r),p=Vp(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?nu(c):zp(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Fp(c,s),jp(v,c)},function(v){throw nu(c),v}):(Fp(c,s),jp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===WS&&(u=void 0),r.D&&Gp(u,!0),s){var h=[],y=[];Yt("Patches").M(o,u,h,y),s(h,y)}return u}St(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){Nt(n)||St(8),mn(n)&&(n=hb(n));var r=MS(this),o=Vp(this,n,void 0);return o[le].C=!0,zp(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Fp(i,r),jp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!BS&&St(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=Yt("Patches").$;return mn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),tt=new wb,xb=tt.produce,HL=tt.produceWithPatches.bind(tt),BL=tt.setAutoFreeze.bind(tt),UL=tt.setUseProxies.bind(tt),zL=tt.applyPatches.bind(tt),VL=tt.createDraft.bind(tt),KL=tt.finishDraft.bind(tt),iu=xb;function lr(e){"@babel/helpers - typeof";return lr=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},lr(e)}function Yp(e,t){if(lr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zp(e){var t=Yp(e,"string");return lr(t)==="symbol"?t:String(t)}function Jp(e,t,n){return t=Zp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qS(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 su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qS(Object(n),!0).forEach(function(r){Jp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(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 GS=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),em=function(){return Math.random().toString(36).substring(7).split("").join(".")},au={INIT:"@@redux/INIT"+em(),REPLACE:"@@redux/REPLACE"+em(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+em()}};function Eb(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function tm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(tm)(e,t)}if(typeof e!="function")throw new Error(Ne(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(Ne(3));return i}function p(v){if(typeof v!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(v),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var f=a.indexOf(v);a.splice(f,1),s=null}}}function d(v){if(!Eb(v))throw new Error(Ne(7));if(typeof v.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var f=g[m];f()}return v}function h(v){if(typeof v!="function")throw new Error(Ne(10));o=v,d({type:au.REPLACE})}function y(){var v,g=p;return v={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Ne(11));function w(){f.next&&f.next(c())}w();var x=g(w);return{unsubscribe:x}}},v[GS]=function(){return this},v}return d({type:au.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[GS]=y,r}function Cb(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:au.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:au.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function lu(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{Cb(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={},y=0;y<i.length;y++){var v=i[y],g=n[v],m=u[v],f=g(m,c);if(typeof f>"u"){var w=c&&c.type;throw new Error(Ne(14))}h[v]=f,d=d||f!==m}return d=d||i.length!==Object.keys(u).length,d?h:u}}function $o(){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 XS(){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(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=$o.apply(void 0,a)(o.dispatch),su(su({},o),{},{dispatch:i})}}}function QS(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 YS=QS();YS.withExtraArgument=QS;var nm=YS;var nw=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)}}(),Tb=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}}},qo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},_b=Object.defineProperty,bb=Object.defineProperties,kb=Object.getOwnPropertyDescriptors,ZS=Object.getOwnPropertySymbols,Pb=Object.prototype.hasOwnProperty,Rb=Object.prototype.propertyIsEnumerable,JS=function(e,t,n){return t in e?_b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ur=function(e,t){for(var n in t||(t={}))Pb.call(t,n)&&JS(e,n,t[n]);if(ZS)for(var r=0,o=ZS(t);r<o.length;r++){var n=o[r];Rb.call(t,n)&&JS(e,n,t[n])}return e},rm=function(e,t){return bb(e,kb(t))},Ib=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 Lb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)},lA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ab(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 Ob=function(e){nw(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,qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,qo([void 0],n.concat(this))))},t}(Array),Nb=function(e){nw(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,qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,qo([void 0],n.concat(this))))},t}(Array);function sm(e){return Nt(e)?iu(e,function(){}):e}function Mb(e){return typeof e=="boolean"}function Db(){return function(t){return Fb(t)}}function Fb(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 Ob;if(n&&(Mb(n)?a.push(nm):a.push(nm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var om=!0;function rw(e){var t=Db(),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(Ab(o))h=lu(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 y=s;if(typeof y=="function"&&(y=y(t),!om&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!om&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=XS.apply(void 0,y),g=$o;l&&(g=Lb(ur({trace:!om},typeof l=="object"&&l)));var m=new Nb(v),f=m;Array.isArray(d)?f=qo([v],d):typeof d=="function"&&(f=d(m));var w=g.apply(void 0,f);return tm(h,c,w)}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 ur(ur({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 ow(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 jb(e){return typeof e=="function"}function Hb(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?ow(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(jb(e))l=function(){return sm(e())};else{var u=sm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=qo([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return h.filter(function(y){return!!y}).length===0&&(h=[a]),h.reduce(function(y,v){if(v)if(mn(y)){var g=y,m=v(g,d);return m===void 0?y:m}else{if(Nt(y))return iu(y,function(f){return v(f,d)});var m=v(y,d);if(m===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return y},p)}return c.getInitialState=l,c}function Bb(e,t){return e+"/"+t}function F(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:sm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=Bb(t,c),h,y;"reducer"in p?(h=p.reducer,y=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=y?fe(d,y):fe(d)});function l(){var c=typeof e.extraReducers=="function"?ow(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],y=h===void 0?[]:h,v=c[2],g=v===void 0?void 0:v,m=ur(ur({},d),s);return Hb(n,function(f){for(var w in m)f.addCase(w,m[w]);for(var x=0,T=y;x<T.length;x++){var E=T[x];f.addMatcher(E.matcher,E.reducer)}g&&f.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var Ub="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zb=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Ub[Math.random()*64|0];return t},Vb=["name","message","stack","code"],im=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),ew=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Kb=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Vb;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},N=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:rm(ur({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:rm(ur({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,y){return{payload:h,error:(r&&r.serializeError||Kb)(c||"Rejected"),meta:rm(ur({},y||{}),{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 y=r!=null&&r.idGenerator?r.idGenerator(c):zb(),v=new l,g,m=!1;function f(x){g=x,v.abort()}var w=function(){return Ib(this,null,function(){var x,T,E,_,R,b,B;return Tb(this,function(re){switch(re.label){case 0:return re.trys.push([0,4,,5]),_=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:h}),$b(_)?[4,_]:[3,2];case 1:_=re.sent(),re.label=2;case 2:if(_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(z,Pe){return v.signal.addEventListener("abort",function(){return Pe({name:"AbortError",message:g||"Aborted"})})}),p(i(y,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:y,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:y,signal:v.signal,abort:f,rejectWithValue:function(z,Pe){return new im(z,Pe)},fulfillWithValue:function(z,Pe){return new ew(z,Pe)}})).then(function(z){if(z instanceof im)throw z;return z instanceof ew?o(z.payload,y,c,z.meta):o(z,y,c)})])];case 3:return E=re.sent(),[3,5];case 4:return b=re.sent(),E=b instanceof im?s(null,y,c,b.payload,b.meta):s(b,y,c),[3,5];case 5:return B=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,B||p(E),[2,E]}})})}();return Object.assign(w,{abort:f,requestId:y,arg:c,unwrap:function(){return w.then(Wb)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Wb(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $b(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qb="task",iw="listener",sw="completed",am="cancelled",fA="task-"+am,pA="task-"+sw,mA=iw+"-"+am,gA=iw+"-"+sw,hA=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=qb+" "+am+" (reason: "+t+")"}return e}();var lm="listenerMiddleware";var yA=fe(lm+"/add"),vA=fe(lm+"/removeAll"),SA=fe(lm+"/remove");var tw,wA=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(tw||(tw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Gb=function(e){return function(t){setTimeout(t,e)}},xA=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gb(10);KS();var Gw=S(cm()),Xw=S(pw());var dm=S(tu());function fk(e){e()}var mw=fk,gw=e=>mw=e,hw=()=>mw;var Xo=S(O());var Sw=S(O());var cu=S(O()),yw=Symbol.for(`react-redux-context-${cu.version}`),vw=globalThis;function pk(){let e=vw[yw];return e||(e=(0,cu.createContext)(null),vw[yw]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=pk();return(r,...o)=>Reflect[t](n,...o)}}));function Fs(e=Me){return function(){return(0,Sw.useContext)(e)}}var du=Fs();var fu=()=>{throw new Error("uSES not initialized!")};var ww=fu,xw=e=>{ww=e},mk=(e,t)=>e===t;function Ew(e=Me){let t=e===Me?du:Fs(e);return function(r,o={}){let{equalityFn:i=mk,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,Xo.useRef)(!0),y=(0,Xo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),v=ww(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Xo.useDebugValue)(v),v}}var A=Ew();function gn(){return gn=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},gn.apply(this,arguments)}function js(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 xm=S(Ow()),Y=S(O()),Kw=S(Fw());var Ik=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Lk(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,w){return l=f,u=w,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let f=e(l,u),w=!s(f,c);return c=f,w&&(d=n(c,p,u)),d}function m(f,w){let x=!i(w,u),T=!o(f,l,w,u);return l=f,u=w,x&&T?y():x?v():T?g():d}return function(w,x){return a?m(w,x):h(w,x)}}function Sm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=js(t,Ik),s=n(e,i),a=r(e,i),l=o(e,i);return Lk(s,a,l,e,i)}function wm(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Hs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function jw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ou(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=jw(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=jw(u),u=i(a,l)),u},i}}function Qo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Hw(e){return e&&typeof e=="object"?Hs(t=>wm(e,t)):e?typeof e=="function"?Ou(e,"mapDispatchToProps"):Qo(e,"mapDispatchToProps"):Hs(t=>({dispatch:t}))}function Bw(e){return e?typeof e=="function"?Ou(e,"mapStateToProps"):Qo(e,"mapStateToProps"):Hs(()=>({}))}function Ak(e,t,n){return gn({},n,e,t)}function Ok(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 Uw(e){return e?typeof e=="function"?Ok(e):Qo(e,"mergeProps"):()=>Ak}function Nk(){let e=hw(),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 zw={notify(){},get:()=>[]};function Nu(e,t){let n,r=zw;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=Nk())}function u(){n&&(n(),n=void 0,r.clear(),r=zw)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Mu=S(O()),Mk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yo=Mk?Mu.useLayoutEffect:Mu.useEffect;function Vw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Zo(e,t){if(Vw(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])||!Vw(e[n[o]],t[n[o]]))return!1;return!0}var Dk=["reactReduxForwardedRef"],Ww=fu,$w=e=>{Ww=e};var Fk=[null,null];function jk(e,t,n){Yo(()=>e(...t),n)}function Hk(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Bk(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 v=t.getState(),g,m;try{g=r(v,o.current)}catch(f){m=f,d=f}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function Uk(e,t){return e===t}function zk(e,t,n,{pure:r,areStatesEqual:o=Uk,areOwnPropsEqual:i=Zo,areStatePropsEqual:s=Zo,areMergedPropsEqual:a=Zo,forwardRef:l=!1,context:u=Me}={}){let c=u,p=Bw(e),d=Hw(t),h=Uw(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",f=`Connect(${m})`,w={shouldHandleStateChanges:y,displayName:f,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(_){let[R,b,B]=(0,Y.useMemo)(()=>{let{reactReduxForwardedRef:ct}=_,br=js(_,Dk);return[_.context,ct,br]},[_]),re=(0,Y.useMemo)(()=>R&&R.Consumer&&(0,Kw.isContextConsumer)(Y.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Y.useContext)(re),Pe=!!_.store&&!!_.store.getState&&!!_.store.dispatch,so=!!z&&!!z.store,Vt=Pe?_.store:z.store,ao=so?z.getServerState:Vt.getState,Ii=(0,Y.useMemo)(()=>Sm(Vt.dispatch,w),[Vt]),[Tr,Fa]=(0,Y.useMemo)(()=>{if(!y)return Fk;let ct=Nu(Vt,Pe?void 0:z.subscription),br=ct.notifyNestedSubs.bind(ct);return[ct,br]},[Vt,Pe,z]),ja=(0,Y.useMemo)(()=>Pe?z:gn({},z,{subscription:Tr}),[Pe,z,Tr]),Li=(0,Y.useRef)(),Ai=(0,Y.useRef)(B),on=(0,Y.useRef)(),Oi=(0,Y.useRef)(!1),_r=(0,Y.useRef)(!1),I=(0,Y.useRef)(!1),W=(0,Y.useRef)();Yo(()=>(I.current=!0,()=>{I.current=!1}),[]);let It=(0,Y.useMemo)(()=>()=>on.current&&B===Ai.current?on.current:Ii(Vt.getState(),B),[Vt,B]),Dn=(0,Y.useMemo)(()=>br=>Tr?Bk(y,Vt,Tr,Ii,Ai,Li,Oi,I,on,Fa,br):()=>{},[Tr]);jk(Hk,[Ai,Li,Oi,B,on,Fa]);let sn;try{sn=Ww(Dn,It,ao?()=>Ii(ao(),B):It)}catch(ct){throw W.current&&(ct.message+=`
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}be!==5&&(be=2),l=zp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=ew(d,i,t);dv(d,T);break e;case 1:i=l;var E=d.type,_=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Qt===null||!Qt.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=tw(d,i,t);dv(d,R);break e}}d=d.return}while(d!==null)}uw(n)}catch(k){t=k,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function aw(){var e=lu.current;return lu.current=au,e===null?au:e}function us(e,t){var n=D;D|=16;var r=aw();He===e&&Ae===t||Mo(e,t);do try{Rb();break}catch(o){sw(e,o)}while(1);if(Ap(),D=n,lu.current=r,ve!==null)throw Error(b(261));return He=null,Ae=0,be}function Rb(){for(;ve!==null;)lw(ve)}function Ib(){for(;ve!==null&&!db();)lw(ve)}function lw(e){var t=dw(e.alternate,e,zr);e.memoizedProps=e.pendingProps,t===null?uw(e):ve=t,Vp.current=null}function uw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=xb(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wb(n,t,zr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||zr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);be===0&&(be=5)}function Or(e){var t=Ho();return Ur(99,Lb.bind(null,e,t)),null}function Lb(e,t){do lr();while(Ss!==null);if(D&48)throw Error(b(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(b(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(pn!==null&&!(r&24)&&pn.has(e)&&pn.delete(e),e===He&&(ve=He=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=D,D|=32,Vp.current=null,lf=Ol,s=Zy(),Mf(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,g=null;t:for(;;){for(var m;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(m=y.firstChild)!==null;)g=y,y=m;for(;;){if(y===s)break t;if(g===a&&++h===i&&(p=c),g===l&&++v===u&&(d=c),(m=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;uf={focusedElem:s,selectionRange:a},Ol=!1,xs=null,Bl=!1,L=r;do try{Ab()}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);xs=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&Cs(L.stateNode,""),f&128){var w=L.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(f&1038){case 2:Dv(L),L.flags&=-3;break;case 6:Dv(L),L.flags&=-3,hf(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,hf(L.alternate,L);break;case 4:hf(L.alternate,L);break;case 8:a=L,nw(s,a);var T=a.alternate;Nv(a),T!==null&&Nv(T)}L=L.nextEffect}}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);if(x=uf,w=Zy(),f=x.focusedElem,s=x.selectionRange,w!==f&&f&&f.ownerDocument&&wS(f.ownerDocument.documentElement,f)){for(s!==null&&Mf(f)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in f?(f.selectionStart=w,f.selectionEnd=Math.min(x,f.value.length)):(x=(w=f.ownerDocument||document)&&w.defaultView||window,x.getSelection&&(x=x.getSelection(),a=f.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!x.extend&&T>s&&(a=s,s=T,T=a),a=Yy(f,T),i=Yy(f,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=f;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<w.length;f++)x=w[f],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Ol=!!lf,uf=lf=null,e.current=n,L=r;do try{for(f=e;L!==null;){var E=L.flags;if(E&36&&_b(f,L.alternate,L),E&128){w=void 0;var _=L.ref;if(_!==null){var R=L.stateNode;switch(L.tag){case 5:w=R;break;default:w=R}typeof _=="function"?_(w):_.current=w}}L=L.nextEffect}}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);L=null,pb(),D=o}else e.current=n;if(ir)ir=!1,Ss=e,ls=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(E=L,E.sibling=null,E.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Qt=null),r===1?e===op?ws++:(ws=0,op=e):ws=0,n=n.stateNode,Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(Ip,n,void 0,(n.current.flags&64)===64)}catch{}if(xt(e,Le()),uu)throw uu=!1,e=tp,tp=null,e;return D&8||Zt(),null}function Ab(){for(;L!==null;){var e=L.alternate;Bl||xs===null||(L.flags&8?jy(L,xs)&&(Bl=!0):L.tag===13&&bb(e,L)&&jy(L,xs)&&(Bl=!0));var t=L.flags;t&256&&Tb(e,L),!(t&512)||ir||(ir=!0,Ls(97,function(){return lr(),null})),L=L.nextEffect}}function lr(){if(ls!==90){var e=97<ls?97:ls;return ls=90,Ur(e,Nb)}return!1}function Ob(e,t){np.push(t,e),ir||(ir=!0,Ls(97,function(){return lr(),null}))}function cw(e,t){rp.push(t,e),ir||(ir=!0,Ls(97,function(){return lr(),null}))}function Nb(){if(Ss===null)return!1;var e=Ss;if(Ss=null,D&48)throw Error(b(331));var t=D;D|=32;var n=rp;rp=[];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(b(330));tr(i,l)}}for(n=np,np=[],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(b(330));tr(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return D=t,Zt(),!0}function jv(e,t,n){t=zp(n,t),t=ew(e,t,1),Zn(e,t),t=et(),e=Cu(e,1),e!==null&&(gu(e,1,t),xt(e,t))}function tr(e,t){if(e.tag===3)jv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){jv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r))){e=zp(t,e);var o=tw(n,e,1);if(Zn(n,o),o=et(),n=Cu(n,1),n!==null)gu(n,1,o),xt(n,o);else if(typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function Mb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Ae&n)===n&&(be===4||be===3&&(Ae&62914560)===Ae&&500>Le()-Wp?Mo(e,0):Kp|=n),xt(e,t)}function Db(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(cn===0&&(cn=Vo),t=wo(62914560&~cn),t===0&&(t=4194304)):t=Ho()===99?1:2:t=1),n=et(),e=Cu(e,t),e!==null&&(gu(e,t,n),xt(e,n))}var dw;dw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:Tv(t),pf();break;case 5:gv(t);break;case 1:qe(t.type)&&Dl(t);break;case 4:Vf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(Yl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?_v(e,t,n):(de(ce,ce.current&1),t=fn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Iv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,mf(e,t,n)}return fn(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=jo(t,Oe.current),Ao(t,n),o=jp(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)){var i=!0;Dl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Np(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&eu(t,r,s,e),o.updater=xu,t.stateNode=o,o._reactInternals=t,zf(t,r,e,n),t=qf(null,t,r,!0,i,n)}else t.tag=0,We(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=jb(o),e=Nt(o,e),i){case 0:t=$f(null,t,o,e,n);break e;case 1:t=Cv(null,t,o,e,n);break e;case 11:t=xv(null,t,o,e,n);break e;case 14:t=Ev(null,t,o,Nt(o.type,e),r,n);break e}throw Error(b(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),$f(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Cv(e,t,r,o,n);case 3:if(Tv(t),r=t.updateQueue,e===null||r===null)throw Error(b(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,DS(e,t),As(t,r,null,n),r=t.memoizedState.element,r===o)pf(),t=fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Lo(t.stateNode.containerInfo.firstChild),dn=t,i=Yt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Oo.push(i);for(n=BS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),pf();t=t.child}return t;case 5:return gv(t),e===null&&Kf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,jf(r,o)?s=null:i!==null&&jf(r,i)&&(t.flags|=16),XS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&Kf(t),null;case 13:return _v(e,t,n);case 4:return Vf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),xv(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(de(Yl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=fn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),MS(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ao(t,n),o=wt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),Ev(e,t,o,i,r,n);case 15:return QS(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,qe(r)?(e=!0,Dl(t)):e=!1,Ao(t,n),jS(t,r,o),zf(t,r,o,n),qf(null,t,r,!0,e,n);case 19:return Iv(e,t,n);case 23:return mf(e,t,n);case 24:return mf(e,t,n)}throw Error(b(156,t.tag))};function Fb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,n,r){return new Fb(e,t,n,r)}function qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jb(e){if(typeof e=="function")return qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fu)return 11;if(e===pu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ul(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")qp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Kn:return Do(n.children,o,i,t);case Uv:s=8,o|=16;break;case up:s=8,o|=1;break;case cs:return e=vt(12,n,t,o|8),e.elementType=cs,e.type=cs,e.lanes=i,e;case ds:return e=vt(13,n,t,o),e.type=ds,e.elementType=ds,e.lanes=i,e;case zl:return e=vt(19,n,t,o),e.elementType=zl,e.lanes=i,e;case gp:return Gp(n,o,i,t);case wf:return e=vt(24,n,t,o),e.elementType=wf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cp:s=10;break e;case dp:s=9;break e;case fu:s=11;break e;case pu:s=14;break e;case fp:s=16,r=null;break e;case pp:s=22;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Do(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Gp(e,t,n,r){return e=vt(23,e,r,t),e.elementType=gp,e.lanes=n,e}function yf(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function vf(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hb(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=tf(0),this.expirationTimes=tf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tf(0),this.mutableSourceEagerHydrationData=null}function Bb(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cu(e,t,n,r){var o=t.current,i=et(),s=Jn(o);e:if(n){n=n._reactInternals;t:{if(Wr(n)!==n||n.tag!==1)throw Error(b(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(qe(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(b(171))}if(n.tag===1){var l=n.type;if(qe(l)){n=kS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function Sf(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 Hv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qp(e,t){Hv(e,t),(e=e.alternate)&&Hv(e,t)}function Ub(){return null}function Xp(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new Hb(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Np(t),e[zo]=n.current,CS(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}Xp.prototype.render=function(e){cu(e,this._internalRoot,null,null)};Xp.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;cu(null,e,null,function(){t[zo]=null})};function Bs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zb(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 Xp(e,0,t?{hydrate:!0}:void 0)}function Tu(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=Sf(s);a.call(u)}}cu(t,s,e,o)}else{if(i=n._reactRootContainer=zb(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Sf(s);l.call(u)}}iw(function(){cu(t,s,e,o)})}return Sf(s)}nS=function(e){if(e.tag===13){var t=et();er(e,4,t),Qp(e,4)}};wp=function(e){if(e.tag===13){var t=et();er(e,67108864,t),Qp(e,67108864)}};rS=function(e){if(e.tag===13){var t=et(),n=Jn(e);er(e,n,t),Qp(e,n)}};oS=function(e,t){return t()};If=function(e,t,n){switch(t){case"input":if(Ef(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=Su(r);if(!o)throw Error(b(90));Vv(r),Ef(r,o)}}}break;case"textarea":Wv(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};yp=ow;Zv=function(e,t,n,r,o){var i=D;D|=4;try{return Ur(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(Wo(),Zt())}};vp=function(){!(D&49)&&(kb(),lr())};Jv=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}};function fw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bs(t))throw Error(b(200));return Bb(e,t,null,n)}var Vb={Events:[Fs,To,Su,Xv,Yv,lr,{current:!1}]},rs={findFiberByHostInstance:Dr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Kb={bundleType:rs.bundleType,version:rs.version,rendererPackageName:rs.rendererPackageName,rendererConfig:rs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Kr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tS(e),e===null?null:e.stateNode},findFiberByHostInstance:rs.findFiberByHostInstance||Ub,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(os=__REACT_DEVTOOLS_GLOBAL_HOOK__,!os.isDisabled&&os.supportsFiber))try{Ip=os.inject(Kb),Hr=os}catch{}var os;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vb;Et.createPortal=fw;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(b(188)):Error(b(268,Object.keys(e)));return e=tS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Ur(99,e.bind(null,t))}finally{D=n,Zt()}};Et.hydrate=function(e,t,n){if(!Bs(t))throw Error(b(200));return Tu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Bs(t))throw Error(b(200));return Tu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Bs(e))throw Error(b(40));return e._reactRootContainer?(iw(function(){Tu(null,null,e,!1,function(){e._reactRootContainer=null,e[zo]=null})}),!0):!1};Et.unstable_batchedUpdates=ow;Et.unstable_createPortal=function(e,t){return fw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bs(n))throw Error(b(200));if(e==null||e._reactInternals===void 0)throw Error(b(38));return Tu(e,t,n,!1,r)};Et.version="17.0.2"});var _u=pe((DO,gw)=>{"use strict";function mw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mw)}catch(e){console.error(e)}}mw(),gw.exports=pw()});var Vw=pe(zw=>{"use strict";var Yo=O();function kP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var RP=typeof Object.is=="function"?Object.is:kP,IP=Yo.useState,LP=Yo.useEffect,AP=Yo.useLayoutEffect,OP=Yo.useDebugValue;function NP(e,t){var n=t(),r=IP({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return AP(function(){o.value=n,o.getSnapshot=t,Cm(o)&&i({inst:o})},[e,n,t]),LP(function(){return Cm(o)&&i({inst:o}),e(function(){Cm(o)&&i({inst:o})})},[e]),OP(n),n}function Cm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!RP(e,n)}catch{return!0}}function MP(e,t){return t()}var DP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?MP:NP;zw.useSyncExternalStore=Yo.useSyncExternalStore!==void 0?Yo.useSyncExternalStore:DP});var Tm=pe((CN,Kw)=>{"use strict";Kw.exports=Vw()});var $w=pe(Ww=>{"use strict";var Ou=O(),FP=Tm();function jP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var HP=typeof Object.is=="function"?Object.is:jP,BP=FP.useSyncExternalStore,UP=Ou.useRef,zP=Ou.useEffect,VP=Ou.useMemo,KP=Ou.useDebugValue;Ww.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=UP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=VP(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,HP(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=BP(e,i[0],i[1]);return zP(function(){s.hasValue=!0,s.value=a},[a]),KP(a),a}});var Gw=pe((_N,qw)=>{"use strict";qw.exports=$w()});var i0=pe(G=>{"use strict";var xe=typeof Symbol=="function"&&Symbol.for,bm=xe?Symbol.for("react.element"):60103,Pm=xe?Symbol.for("react.portal"):60106,Fu=xe?Symbol.for("react.fragment"):60107,ju=xe?Symbol.for("react.strict_mode"):60108,Hu=xe?Symbol.for("react.profiler"):60114,Bu=xe?Symbol.for("react.provider"):60109,Uu=xe?Symbol.for("react.context"):60110,km=xe?Symbol.for("react.async_mode"):60111,zu=xe?Symbol.for("react.concurrent_mode"):60111,Vu=xe?Symbol.for("react.forward_ref"):60112,Ku=xe?Symbol.for("react.suspense"):60113,GP=xe?Symbol.for("react.suspense_list"):60120,Wu=xe?Symbol.for("react.memo"):60115,$u=xe?Symbol.for("react.lazy"):60116,QP=xe?Symbol.for("react.block"):60121,XP=xe?Symbol.for("react.fundamental"):60117,YP=xe?Symbol.for("react.responder"):60118,ZP=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bm:switch(e=e.type,e){case km:case zu:case Fu:case Hu:case ju:case Ku:return e;default:switch(e=e&&e.$$typeof,e){case Uu:case Vu:case $u:case Wu:case Bu:return e;default:return t}}case Pm:return t}}}function o0(e){return rt(e)===zu}G.AsyncMode=km;G.ConcurrentMode=zu;G.ContextConsumer=Uu;G.ContextProvider=Bu;G.Element=bm;G.ForwardRef=Vu;G.Fragment=Fu;G.Lazy=$u;G.Memo=Wu;G.Portal=Pm;G.Profiler=Hu;G.StrictMode=ju;G.Suspense=Ku;G.isAsyncMode=function(e){return o0(e)||rt(e)===km};G.isConcurrentMode=o0;G.isContextConsumer=function(e){return rt(e)===Uu};G.isContextProvider=function(e){return rt(e)===Bu};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bm};G.isForwardRef=function(e){return rt(e)===Vu};G.isFragment=function(e){return rt(e)===Fu};G.isLazy=function(e){return rt(e)===$u};G.isMemo=function(e){return rt(e)===Wu};G.isPortal=function(e){return rt(e)===Pm};G.isProfiler=function(e){return rt(e)===Hu};G.isStrictMode=function(e){return rt(e)===ju};G.isSuspense=function(e){return rt(e)===Ku};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fu||e===zu||e===Hu||e===ju||e===Ku||e===GP||typeof e=="object"&&e!==null&&(e.$$typeof===$u||e.$$typeof===Wu||e.$$typeof===Bu||e.$$typeof===Uu||e.$$typeof===Vu||e.$$typeof===XP||e.$$typeof===YP||e.$$typeof===ZP||e.$$typeof===QP)};G.typeOf=rt});var a0=pe((HN,s0)=>{"use strict";s0.exports=i0()});var m0=pe((BN,p0)=>{"use strict";var Rm=a0(),JP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ek={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tk={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},d0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Im={};Im[Rm.ForwardRef]=tk;Im[Rm.Memo]=d0;function l0(e){return Rm.isMemo(e)?d0:Im[e.$$typeof]||JP}var nk=Object.defineProperty,rk=Object.getOwnPropertyNames,u0=Object.getOwnPropertySymbols,ok=Object.getOwnPropertyDescriptor,ik=Object.getPrototypeOf,c0=Object.prototype;function f0(e,t,n){if(typeof t!="string"){if(c0){var r=ik(t);r&&r!==c0&&f0(e,r,n)}var o=rk(t);u0&&(o=o.concat(u0(t)));for(var i=l0(e),s=l0(t),a=0;a<o.length;++a){var l=o[a];if(!ek[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=ok(t,l);try{nk(e,l,u)}catch{}}}}return e}p0.exports=f0});var h0=pe(Q=>{"use strict";var Lm=Symbol.for("react.element"),Am=Symbol.for("react.portal"),qu=Symbol.for("react.fragment"),Gu=Symbol.for("react.strict_mode"),Qu=Symbol.for("react.profiler"),Xu=Symbol.for("react.provider"),Yu=Symbol.for("react.context"),sk=Symbol.for("react.server_context"),Zu=Symbol.for("react.forward_ref"),Ju=Symbol.for("react.suspense"),ec=Symbol.for("react.suspense_list"),tc=Symbol.for("react.memo"),nc=Symbol.for("react.lazy"),ak=Symbol.for("react.offscreen"),g0;g0=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lm:switch(e=e.type,e){case qu:case Qu:case Gu:case Ju:case ec:return e;default:switch(e=e&&e.$$typeof,e){case sk:case Yu:case Zu:case nc:case tc:case Xu:return e;default:return t}}case Am:return t}}}Q.ContextConsumer=Yu;Q.ContextProvider=Xu;Q.Element=Lm;Q.ForwardRef=Zu;Q.Fragment=qu;Q.Lazy=nc;Q.Memo=tc;Q.Portal=Am;Q.Profiler=Qu;Q.StrictMode=Gu;Q.Suspense=Ju;Q.SuspenseList=ec;Q.isAsyncMode=function(){return!1};Q.isConcurrentMode=function(){return!1};Q.isContextConsumer=function(e){return Tt(e)===Yu};Q.isContextProvider=function(e){return Tt(e)===Xu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm};Q.isForwardRef=function(e){return Tt(e)===Zu};Q.isFragment=function(e){return Tt(e)===qu};Q.isLazy=function(e){return Tt(e)===nc};Q.isMemo=function(e){return Tt(e)===tc};Q.isPortal=function(e){return Tt(e)===Am};Q.isProfiler=function(e){return Tt(e)===Qu};Q.isStrictMode=function(e){return Tt(e)===Gu};Q.isSuspense=function(e){return Tt(e)===Ju};Q.isSuspenseList=function(e){return Tt(e)===ec};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qu||e===Qu||e===Gu||e===Ju||e===ec||e===ak||typeof e=="object"&&e!==null&&(e.$$typeof===nc||e.$$typeof===tc||e.$$typeof===Xu||e.$$typeof===Yu||e.$$typeof===Zu||e.$$typeof===g0||e.getModuleId!==void 0)};Q.typeOf=Tt});var v0=pe((zN,y0)=>{"use strict";y0.exports=h0()});var sx=pe((W2,ix)=>{"use strict";var Hk=/["'&<>]/;ix.exports=Bk;function Bk(e){var t=""+e,n=Hk.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 Pg=pe((Z4,OE)=>{"use strict";var RR="Expected a function",LE=NaN,IR="[object Symbol]",LR=/^\s+|\s+$/g,AR=/^[-+]0x[0-9a-f]+$/i,OR=/^0b[01]+$/i,NR=/^0o[0-7]+$/i,MR=parseInt,DR=typeof global=="object"&&global&&global.Object===Object&&global,FR=typeof self=="object"&&self&&self.Object===Object&&self,jR=DR||FR||Function("return this")(),HR=Object.prototype,BR=HR.toString,UR=Math.max,zR=Math.min,_g=function(){return jR.Date.now()};function VR(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(RR);t=AE(t)||0,bg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?UR(AE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var _=r,R=o;return r=o=void 0,u=E,s=e.apply(R,_),s}function v(E){return u=E,a=setTimeout(m,t),c?h(E):s}function y(E){var _=E-l,R=E-u,k=t-_;return p?zR(k,i-R):k}function g(E){var _=E-l,R=E-u;return l===void 0||_>=t||_<0||p&&R>=i}function m(){var E=_g();if(g(E))return f(E);a=setTimeout(m,y(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:f(_g())}function T(){var E=_g(),_=g(E);if(r=arguments,o=this,l=E,_){if(a===void 0)return v(l);if(p)return a=setTimeout(m,t),h(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=w,T.flush=x,T}function bg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function KR(e){return!!e&&typeof e=="object"}function WR(e){return typeof e=="symbol"||KR(e)&&BR.call(e)==IR}function AE(e){if(typeof e=="number")return e;if(WR(e))return LE;if(bg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(LR,"");var n=OR.test(e);return n||NR.test(e)?MR(e.slice(2),n?2:8):AR.test(e)?LE:+e}OE.exports=VR});var IL={};Te(IL,{Card:()=>me,Chip:()=>ty,ContentEditableInput:()=>io,DeepdeskAPI:()=>Dn,DeepdeskSDK:()=>Da,InputMediator:()=>Sn,InputType:()=>Un,KeyboardHint:()=>ul,Label:()=>cl,Locale:()=>Gs,Section:()=>Hn,SectionList:()=>dl,Sources:()=>Bn,Suggestion:()=>oe,SuggestionList:()=>Wt,TextAreaInput:()=>wn,ToggleButton:()=>Lr,attachFile:()=>e1,authenticateWithKey:()=>ZT,createOverlayContainer:()=>di,createRangeFromOffsets:()=>oo,escapeHTML:()=>Ei,fetchPlatformConfig:()=>JT,formatTextMarkup:()=>YT,getRangeOffsets:()=>gd,getRangeText:()=>Oa,isSupportedInputElement:()=>vd,updateContentEditable:()=>XT,updateTextArea:()=>QT,useStyles:()=>P,waitForElementVisibilityChange:()=>Sd});var Wa=S(X()),pt=S(O());var Ka=S(O()),Fh=S(X()),Di=Ka.default.createContext({});function P(e,t){let r=(0,Ka.useContext)(Di)[e];return r?Object.entries(t).reduce((o,[i,s])=>{let a=r[i];return{...o,[i]:(0,Fh.default)(s,a)}},{}):t}var jh={root:"_root_vr71j_1"};var kr=S(C()),Vh=()=>(0,kr.jsxs)("svg",{className:jh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,kr.jsx)("defs",{children:(0,kr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,kr.jsx)("title",{children:"Failed loading image"}),(0,kr.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 Pd={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 Rr=S(C()),$a=(0,pt.createContext)(Pd),w1=({title:e,src:t})=>{let n=(0,pt.useContext)($a),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Rr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Rr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Rr.jsx)(Vh,{})})},x1=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)($a);return(0,Rr.jsx)("div",{className:(0,Wa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},E1=({as:e="h1",cropText:t=!1,className:n,children:r})=>{let o=(0,pt.useContext)($a);return pt.default.createElement(e,{className:(0,Wa.default)(o.title,n,{[o.contentIsCropped]:t})},r)},qa=({children:e})=>{let t=P("Card",Pd);return(0,Rr.jsx)("div",{className:(0,Wa.default)(t.root),children:(0,Rr.jsx)($a.Provider,{value:t,children:e})})};qa.Image=w1;qa.Content=x1;qa.Title=E1;var me=qa;var Kh={root:"_root_nkim0_1"};var al=S(O());var kd=function(e,t){return kd=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])},kd(e,t)};function ji(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Je=function(){return Je=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},Je.apply(this,arguments)};function Wh(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 Ga(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 Qa;(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"})(Qa||(Qa={}));var Xa=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var At;(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"})(At||(At={}));var Ya;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ya||(Ya={}));function Rd(e){return e.type===At.literal}function $h(e){return e.type===At.argument}function Za(e){return e.type===At.number}function Ja(e){return e.type===At.date}function el(e){return e.type===At.time}function tl(e){return e.type===At.select}function nl(e){return e.type===At.plural}function qh(e){return e.type===At.pound}function rl(e){return e.type===At.tag}function ol(e){return!!(e&&typeof e=="object"&&e.type===Ya.number)}function Hi(e){return!!(e&&typeof e=="object"&&e.type===Ya.dateTime)}function Id(e){e.forEach(function(t){if(delete t.location,tl(t)||nl(t))for(var n in t.options)delete t.options[n].location,Id(t.options[n].value);else Za(t)&&ol(t.style)||(Ja(t)||el(t))&&Hi(t.style)?delete t.style.location:rl(t)&&Id(t.children)})}function Gh(e,t){t===void 0&&(t={}),t=Je({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Xa(e,t).parse();if(n.err){var r=SyntaxError(Qa[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Id(n.val),n.val}function il(e,t){var n=t&&t.cache?t.cache:k1,r=t&&t.serializer?t.serializer:P1,o=t&&t.strategy?t.strategy:T1;return o(e,{cache:n,serializer:r})}function C1(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Qh(e,t,n,r){var o=C1(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Xh(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 Ld(e,t,n,r,o){return n.bind(t,e,r,o)}function T1(e,t){var n=e.length===1?Qh:Xh;return Ld(e,this,n,t.cache.create(),t.serializer)}function _1(e,t){return Ld(e,this,Xh,t.cache.create(),t.serializer)}function b1(e,t){return Ld(e,this,Qh,t.cache.create(),t.serializer)}var P1=function(){return JSON.stringify(arguments)};function Ad(){this.cache=Object.create(null)}Ad.prototype.get=function(e){return this.cache[e]};Ad.prototype.set=function(e,t){this.cache[e]=t};var k1={create:function(){return new Ad}},sl={variadic:_1,monadic:b1};var Ir;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ir||(Ir={}));var Bi=function(e){ji(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 Od=function(e){ji(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('", "'),'"'),Ir.INVALID_VALUE,i)||this}return t}(Bi);var Yh=function(e){ji(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ir.INVALID_VALUE,o)||this}return t}(Bi);var Zh=function(e){ji(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,'"'),Ir.MISSING_VALUE,r)||this}return t}(Bi);var ke;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ke||(ke={}));function R1(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==ke.literal||n.type!==ke.literal?t.push(n):r.value+=n.value,t},[])}function I1(e){return typeof e=="function"}function Ui(e,t,n,r,o,i,s){if(e.length===1&&Rd(e[0]))return[{type:ke.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Rd(c)){a.push({type:ke.literal,value:c.value});continue}if(qh(c)){typeof i=="number"&&a.push({type:ke.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Zh(p,s);var d=o[p];if($h(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?ke.literal:ke.object,value:d});continue}if(Ja(c)){var h=typeof c.style=="string"?r.date[c.style]:Hi(c.style)?c.style.parsedOptions:void 0;a.push({type:ke.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(el(c)){var h=typeof c.style=="string"?r.time[c.style]:Hi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:ke.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(Za(c)){var h=typeof c.style=="string"?r.number[c.style]:ol(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:ke.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(rl(c)){var v=c.children,y=c.value,g=o[y];if(!I1(g))throw new Yh(y,"function",s);var m=Ui(v,t,n,r,o,i),f=g(m.map(function(T){return T.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(T){return{type:typeof T=="string"?ke.literal:ke.object,value:T}}))}if(tl(c)){var w=c.options[d]||c.options.other;if(!w)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ui(w.value,t,n,r,o));continue}if(nl(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Bi(`Intl.PluralRules is not available in this environment.
10
+ Try polyfilling it using "@formatjs/intl-pluralrules"
11
+ `,Ir.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ui(w.value,t,n,r,o,d-(c.offset||0)));continue}}return R1(a)}function L1(e,t){return t?Je(Je(Je({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Je(Je({},e[r]),t[r]||{}),n},{})):e}function A1(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=L1(e[r],t[r]),n},Je({},e)):e}function Nd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function O1(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.number),strategy:sl.variadic}),getDateTimeFormat:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.dateTime),strategy:sl.variadic}),getPluralRules:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.pluralRules),strategy:sl.variadic})}}var Jh=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!==ke.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 Ui(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=Wh(s,["formatters"]);this.ast=e.__parse(t,Je(Je({},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=A1(e.formats,r),this.formatters=o&&o.formatters||O1(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=Gh,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 N1(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var M1="dummy",Md=(0,al.createContext)(null);function H(e){let t=(0,al.useContext)(Md);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=N1(n,r);return i?new Jh(i).format(o):(t!==M1&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Dd={};Te(Dd,{enUS:()=>D1,nlNL:()=>F1});var D1={experimental:[{type:0,value:"Experimental"}]},F1={experimental:[{type:0,value:"Experimenteel"}]};var Fd=S(C()),ey=({children:e})=>{let t=P("Chip",Kh);return(0,Fd.jsx)("span",{className:t.root,children:e})},ll=()=>{let e=H(Dd);return(0,Fd.jsx)(ey,{children:e("experimental")})},ty=ey;var ry=S(X());var ny={root:"_root_cq1yq_1"};var oy=S(C());var j1={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},H1=({className:e,keyCode:t,...n})=>{let r=P("KeyboardHint",ny);return(0,oy.jsx)("span",{"data-key":j1[t],className:(0,ry.default)(e,r.root),...n})},ul=H1;var sy=S(X());var iy={root:"_root_4a08n_1"};var ay=S(C()),B1=({className:e,children:t,...n})=>{let r=P("Label",iy);return(0,ay.jsx)("span",{...n,className:(0,sy.default)(e,r.root),children:t})},cl=B1;var ly={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var co=S(C()),U1=({title:e,children:t,type:n,...r})=>{let o=P("Section",ly);return(0,co.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,co.jsx)("div",{className:o.subTitleContainer,children:(0,co.jsx)("span",{className:o.subtitle,children:e})}),(0,co.jsx)("div",{className:o.suggestions,children:t})]})},Hn=U1;var cy=S(X()),dy=S(O());var uy={root:"_root_19wxp_1"};var fy=S(C()),z1=dy.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",uy);return(0,fy.jsx)("div",{ref:n,className:(0,cy.default)(r.root,e),children:t})}),dl=z1;var zi=S(X()),gt=S(O());var jd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(C()),fo=(0,gt.createContext)(jd),V1=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{...n,className:(0,zi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},K1=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsxs)("div",{className:(0,zi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},W1=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(fo);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},$1=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsx)("button",{type:"button",className:(0,zi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Hd=({labels:e})=>{let t=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},po=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",jd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,zi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(fo.Provider,{value:a,children:r})})});po.Labels=Hd;po.Actions=V1;po.ActionButton=$1;po.DropdownButton=K1;po.DropdownItem=W1;var oe=po;var my=S(X());var py={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var gy=S(C()),q1=({withDivider:e,children:t})=>{let n=P("SuggestionList",py);return(0,gy.jsx)("div",{className:(0,my.default)(n.root,{[n.isWithDivider]:e}),children:t})},Wt=q1;var yy=S(X());var hy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var fl=S(C()),G1=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",hy);return(0,fl.jsx)("button",{type:"button",className:(0,yy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,fl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,fl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Lr=G1;var vy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,mo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Sy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Bn=(d=>(d.SEARCH="search",d.TEMPLATE="template",d.ELASTIC_SEARCH="studio-search",d.GPT="gpt",d.TRIE="trie",d.TRIE_WITH_TYPOS="trie-with-typos",d.SEMANTIC="semantic",d.TEXT_RECOMMENDATION="text_recommendation",d.URL_RECOMMENDATION="url_recommendation",d.LINK_RECOMMENDATION="link_recommendation",d.PERSONAL_COLLECTION="personal-collection",d.PERSONAL_COLLECTION_SEARCH="personal-collection-search",d))(Bn||{}),Un=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Un||{});var Fn=S(_u());var oC=S(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 gn(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)===Zb}(e)||Array.isArray(e)||!!e[Ew]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ew])||im(e)||sm(e))}function qr(e,t,n){n===void 0&&(n=!1),Go(e)===0?(n?Object.keys:qo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Go(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:im(e)?2:sm(e)?3:0}function $o(e,t){return Go(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wb(e,t){return Go(e)===2?e.get(t):e[t]}function Cw(e,t,n){var r=Go(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Tw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function im(e){return Xb&&e instanceof Map}function sm(e){return Yb&&e instanceof Set}function ur(e){return e.o||e.t}function am(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pw(e);delete t[le];for(var n=qo(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 lm(e,t){return t===void 0&&(t=!1),um(e)||gn(e)||!Dt(e)||(Go(e)>1&&(e.set=e.add=e.clear=e.delete=$b),Object.freeze(e),t&&qr(e,function(n,r){return lm(r,!0)},!0)),e}function $b(){Ct(2)}function um(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Jt(e){var t=om[e];return t||Ct(18,e),t}function qb(e,t){om[e]||(om[e]=t)}function tm(){return zs}function Yp(e,t){t&&(Jt("Patches"),e.u=[],e.s=[],e.v=t)}function bu(e){nm(e),e.p.forEach(Gb),e.p=null}function nm(e){e===zs&&(zs=e.l)}function hw(e){return zs={p:[],l:zs,h:e,m:!0,_:0}}function Gb(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Zp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Jt("ES5").S(t,e,r),r?(n[le].P&&(bu(t),Ct(4)),Dt(e)&&(e=Pu(t,e),t.l||ku(t,e)),t.u&&Jt("Patches").M(n[le].t,e,t.u,t.s)):e=Pu(t,n,[]),bu(t),t.u&&t.v(t.u,t.s),e!==bw?e:void 0}function Pu(e,t,n){if(um(t))return t;var r=t[le];if(!r)return qr(t,function(a,l){return yw(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ku(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=am(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),qr(i,function(a,l){return yw(e,r,o,a,l,n,s)}),ku(e,o,!1),n&&e.u&&Jt("Patches").N(r,n,e.u,e.s)}return r.o}function yw(e,t,n,r,o,i,s){if(gn(o)){var a=Pu(e,o,i&&t&&t.i!==3&&!$o(t.R,r)?i.concat(r):void 0);if(Cw(n,r,a),!gn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!um(o)){if(!e.h.D&&e._<1)return;Pu(e,o),t&&t.A.l||ku(e,o)}}function ku(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Jp(e,t){var n=e[le];return(n?ur(n):e)[t]}function vw(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function em(e){e.o||(e.o=am(e.t))}function rm(e,t,n){var r=im(t)?Jt("MapSet").F(t,n):sm(t)?Jt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:tm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Vs;s&&(l=[a],u=Us);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Jt("ES5").J(t,n);return(n?n.A:tm()).p.push(r),r}function Qb(e){return gn(e)||Ct(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=Go(n);if(o){if(!o.P&&(o.i<4||!Jt("ES5").K(o)))return o.t;o.I=!0,r=Sw(n,i),o.I=!1}else r=Sw(n,i);return qr(r,function(s,a){o&&Wb(o.t,s)===a||Cw(r,s,t(a))}),i===3?new Set(r):r}(e)}function Sw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return am(e)}function _w(){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 Vs.get(u,s)},set:function(u){var c=this[le];Vs.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=qo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!$o(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!Tw(h,d))return!0}}var y=!!a[le];return u.length!==qo(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(ur(s)))}var i={};qb("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=Pw(d);delete y[le];for(var g=qo(y),m=0;m<g.length;m++){var f=g[m];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:tm(),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?gn(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)qr(h,function(x){x!==le&&(d[x]!==void 0||$o(d,x)?v[x]||u(h[x]):(v[x]=!0,cr(p)))}),qr(d,function(x){h[x]!==void 0||$o(h,x)||(v[x]=!1,cr(p))});else if(y===5){if(r(p)&&(cr(p),v.length=!0),h.length<d.length)for(var g=h.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<h.length;m++)v[m]=!0;for(var f=Math.min(h.length,d.length),w=0;w<f;w++)h.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&u(h[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var ww,zs,cm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xb=typeof Map<"u",Yb=typeof Set<"u",xw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bw=cm?Symbol.for("immer-nothing"):((ww={})["immer-nothing"]=!0,ww),Ew=cm?Symbol.for("immer-draftable"):"__$immer_draftable",le=cm?Symbol.for("immer-state"):"__$immer_state";var Zb=""+Object.prototype.constructor,qo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pw=Object.getOwnPropertyDescriptors||function(e){var t={};return qo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},om={},Vs={get:function(e,t){if(t===le)return e;var n=ur(e);if(!$o(n,t))return function(o,i,s){var a,l=vw(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===Jp(e.t,t)?(em(e),e.o[t]=rm(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=vw(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Jp(ur(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Tw(n,o)&&(n!==void 0||$o(e.t,t)))return!0;em(e),cr(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Jp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,em(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Us={};qr(Vs,function(e,t){Us[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Us.deleteProperty=function(e,t){return Us.set.call(this,e,t,void 0)},Us.set=function(e,t,n){return Vs.set.call(this,e[0],t,n,e[0])};var Jb=function(){function e(n){var r=this;this.O=xw,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var g=this;y===void 0&&(y=a);for(var m=arguments.length,f=Array(m>1?m-1:0),w=1;w<m;w++)f[w-1]=arguments[w];return l.produce(y,function(x){var T;return(T=i).call.apply(T,[g,x].concat(f))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Dt(o)){var c=hw(r),p=rm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?bu(c):nm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Yp(c,s),Zp(y,c)},function(y){throw bu(c),y}):(Yp(c,s),Zp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===bw&&(u=void 0),r.D&&lm(u,!0),s){var h=[],v=[];Jt("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),gn(n)&&(n=Qb(n));var r=hw(this),o=rm(this,n,void 0);return o[le].C=!0,nm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Yp(i,r),Zp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!xw&&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=Jt("Patches").$;return gn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),nt=new Jb,eP=nt.produce,FO=nt.produceWithPatches.bind(nt),jO=nt.setAutoFreeze.bind(nt),HO=nt.setUseProxies.bind(nt),BO=nt.applyPatches.bind(nt),UO=nt.createDraft.bind(nt),zO=nt.finishDraft.bind(nt),Ru=eP;function dr(e){"@babel/helpers - typeof";return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}function dm(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fm(e){var t=dm(e,"string");return dr(t)==="symbol"?t:String(t)}function pm(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 kw(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 Iu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kw(Object(n),!0).forEach(function(r){pm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(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 Rw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lu={INIT:"@@redux/INIT"+mm(),REPLACE:"@@redux/REPLACE"+mm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mm()}};function tP(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 gm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(gm)(e,t)}if(typeof e!="function")throw new Error(Ne(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(Ne(3));return i}function p(y){if(typeof y!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!tP(y))throw new Error(Ne(7));if(typeof y.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var f=g[m];f()}return y}function h(y){if(typeof y!="function")throw new Error(Ne(10));o=y,d({type:Lu.REPLACE})}function v(){var y,g=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Ne(11));function w(){f.next&&f.next(c())}w();var x=g(w);return{unsubscribe:x}}},y[Rw]=function(){return this},y}return d({type:Lu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[Rw]=v,r}function nP(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Lu.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:Lu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function Au(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{nP(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],g=n[y],m=u[y],f=g(m,c);if(typeof f>"u"){var w=c&&c.type;throw new Error(Ne(14))}h[y]=f,d=d||f!==m}return d=d||i.length!==Object.keys(u).length,d?h:u}}function Qo(){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 Iw(){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(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Qo.apply(void 0,a)(o.dispatch),Iu(Iu({},o),{},{dispatch:i})}}}function Lw(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 Aw=Lw();Aw.withExtraArgument=Lw;var hm=Aw;var Fw=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)}}(),rP=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}}},Xo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},oP=Object.defineProperty,iP=Object.defineProperties,sP=Object.getOwnPropertyDescriptors,Ow=Object.getOwnPropertySymbols,aP=Object.prototype.hasOwnProperty,lP=Object.prototype.propertyIsEnumerable,Nw=function(e,t,n){return t in e?oP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fr=function(e,t){for(var n in t||(t={}))aP.call(t,n)&&Nw(e,n,t[n]);if(Ow)for(var r=0,o=Ow(t);r<o.length;r++){var n=o[r];lP.call(t,n)&&Nw(e,n,t[n])}return e},ym=function(e,t){return iP(e,sP(t))},uP=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 cP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qo:Qo.apply(null,arguments)},sN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function dP(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 fP=function(e){Fw(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,Xo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Xo([void 0],n.concat(this))))},t}(Array),pP=function(e){Fw(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,Xo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Xo([void 0],n.concat(this))))},t}(Array);function wm(e){return Dt(e)?Ru(e,function(){}):e}function mP(e){return typeof e=="boolean"}function gP(){return function(t){return hP(t)}}function hP(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 fP;if(n&&(mP(n)?a.push(hm):a.push(hm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var vm=!0;function jw(e){var t=gP(),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(dP(o))h=Au(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),!vm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vm&&v.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Iw.apply(void 0,v),g=Qo;l&&(g=cP(fr({trace:!vm},typeof l=="object"&&l)));var m=new pP(y),f=m;Array.isArray(d)?f=Xo([y],d):typeof d=="function"&&(f=d(m));var w=g.apply(void 0,f);return gm(h,c,w)}function fe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return fr(fr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function Hw(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 yP(e){return typeof e=="function"}function vP(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?Hw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(yP(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=Xo([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(gn(v)){var g=v,m=y(g,d);return m===void 0?v:m}else{if(Dt(v))return Ru(v,function(f){return y(f,d)});var m=y(v,d);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return v},p)}return c.getInitialState=l,c}function SP(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=SP(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"?Hw(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],g=y===void 0?void 0:y,m=fr(fr({},d),s);return vP(n,function(f){for(var w in m)f.addCase(w,m[w]);for(var x=0,T=v;x<T.length;x++){var E=T[x];f.addMatcher(E.matcher,E.reducer)}g&&f.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var wP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xP=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wP[Math.random()*64|0];return t},EP=["name","message","stack","code"],Sm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Mw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),CP=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=EP;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:ym(fr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:ym(fr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||CP)(c||"Rejected"),meta:ym(fr({},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):xP(),y=new l,g,m=!1;function f(x){g=x,y.abort()}var w=function(){return uP(this,null,function(){var x,T,E,_,R,k,N;return rP(this,function(te){switch(te.label){case 0:return te.trys.push([0,4,,5]),_=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:h}),_P(_)?[4,_]:[3,2];case 1:_=te.sent(),te.label=2;case 2:if(_===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(z,je){return y.signal.addEventListener("abort",function(){return je({name:"AbortError",message:g||"Aborted"})})}),p(i(v,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:v,arg:c},{getState:d,extra: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,je){return new Sm(z,je)},fulfillWithValue:function(z,je){return new Mw(z,je)}})).then(function(z){if(z instanceof Sm)throw z;return z instanceof Mw?o(z.payload,v,c,z.meta):o(z,v,c)})])];case 3:return E=te.sent(),[3,5];case 4:return k=te.sent(),E=k instanceof Sm?s(null,v,c,k.payload,k.meta):s(k,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(w,{abort:f,requestId:v,arg:c,unwrap:function(){return w.then(TP)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function TP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _P(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var bP="task",Bw="listener",Uw="completed",xm="cancelled",cN="task-"+xm,dN="task-"+Uw,fN=Bw+"-"+xm,pN=Bw+"-"+Uw,mN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=bP+" "+xm+" (reason: "+t+")"}return e}();var Em="listenerMiddleware";var gN=fe(Em+"/add"),hN=fe(Em+"/removeAll"),yN=fe(Em+"/remove");var Dw,vN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Dw||(Dw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},PP=function(e){return function(t){setTimeout(t,e)}},SN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:PP(10);_w();var R0=S(Tm()),I0=S(Gw());var _m=S(_u());function WP(e){e()}var Qw=WP,Xw=e=>Qw=e,Yw=()=>Qw;var Zo=S(O());var e0=S(O());var Nu=S(O()),Zw=Symbol.for(`react-redux-context-${Nu.version}`),Jw=globalThis;function $P(){let e=Jw[Zw];return e||(e=(0,Nu.createContext)(null),Jw[Zw]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=$P();return(r,...o)=>Reflect[t](n,...o)}}));function Ks(e=Me){return function(){return(0,e0.useContext)(e)}}var Mu=Ks();var Du=()=>{throw new Error("uSES not initialized!")};var t0=Du,n0=e=>{t0=e},qP=(e,t)=>e===t;function r0(e=Me){let t=e===Me?Mu:Ks(e);return function(r,o={}){let{equalityFn:i=qP,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,Zo.useRef)(!0),v=(0,Zo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=t0(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,Zo.useDebugValue)(y),y}}var A=r0();function hn(){return hn=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},hn.apply(this,arguments)}function Ws(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 Mm=S(m0()),Y=S(O()),_0=S(v0());var uk=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ck(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,w){return l=f,u=w,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let f=e(l,u),w=!s(f,c);return c=f,w&&(d=n(c,p,u)),d}function m(f,w){let x=!i(w,u),T=!o(f,l,w,u);return l=f,u=w,x&&T?v():x?y():T?g():d}return function(w,x){return a?m(w,x):h(w,x)}}function Om(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ws(t,uk),s=n(e,i),a=r(e,i),l=o(e,i);return ck(s,a,l,e,i)}function Nm(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 $s(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function S0(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function rc(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=S0(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=S0(u),u=i(a,l)),u},i}}function Jo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function w0(e){return e&&typeof e=="object"?$s(t=>Nm(e,t)):e?typeof e=="function"?rc(e,"mapDispatchToProps"):Jo(e,"mapDispatchToProps"):$s(t=>({dispatch:t}))}function x0(e){return e?typeof e=="function"?rc(e,"mapStateToProps"):Jo(e,"mapStateToProps"):$s(()=>({}))}function dk(e,t,n){return hn({},n,e,t)}function fk(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 E0(e){return e?typeof e=="function"?fk(e):Jo(e,"mergeProps"):()=>dk}function pk(){let e=Yw(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var C0={notify(){},get:()=>[]};function oc(e,t){let n,r=C0;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=pk())}function u(){n&&(n(),n=void 0,r.clear(),r=C0)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var ic=S(O()),mk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ei=mk?ic.useLayoutEffect:ic.useEffect;function T0(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ti(e,t){if(T0(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])||!T0(e[n[o]],t[n[o]]))return!1;return!0}var gk=["reactReduxForwardedRef"],b0=Du,P0=e=>{b0=e};var hk=[null,null];function yk(e,t,n){ei(()=>e(...t),n)}function vk(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Sk(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(),g,m;try{g=r(y,o.current)}catch(f){m=f,d=f}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wk(e,t){return e===t}function xk(e,t,n,{pure:r,areStatesEqual:o=wk,areOwnPropsEqual:i=ti,areStatePropsEqual:s=ti,areMergedPropsEqual:a=ti,forwardRef:l=!1,context:u=Me}={}){let c=u,p=x0(e),d=w0(t),h=E0(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",f=`Connect(${m})`,w={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(_){let[R,k,N]=(0,Y.useMemo)(()=>{let{reactReduxForwardedRef:dt}=_,Pr=Ws(_,gk);return[_.context,dt,Pr]},[_]),te=(0,Y.useMemo)(()=>R&&R.Consumer&&(0,_0.isContextConsumer)(Y.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Y.useContext)(te),je=!!_.store&&!!_.store.getState&&!!_.store.dispatch,on=!!z&&!!z.store,Kt=je?_.store:z.store,ao=on?z.getServerState:Kt.getState,Ii=(0,Y.useMemo)(()=>Om(Kt.dispatch,w),[Kt]),[_r,Fa]=(0,Y.useMemo)(()=>{if(!v)return hk;let dt=oc(Kt,je?void 0:z.subscription),Pr=dt.notifyNestedSubs.bind(dt);return[dt,Pr]},[Kt,je,z]),ja=(0,Y.useMemo)(()=>je?z:hn({},z,{subscription:_r}),[je,z,_r]),Li=(0,Y.useRef)(),Ai=(0,Y.useRef)(N),sn=(0,Y.useRef)(),Oi=(0,Y.useRef)(!1),br=(0,Y.useRef)(!1),I=(0,Y.useRef)(!1),W=(0,Y.useRef)();ei(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Y.useMemo)(()=>()=>sn.current&&N===Ai.current?sn.current:Ii(Kt.getState(),N),[Kt,N]),jn=(0,Y.useMemo)(()=>Pr=>_r?Sk(v,Kt,_r,Ii,Ai,Li,Oi,I,sn,Fa,Pr):()=>{},[_r]);yk(vk,[Ai,Li,Oi,N,sn,Fa]);let an;try{an=b0(jn,Lt,ao?()=>Ii(ao(),N):Lt)}catch(dt){throw W.current&&(dt.message+=`
10
12
  The error may be correlated with this previous error:
11
13
  ${W.current.stack}
12
14
 
13
- `),ct}Yo(()=>{W.current=void 0,on.current=void 0,Li.current=sn});let Ni=(0,Y.useMemo)(()=>Y.default.createElement(g,gn({},sn,{ref:b})),[b,g,sn]);return(0,Y.useMemo)(()=>y?Y.default.createElement(re.Provider,{value:ja},Ni):Ni,[re,Ni,ja])}let E=Y.default.memo(x);if(E.WrappedComponent=g,E.displayName=x.displayName=f,l){let R=Y.default.forwardRef(function(B,re){return Y.default.createElement(E,gn({},B,{reactReduxForwardedRef:re}))});return R.displayName=f,R.WrappedComponent=g,(0,xm.default)(R,g)}return(0,xm.default)(E,g)}}var Vr=zk;var Bs=S(O());function Vk({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Bs.useMemo)(()=>{let u=Nu(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Bs.useMemo)(()=>e.getState(),[e]);Yo(()=>{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||Me;return Bs.default.createElement(l.Provider,{value:s},n)}var Em=Vk;function Du(e=Me){let t=e===Me?du:Fs(e);return function(){let{store:r}=t();return r}}var Cm=Du();function qw(e=Me){let t=e===Me?Cm:Du(e);return function(){return t().dispatch}}var K=qw();xw(Xw.useSyncExternalStoreWithSelector);$w(Gw.useSyncExternalStore);gw(dm.unstable_batchedUpdates);var Us=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Us||{});var Kk={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"},Qw=F({name:"settings",initialState:Kk,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:zs}=Qw.actions,Tm=e=>t=>t.settings[e],D=e=>A(Tm(e)),Yw=Qw.reducer;var oE=S(O());function hn(){}hn.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(v){return o?(setTimeout(function(){o(void 0,v)},0),!0):v}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 v=-1*u;v<=u;v+=2){var g=void 0,m=p[v-1],f=p[v+1],w=(f?f.newPos:0)-v;m&&(p[v-1]=void 0);var x=m&&m.newPos+1<a,T=f&&0<=w&&w<l;if(!x&&!T){p[v]=void 0;continue}if(!x||T&&m.newPos<f.newPos?(g=$k(f),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),w=i.extractCommon(g,n,t,v),g.newPos+1>=a&&w+1>=l)return s(Wk(i,g.components,n,t,i.useLongestToken));p[v]=g}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();h()||v()},0)})();else for(;u<=c;){var y=h();if(y)return y}},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 Wk(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,y){var v=r[l+y];return v.length>h.length?v: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 $k(e){return{newPos:e.newPos,components:e.components.slice(0)}}var qk=new hn;function e0(e,t,n){return qk.diff(e,t,n)}var Zw=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Jw=/\S/,t0=new hn;t0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Jw.test(e)&&!Jw.test(t)};t0.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]&&Zw.test(t[n])&&Zw.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var n0=new hn;n0.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 Gk=new hn;Gk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Xk=new hn;Xk.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Fu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fu=function(t){return typeof t}:Fu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}var Qk=Object.prototype.toString,Vs=new hn;Vs.useLongestToken=!0;Vs.tokenize=n0.tokenize;Vs.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(_m(e,null,null,o),o," ")};Vs.equals=function(e,t){return hn.prototype.equals.call(Vs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function _m(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(Qk.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]=_m(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Fu(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]=_m(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var bm=new hn;bm.tokenize=function(e){return e.slice()};bm.join=bm.removeEmpty=function(e){return e};function r0(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function cr(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)=>cr(i,t[s],n-1)):r0(e)&&r0(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>cr(e[s],t[s],n-1)):!1}function Yk(e){return Math.max(...e.map(t=>t.length))}function Zk(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 o0(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<Yk(r);o++){let i=Zk(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 Jk=2;function km(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=o0(e,Jk);return n&&n.text!==t?n:e[0]}var i0={current:null,isSupported:null},Z=fe("resetConversation"),ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Hu=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Bu=e=>e.conversation.isSupported,Pm=N("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Uu=N("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),zu=N("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Vu=N("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hu(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Rm=N("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})})}),Ku=N("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hu(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),eP=[Uu.rejected,zu.rejected,Vu.rejected,Ku.rejected].map(e=>e==null?void 0:e.toString()),tP=F({name:"conversation",initialState:i0,reducers:{},extraReducers:e=>{e.addCase(Pm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Uu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(zu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Rm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Ku.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(Z,()=>i0).addMatcher(t=>eP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),s0=tP.reducer;var dr={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,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function $u(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 qu=fe("input/replaceText"),Gu=fe("input/keyDown"),Ks=fe("input/sendMessage"),Xu=fe("input/sendEditSuggestionMessage"),Qu=fe("input/uiInputChange"),Yu=fe("input/applyImageSuggestion"),Zt=fe("input/sendEvent");function Wu(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s},eventMetrics:{inputType:a},replace:l}=e.stagedSuggestion,u=n==="search"||n==="personal-collection-search",c=u||l==="selection"?t:t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions=[...e.metrics.textSuggestions,{text:c,source:n,abVariant:r,abTestName:o,inputType:a,sourceText:s,trainingJobs:i||[],searchTerm:u?e.userCommitted.text:null}],e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var a0=e=>F({name:e,initialState:dr,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,{...dr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=km(t.textSuggestions,t.userCommitted.text)},setInputHtml(t,n){t.html=n.payload},changeSelection(t,n){n.payload&&(cr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Wu(t)))},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:p,ctrlKey:d,metaKey:h,altKey:y}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=t,{text:g}=n.payload,m=e0(v,g);v.length-g.length>1&&t.metrics.deletions.push(...m.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=v.length-g.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}break;case"Shift":break;default:if(!d&&!h&&!y){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=dr.metrics,t.textSuggestions=[]),t.text!==n.payload.text&&Wu(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"&&Wu(t)},commitSuggestion(t){Wu(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=km(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}){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(Z,n=>{n.tabCompletionSuggestion=dr.tabCompletionSuggestion,n.previousKeyDownEvent=dr.previousKeyDownEvent,n.textSuggestions=dr.textSuggestions,n.selectedSuggestionIndex=dr.selectedSuggestionIndex,n.metrics=dr.metrics})}}),Im=a0("input"),Jo=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),nP=e=>e.input.selection,l0=()=>A(nP),{userInput:u0,changeSelection:Lm,initialInput:c0,mergeMetrics:d0,nextTextSuggestionIndex:f0,offeredTextSuggestion:p0,previousTextSuggestionIndex:m0,registerCut:g0,registerKeyDown:h0,registerPaste:y0,reset:v0,resetToCommitted:Ws,setInputHtml:S0,setSelectedTextSuggestionIndex:Zu,setTextSuggestions:fr,stageSuggestion:Mt,commitSuggestion:pr}=Im.actions,Ge=a0("overlay");var ei=S(O());var ec=S(O()),w0=S(Q()),$s=ec.default.createContext({});function P(e,t){let r=(0,ec.useContext)($s)[e];return r?Object.entries(t).reduce((o,[i,s])=>{let a=r[i];return{...o,[i]:(0,w0.default)(s,a)}},{}):t}var x0={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Om=S(C()),aP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ei.useRef)(null),l=(0,ei.useRef)(null),u=P("Dialog",x0);return(0,ei.useEffect)(()=>{var d,h;let c=y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),o())},p=y=>{let v=window.getSelection();v!=null&&v.toString()||y.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var y,v;(y=a.current)==null||y.removeEventListener("click",p),(v=a.current)==null||v.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ei.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,Om.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Om.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ti=aP;var hg=S(O());var Nm={};Te(Nm,{enUS:()=>lP,nlNL:()=>uP});var lP={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?"}]},uP={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 b0={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 mc=S(O());var Mm=function(e,t){return Mm=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])},Mm(e,t)};function Gs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var rt=function(){return rt=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},rt.apply(this,arguments)};function k0(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 tc(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 nc;(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"})(nc||(nc={}));var rc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Dt;(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"})(Dt||(Dt={}));var oc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(oc||(oc={}));function Dm(e){return e.type===Dt.literal}function P0(e){return e.type===Dt.argument}function ic(e){return e.type===Dt.number}function sc(e){return e.type===Dt.date}function ac(e){return e.type===Dt.time}function lc(e){return e.type===Dt.select}function uc(e){return e.type===Dt.plural}function R0(e){return e.type===Dt.pound}function cc(e){return e.type===Dt.tag}function dc(e){return!!(e&&typeof e=="object"&&e.type===oc.number)}function Xs(e){return!!(e&&typeof e=="object"&&e.type===oc.dateTime)}function Fm(e){e.forEach(function(t){if(delete t.location,lc(t)||uc(t))for(var n in t.options)delete t.options[n].location,Fm(t.options[n].value);else ic(t)&&dc(t.style)||(sc(t)||ac(t))&&Xs(t.style)?delete t.style.location:cc(t)&&Fm(t.children)})}function I0(e,t){t===void 0&&(t={}),t=rt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new rc(e,t).parse();if(n.err){var r=SyntaxError(nc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Fm(n.val),n.val}function fc(e,t){var n=t&&t.cache?t.cache:gP,r=t&&t.serializer?t.serializer:mP,o=t&&t.strategy?t.strategy:dP;return o(e,{cache:n,serializer:r})}function cP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function L0(e,t,n,r){var o=cP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function A0(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 dP(e,t){var n=e.length===1?L0:A0;return jm(e,this,n,t.cache.create(),t.serializer)}function fP(e,t){return jm(e,this,A0,t.cache.create(),t.serializer)}function pP(e,t){return jm(e,this,L0,t.cache.create(),t.serializer)}var mP=function(){return JSON.stringify(arguments)};function Hm(){this.cache=Object.create(null)}Hm.prototype.get=function(e){return this.cache[e]};Hm.prototype.set=function(e,t){this.cache[e]=t};var gP={create:function(){return new Hm}},pc={variadic:fP,monadic:pP};var Kr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Kr||(Kr={}));var Qs=function(e){Gs(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 Bm=function(e){Gs(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('", "'),'"'),Kr.INVALID_VALUE,i)||this}return t}(Qs);var O0=function(e){Gs(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Kr.INVALID_VALUE,o)||this}return t}(Qs);var N0=function(e){Gs(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,'"'),Kr.MISSING_VALUE,r)||this}return t}(Qs);var De;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(De||(De={}));function hP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==De.literal||n.type!==De.literal?t.push(n):r.value+=n.value,t},[])}function yP(e){return typeof e=="function"}function Ys(e,t,n,r,o,i,s){if(e.length===1&&Dm(e[0]))return[{type:De.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Dm(c)){a.push({type:De.literal,value:c.value});continue}if(R0(c)){typeof i=="number"&&a.push({type:De.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new N0(p,s);var d=o[p];if(P0(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?De.literal:De.object,value:d});continue}if(sc(c)){var h=typeof c.style=="string"?r.date[c.style]:Xs(c.style)?c.style.parsedOptions:void 0;a.push({type:De.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(ac(c)){var h=typeof c.style=="string"?r.time[c.style]:Xs(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:De.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(ic(c)){var h=typeof c.style=="string"?r.number[c.style]:dc(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:De.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(cc(c)){var y=c.children,v=c.value,g=o[v];if(!yP(g))throw new O0(v,"function",s);var m=Ys(y,t,n,r,o,i),f=g(m.map(function(T){return T.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(T){return{type:typeof T=="string"?De.literal:De.object,value:T}}))}if(lc(c)){var w=c.options[d]||c.options.other;if(!w)throw new Bm(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ys(w.value,t,n,r,o));continue}if(uc(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Qs(`Intl.PluralRules is not available in this environment.
14
- Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,Kr.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Bm(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ys(w.value,t,n,r,o,d-(c.offset||0)));continue}}return hP(a)}function vP(e,t){return t?rt(rt(rt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=rt(rt({},e[r]),t[r]||{}),n},{})):e}function SP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=vP(e[r],t[r]),n},rt({},e)):e}function Um(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function wP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.number),strategy:pc.variadic}),getDateTimeFormat:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.dateTime),strategy:pc.variadic}),getPluralRules:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.pluralRules),strategy:pc.variadic})}}var M0=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!==De.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 Ys(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=k0(s,["formatters"]);this.ast=e.__parse(t,rt(rt({},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=SP(e.formats,r),this.formatters=o&&o.formatters||wP(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=I0,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 xP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var EP="dummy",zm=(0,mc.createContext)(null);function j(e){let t=(0,mc.useContext)(zm);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=xP(n,r);return i?new M0(i).format(o):(t!==EP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Zs=S(C()),gc=()=>(0,Zs.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Zs.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Zs.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 Js=S(C()),D0=()=>(0,Js.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,Js.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,Js.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 ea=S(Q()),Et=S(O());var Vm={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var xt=S(C()),ni=(0,Et.createContext)(Vm),CP=({fixed:e,children:t,...n})=>{let r=(0,Et.useContext)(ni);return(0,xt.jsx)("div",{...n,className:(0,ea.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},TP=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,Et.useContext)(ni);return(0,xt.jsxs)("div",{className:(0,ea.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,xt.jsx)("ul",{className:i.dropdownList,children:o})]})},_P=({index:e,label:t,onClick:n})=>{let r=(0,Et.useContext)(ni);return(0,xt.jsx)("li",{className:r.dropdownItem,children:(0,xt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},bP=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,Et.useContext)(ni);return(0,xt.jsx)("button",{type:"button",className:(0,ea.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Km=({labels:e})=>{let t=(0,Et.useContext)(ni);return(0,xt.jsx)("div",{className:t.labels,children:e.map(n=>(0,xt.jsx)("span",{className:t.label,children:n},n))})},ri=Et.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",Vm),l=(0,Et.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,xt.jsx)(o,{...i,ref:s,className:(0,ea.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,xt.jsx)(ni.Provider,{value:a,children:r})})});ri.Labels=Km;ri.Actions=CP;ri.ActionButton=bP;ri.DropdownButton=TP;ri.DropdownItem=_P;var se=ri;var Tt=S(O());var hc=S(O());function ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,$m=2,qm=4,Se=8,yc=16,na=32,Ft=64,Wm={a:{content:q|Se,self:!1,type:q|Se|na|Ft},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|$m|qm|Se|yc|na|Ft},button:{content:Se,type:q|Se|na|Ft},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|na|Ft},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|yc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function $r(e){return t=>{Wm[t]={...e,...Wm[t]}}}["address","main","div","figure","p","pre"].forEach($r({content:q,type:q|Ft}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach($r({content:Se,type:q|Se|Ft}));["p","pre"].forEach($r({content:Se,type:q|Ft}));["s","small","span","del","ins"].forEach($r({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach($r({content:q,type:q|$m|Ft}));["h1","h2","h3","h4","h5","h6"].forEach($r({content:Se,type:q|qm|Ft}));["audio","canvas","iframe","img","video"].forEach($r({type:q|Se|yc|Ft}));var oa=Object.freeze(Wm),Gm=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Xm=Object.keys(oa).filter(e=>e!=="canvas"&&e!=="iframe"),J=1,Qm=2,Wr=3,mr=4,Sc=5,wc=Object.freeze({alt:J,cite:J,class:J,colspan:Wr,controls:mr,datetime:J,default:mr,disabled:mr,dir:J,height:J,href:J,id:J,kind:J,label:J,lang:J,loading:J,loop:mr,media:J,muted:mr,poster:J,rel:J,role:J,rowspan:Wr,scope:J,sizes:J,span:Wr,start:Wr,style:Sc,src:J,srclang:J,srcset:J,tabindex:J,target:J,title:J,type:J,width:J}),Ym=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function vc(){return vc=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},vc.apply(this,arguments)}function xc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?hc.default.createElement(i,vc({className:t},e)):hc.default.createElement(i,vc({className:t},e),n)}var ra=class{attribute(t,n){return n}node(t,n){return n}};function F0(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 jt=class{constructor(t,n,r){ta(this,"greedy",!1),ta(this,"options",void 0),ta(this,"propName",void 0),ta(this,"inverseName",void 0),ta(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?hc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return F0(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var qr=S(O()),U0=S(H0());function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RP=/(url|image|image-set)\(/i,Zm=class extends ra{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(RP)&&delete n[r]}),n}},B0=1,IP=3,LP=/^<(!doctype|(html|head|body)(\s|>))/i,AP=/^(aria-|data-|\w+:)/iu,OP=/{{{(\w+)\/?}}}/;function NP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ec=class{constructor(t,n={},r=[],o=[]){var i;yn(this,"allowed",void 0),yn(this,"banned",void 0),yn(this,"blocked",void 0),yn(this,"container",void 0),yn(this,"content",[]),yn(this,"props",void 0),yn(this,"matchers",void 0),yn(this,"filters",void 0),yn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Zm],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Xm),this.banned=new Set(Gm),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:y,valid:v,void:g,...m}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),v?(p+=g?`{{{${f}/}}}`:`{{{${f}}}}${y}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=y,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||y.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
+ `),dt}ei(()=>{W.current=void 0,sn.current=void 0,Li.current=an});let Ni=(0,Y.useMemo)(()=>Y.default.createElement(g,hn({},an,{ref:k})),[k,g,an]);return(0,Y.useMemo)(()=>v?Y.default.createElement(te.Provider,{value:ja},Ni):Ni,[te,Ni,ja])}let E=Y.default.memo(x);if(E.WrappedComponent=g,E.displayName=x.displayName=f,l){let R=Y.default.forwardRef(function(N,te){return Y.default.createElement(E,hn({},N,{reactReduxForwardedRef:te}))});return R.displayName=f,R.WrappedComponent=g,(0,Mm.default)(R,g)}return(0,Mm.default)(E,g)}}var Gr=xk;var qs=S(O());function Ek({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,qs.useMemo)(()=>{let u=oc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,qs.useMemo)(()=>e.getState(),[e]);ei(()=>{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||Me;return qs.default.createElement(l.Provider,{value:s},n)}var Dm=Ek;function sc(e=Me){let t=e===Me?Mu:Ks(e);return function(){let{store:r}=t();return r}}var Fm=sc();function k0(e=Me){let t=e===Me?Fm:sc(e);return function(){return t().dispatch}}var K=k0();n0(I0.useSyncExternalStoreWithSelector);P0(R0.useSyncExternalStore);Xw(_m.unstable_batchedUpdates);var Gs=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Gs||{});var Ck={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"},L0=j({name:"settings",initialState:Ck,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Qs}=L0.actions,jm=e=>t=>t.settings[e],F=e=>A(jm(e)),A0=L0.reducer;var EE=S(O());function yn(){}yn.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 g=void 0,m=p[y-1],f=p[y+1],w=(f?f.newPos:0)-y;m&&(p[y-1]=void 0);var x=m&&m.newPos+1<a,T=f&&0<=w&&w<l;if(!x&&!T){p[y]=void 0;continue}if(!x||T&&m.newPos<f.newPos?(g=_k(f),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),w=i.extractCommon(g,n,t,y),g.newPos+1>=a&&w+1>=l)return s(Tk(i,g.components,n,t,i.useLongestToken));p[y]=g}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 Tk(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 _k(e){return{newPos:e.newPos,components:e.components.slice(0)}}var bk=new yn;function M0(e,t,n){return bk.diff(e,t,n)}var O0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N0=/\S/,D0=new yn;D0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N0.test(e)&&!N0.test(t)};D0.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]&&O0.test(t[n])&&O0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var F0=new yn;F0.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 Pk=new yn;Pk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kk=new yn;kk.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function ac(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ac=function(t){return typeof t}:ac=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}var Rk=Object.prototype.toString,Xs=new yn;Xs.useLongestToken=!0;Xs.tokenize=F0.tokenize;Xs.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," ")};Xs.equals=function(e,t){return yn.prototype.equals.call(Xs,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(Rk.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()),ac(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 Bm=new yn;Bm.tokenize=function(e){return e.slice()};Bm.join=Bm.removeEmpty=function(e){return e};function j0(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function pr(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)=>pr(i,t[s],n-1)):j0(e)&&j0(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>pr(e[s],t[s],n-1)):!1}function Ik(e){return Math.max(...e.map(t=>t.length))}function Lk(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 H0(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<Ik(r);o++){let i=Lk(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 Ak=2;function Um(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=H0(e,Ak);return n&&n.text!==t?n:e[0]}var B0={current:null,isSupported:null},Z=fe("resetConversation"),lc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},uc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},cc=e=>e.conversation.isSupported,zm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),dc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),fc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),pc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=uc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Vm=M("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),mc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=uc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),Ok=[dc.rejected,fc.rejected,pc.rejected,mc.rejected].map(e=>e==null?void 0:e.toString()),Nk=j({name:"conversation",initialState:B0,reducers:{},extraReducers:e=>{e.addCase(zm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(dc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(fc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(pc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(mc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(Z,()=>B0).addMatcher(t=>Ok.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),U0=Nk.reducer;var mr={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,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function hc(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 yc=fe("input/replaceText"),vc=fe("input/keyDown"),Ys=fe("input/sendMessage"),Sc=fe("input/sendEditSuggestionMessage"),wc=fe("input/uiInputChange"),xc=fe("input/applyImageSuggestion"),ot=fe("input/sendEvent");function gc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s},eventMetrics:{inputType:a},replace:l}=e.stagedSuggestion,u=n==="search"||n==="personal-collection-search",c=u||l==="selection"?t:t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions=[...e.metrics.textSuggestions,{text:c,source:n,abVariant:r,abTestName:o,inputType:a,sourceText:s,trainingJobs:i||[],searchTerm:u?e.userCommitted.text:null}],e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var z0=e=>j({name:e,initialState:mr,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,{...mr,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)},setInputHtml(t,n){t.html=n.payload},changeSelection(t,n){n.payload&&(pr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&gc(t)))},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:g}=n.payload,m=M0(y,g);y.length-g.length>1&&t.metrics.deletions.push(...m.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-g.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=mr.metrics,t.textSuggestions=[]),t.text!==n.payload.text&&gc(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"&&gc(t)},commitSuggestion(t){gc(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}){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(Z,n=>{n.tabCompletionSuggestion=mr.tabCompletionSuggestion,n.previousKeyDownEvent=mr.previousKeyDownEvent,n.textSuggestions=mr.textSuggestions,n.selectedSuggestionIndex=mr.selectedSuggestionIndex,n.metrics=mr.metrics})}}),Km=z0("input"),ni=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),Mk=e=>e.input.selection,V0=()=>A(Mk),{userInput:K0,changeSelection:Wm,initialInput:W0,mergeMetrics:$0,nextTextSuggestionIndex:q0,offeredTextSuggestion:G0,previousTextSuggestionIndex:Q0,registerCut:X0,registerKeyDown:Y0,registerPaste:Z0,reset:J0,resetToCommitted:Zs,setInputHtml:ex,setSelectedTextSuggestionIndex:Ec,setTextSuggestions:gr,stageSuggestion:Ft,commitSuggestion:hr}=Km.actions,Ge=z0("overlay");var ri=S(O());var tx={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var $m=S(C()),Dk=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ri.useRef)(null),l=(0,ri.useRef)(null),u=P("Dialog",tx);return(0,ri.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,ri.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,$m.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,$m.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},oi=Dk;var yg=S(O());var qm={};Te(qm,{enUS:()=>Fk,nlNL:()=>jk});var Fk={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?"}]},jk={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 nx={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 Js=S(C()),Cc=()=>(0,Js.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Js.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Js.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 ea=S(C()),rx=()=>(0,ea.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ea.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ea.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 bt=S(O());var Tc=S(O());function ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,Qm=2,Xm=4,Se=8,_c=16,na=32,jt=64,Gm={a:{content:q|Se,self:!1,type:q|Se|na|jt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|Qm|Xm|Se|_c|na|jt},button:{content:Se,type:q|Se|na|jt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|na|jt},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|_c},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function Xr(e){return t=>{Gm[t]={...e,...Gm[t]}}}["address","main","div","figure","p","pre"].forEach(Xr({content:q,type:q|jt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Xr({content:Se,type:q|Se|jt}));["p","pre"].forEach(Xr({content:Se,type:q|jt}));["s","small","span","del","ins"].forEach(Xr({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(Xr({content:q,type:q|Qm|jt}));["h1","h2","h3","h4","h5","h6"].forEach(Xr({content:Se,type:q|Xm|jt}));["audio","canvas","iframe","img","video"].forEach(Xr({type:q|Se|_c|jt}));var oa=Object.freeze(Gm),Ym=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Zm=Object.keys(oa).filter(e=>e!=="canvas"&&e!=="iframe"),J=1,Jm=2,Qr=3,yr=4,Pc=5,kc=Object.freeze({alt:J,cite:J,class:J,colspan:Qr,controls:yr,datetime:J,default:yr,disabled:yr,dir:J,height:J,href:J,id:J,kind:J,label:J,lang:J,loading:J,loop:yr,media:J,muted:yr,poster:J,rel:J,role:J,rowspan:Qr,scope:J,sizes:J,span:Qr,start:Qr,style:Pc,src:J,srclang:J,srcset:J,tabindex:J,target:J,title:J,type:J,width:J}),eg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function bc(){return bc=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},bc.apply(this,arguments)}function Rc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Tc.default.createElement(i,bc({className:t},e)):Tc.default.createElement(i,bc({className:t},e),n)}var ra=class{attribute(t,n){return n}node(t,n){return n}};function ox(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var Ht=class{constructor(t,n,r){ta(this,"greedy",!1),ta(this,"options",void 0),ta(this,"propName",void 0),ta(this,"inverseName",void 0),ta(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?Tc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return ox(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Yr=S(O()),lx=S(sx());function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uk=/(url|image|image-set)\(/i,tg=class extends ra{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Uk)&&delete n[r]}),n}},ax=1,zk=3,Vk=/^<(!doctype|(html|head|body)(\s|>))/i,Kk=/^(aria-|data-|\w+:)/iu,Wk=/{{{(\w+)\/?}}}/;function $k(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ic=class{constructor(t,n={},r=[],o=[]){var i;vn(this,"allowed",void 0),vn(this,"banned",void 0),vn(this,"blocked",void 0),vn(this,"container",void 0),vn(this,"content",[]),vn(this,"props",void 0),vn(this,"matchers",void 0),vn(this,"filters",void 0),vn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new tg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Zm),this.banned=new Set(Ym),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:g,...m}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...m,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||NP)();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(LP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,U0.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==B0||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=wc[l]||wc[s];if(!this.isSafe(t)||!l.match(AP)&&(!n&&(!u||u===Qm)||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===mr?c=!0:u===Wr?c=Number.parseFloat(String(c)):u!==Sc&&(c=String(c)),r[Ym[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 oa[t]?{...n,...oa[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===B0){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let v;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;v=this.parseNode(y,h);let m=s(y,v,h);if(m===null)return;if(typeof m<"u"){l.push(qr.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,h))){var p;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),h.void&&(m.selfClose=h.void),l.push(qr.default.createElement(xc,{...m,key:this.keyIndex},(p=v)!==null&&p!==void 0?p:this.parseNode(y,h)))}else l=[...l,...this.parseNode(y,h.tagName?h:n)]}else if(c.nodeType===IP){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(OP);){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 y=o.match(new RegExp(`{{{/${a}}}}`));h=y.index+y[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,y.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 MP(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 Ec(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?qr.default.createElement(qr.default.Fragment,null,d):qr.default.createElement(xc,{attributes:n,className:r,tagName:c},d)}function oi(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,y=i?[]:l,v=o?[]:a,g=c?[c]:[],m=u?[u]:[];y.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let f=g.reduce((T,E)=>E(T,e),r??""),w=new Ec(f,h,y,v),x=m.reduce((T,E)=>E(T,e),w.parse());return qr.default.createElement(MP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:p})}var sg=S(Q());var Jm={root:"_root_7hhs4_1",agentText:"_agentText_7hhs4_3",textInput:"_textInput_7hhs4_8",textInputWrapper:"_textInputWrapper_7hhs4_27",alert:"_alert_7hhs4_31",alertText:"_alertText_7hhs4_50",warning:"_warning_7hhs4_60",success:"_success_7hhs4_69"};var V0=S(Q());var ii=S(O());function z0(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Cc(e){let t=(0,ii.useRef)(null),[n,r]=(0,ii.useState)(!1);return(0,ii.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=z0((c,p)=>{let d=t.current;if(!d)return;let h=c/i,y=p/i,v=d.getBoundingClientRect(),g=h>v.x&&h<v.x+v.width&&y>v.y&&y<v.y+v.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=z0(()=>{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 Ct={root:"_root_kpc8q_1",agentText:"_agentText_kpc8q_4",tabText:"_tabText_kpc8q_9",hint:"_hint_kpc8q_10",matchSelection:"_matchSelection_kpc8q_14",focus:"_focus_kpc8q_20",resetIndent:"_resetIndent_kpc8q_24",matchKeyword:"_matchKeyword_kpc8q_28",matchPlaceholder:"_matchPlaceholder_kpc8q_29",hover:"_hover_kpc8q_35",hintText:"_hintText_kpc8q_67",popover:"_popover_kpc8q_75",popoverRoot:"_popoverRoot_kpc8q_80",popoverContentContainer:"_popoverContentContainer_kpc8q_84",popoverContent:"_popoverContent_kpc8q_84",selectionOptions:"_selectionOptions_kpc8q_110",selectionOptionsIsHidden:"_selectionOptionsIsHidden_kpc8q_115",selectionOptionsButton:"_selectionOptionsButton_kpc8q_119",caret:"_caret_kpc8q_135",popoverSuggestionsRoot:"_popoverSuggestionsRoot_kpc8q_139",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_kpc8q_144"};var eg=S(C()),DP=({inputElement:e,children:t})=>{let n=P("TabCompletion",Ct),[r,o]=Cc(e);return(0,eg.jsx)("mark",{ref:r,className:(0,V0.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},si=class extends jt{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,eg.jsx)(DP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ai=S(O());function Tc(e){return e.contentEditable==="true"}function FP(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 K0(e){let{selectionStart:t,selectionEnd:n}=Tc(e)?FP(e):e;return[t,n]}function _c(e){let[,t]=(0,ai.useState)(),n=(0,ai.useRef)(null);return n.current=K0(e),(0,ai.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=K0(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function bc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(lo);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 W0=S(O());function li(e){(0,W0.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Gr(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var $0,Jt=new Map,jP=["bottom","height","left","right","top","width"],HP=(e={},t={})=>jP.some(n=>e[n]!==t[n]),q0=()=>{let e=[];Jt.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Jt.delete(n);return}let r=n.getBoundingClientRect();HP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),Jt.size!==0&&($0=window.requestAnimationFrame(q0))};function G0(e,t){return{observe(){let n=Jt.size===0;if(Jt.has(e)){let r=Jt.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Jt.set(e,{rect:void 0,callbacks:[t]});n&&q0()},unobserve(){let n=Jt.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Jt.delete(e),Jt.size||cancelAnimationFrame($0)}}}}var X0,en=new Map,Q0=()=>{en.forEach((e,t)=>{if(!t.isConnected){en.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)))}),en.size!==0&&(X0=window.requestAnimationFrame(Q0))};function Y0(e,t){return{observe(){let n=en.size===0;en.has(e)?en.get(e).callbacks.push(t):en.set(e,{visible:void 0,callbacks:[t]}),n&&Q0()},unobserve(){let n=en.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||en.delete(e),en.size||cancelAnimationFrame(X0)}}}}var tg=["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 ng(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ui(e){return parseFloat(e)}function kc(e){return Math.round(e*1e6)}function Z0(e){return e/1e6}function rg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ui(e.width),i=ui(e.borderLeftWidth),s=ui(e.borderRightWidth),a=ui(e.paddingRight),l=Z0(kc(o)-kc(i)-kc(s)),u=Z0(kc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function ci(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Gr(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ng(r,n,tg),rg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=Y0(e,()=>{ng(r,n,tg),rg(r,e,n),i(),setTimeout(i,0)}),a=G0(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(ng(r,n,tg),rg(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=ui(p.borderTopWidth),h=ui(p.borderBottomWidth),y=c.top+d-u.top,v=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${y}px 0px ${v}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 og={};Te(og,{enUS:()=>BP,nlNL:()=>UP});var BP={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"}]},UP={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 ia=S(C()),J0=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ia.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ia.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 ig=S(C()),ex=()=>(0,ig.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,ig.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var tx=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(tx||{}),vn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentHTML="";currentSelection=null;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,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(tx).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){let t=this.currentSelection;this.isPossibleClearInputAction=!0,t&&this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){let t=()=>{let r=document.activeElement===this.element?this.getSelection():null;cr(this.currentSelection,r)||(this.currentSelection=r,this.emit("selection",r))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),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)),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Sn=class extends vn{getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){return this.currentSelection?this.getText().slice(this.currentSelection.start,this.currentSelection.end):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var Xe=S(C()),zP=({value:e,onUse:t,...n})=>{var c;let r=j(og),o=K(),i=P("EditSuggestionTextInput",Jm),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(lo))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new Sn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown($u(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Ge.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(VP,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,sg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(J0,{}):(0,Xe.jsx)(ex,{})]})]})},VP=({inputElement:e,value:t})=>{let n=P("EditSuggestionTextInput",Jm),r=(0,Tt.useRef)(null),o=_c(e);return(0,Tt.useEffect)(()=>{bc(e,o)},[o,e]),(0,Xe.jsx)(KP,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,sg.default)(n.root,n.agentText),children:[(0,Xe.jsx)(oi,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new si("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},KP=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=ci(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},nx=zP;var pi=S(O());var Qe={root:"_root_m5usm_1",list:"_list_m5usm_2",listWrapper:"_listWrapper_m5usm_6",listHorizontal:"_listHorizontal_m5usm_10",page:"_page_m5usm_19",search:"_search_m5usm_25",pageNav:"_pageNav_m5usm_33",pageTitle:"_pageTitle_m5usm_41",pageBackButton:"_pageBackButton_m5usm_48",listHeading:"_listHeading_m5usm_62",listItem:"_listItem_m5usm_70",listItemContent:"_listItemContent_m5usm_79",listItemText:"_listItemText_m5usm_97",listItemDescription:"_listItemDescription_m5usm_105",truncate:"_truncate_m5usm_112",lineClamp:"_lineClamp_m5usm_118",listItemTitle:"_listItemTitle_m5usm_125",listItemAction:"_listItemAction_m5usm_132",listItemPrimaryAction:"_listItemPrimaryAction_m5usm_146",listItemSelected:"_listItemSelected_m5usm_151",sources:"_sources_m5usm_155",sourcesTitle:"_sourcesTitle_m5usm_162",source:"_source_m5usm_155",icon:"_icon_m5usm_177",searchIcon:"_searchIcon_m5usm_194",searchInputWrapper:"_searchInputWrapper_m5usm_199",searchInput:"_searchInput_m5usm_199",select:"_select_m5usm_220",selectType:"_selectType_m5usm_237",selectWrapper:"_selectWrapper_m5usm_241",image:"_image_m5usm_271",imageSrc:"_imageSrc_m5usm_278",imageTitle:"_imageTitle_m5usm_289",actions:"_actions_m5usm_294",actionsWrapper:"_actionsWrapper_m5usm_298",actionsBar:"_actionsBar_m5usm_304",actionButton:"_actionButton_m5usm_313",actionShortcut:"_actionShortcut_m5usm_331",actionShortcutFixKerning:"_actionShortcutFixKerning_m5usm_338"};var sa=S(C()),WP=({src:e,title:t})=>{let n=P("CommandPalette",Qe);return(0,sa.jsxs)("div",{className:n.image,children:[(0,sa.jsx)("img",{src:e,alt:t,className:n.imageSrc}),t&&(0,sa.jsx)("span",{className:n.imageTitle,children:t})]})},rx=WP;var ox=S(O()),ix=S(Q());var aa=S(C());function ag({children:e,heading:t,orientation:n}){let r=P("CommandPalette",Qe);return ox.default.Children.count(e)===0?null:(0,aa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,aa.jsx)("h4",{className:r.listHeading,children:t}),(0,aa.jsx)("div",{className:(0,ix.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var la=S(Q());var sx={root:"_root_nkim0_1"};var lg={};Te(lg,{enUS:()=>$P,nlNL:()=>qP});var $P={experimental:[{type:0,value:"Experimental"}]},qP={experimental:[{type:0,value:"Experimenteel"}]};var ug=S(C()),ax=({children:e})=>{let t=P("Chip",sx);return(0,ug.jsx)("span",{className:t.root,children:e})},Pc=()=>{let e=j(lg);return(0,ug.jsx)(ax,{children:e("experimental")})},lx=ax;var Rc=S(O()),dx=S(C()),ux=Rc.default.createContext(void 0);function gr(){let e=Rc.default.useContext(ux);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var cx=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Rc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,dx.jsx)(ux.Provider,{value:s,children:e})};var _t=S(C());function cg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,index:o,isExperimental:i,description:s,sources:a,styles:l,...u}){let{selected:c,onChangeOpen:p}=gr(),d=P("CommandPalette",Qe);function h(y){r(y),e&&p(!1)}return(0,_t.jsxs)("div",{className:(0,la.default)(d.listItem,c===o&&d.listItemSelected),children:[(0,_t.jsxs)("button",{type:"button",className:(0,la.default)("command-palette-list-item",d.listItemAction,d.listItemPrimaryAction),"aria-disabled":u.disabled??!1,onClick:h,...u,children:[(0,_t.jsxs)("div",{className:d.listItemContent,children:[typeof n=="string"?(0,_t.jsx)("p",{className:(0,la.default)(d.listItemText,d.truncate,l==null?void 0:l.title),children:n}):n,s&&(0,_t.jsx)("p",{className:(0,la.default)(d.listItemDescription,l==null?void 0:l.description,t?d.lineClamp:d.truncate),children:s})]}),i&&(0,_t.jsx)(Pc,{})]}),a&&(0,_t.jsxs)("div",{className:d.sources,children:[(0,_t.jsx)("span",{className:d.sourcesTitle,children:"Sources"}),a.map(y=>y.url?(0,_t.jsx)("a",{className:d.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",children:y.name},y.url):(0,_t.jsx)("span",{className:d.source,children:y.name},y.name))]})]})}var ua={};Te(ua,{enUS:()=>GP,nlNL:()=>XP});var GP={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}]},XP={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}]};var hr=S(C());function dg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ua),s=P("CommandPalette",Qe),{page:a}=gr();return a!==n?null:(0,hr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,hr.jsxs)("div",{className:s.pageNav,children:[(0,hr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,hr.jsx)(gc,{}),i("back")]}),t&&(0,hr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,hr.jsx)(Pc,{})]}),e]})}var yr=S(O());var Ic=()=>/Mac/i.test(navigator.platform);var QP={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},H=QP;function YP(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function ne(e){return Array.isArray(e)?e.map(ne):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[YP(n)]:ne(e[n])}),{}):e}function fg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ee(e){return Array.isArray(e)?e.map(Ee):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[fg(n)]:Ee(e[n])}),{}):e}var ZP={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},da=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)||""}},ca=N("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?ne(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),ne(r))}),pg=N("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}),mg=N("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),fx=e=>e.info.agentInfo,px=F({name:"info",initialState:ZP,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ca.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ca.rejected,t=>{t.fetchState="error"}).addCase(ca.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(pg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Z,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:mx}=px.actions,gx=px.reducer;var Lc={list:[],fetchState:"idle",isOpen:!1,page:"search"},hx=e=>e.search.isOpen,yx=e=>e.search.page,vx=e=>e.search.list;function Sx(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Xr=N("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:da(r),tags:e.tags});return i}),wx=F({name:"search",initialState:Lc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Lc.fetchState,e.list=Lc.list}},extraReducers:e=>{e.addCase(Xr.pending,t=>{t.fetchState="loading"}).addCase(Xr.rejected,(t,n)=>{t.fetchState="error",H.error(n.error)}).addCase(Xr.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(Z,()=>Lc)}}),{resetSearch:Ac,setIsOpen:ot,setPage:Ue}=wx.actions,xx=wx.reducer;var JP=/(https?:\/\/[^\s]+)/,Oc=e=>e.split(" ").find(t=>JP.test(t));var gg=S(Q());var Nc=S(C()),eR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Qe);return(0,Nc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,gg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Nc.jsx)("span",{className:(0,gg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},di=eR;var wn=S(C()),tR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=P("CommandPalette",Qe),a=j(ua),{selected:l,setSelected:u}=gr(),c=i[l],p=c&&typeof c.text=="string"&&Oc(c.text),d=(0,yr.useRef)(null);function h(w){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),T=0,E=0;w==="down"?(x.forEach((R,b)=>{b===l&&(T=b)}),E=T===x.length-1?0:T+1):w==="up"?(x.forEach((R,b)=>{b===l&&(T=b)}),E=T?T-1:x.length-1):u(0);let _=x[E];_&&typeof E=="number"&&(u(E),_.scrollIntoView&&_.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function y(){if(!d.current)return;let w=d.current.querySelectorAll(".command-palette-list-item"),x=0;w.forEach((E,_)=>{_===l&&(x=_)});let T=w[x];T&&T.click()}let v=()=>{p&&window.open(p,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,yr.useCallback)(w=>{if(w.key==="Enter"&&w.altKey&&p){v();return}if(w.key==="Enter"&&w.shiftKey){m();return}if(w.key==="ArrowDown"){w.preventDefault(),w.stopPropagation(),h("down");return}if(w.key==="ArrowUp"){w.preventDefault(),w.stopPropagation(),h("up");return}w.key==="Enter"&&l!==-1&&(w.preventDefault(),w.stopPropagation(),y())},[l]);return(0,yr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,wn.jsxs)("div",{className:s.actions,children:[(0,wn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,wn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,wn.jsx)(di,{onClick:v,shortKeys:[Ic()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,wn.jsxs)(yr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,wn.jsx)(di,{onClick:m,shortKeys:[8679,8629],children:n}),(0,wn.jsx)(di,{onClick:g,shortKeys:[8629],children:t})]})]})]})},Cx=tR;var Tx=S(O());var fa=S(C()),fi=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"currentColor",children:[(0,fa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,fa.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=S(C());function nR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Qe);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(fi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.jsx)("input",{ref:a,spellCheck:!1,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 _x=(0,Tx.forwardRef)(nR);var pa=S(C());function Qr({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,y]=(0,pi.useState)(0),v=(0,pi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=v.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,pi.useEffect)(()=>{y(0)},[d,r]),(0,pa.jsx)(ti,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,children:(0,pa.jsxs)(cx,{selected:h,setSelected:y,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,pa.jsx)(_x,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Qr.Page=dg;Qr.List=ag;Qr.Image=rx;Qr.ListItem=cg;Qr.ActionsBar=Cx;Qr.Button=di;var ee=Qr;var je=S(C()),rR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=P("EditSuggestionForm",b0),l=K(),u=j(Nm),c=A(y=>y.overlayInput.text);(0,hg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=y=>{y.preventDefault(),d(c)},d=y=>{l(Xu(y)),t(y)},h=y=>v=>{c!==s?window.confirm(u("warning"))&&y(v):y(v)};return(0,hg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,je.jsxs)("div",{className:a.root,children:[(0,je.jsxs)("div",{className:a.content,children:[e.title&&(0,je.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,je.jsx)(Km,{labels:e.searchKeywords}),(0,je.jsx)(nx,{onUse:d,value:c})]}),(0,je.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,je.jsx)(gc,{})}),(0,je.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,je.jsx)(D0,{})})]}),(0,je.jsxs)("div",{className:a.primaryButtons,children:[(0,je.jsx)(ee.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,je.jsx)(ee.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Mc=rR;var oR=["{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}"],iR=new RegExp(oR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function bx(e,t){let n=e.split(iR),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 kx(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var Rx={suggestions:[],fetchState:"idle",isInitialRequest:null},Px={default:Rx},Ix=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Lx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Ax=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")},mi=e=>e.textSuggestions,Ox=e=>t=>t.text.startsWith(e),Dc=fe("textSuggestions/refresh"),xn=N("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=Jo(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,da(r),e);if(e==="default"){let c=s?l.filter(Ox(a)):l;t.dispatch(fr(c.slice(0,i)))}return l}),ma=N("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,{...da(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Ox(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?bx(c.text,e):c.text}))),l=kx(l,i),t.dispatch(fr(l)),l}),Nx=F({name:"textSuggestions",initialState:Px,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(xn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||Rx;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(xn.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(xn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(ma.pending,t=>{t.default.fetchState="loading"}).addCase(ma.rejected,t=>{t.default.fetchState="error"}).addCase(ma.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(Z,()=>Px)}}),{setTextSuggestions:Mx,setSuggestionState:Dx}=Nx.actions,Fx=Nx.reducer;var jx={contentType:null,suggestion:null},Hx=e=>e.activeSuggestion.suggestion,Bx=e=>e.activeSuggestion.contentType,Ux=F({name:"activeSuggestion",initialState:jx,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(Z,()=>jx)}}),{setActiveSuggestion:En,resetActiveSuggestion:yg}=Ux.actions,zx=Ux.reducer;var vg={};Te(vg,{enUS:()=>sR,nlNL:()=>aR});var sR={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"}]},aR={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 lR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Vx=({ui:e})=>e.overlayCollapsed;var Kx=F({name:"ui",initialState:lR,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:ga,setInputHasFocus:gi,setOverlayCollapsed:hi,setOpenOverlayWhenTyping:Wx,setOverlayCollapsedUserOverwrite:$x}=Kx.actions,qx=Kx.reducer;var ha=S(O()),Xx=S(C()),Gx=ha.default.createContext(null),ya=({broadcastEvents:e,children:t})=>{let n=ha.default.useMemo(()=>e,[]);return(0,Xx.jsx)(Gx.Provider,{value:n,children:t})},bt=()=>{let e=(0,ha.useContext)(Gx);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var uR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Cn=e=>e.auth.isLoggedIn,Qx=e=>e.auth.loginFetchState,Yx=e=>e.auth.verifyFetchState,Zx=e=>e.auth.showLoginOverlay,Yr=N("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Jx=N("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),va=N("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),eE=F({name:"auth",initialState:uR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Yr.pending,t=>{t.loginFetchState="loading"}),e.addCase(Yr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Yr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(va.pending,t=>{t.verifyFetchState="loading"}),e.addCase(va.rejected,t=>{t.verifyFetchState="error"}),e.addCase(va.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Fc,setShowLoginOverlay:tE}=eE.actions,nE=eE.reducer;var Sg="SetActiveSuggestion",yi="ShowLoginOverlay",wg="UserLoggedIn",Tn="ApplySuggestion",xg="ApplyImageSuggestion",cR="ShowCommandPalette",dR=e=>({[Sg]:t=>{e.dispatch(Dx(t.state)),e.dispatch(En({contentType:t.contentType,suggestion:t.suggestion}))},[cR]:t=>{e.dispatch(ot(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[yi]:t=>{e.dispatch(tE(t))},[wg]:()=>{e.dispatch(Yr())},[xg]:t=>{e.dispatch(Yu({suggestion:t.suggestion}))},[Tn]:t=>{e.dispatch(Mt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(pr())}}),rE=dR;var Eg=S(C()),fR=()=>{var y;let[e,t]=(0,oE.useState)(!1),n=A(Hx),r=A(Bx),o=A(mi),i=K(),s=bt(),a=j(vg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(yg()),i(gi(!0)),i(Ge.actions.reset())},c=(v,g)=>{i(yg()),i(gi(!0)),s.send(Tn,{text:v,suggestion:g})};if(n===null||r===null)return null;let p=(y=o[r])==null?void 0:y.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(En({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(En({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Eg.jsx)(ti,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Eg.jsx)(Mc,{onTouched:t,onDismiss:u,onUse:v=>c(v,n),suggestion:n,onNext:h,onPrevious:d})})},iE=fR;var jc=S(Q()),Bt=S(O());var aE=S(Q());var sE={root:"_root_1ukx5_1"};var lE=S(C()),pR=({className:e,value:t,...n})=>{let r=P("TextInput",sE);return(0,lE.jsx)("input",{className:(0,aE.default)(e,r.root),type:"text",value:t,...n})},Sa=pR;var Cg={};Te(Cg,{enUS:()=>mR,nlNL:()=>gR});var mR={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"}]},gR={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 uE={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=S(C());var hR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},yR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Cg),s=P("LoginTokenDialog",uE),a=A(Yx),l=K(),u=D("productName"),[c,p]=(0,Bt.useState)(e||""),[d,h]=(0,Bt.useState)(0),[y,v]=(0,Bt.useState)(""),g=(0,Bt.useCallback)(async x=>{x.preventDefault(),l(Jx({email:c})),h(1)},[n,c]),m=()=>{v(""),h(0)},f=(0,Bt.useCallback)(async x=>{x.preventDefault();let T=hR(x.target.elements.token.value);if(!T){v(i("verifyCodeError",{login:w}));return}l(va({token:T}))},[n]),w=(0,Bt.useMemo)(()=>x=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,Bt.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:w})),a==="done"&&r()},[a]),(0,he.jsx)(ti,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Sa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>p(x.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,jc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:f,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Sa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,he.jsx)("div",{className:s.errorMessage,children:y}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,jc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,jc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},cE=yR;var fE=S(C()),vR=()=>{let e=A(Zx),t=A(fx),n=D("adminUrl"),r=bt(),o=()=>r.send(yi,!1),i=()=>{r.send(yi,!1),r.send(wg)};return(0,fE.jsx)(cE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},dE=vR;var jE=S(bg()),it=S(O());var DR={data:null,fetchState:"idle"},hE=e=>e.contentTypes.data,wa=N("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),FR=F({name:"contentTypes",initialState:DR,reducers:{},extraReducers:e=>{e.addCase(wa.pending,t=>{t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),yE=FR.reducer;function xa(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 vE=S(O());function SE(e,t){(0,vE.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 Ea=S(O());var wE={data:null,fetchState:"idle"},Hc=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},Ut=N("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),jR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),HR=F({name:"entities",initialState:wE,reducers:{},extraReducers:e=>{e.addCase(Ut.pending,t=>{t.fetchState="loading"}).addCase(Ut.rejected,t=>{t.fetchState="error"}).addCase(Ut.fulfilled,(t,n)=>{t.fetchState="done",t.data=jR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(Z,()=>wE)}}),xE=HR.reducer;var kg={};Te(kg,{enUS:()=>BR,nlNL:()=>UR});var BR={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},UR={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var EE={root:"_root_17kae_1",empty:"_empty_17kae_5"};var Zr=S(C()),zR=({onCopy:e,onUse:t})=>{let n=(0,Ea.useRef)(null),r=P("EntitiesList",EE),o=j(kg),i=A(Hc),s=K();return(0,Ea.useEffect)(()=>{s(Ut())},[]),(0,Ea.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,Zr.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,Zr.jsx)(ee.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,Zr.jsx)(ee.List,{children:i.map((a,l)=>(0,Zr.jsx)(ee.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,Zr.jsx)("p",{className:r.empty,children:o("noResults")})]})},CE=zR;var zt=S(O());var TE={data:null,fetchState:"idle"},_E=e=>e.summary.data,bE=e=>e.summary.fetchState==="error",_n=N("summary/getSummary",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let o=r.conversationQuery,i=await o();if(i.length===0)return Promise.reject(new Error("No messages are included"));let s=await n.getSummary(i);return{original:i,summary:s}}),VR=F({name:"summary",initialState:TE,reducers:{},extraReducers:e=>{e.addCase(_n.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(_n.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(_n.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(Z,()=>TE)}}),kE=VR.reducer;var Pg={};Te(Pg,{enUS:()=>KR,nlNL:()=>WR});var KR={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."}]},WR={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 PE={root:"_root_18y7z_1",actions:"_actions_18y7z_5",main:"_main_18y7z_11",textInput:"_textInput_18y7z_15",loading:"_loading_18y7z_34",error:"_error_18y7z_38"};var bn=S(C()),$R=({onCopy:e})=>{let t=(0,zt.useRef)(null),n=P("SummaryForm",PE),[r,o]=(0,zt.useState)(""),i=j(Pg),s=A(_E),a=A(bE),l=K(),u=()=>{l(Zt({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(Zt({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,zt.useEffect)(()=>{l(_n())},[]),(0,zt.useEffect)(()=>{o(s||"")},[s]),(0,zt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,zt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,bn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,bn.jsx)("p",{className:n.error,children:i("error")}):(0,bn.jsxs)(zt.Fragment,{children:[(0,bn.jsx)("div",{className:n.main,children:(0,bn.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,bn.jsx)("div",{className:n.actions,children:(0,bn.jsx)(ee.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},RE=$R;var Rg={};Te(Rg,{enUS:()=>qR,nlNL:()=>GR});var qR={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"}],knowledgeSearch:[{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?"}]},GR={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:"Vat gesprek samen"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeSearch:[{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 Jr=S(O());var Ig={};Te(Ig,{enUS:()=>XR,nlNL:()=>QR});var XR={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"}]},QR={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 IE={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Lg={data:[],fetchState:"idle"},LE=e=>{var t;return(t=e.answer)==null?void 0:t.data},AE=e=>e.answer.fetchState,Ca=fe("answer/resetKnowledgeSearch"),vi=N("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().profile.data)==null?void 0:s.code;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeSearch({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),YR=F({name:"answer",initialState:Lg,reducers:{},extraReducers:e=>{e.addCase(vi.pending,t=>{t.fetchState="loading"}).addCase(vi.rejected,t=>{t.fetchState="error"}).addCase(vi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(Z,()=>Lg).addCase(Ca,()=>Lg)}}),OE=YR.reducer;var Ta=S(C()),NE=()=>(0,Ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ta.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ta.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Ye=S(C()),ZR=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Jr.default.useState(""),{setSelected:s}=gr(),a=(0,Jr.useRef)(null),l=P("EntitiesList",IE),u=j(Ig),c=K(),p=A(LE),d=A(AE),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(vi({question:o,promptInstruction:r}))};return(0,Jr.useEffect)(()=>{var y;n&&d==="idle"?c(vi({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,Jr.useEffect)(()=>{d==="done"&&(s(0),i(""))},[d,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(ee.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(ee.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:v},g)=>(0,Ye.jsx)(ee.List,{children:(0,Ye.jsx)(ee.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),sources:v.sources,styles:{title:l.question,description:l.answer},children:y})},`${v.answer}_${g}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,Ye.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,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(NE,{})})]})]})]})},ME=ZR;var JR={data:null,fetchState:"idle"},Si=e=>e.profile.data,Bc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],_a=N("profile/getProfile",async(e,t)=>{let{deepdeskAPI:n}=t.extra,o=t.getState().conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return n.getProfile(o.profileCode)}),eI=F({name:"profile",initialState:JR,reducers:{},extraReducers:e=>{e.addCase(_a.pending,t=>{t.fetchState="loading"}).addCase(_a.rejected,t=>{t.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),DE=eI.reducer;var Ce=S(C()),tI=200,nI=5,rI=4,oI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),FE=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),iI=()=>{let e=K(),t=bt(),n=j(Rg),[r,o]=(0,it.useState)(!1),[i,s]=(0,it.useState)(""),a=A(yx),l=A(Si),[u,c]=(0,it.useState)(null),[p,d]=(0,it.useState)([]),[h,y]=(0,it.useState)(),v=A(Cn),g=D("showSearch"),m=D("showEntitiesCommand"),f=D("showSummaryCommand"),w=D("showKnowledgeSearch"),x=D("showImageSearch"),T=D("searchTriggerKey"),E=A(hE),_=A(vx),R=A(hx),b=I=>on(_.filter(W=>W.type===I.toUpperCase()),I),B=[{value:"PERSONAL",label:n("personalSuggestions"),list:b("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:b("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:b("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:b("IMAGE"),listOrientation:"horizontal",shouldShow:x}].filter(I=>I.shouldShow),re=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:m&&FE(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&FE(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeSearch")}: ${i}`:n("knowledgeSearch"),onClick:()=>e(Ue("knowledgeSearch")),shouldShow:w,experimental:!0}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:b(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],Pe=(0,it.useCallback)((0,jE.default)((I,W)=>{e(Xr({query:I,type:W,tags:["search-overlay"]}))},tI),[]),so=oI([...z,...B]),Vt=(0,it.useCallback)((I,W)=>{if(!W)return;let It=[...B,...z].find(({value:Dn})=>Dn===W);It&&(e(Ue("edit")),c(I),d(It.list))},[e,u,z]),ao=(0,it.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(xg,{suggestion:W});break;default:t.send(Tn,{text:I,suggestion:W})}e(ot(!1))},[e]),Ii=I=>{xa(I.text),e(Zt({name:"entity copied",data:{entity:I,type:"copy"}})),e(ot(!1))},Tr=I=>{t.send(Tn,{text:I,suggestion:{source:"knowledge-search",text:I}}),e(Zt({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ca()),e(ot(!1))},Fa=I=>{xa(I),e(ot(!1))},ja=I=>{t.send(Tn,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(ot(!1))},Li=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ai=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function on(I,W){return I.slice(0,h?10:W.toLowerCase()==="image"?rI:nI)}function Oi(I,W,It){return W.reduce((Dn,sn)=>It&&h===It?sn.length+Dn:on(sn,It).length+Dn,I)}function _r(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,it.useEffect)(()=>{i?Pe(i,h):e(Ac())},[i,h]),(0,it.useEffect)(()=>{v&&e(wa())},[v]),SE(T,()=>e(ot(!0))),!g||!l?null:(0,Ce.jsxs)(ee,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:_r(I=>e(ot(I))),onChangeType:I=>y(I),onChangePage:_r(I=>e(Ue(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...B],children:[(0,Ce.jsx)(ee.Page,{id:"search",children:(0,Ce.jsxs)(ee.ActionsBar,{list:[...re.map(I=>({text:I.label,type:"command"})),...so.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>ao(I,so[W]),onSecondary:(I,W)=>Vt(so[W],so[W].type),children:[re.length>0&&(0,Ce.jsx)(ee.List,{heading:n("commands"),children:re.map((I,W)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...z,...B].map(({value:I,label:W,list:It,lineClamp:Dn,listOrientation:sn},Ni)=>(0,Ce.jsx)(ee.List,{heading:W,orientation:sn==="horizontal"?"horizontal":"vertical",children:on(It,I).map((ut,ct)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(re.length+ct,[...z,...B].slice(0,Ni).map(({list:br})=>br),I),closeOnSelect:!1,lineClamp:Dn,onClick:()=>ao(ut.text,ut),description:I!=="IMAGE"?ut.title&&ut.text:void 0,children:I==="IMAGE"?(0,Ce.jsx)(ee.Image,{title:ut.title||ut.text,src:ut.image}):ut.title||ut.text},`${ut.id}-${ut.text}`))},I))]})}),(0,Ce.jsx)(ee.Page,{id:"edit",onDismiss:_r(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ce.jsx)(Mc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Ai,onPrevious:Li,onUse:I=>{e(Ue("search")),ao(I,u),e(ot(!1)),d([]),c(null)}})}),(0,Ce.jsx)(ee.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:_r(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(CE,{onUse:ja,onCopy:Ii})}),(0,Ce.jsx)(ee.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:_r(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(RE,{onCopy:Fa})}),(0,Ce.jsx)(ee.Page,{id:"knowledgeSearch",title:n("knowledgeSearch"),isExperimental:!0,onDismiss:_r(()=>{e(Ca()),e(Ue("search"))}),children:(0,Ce.jsx)(ME,{promptInstruction:l.knowledgeSearchPromptInstruction,question:i,onUse:Tr,onResetQuestion:()=>{e(Ca()),s("")}})})]})},HE=iI;var wi=S(C()),sI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,wi.jsxs)(BE.Fragment,{children:[e&&(0,wi.jsx)(HE,{}),(0,wi.jsx)(iE,{}),t&&(0,wi.jsx)(dE,{})]})},UE=sI;var ba=S(C()),aI=({children:e})=>{let n=D("locale").replace("-","");return(0,ba.jsx)(zm.Provider,{value:n,children:e})},lI=({store:e,customStyles:t={},children:n})=>(0,ba.jsx)(Em,{store:e,children:(0,ba.jsx)(aI,{children:(0,ba.jsx)($s.Provider,{value:t,children:n})})}),ka=lI;var Kc=S(Q()),Ci=S(O());var zE=S(O());function VE(e,t){let[n,r]=(0,zE.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return H.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){H.error(s)}}]}function Uc(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 WE=S(Q()),kn=S(O());var Ag={};Te(Ag,{enUS:()=>uI,nlNL:()=>cI});var uI={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"}]}]},cI={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 KE={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var vr=S(C()),Og=(e,t,n)=>r=>(0,vr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),dI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Ag),i=bt(),s=P("Login",KE),a=D("productName"),l=(0,kn.useCallback)(v=>{v.preventDefault(),r&&r(parseInt(v.target.value,10))},[]),u=(0,kn.useCallback)(v=>{v.preventDefault(),i.send(yi,!0)},[t]),c=(0,kn.useMemo)(()=>v=>(0,vr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:v},"login"),[t]),p=(0,kn.useCallback)(v=>(0,vr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:v},"prompt"),[u]),{min:d,hour:h,day:y}=(0,kn.useMemo)(()=>({min:Og(s,60*10,l),hour:Og(s,60*60,l),day:Og(s,60*60*12,l)}),[]);return(0,vr.jsxs)("div",{className:(0,WE.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,vr.jsxs)(kn.Fragment,{children:[(0,vr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:y})]})]})},zc=dI;var $E={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Pa=S(C()),fI=({title:e})=>{let t=P("SearchTrigger",$E),n=K();return(0,Pa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(ot(!0)),children:[(0,Pa.jsx)(fi,{}),(0,Pa.jsx)("span",{className:t.text,children:e})]})},qE=fI;var XE=S(Q());var GE={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var QE=S(C()),pI=({withDivider:e,children:t})=>{let n=P("SuggestionList",GE);return(0,QE.jsx)("div",{className:(0,XE.default)(n.root,{[n.isWithDivider]:e}),children:t})},tn=pI;var rC=S(O());var Ei=S(O());var YE=S(O());function ZE(e,t,n){(0,YE.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var mI=/[.*+?^${}()|[\]\\]/g,gI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function hI(e){return e.replace(mI,"\\$&")}function yI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Ng(e){return e.search(gI)}function JE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${hI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function eC(e){return e.replace(lo,'<mark data-type="placeholder">$1</mark>')}function xi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function vI(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 Mg(e,t,n={}){if(t){let r=yI(t.toLowerCase(),e.toLowerCase()),o=xi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Ng(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(vh).length>3||t.length>30?vI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${xi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var tC={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Dg=S(C()),wI=["search","personal-collection-search","studio-search"];function xI(e,t,n,r={}){let o="";return wI.includes(t)?o=JE(Mg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Mg(e,n,r),r.placeholders===!0&&(o=eC(o)),o}var EI=()=>{},CI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=A(Jo),i=K(),s=P("TextSuggestion",tC),a=(0,Ei.useRef)(null);(0,Ei.useEffect)(()=>{let u=setTimeout(()=>{i(p0({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),ZE(a,"click",()=>{i(Zu(e)),i(Mt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Ei.useMemo)(()=>xI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Dg.jsx)(se,{ref:a,as:"button",selected:t,onClick:EI,children:(0,Dg.jsx)(oi,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},nC=CI;var Fg=S(C()),TI=({suggestions:e,selectedIndex:t})=>(0,Fg.jsx)(rC.Fragment,{children:e.slice().map((n,r)=>(0,Fg.jsx)(nC,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),oC=TI;var sC=S(Q());var iC={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var Vc=S(C()),_I=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",iC);return(0,Vc.jsx)("button",{type:"button",className:(0,sC.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Vc.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Vc.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},eo=_I;var jg={};Te(jg,{enUS:()=>bI,nlNL:()=>kI});var bI={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},kI={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 aC={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(C()),PI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=P("SuggestionsOverlay",aC),o=j(jg),i=D("inlineSuggestions"),s=A(Uc),a=l0(),l=K(),u=(0,Ci.useRef)(null),c=D("searchTriggerKey"),p=D("productName"),d=A(Vx),h=A(Cn),y=A(Bu),[v,g]=(0,Ci.useState)(null),m=D("showSearch"),f=D("showTextSuggestions"),w=D("adminUrl"),x=D("isEmbedded"),[T,E]=VE("dd-snooze-until-ms",0),_=d||T>Date.now(),R=t.filter(re=>re.source!=="gpt").length,b=()=>{_&&E(0),l($x(!_))},B=re=>{let z=Date.now()+re*1e3;E(z),H.info(`Snooze until: ${new Date(z)}`),l(hi({collapse:!0}))};return(0,Ci.useEffect)(()=>{R===0&&g(null)},[t,R]),li(()=>{l(hi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||h===null||y===!1?null:h===!1?(0,ue.jsxs)("div",{ref:u,className:(0,Kc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(eo,{className:r.toggleButton,title:o("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(eo,{className:r.toggleButton,title:o("open",{productName:p}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(zc,{loginUrl:w,isEmbedded:x,onSnooze:B})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,Kc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:m&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(Ic()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,ue.jsx)(qE,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,Kc.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,ue.jsx)(eo,{className:r.toggleButton,title:o("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(eo,{className:r.toggleButton,title:o("open",{productName:p}),onClick:b,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(tn,{children:(0,ue.jsx)(oC,{suggestions:t,selectedIndex:n})})})]})},RI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Wc=Vr(RI)(PI);var ld=S(Q());var In=S(O());var lC=S(O()),II=["div","span","mark","strong","b","i","u","em"];function Hg(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(II.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,lC.cloneElement)(r,{children:Hg(s,t,n+1)})]}return[...e,...t]}function Pn(e){return e.tagName.toLowerCase()==="textarea"}var cC=S(Q());var uC={root:"_root_1s73o_1",isArrowUp:"_isArrowUp_1s73o_22",isArrowDown:"_isArrowDown_1s73o_23",isTab:"_isTab_1s73o_39",isEsc:"_isEsc_1s73o_44",isEnter:"_isEnter_1s73o_49"};var dC=S(C());var LI=({className:e,keyCode:t,children:n,...r})=>{let o=P("KeyboardHint",uC);return(0,dC.jsx)("span",{className:(0,cC.default)(e,o.root,{[o.isArrowUp]:t==="arrow-up",[o.isArrowDown]:t==="arrow-down",[o.isTab]:t==="tab",[o.isEsc]:t==="esc",[o.isEnter]:t==="enter"}),...r,children:n})},$c=LI;var Qc=S(O());var Ug=S(Q()),kt=S(O());var qc=S(O()),AI=["bottom","height","left","right","top","width"],OI=(e={},t={})=>AI.some(n=>e[n]!==t[n]),Rn=new Map,fC,pC=()=>{let e=[],t=[];Rn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();OI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Rn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),fC=window.requestAnimationFrame(pC)};function NI(e,t){return{observe(){let n=Rn.size===0;if(Rn.has(e)){let r=Rn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Rn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&pC()},unobserve(){let n=Rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Rn.delete(e),Rn.size||cancelAnimationFrame(fC)}}}}function Bg(e){let[t,n]=(0,qc.useState)(null);return(0,qc.useLayoutEffect)(()=>{if(!e.current)return;let r=NI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ti=S(O()),gC=S(tu());var mC={root:"_root_1jq08_1"};var hC=({children:e})=>{let[t,n]=(0,Ti.useState)(null),r=(0,Ti.useContext)($s);return(0,Ti.useLayoutEffect)(()=>{let o=document.createElement("div");return Gr(o),o.classList.add(mC.root),r!=null&&r.rootNode&&o.classList.add(r==null?void 0:r.rootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,gC.createPortal)(e,t):null};var nn={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 Gc=S(C()),_i=(e=!1)=>{let[t,n]=(0,kt.useState)(e),r=(0,kt.useCallback)(()=>n(!0),[]),o=(0,kt.useCallback)(()=>n(!1),[]),i=(0,kt.useCallback)(()=>n(a=>!a),[]),s=(0,kt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function zg(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 bi=({className:e,triggerRef:t,boundaryRef:n=(0,kt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=zg,...a})=>{let l=Bg(t),u=Bg(n),c=(0,kt.useMemo)(()=>s(l,u,0),[l,u]);return(0,Gc.jsx)(hC,{children:(0,Gc.jsx)("div",{className:(0,Ug.default)(nn.ref,{[nn.positionAbove]:r==="above",[nn.positionBelow]:r==="below",[nn.positionLeft]:r==="left",[nn.positionRight]:r==="right",[nn.alignStart]:o==="start",[nn.alignCenter]:o==="center",[nn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,Gc.jsx)("div",{className:(0,Ug.default)(e,nn.root),children:i})})})};var Sr=S(C()),MI=({inputStyle:e,inputElement:t})=>{let n=P("TabCompletion",Ct),r=_i(document.activeElement===t);return li(()=>r.close()),(0,Qc.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Sr.jsxs)(Qc.Fragment,{children:[(0,Sr.jsx)("mark",{className:Ct.caret,ref:r.triggerRef}),r.opened&&(0,Sr.jsx)(bi,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Sr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Sr.jsx)(Wc,{inline:!0})})})]})},Xc=class extends jt{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Pn(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Ng(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Sr.jsx)(MI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var wC=S(Q());var td=S(O());function yC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Yc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function vC(e){return e!=null}var SC=S(Q()),Zc=S(O());var Vg=S(C()),Jc=(0,Zc.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Zc.useRef)(null),i=P("TabCompletion",Ct);return(0,Vg.jsx)("div",{ref:Yc([o,r]),className:(0,SC.default)(e,i.popoverContentContainer),...n,children:(0,Vg.jsx)("div",{className:i.popoverContent,children:t})})});var wr=S(C()),DI=e=>t=>{let n=zg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},FI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",Ct),s=_i(),a=(0,td.useMemo)(()=>DI(e.getBoundingClientRect()),[e]),[l,u]=Cc(e);return(0,td.useEffect)(()=>{u?s.open():s.close()},[u]),(0,wr.jsxs)("span",{children:[(0,wr.jsx)("mark",{ref:Yc([l,s.triggerRef]),className:(0,wC.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,wr.jsx)(bi,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,wr.jsx)(Jc,{style:n,children:(0,wr.jsx)("div",{className:i.hintText,children:o})})})]})},ed=class extends jt{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${yC(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(vC);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,wr.jsx)(FI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var sd=S(Q());var Ve=S(O());var Kg=S(C()),xC=()=>(0,Kg.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,Kg.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 xr=S(O());var _C=S(bg());var nd=S(Q()),Pt=S(O());var EC={root:"_root_vr71j_1"};var to=S(C()),CC=()=>(0,to.jsxs)("svg",{className:EC.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,to.jsx)("defs",{children:(0,to.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,to.jsx)("title",{children:"Failed loading image"}),(0,to.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 Wg={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 no=S(C()),rd=(0,Pt.createContext)(Wg),jI=({title:e,src:t})=>{let n=(0,Pt.useContext)(rd),[r,o]=(0,Pt.useState)(!1);return(0,Pt.useEffect)(()=>{o(!1)},[t]),(0,no.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,no.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,no.jsx)(CC,{})})},HI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pt.useContext)(rd);return(0,no.jsx)("div",{className:(0,nd.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},BI=({as:e="h1",cropText:t=!1,className:n,children:r})=>{let o=(0,Pt.useContext)(rd);return Pt.default.createElement(e,{className:(0,nd.default)(o.title,n,{[o.contentIsCropped]:t})},r)},od=({children:e})=>{let t=P("Card",Wg);return(0,no.jsx)("div",{className:(0,nd.default)(t.root),children:(0,no.jsx)(rd.Provider,{value:t,children:e})})};od.Image=jI;od.Content=HI;od.Title=BI;var ge=od;var TC={root:"_root_1muu8_1",content:"_content_1muu8_7"};function id(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 $g(e){return e.replace("https://www.","").replace("https://","")}var Rt=S(C()),UI=3,zI=e=>({image:e.image||"",text:`https://${e.text}`,id:e.id,title:e.title}),VI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=UI})=>{let i=P("LinkSearch",TC),[s,a]=(0,xr.useState)(""),l=K(),u=A(Ix("url")),c=A(Sx("URL",zI)),[p,d]=(0,xr.useState)(c.length-1),h=D("fallbackImage"),y=f=>{let w=f.target;a(w.value)},v=(f,w)=>{f.stopPropagation(),f.preventDefault(),window.open(w,"_blank")},g=f=>{var T;let w=p-1<0?c.length-1:p-1,x=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(w),f.code==="ArrowDown"&&d(x),f.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,xr.useCallback)((0,_C.default)(f=>{l(Xr({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,xr.useEffect)(()=>{s&&m(s)},[s]),(0,xr.useEffect)(()=>()=>{l(Ac())},[]),(0,Rt.jsxs)("div",{className:i.root,children:[(0,Rt.jsx)(tn,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,w)=>(0,Rt.jsx)(se,{selected:p===w,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,Rt.jsxs)(ge,{children:[(0,Rt.jsx)(ge.Image,{src:id(f,"small",h||void 0),title:f.title||f.text}),(0,Rt.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,Rt.jsx)(ge.Title,{children:f.title||$g(f.text)}),f.title&&$g(f.text)]}),(0,Rt.jsx)(se.Actions,{children:(0,Rt.jsx)(se.ActionButton,{label:r,onClick:x=>v(x,f.text)})})]})},f.text))}),(0,Rt.jsx)(Sa,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:g})]})},bC=VI;var qg={};Te(qg,{enUS:()=>KI,nlNL:()=>WI});var KI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},WI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(C()),$I=(0,Ve.forwardRef)((e,t)=>{let n=P("TabCompletion",Ct);return(0,ze.jsx)("mark",{ref:t,className:(0,sd.default)(n.matchSelection)},"selection-start")}),qI=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(qg),s=P("TabCompletion",Ct),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),p=K(),d=_i(document.activeElement===r),[h]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ve.useEffect)(()=>()=>h.detach(),[]),(0,Ve.useEffect)(()=>{let v=e.current,g=a.current;!v||!g||(h.setStart(v,0),h.setEnd(g,0))},[e.current,a.current]),li(()=>{d.close()});let y=(0,Ve.useCallback)(v=>{let g=h.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;p(qu({text:`[${g}](${m})`}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,sd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(bi,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(Jc,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,sd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(xC,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(bC,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},ad=class extends jt{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,ze.jsx)($I,{ref:this.startRef}):(0,ze.jsx)(qI,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var kC={root:"_root_kpc8q_1",agentText:"_agentText_kpc8q_4",tabText:"_tabText_kpc8q_9",hint:"_hint_kpc8q_10",matchSelection:"_matchSelection_kpc8q_14",focus:"_focus_kpc8q_20",resetIndent:"_resetIndent_kpc8q_24",matchKeyword:"_matchKeyword_kpc8q_28",matchPlaceholder:"_matchPlaceholder_kpc8q_29",hover:"_hover_kpc8q_35",hintText:"_hintText_kpc8q_67",popover:"_popover_kpc8q_75",popoverRoot:"_popoverRoot_kpc8q_80",popoverContentContainer:"_popoverContentContainer_kpc8q_84",popoverContent:"_popoverContent_kpc8q_84",selectionOptions:"_selectionOptions_kpc8q_110",selectionOptionsIsHidden:"_selectionOptionsIsHidden_kpc8q_115",selectionOptionsButton:"_selectionOptionsButton_kpc8q_119",caret:"_caret_kpc8q_135",popoverSuggestionsRoot:"_popoverSuggestionsRoot_kpc8q_139",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_kpc8q_144"};var Er=S(C()),GI=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",kC),c=D("insertLink"),p=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),h=_c(a),y=(0,In.useRef)(null);(0,In.useEffect)(()=>{Pn(a)&&h&&bc(a,h)},[h]);let v=(0,In.useCallback)(f=>{if(!o||!n)return f;let w=[(0,Er.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Er.jsx)("span",{className:(0,ld.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,Er.jsx)($c,{className:(0,ld.default)(u.hint,u.resetIndent),keyCode:"tab"},"tabHint")),Hg(f,w)},[o,n,r]),g=(0,In.useMemo)(()=>{let f=[];return d&&f.push(new Xc("inline")),c&&f.push(new ad("selection")),f.push(new si("placeholders")),i&&f.push(new ed("keywords")),f},[d,c,i]),m=(0,In.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,Er.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(y.current=f==null?void 0:f.parentElement)},className:(0,ld.default)(u.root,u.agentText),style:m,children:[(0,Er.jsx)(oi,{tagName:"span",noWrap:!1,containerTagName:"div",disableLineBreaks:Pn(a),content:t||"\u200B",onAfterParse:v,matchers:g,selection:h,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!p}),(0,Er.jsx)("br",{})]}):null},XI=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var v;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??xi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:y}=n;return{showTabHint:c,showStyleSuggestions:y,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((v=r.list)==null?void 0:v.keywordMatches)??[],enabled:h&&p!==!1}},PC=Vr(XI)(GI);var TT=S(Q()),_T=S(O());var RC={list:[],fetchState:"idle",isInitialRequest:null},LC=e=>e.autoflows.list||[],IC=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Ln=N("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gg=N("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(Ln(e.platformSessionId))}),Xg=N("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(Ln(e.platformSessionId))}),QI=F({name:"autoflows",initialState:RC,reducers:{},extraReducers:e=>{e.addCase(Gg.pending,(t,n)=>{let r=IC(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Xg.pending,(t,n)=>{let r=IC(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Ln.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Ln.rejected,t=>{t.fetchState="error"}),e.addCase(Ln.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(Z,()=>RC)}}),AC=N("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(Ln(e))}),o.on("sessionCompleted",()=>{n(Ln(e))})}),OC=N("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),NC=QI.reducer;var MC={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},DC=e=>e.customMessages.list,FC=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),jC=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),HC=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ra=N("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),ud=N("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)}),cd=N("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)}),BC=F({name:"customMessages",initialState:MC,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(ud.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(ud.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(cd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(cd.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(Z,()=>MC)}}),UC=N("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(BC.actions.onCustomMessage(i))})}),zC=N("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),VC=BC.reducer;var YI={jwt:null,accountUrl:null,interval:null},KC=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},Qg=N("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),Yg=N("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(Qg()),setInterval(()=>r(Qg()),n)}),WC=F({name:"exchangeToken",initialState:YI,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Qg.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(Yg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:$C}=WC.actions,qC=WC.reducer;function GC(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var rT=S(O());var eT=S(Q()),tT=S(O());var QC=S(Q());var XC={root:"_root_838fd_1"};var ZC=S(C()),ZI=({className:e,children:t})=>{let n=P("Unicode",XC);return(0,ZC.jsx)("span",{className:(0,QC.default)(e,n.root),children:t})},YC=ZI;var JC={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 Zg={};Te(Zg,{enUS:()=>JI,nlNL:()=>eL});var JI={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"}]},eL={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 st=S(C()),nL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",JC),a=j(Zg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,st.jsxs)(se,{className:(0,eT.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,st.jsx)(ge,{children:(0,st.jsxs)(ge.Content,{children:[(0,st.jsxs)(ge.Title,{children:[t&&(0,st.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,st.jsx)("span",{children:r})]})}),(0,st.jsx)(se.Actions,{fixed:t==="Started",children:(0,st.jsx)(se.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,st.jsxs)(tT.Fragment,{children:[(0,st.jsx)(YC,{children:u})," ",(0,st.jsx)("span",{children:a(l)})]})})})]})},nT=nL;var Jg=S(C()),rL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},oL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jg.jsx)(rT.Fragment,{children:e.map(o=>(0,Jg.jsx)(nT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||rL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),iL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},sL={onStartAutoflow:Gg,onStopAutoflow:Xg},oT=Vr(iL,sL)(oL);var dd=S(O());var nh=S(Q());var eh=S(C()),th=()=>(0,eh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,eh.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 iT={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 rn=S(C()),aL=({entities:e})=>{let t=P("EntitiesWidgetList",iT),[n,r]=(0,dd.useState)(void 0),o=K(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),xa(a.text),o(Zt({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,dd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,rn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,rn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,rn.jsx)("span",{className:t.entityText,children:a.text}),(0,rn.jsxs)("span",{className:t.iconWrapper,children:[(0,rn.jsx)("span",{className:(0,nh.default)(t.icon),children:(0,rn.jsx)(th,{})}),(0,rn.jsx)("span",{className:(0,nh.default)(t.icon,n===l&&t.iconClicked),children:(0,rn.jsx)(th,{})})]})]},a.text))})},sT=aL;var cT=S(Q()),rh=S(O());var lT=S(Q());var aT={root:"_root_4a08n_1"};var uT=S(C()),lL=({className:e,children:t,...n})=>{let r=P("Label",aT);return(0,uT.jsx)("span",{...n,className:(0,lT.default)(e,r.root),children:t})},fd=lL;var Ia={};Te(Ia,{enUS:()=>uL,nlNL:()=>cL});var uL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],answer:[{type:0,value:"Answer"}]},cL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],answer:[{type:0,value:"Antwoord"}]};var An={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 Ze=S(C()),dL=({suggestion:e})=>{let t=j(Ia),n=K(),r=A(FC(e.text)),o=A(jC(e.text)),i=A(HC(e.text)),s=A(ju),{replyOptions:a}=e,l=(0,rh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(ud({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,rh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(cd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Ze.jsxs)(se,{onClick:l,className:(0,cT.default)(An.root,{[An.isUsed]:r,[An.hasError]:i}),children:[(0,Ze.jsx)(ge,{children:(0,Ze.jsxs)(ge.Content,{children:[(0,Ze.jsxs)(ge.Title,{className:An.title,children:[e.text," ",(0,Ze.jsx)(fd,{className:An.label,children:"analyse tool"})," ",i&&(0,Ze.jsx)("span",{className:An.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Ze.jsx)("ul",{className:An.quickReplies,children:a.map(c=>(0,Ze.jsx)("li",{className:An.quickReply,children:c.title},c.title))})]})}),(0,Ze.jsxs)(se.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Ze.jsx)(se.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Ze.jsx)(se.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Ze.jsx)(se.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},dT=dL;var oh=S(C()),fT=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 pT={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ki=S(C()),fL=({title:e,children:t,...n})=>{let r=P("Section",pT);return(0,ki.jsxs)("section",{...n,className:r.root,children:[e&&(0,ki.jsx)("div",{className:r.subTitleContainer,children:(0,ki.jsx)("span",{className:r.subtitle,children:e})}),(0,ki.jsx)("div",{className:r.suggestions,children:t})]})},Cr=fL;var gT=S(Q()),hT=S(O());var mT={root:"_root_19wxp_1"};var yT=S(C()),pL=hT.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",mT);return(0,yT.jsx)("div",{ref:n,className:(0,gT.default)(r.root,e),children:t})}),pd=pL;var vT=S(O());var at=S(C()),mL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Oc(o),s=j(Ia),a=D("showImages"),l=D("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,vT.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,at.jsxs)(se,{onClick:u,"data-testid":"edit-suggestion",children:[(0,at.jsxs)(ge,{children:[a&&e.image&&(0,at.jsx)(ge.Image,{src:id(e,"small",l||void 0),title:e.title}),(0,at.jsxs)(ge.Content,{children:[e.title&&(0,at.jsx)(ge.Title,{children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,at.jsx)(se.Labels,{labels:e.searchKeywords}),(0,at.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,at.jsxs)(se.Actions,{children:[i&&(0,at.jsx)(se.ActionButton,{onClick:p,label:s("visitUrl")}),(0,at.jsx)(se.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,at.jsx)(se.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},ST=mL;var La=S(C()),gL=({contentType:e,lines:t,suggestions:n})=>{let r=bt(),o=A(mi),i=a=>{r.send(Sg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Tn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,La.jsx)(La.Fragment,{children:n.map(a=>(0,La.jsx)(ST,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wT=gL;var ih={};Te(ih,{enUS:()=>hL,nlNL:()=>yL});var hL={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"}]},yL={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xT={root:"_root_oym4o_1",loginText:"_loginText_oym4o_7",stateText:"_stateText_oym4o_8",sectionList:"_sectionList_oym4o_20",links:"_links_oym4o_24",link:"_link_oym4o_24"};var sh=S(C()),ET=()=>(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 ah=S(C()),CT=()=>(0,ah.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ah.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 U=S(C()),md=(e,t)=>{let n=A(Cn);(0,_T.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},vL=()=>{let e=j(ih),t=K(),n=D("isEmbedded"),r=P("Widget",xT),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=A(Si),p=A(Bc),d=A(LC),h=A(Hc),y=A(DC),v=A(Hu),g=A(Bu),m=A(Cn),f=A(ju),w=A(GC),x=A(mi),T=bt(),E=A(Ax),_=A(KC("/admin/personal-collection")),R=D("adminUrl");return md(()=>(t(Ra(f)),t(UC(f)),()=>{t(zC(f))}),[t,g,i,f]),md(()=>(t(Ln(f)),t(AC(f)),()=>{t(OC(f))}),[t,g,o,f]),md(()=>{p.forEach(({type:b})=>{t(b==="entities"?Ut():xn(b))})},[t,g,v,c]),md(()=>(t(Yg()),()=>{t($C())}),[t,g,s,v]),g===!1?(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("notSupported")})})},"supported"):m===!1?(0,U.jsx)("div",{className:r.loginText,children:(0,U.jsx)("div",{children:(0,U.jsx)(zc,{isEmbedded:n,loginUrl:R})})},"login"):!c||!f||m===null||E||w?(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("waiting")})})},"waiting"):(0,U.jsx)("div",{className:(0,TT.default)(r.root),"data-testid":"widget",children:(0,U.jsxs)(pd,{className:r.sectionList,children:[(0,U.jsx)(Cr,{title:e("actions"),children:(0,U.jsxs)("div",{className:r.links,children:[u&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,U.jsx)(fi,{}),e("linkSearch")]}),a&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,U.jsx)(CT,{}),e("linkSummary")]}),l&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeSearch"}),children:[(0,U.jsx)(ET,{}),e("linkKnowledgeSearch")]}),_&&(0,U.jsxs)("a",{className:r.link,target:"_blank",href:_,rel:"noreferrer",children:[(0,U.jsx)(fT,{}),e("linkPersonalcollection")]})]})}),i&&y.length>0&&(0,U.jsx)(Cr,{"data-testid":"custom-messages",children:(0,U.jsx)(tn,{withDivider:!0,children:y.map(b=>(0,U.jsx)(dT,{suggestion:b},b.text))})}),o&&d.length>0&&(0,U.jsx)(Cr,{title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,U.jsx)(tn,{withDivider:!0,children:(0,U.jsx)(oT,{})})}),p.map(({type:b,title:B,amount:re,lines:z})=>{var Pe;switch(b){case"entities":return h&&h.length>0&&(0,U.jsx)(Cr,{title:B,"data-testid":`type-${b}`,children:(0,U.jsx)(sT,{entities:h})},b);default:return((Pe=x[b])==null?void 0:Pe.fetchState)==="done"&&x[b].suggestions.length>0&&(0,U.jsx)(Cr,{title:B,"data-testid":`type-${b}`,children:(0,U.jsx)(tn,{withDivider:!0,children:(0,U.jsx)(wT,{lines:z,contentType:b,suggestions:x[b].suggestions.slice(0,re)||[]})})},b)}})]})})},bT=vL;function kT(e){let t=new Range;return t.selectNodeContents(e),t}var Aa=/[\u200B-\u200D\uFEFF]/g;function ro(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Aa,""),d=o+p.length,h=t>=o&&t<=d,y=n>=o&&n<=d;if(h){let v=s(c,t-o);v===0&&!y?r.setStartBefore(l):r.setStart(l,v)}y&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gd(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let h=c.textContent;p&&(s=l+h.substring(0,r).replace(Aa,"").length),d&&(a=l+h.substring(0,i).replace(Aa,"").length),l+=h.replace(Aa,"").length;break}case Node.ELEMENT_NODE:{let{tagName:h}=c,y=c.nextSibling===null;h==="BR"&&!y&&l++;for(let v=0;v<c.childNodes.length&&(p&&v===r&&(s=l),u(c.childNodes[v]),d&&v===i-1&&(a=l),a===void 0);v++);!d&&h==="DIV"&&!y&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Oa(e,t){if(!e.contains(t.commonAncestorContainer))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,y=u.textContent.replace(Aa,"");d===0&&h===void 0?a+=y:a+=y.substring(d,h);break}case Node.ELEMENT_NODE:{let{tagName:d}=u,h=u.nextSibling===null;s===0&&d==="BR"&&!h&&(a+=`
20
- `);for(let y=c?r:0;y<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[y]),s!==1);y++);!p&&s===0&&d==="DIV"&&!h&&(a+=`
21
- `);break}default:break}p&&s++}return l(e),a}var oo=class extends vn{observer;getText(){let t=new Range;return t.selectNodeContents(this.element),Oa(this.element,t)}getHTML(){return this.element.innerHTML||""}getSelection(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:gd(this.element,n)}getSelectedText(){if(!this.currentSelection)return"";let{start:t,end:n}=this.currentSelection;return Oa(this.element,ro(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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 lh=class{constructor(t){this.name=t;H.warn("BroadcastChannel is not supported")}postMessage(){}addEventListener(){}removeEventListener(){}close(){}},uh=class{constructor(t,n){this.name=t;this.options=n;this.broadcastChannel=new this.options.broadcastChannelConstructor(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()}},ch=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()}},dh=class{sessionId;deepdeskUrl;channel;broadcastChannelConstructor;eventMap;isIntegration;constructor(t){this.deepdeskUrl=t.deepdeskUrl,this.broadcastChannelConstructor=t.broadcastChannelConstructor||window.BroadcastChannel||lh,this.isIntegration=t.deepdeskUrl!==(t.origin||window.location.origin),this.eventMap=t.eventMap,this.setSessionId("deepdesk-general")}setSessionId(t){if(this.sessionId===t)return;this.cleanup(),H.info("Set sessionId",t),this.sessionId=t,this.channel=this.isIntegration?new ch(t,this.deepdeskUrl,{debug:!0}):new uh(t,{broadcastChannelConstructor:this.broadcastChannelConstructor});let n=r=>{var o,i;r.origin===this.deepdeskUrl&&r.data.type==="event"&&(H.info("Received broadcast event",this.sessionId,r),(i=(o=this.eventMap)[r.data.name])==null||i.call(o,r.data.payload))};this.channel.onMessage(n)}send(t,n){var o,i,s;if(!this.sessionId)return;H.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)}cleanup(){var t;(t=this.channel)==null||t.close(),delete this.channel}},PT=dh;var Pi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var fh=e=>new Promise(t=>{setTimeout(t,e)});var Ri=class extends Pi{name="ClientError"},ph=class extends Pi{name="ServerError"},On=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}async request(t,n={}){let r={isStale:!1},o=`${this.baseUrl}${t}`,i=this.fetch,{abortLatest:s=!1,attempts:a=1,retryDelay:l=500,refreshTokenOn401:u=!0,retryOnError:c=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:d="v1",...h}=n,y={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(y.headers={...y.headers,"X-CSRFToken":this.csrfToken}),typeof d=="string"&&(y.headers={...y.headers,"X-Deepdesk-API-Version":d});let v=a,g=!1;if(!i)throw new Error("fetch is not set");this.latestRequestByUrl[o]&&s&&(this.latestRequestByUrl[o].isStale=!0),this.latestRequestByUrl[o]=r;let m=async()=>(v--,i(o,y).then(async x=>p(x)&&!r.isStale&&v>0?(await fh(l),m()):x.status===401&&u===!0&&g===!1?(g=!0,await this.refreshToken(),m()):x).catch(async x=>{if(c(x)&&!r.isStale&&v>0)return await fh(l),m();throw x})),f=await m(),w=await f.json().catch(()=>null);if(r.isStale)throw new Error("Aborted");if(f.status>=500)throw new ph("Server Error",w);if(f.status===401)throw new Ri("Unauthorized",w);if(f.status===403)throw new Ri("Forbidden",w);if(f.status===404)throw new Ri("Not Found",w);if(f.status>=400)throw new Ri("Bad Request",w);return delete this.latestRequestByUrl[o],w}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 SL;(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||={})})(SL||={});function hd(e){return{...ne(e),tags:e.tags}}var Nn=class e{constructor(t,n={}){this.options=n;this.client=new On(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(),H.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ee(t),tags:t.tags},{version:"v2"});return hd(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return ne(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return ne(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return ne(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(),H.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 hd(i)}async isConversationSupported(t,n={}){H.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=Ee(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return hd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ee(o),tags:o.tags})),{version:"v2"})).map(o=>hd(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",Ee({...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:Ee({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(r=>r.text&&r.source)}})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.get(`/apis/admin/session/jwt/?jwt=${t}`,{version:null}).catch(n=>{throw H.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",Ee(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}`,Ee(n),{abortLatest:!0})).map(i=>({...ne(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`,Ee(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 ne(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",Ee(t),{abortLatest:!0});return ne(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ee(t),{version:"v2"});return ne(n)}async knowledgeSearch(t,n,r){let o=await this.client.post("/api/knowledge-search/search",Ee({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return ne(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return ne(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 ne(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Sh);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&H.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Na=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(fg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,ne(o))}catch{H.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 wL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(wL||={});var Ma=class{constructor(t,n={}){this.apiUrl=t;this.client=new On(t,n)}client;streams={};logger=H;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return ne(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Ee(n));return ne(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ee(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return ne(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Ee(t));return ne(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Na(`${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 RT={startTime:null,stopTime:null},IT=F({name:"handlingTime",initialState:RT,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(Z,()=>RT)}}),{handlingTimeStart:LT,handlingTimeStop:yd,handlingTimeReset:AT}=IT.actions,OT=IT.reducer;var NT=(e={})=>{let t={onAuthError:Fc(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mh={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var io=N("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 mh.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),xL=F({name:"styleSuggestions",initialState:mh,reducers:{},extraReducers:e=>{e.addCase(io.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(io.rejected,t=>{t.fetchState="error"}).addCase(io.fulfilled,(t,n)=>{t.fetchState="done",cr(t.list,n.payload)||(t.list=n.payload)}).addCase(Z,()=>mh)}}),MT=xL.reducer;var DT=(e={})=>{let t,n=!0,r={getStyleSuggestions:io,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 EL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var FT=(e={})=>{let t={getTextSuggestions:xn,getAutocompleteSuggestions:ma,debounce:200,check:Uc,...e},n,r=!0;return o=>i=>s=>{var g;let{input:{userCommitted:a}}=o.getState(),l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{recommendTextSuggestions:c,showTabCompletion:p}=u.settings,d=(g=u.conversation.current)==null?void 0:g.id,h=s.type===Dc.toString();if(!d||!c&&!p)return l;let{input:{userCommitted:y}}=u;return EL(y,a)&&!r&&!h||(clearTimeout(n),!t.check(u))||(n=setTimeout(()=>{r=!1;let m=Jo(u);m===""?o.dispatch(t.getTextSuggestions("default")):o.dispatch(t.getAutocompleteSuggestions(m))},h?0:t.debounce)),l}};var jT=io.fulfilled.toString();function CL(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 HT=e=>t=>n=>r=>{var c;if(r.type!==jT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current,{agentInfo:l}=i.info;if(o===s)return;let u=CL(o,s);r.type===jT&&u.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,agentId:l.agentId??(a==null?void 0:a.agentId),agentName:l.agentName??(a==null?void 0:a.agentName),agentEmail:l.agentEmail??(a==null?void 0:a.agentEmail),data:{keywordMatches:u}})};var TL=lu({activeSuggestion:zx,answer:OE,auth:nE,autoflows:NC,conversation:s0,contentTypes:yE,customMessages:VC,exchangeToken:qC,entities:xE,handlingTime:OT,info:gx,input:Im.reducer,overlayInput:Ge.reducer,settings:Yw,profile:DE,search:xx,summary:kE,styleSuggestions:MT,ui:qx,textSuggestions:Fx});function BT(e){return rw({reducer:TL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),NT(),FT({debounce:200}),DT({debounce:500}),HT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var _L=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},bL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Tm("inlineSuggestions")(o);switch(r.type){case En.toString():{let l=Lx(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 Mt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:_L(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case qu.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 Ws.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Yu.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 Ut.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case _n.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),summary:r.payload.summary}});break;case Zt.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 Gu.toString():e.handleKeyDown(r.payload);break;case Ks.toString():e.logSendMessage(r.payload);break;case Xu.toString():e.logSendEditSuggestionMessage(r.payload);break;case Qu.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Ks.toString():e.handleAfterSendMessage(r.payload);break;case ga.toString():e.onUpdateShowTabHint(r.payload);break;case yd.toString():e.logHandlingTime();break;case Mt.toString():{i&&(t.dispatch(fr([])),t.dispatch(pr()));break}default:break}return s},UT=bL;function gh(e){return e.toISOString().replace("T"," ").replace("Z","")}function zT(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:gh(n),timeStop:gh(r)}}function hh(e,t,n){var T,E,_;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,pastes:c,cuts:p,deletions:d,textSuggestions:h,offeredTextSuggestions:y}}=t[e],v=r.length,m=h.reduce((R,{text:b,searchTerm:B})=>R+b.length-(B?B.length:0),0),f=u??Date.now(),w=(Date.now()-f)/1e3,x=o/w;return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:c,cuts:p,deletions:d,lenTextTyped:o,lenTextTotal:v,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:w,charsPerSecond:x,numPastes:l,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:y.filter(R=>R.source==="gpt").length}],agentId:(T=t.info.agentInfo)==null?void 0:T.agentId,agentName:(E=t.info.agentInfo)==null?void 0:E.agentName,agentEmail:(_=t.info.agentInfo)==null?void 0:_.agentEmail}}function VT(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?VT(r,t):null}function KT(e,t){return VT(e,t)}function WT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vd(e){return e instanceof HTMLElement&&(Pn(e)||Tc(e))}var $T=(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{H.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function kL(e){return e.offsetParent!==null}function qT(e){if(!kL(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 Sd(e,t,n=100){let r=qT(e);t({isVisible:r});let o=setInterval(()=>{let i=qT(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var lt=S(C()),GT=$T("showTabHint",!0),Da=class e{static version="10.1.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}){let l=t.replace(/\/api$/,"");this.deepdeskApi=new Nn(l,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[UT({emit:(c,p,d)=>this.emit(c,p,d),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),handleInputChanged:c=>this.handleInputChanged(c),handleKeyDown:c=>this.handleKeyDown(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),logSendEditSuggestionMessage:c=>this.logSendEditMessage(c),onUpdateShowTabHint:c=>GT.update(c),sendEvent:(c,p)=>this.deepdeskApi.sendEvent(c,p)})]};n&&Object.assign(u,{deepdeskBrokerAPI:new Ma(n)}),this.store=BT(u),this.broadcastEvents=new PT({debug:!0,deepdeskUrl:l,eventMap:rE(this.store)}),this.store.dispatch(zs),this.store.dispatch(ga(GT.value())),this.store.dispatch(zs({locale:o,adminUrl:l,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?(H.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(H.warn("Profile has not been loaded (yet)"),!0):(H.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Fc(null)),this.store.dispatch(Yr()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Cn(r)&&Qx(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){H.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Pm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Uu(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(zu({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Rm(t))).payload}async postMessages(t){return(await this.store.dispatch(Ku(t))).payload}async updateConversation(t){return(await this.store.dispatch(Vu(t))).payload}resetConversation(){this.store.dispatch(Z()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(_n());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(zs(t))}setVisitorInfo(t){this.store.dispatch(mx(t))}async setAgentInfo(t){await this.store.dispatch(ca(t))}async setAgentSettings(t){await this.store.dispatch(pg(t))}async getAgentSettings(){return(await this.store.dispatch(mg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();let t=[];return this.store.dispatch(Dc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Qu(t))}syncInputHtml(t){this.store.dispatch(S0(t))}notifyKeyDown(t){this.store.dispatch(Gu(t))}notifyPaste(t,n){this.store.dispatch(y0({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(g0(t))}notifyExternalSuggestion(t){this.store.dispatch(Mt(t)),this.store.dispatch(pr())}notifyEditSuggestion(t){this.store.dispatch(Mx(t.contentType,t.suggestions)),this.store.dispatch(En({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(hi({collapse:!1})),this.inputMediator&&this.store.dispatch(u0({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(fr([])))}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(h0($u(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(f0()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(m0());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(Ws()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Zu(-1)),this.store.dispatch(Ws()),t.preventDefault()):n||(this.store.dispatch(hi({collapse:!0})),this.store.dispatch(Wx(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(ga(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(Mt({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(pr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(v0()),this.store.dispatch(fr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(H.info("Start handling time"),this.store.dispatch(LT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(H.info("Stop handling time"),this.store.dispatch(yd()))}logSendMessage(t){let n=hh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=hh("overlayInput",this.state,{version:"v2"});t&&Object.assign(n,{text:t}),this.store.dispatch(d0(this.state.overlayInput.metrics)),this.deepdeskApi.sendEvent("suggestion edited",{data:n})}logHandlingTime(){let t=zT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(AT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(pr()),this.store.dispatch(Ks(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Mt({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){H.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),H.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]=ci(r,o);return i.dataset.testid=t,n!=null&&n.rootNode&&i.classList.add(n.rootNode),this.unmountHandlers.push(()=>{(0,Mn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Gr(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,Mn.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(!vd(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:y,closestScrollSelector:v,appendOverlayTo:g,inlineSuggestions:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:m});let f=v&&KT(t,v)||void 0,w=this.overlayContainerFactory("deepdesk-tab-completion",r,t,{appendTo:g,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()}),x=this.overlayContainerFactory("deepdesk-suggestions-overlay",r,f||t,{appendTo:g});n.automaticHandlingTime&&this.setupHandlingTime(t),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(PC,{inputElement:t})})}),w),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(Wc,{})})}),x),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(UE,{})})}),this.createContainer("deepdesk-overlays")),Gr(t),this.inputMediator=y||(Pn(t)?new Sn(t):new oo(t)),this.inputMediator.on("change",({plainText:E})=>{this.notifyInputChanged(E)}),this.inputMediator.on("updated",({rawHtml:E})=>{E!=null&&this.syncInputHtml(E)}),this.inputMediator.on("keydown",E=>{this.notifyKeyDown(E)}),this.inputMediator.on("paste",({pastedText:E,selectionText:_})=>{this.notifyPaste(E,_)}),this.inputMediator.on("cut",({selectionText:E})=>{this.notifyCut(E)});let T;this.inputMediator.on("selection",E=>{clearTimeout(T),E===null?T=setTimeout(()=>{E!==null&&this.store.dispatch(Lm(E))},500):this.store.dispatch(Lm(E))}),this.inputMediator.on("disabled",()=>{var E;(E=this.inputMediator)==null||E.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(gi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(gi(!0))),this.store.dispatch(c0({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var E;this.broadcastEvents.setSessionId((E=this.state.conversation.current)==null?void 0:E.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&&H.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,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(bT,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Mn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Sd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){WT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(_a());let t=Si(this.state);t&&this.store.dispatch(zs({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeSearch,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(H.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;H.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=Bc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Ut()):this.store.dispatch(xn(r))})}catch(r){this.handleError(r)}}};async function XT(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 QT(e,t,n={}){let r=n.replace?ro(e,n.replace.start,n.replace.end):kT(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),t.split(`
22
- `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}),r.commonAncestorContainer===e&&r.surroundContents(document.createElement("div"))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?ro(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function YT(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ZT(e,t,n){await new Nn(e).authenticateWithKey(t,n)}async function JT(e){let n=await new On(e).get("/platform/config/",{version:null});return ne(n)}async function PL(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 e1(e,t){let n=await PL(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 s1(RL);})();
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||$k)();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(Vk)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,lx.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==ax||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=kc[l]||kc[s];if(!this.isSafe(t)||!l.match(Kk)&&(!n&&(!u||u===Jm)||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===yr?c=!0:u===Qr?c=Number.parseFloat(String(c)):u!==Pc&&(c=String(c)),r[eg[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 oa[t]?{...n,...oa[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===ax){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 g=this.keyIndex;y=this.parseNode(v,h);let m=s(v,y,h);if(m===null)return;if(typeof m<"u"){l.push(Yr.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,h))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),h.void&&(m.selfClose=h.void),l.push(Yr.default.createElement(Rc,{...m,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===zk){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(Wk);){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 qk(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 Ic(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?Yr.default.createElement(Yr.default.Fragment,null,d):Yr.default.createElement(Rc,{attributes:n,className:r,tagName:c},d)}function ii(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,g=c?[c]:[],m=u?[u]:[];v.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let f=g.reduce((T,E)=>E(T,e),r??""),w=new Ic(f,h,v,y),x=m.reduce((T,E)=>E(T,e),w.parse());return Yr.default.createElement(qk,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:p})}var ug=S(X());var ng={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 cx=S(X());var si=S(O());function ux(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Lc(e){let t=(0,si.useRef)(null),[n,r]=(0,si.useState)(!1);return(0,si.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=ux((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),g=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=ux(()=>{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 _t={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var rg=S(C()),Gk=({inputElement:e,children:t})=>{let n=P("TabCompletion",_t),[r,o]=Lc(e);return(0,rg.jsx)("mark",{ref:r,className:(0,cx.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ai=class extends Ht{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,rg.jsx)(Gk,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var li=S(O());function Ac(e){return e.contentEditable==="true"}function Qk(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 dx(e){let{selectionStart:t,selectionEnd:n}=Ac(e)?Qk(e):e;return[t,n]}function Oc(e){let[,t]=(0,li.useState)(),n=(0,li.useRef)(null);return n.current=dx(e),(0,li.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=dx(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 Nc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(mo);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 fx=S(O());function ui(e){(0,fx.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Zr(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var px,en=new Map,Xk=["bottom","height","left","right","top","width"],Yk=(e={},t={})=>Xk.some(n=>e[n]!==t[n]),mx=()=>{let e=[];en.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),en.delete(n);return}let r=n.getBoundingClientRect();Yk(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),en.size!==0&&(px=window.requestAnimationFrame(mx))};function gx(e,t){return{observe(){let n=en.size===0;if(en.has(e)){let r=en.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else en.set(e,{rect:void 0,callbacks:[t]});n&&mx()},unobserve(){let n=en.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||en.delete(e),en.size||cancelAnimationFrame(px)}}}}var hx,tn=new Map,yx=()=>{tn.forEach((e,t)=>{if(!t.isConnected){tn.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)))}),tn.size!==0&&(hx=window.requestAnimationFrame(yx))};function vx(e,t){return{observe(){let n=tn.size===0;tn.has(e)?tn.get(e).callbacks.push(t):tn.set(e,{visible:void 0,callbacks:[t]}),n&&yx()},unobserve(){let n=tn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||tn.delete(e),tn.size||cancelAnimationFrame(hx)}}}}var og=["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 ig(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ci(e){return parseFloat(e)}function Mc(e){return Math.round(e*1e6)}function Sx(e){return e/1e6}function sg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ci(e.width),i=ci(e.borderLeftWidth),s=ci(e.borderRightWidth),a=ci(e.paddingRight),l=Sx(Mc(o)-Mc(i)-Mc(s)),u=Sx(Mc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function di(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Zr(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ig(r,n,og),sg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=vx(e,()=>{ig(r,n,og),sg(r,e,n),i(),setTimeout(i,0)}),a=gx(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(ig(r,n,og),sg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),p=window.getComputedStyle(t.closestScrollElement),d=ci(p.borderTopWidth),h=ci(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 ag={};Te(ag,{enUS:()=>Zk,nlNL:()=>Jk});var Zk={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"}]},Jk={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 ia=S(C()),wx=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ia.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ia.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 lg=S(C()),xx=()=>(0,lg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,lg.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var Ex=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(Ex||{}),Sn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentHTML="";currentSelection=null;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,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(Ex).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){let t=this.currentSelection;this.isPossibleClearInputAction=!0,t&&this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){let t=()=>{let r=document.activeElement===this.element?this.getSelection():null;pr(this.currentSelection,r)||(this.currentSelection=r,this.emit("selection",r))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),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)),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var wn=class extends Sn{getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){return this.currentSelection?this.getText().slice(this.currentSelection.start,this.currentSelection.end):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var Qe=S(C()),eR=({value:e,onUse:t,...n})=>{var c;let r=H(ag),o=K(),i=P("EditSuggestionTextInput",ng),[s,a]=(0,bt.useState)(null),l=(0,bt.useRef)(null),u=((c=e.match(mo))==null?void 0:c.length)||0;return(0,bt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new wn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown(hc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Ge.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.deactivate()}},[l]),(0,bt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,bt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(tR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,ug.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(wx,{}):(0,Qe.jsx)(xx,{})]})]})},tR=({inputElement:e,value:t})=>{let n=P("EditSuggestionTextInput",ng),r=(0,bt.useRef)(null),o=Oc(e);return(0,bt.useEffect)(()=>{Nc(e,o)},[o,e]),(0,Qe.jsx)(nR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,ug.default)(n.root,n.agentText),children:[(0,Qe.jsx)(ii,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ai("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},nR=({inputElement:e,children:t})=>{let n=(0,bt.useRef)(null);return(0,bt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=di(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},Cx=eR;var mi=S(O());var Xe={root:"_root_m5usm_1",list:"_list_m5usm_2",listWrapper:"_listWrapper_m5usm_6",listHorizontal:"_listHorizontal_m5usm_10",page:"_page_m5usm_19",search:"_search_m5usm_25",pageNav:"_pageNav_m5usm_33",pageTitle:"_pageTitle_m5usm_41",pageBackButton:"_pageBackButton_m5usm_48",listHeading:"_listHeading_m5usm_62",listItem:"_listItem_m5usm_70",listItemContent:"_listItemContent_m5usm_79",listItemText:"_listItemText_m5usm_97",listItemDescription:"_listItemDescription_m5usm_105",truncate:"_truncate_m5usm_112",lineClamp:"_lineClamp_m5usm_118",listItemTitle:"_listItemTitle_m5usm_125",listItemAction:"_listItemAction_m5usm_132",listItemPrimaryAction:"_listItemPrimaryAction_m5usm_146",listItemSelected:"_listItemSelected_m5usm_151",sources:"_sources_m5usm_155",sourcesTitle:"_sourcesTitle_m5usm_162",source:"_source_m5usm_155",icon:"_icon_m5usm_177",searchIcon:"_searchIcon_m5usm_194",searchInputWrapper:"_searchInputWrapper_m5usm_199",searchInput:"_searchInput_m5usm_199",select:"_select_m5usm_220",selectType:"_selectType_m5usm_237",selectWrapper:"_selectWrapper_m5usm_241",image:"_image_m5usm_271",imageSrc:"_imageSrc_m5usm_278",imageTitle:"_imageTitle_m5usm_289",actions:"_actions_m5usm_294",actionsWrapper:"_actionsWrapper_m5usm_298",actionsBar:"_actionsBar_m5usm_304",actionButton:"_actionButton_m5usm_313",actionShortcut:"_actionShortcut_m5usm_331",actionShortcutFixKerning:"_actionShortcutFixKerning_m5usm_338"};var sa=S(C()),rR=({src:e,title:t})=>{let n=P("CommandPalette",Xe);return(0,sa.jsxs)("div",{className:n.image,children:[(0,sa.jsx)("img",{src:e,alt:t,className:n.imageSrc}),t&&(0,sa.jsx)("span",{className:n.imageTitle,children:t})]})},Tx=rR;var _x=S(O()),bx=S(X());var aa=S(C());function cg({children:e,heading:t,orientation:n}){let r=P("CommandPalette",Xe);return _x.default.Children.count(e)===0?null:(0,aa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,aa.jsx)("h4",{className:r.listHeading,children:t}),(0,aa.jsx)("div",{className:(0,bx.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var la=S(X());var Dc=S(O()),Rx=S(C()),Px=Dc.default.createContext(void 0);function vr(){let e=Dc.default.useContext(Px);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var kx=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Dc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,Rx.jsx)(Px.Provider,{value:s,children:e})};var Pt=S(C());function dg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=vr(),h=P("CommandPalette",Xe);function v(y){r(y),e&&d(!1)}return(0,Pt.jsxs)("div",{className:(0,la.default)(h.listItem,p===i&&h.listItemSelected),children:[(0,Pt.jsxs)("button",{type:"button",className:(0,la.default)("command-palette-list-item",h.listItemAction,h.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,Pt.jsxs)("div",{className:h.listItemContent,children:[typeof n=="string"?(0,Pt.jsx)("p",{className:(0,la.default)(h.listItemText,h.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,Pt.jsx)("p",{className:(0,la.default)(h.listItemDescription,u==null?void 0:u.description,t?h.lineClamp:h.truncate),children:a})]}),s&&(0,Pt.jsx)(ll,{})]}),l&&(0,Pt.jsxs)("div",{className:h.sources,children:[(0,Pt.jsx)("span",{className:h.sourcesTitle,children:"Sources"}),l.map(y=>y.url?(0,Pt.jsx)("a",{className:h.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",onClick:()=>o&&o(y),children:y.name},y.url):(0,Pt.jsx)("span",{className:h.source,children:y.name},y.name))]})]})}var ua={};Te(ua,{enUS:()=>oR,nlNL:()=>iR});var oR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}]},iR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}]};var Sr=S(C());function fg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=H(ua),s=P("CommandPalette",Xe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(Cc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(ll,{})]}),e]})}var wr=S(O());var Fc=()=>/Mac/i.test(navigator.platform);var sR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},B=sR;function aR(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,[aR(n)]:re(e[n])}),{}):e}function pg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ee(e){return Array.isArray(e)?e.map(Ee):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[pg(n)]:Ee(e[n])}),{}):e}var lR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},da=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)||""}},ca=M("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),mg=M("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),gg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),Ix=e=>e.info.agentInfo,Lx=j({name:"info",initialState:lR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ca.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ca.rejected,t=>{t.fetchState="error"}).addCase(ca.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(mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(gg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Z,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:Ax}=Lx.actions,Ox=Lx.reducer;var jc={list:[],fetchState:"idle",isOpen:!1,page:"search"},Nx=e=>e.search.isOpen,Mx=e=>e.search.page,Dx=e=>e.search.list;function Fx(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Jr=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:da(r),tags:e.tags});return i}),jx=j({name:"search",initialState:jc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=jc.fetchState,e.list=jc.list}},extraReducers:e=>{e.addCase(Jr.pending,t=>{t.fetchState="loading"}).addCase(Jr.rejected,(t,n)=>{t.fetchState="error",B.error(n.error)}).addCase(Jr.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(Z,()=>jc)}}),{resetSearch:Hc,setIsOpen:it,setPage:Ue}=jx.actions,Hx=jx.reducer;var uR=/(https?:\/\/[^\s]+)/,Bc=e=>e.split(" ").find(t=>uR.test(t));var hg=S(X());var Uc=S(C()),cR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Xe);return(0,Uc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,hg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Uc.jsx)("span",{className:(0,hg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},fi=cR;var xn=S(C()),dR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=P("CommandPalette",Xe),a=H(ua),{selected:l,setSelected:u}=vr(),c=i[l],p=c&&typeof c.text=="string"&&Bc(c.text),d=(0,wr.useRef)(null);function h(w){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),T=0,E=0;w==="down"?(x.forEach((R,k)=>{k===l&&(T=k)}),E=T===x.length-1?0:T+1):w==="up"?(x.forEach((R,k)=>{k===l&&(T=k)}),E=T?T-1:x.length-1):u(0);let _=x[E];_&&typeof E=="number"&&(u(E),_.scrollIntoView&&_.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let w=d.current.querySelectorAll(".command-palette-list-item"),x=0;w.forEach((E,_)=>{_===l&&(x=_)});let T=w[x];T&&T.click()}let y=()=>{p&&window.open(p,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,wr.useCallback)(w=>{if(w.key==="Enter"&&w.altKey&&p){y();return}if(w.key==="Enter"&&w.shiftKey){m();return}if(w.key==="ArrowDown"){w.preventDefault(),w.stopPropagation(),h("down");return}if(w.key==="ArrowUp"){w.preventDefault(),w.stopPropagation(),h("up");return}w.key==="Enter"&&l!==-1&&(w.preventDefault(),w.stopPropagation(),v())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,xn.jsxs)("div",{className:s.actions,children:[(0,xn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,xn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,xn.jsx)(fi,{onClick:y,shortKeys:[Fc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,xn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,xn.jsx)(fi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,xn.jsx)(fi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},Ux=dR;var zx=S(O());var fa=S(C()),pi=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,fa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,fa.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 Bt=S(C());function fR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Xe);return(0,Bt.jsxs)("div",{className:l.search,children:[(0,Bt.jsx)("div",{className:l.searchIcon,children:(0,Bt.jsx)(pi,{})}),(0,Bt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Bt.jsx)("input",{ref:a,spellCheck:!1,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,Bt.jsx)("div",{className:l.selectWrapper,children:(0,Bt.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,Bt.jsx)("option",{children:r}),o.map(u=>(0,Bt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var Vx=(0,zx.forwardRef)(fR);var pa=S(C());function eo({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,mi.useState)(0),y=(0,mi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{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,mi.useEffect)(()=>{v(0)},[d,r]),(0,pa.jsx)(oi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,children:(0,pa.jsxs)(kx,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,pa.jsx)(Vx,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}eo.Page=fg;eo.List=cg;eo.Image=Tx;eo.ListItem=dg;eo.ActionsBar=Ux;eo.Button=fi;var ee=eo;var Fe=S(C()),pR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=P("EditSuggestionForm",nx),l=K(),u=H(qm),c=A(v=>v.overlayInput.text);(0,yg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(Sc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,yg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)(Hd,{labels:e.searchKeywords}),(0,Fe.jsx)(Cx,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,Fe.jsx)(Cc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,Fe.jsx)(rx,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(ee.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(ee.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},zc=pR;var mR=["{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}"],gR=new RegExp(mR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function Kx(e,t){let n=e.split(gR),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 Wx(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var qx={suggestions:[],fetchState:"idle",isInitialRequest:null},$x={default:qx},Gx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Qx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Xx=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")},gi=e=>e.textSuggestions,Yx=e=>t=>t.text.startsWith(e),Vc=fe("textSuggestions/refresh"),En=M("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=ni(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,da(r),e);if(e==="default"){let c=s?l.filter(Yx(a)):l;t.dispatch(gr(c.slice(0,i)))}return l}),ma=M("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...da(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Yx(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?Kx(c.text,e):c.text}))),l=Wx(l,i),t.dispatch(gr(l)),l}),Zx=j({name:"textSuggestions",initialState:$x,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(En.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||qx;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(En.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(En.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(ma.pending,t=>{t.default.fetchState="loading"}).addCase(ma.rejected,t=>{t.default.fetchState="error"}).addCase(ma.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(Z,()=>$x)}}),{setTextSuggestions:Jx,setSuggestionState:eE}=Zx.actions,tE=Zx.reducer;var nE={contentType:null,suggestion:null},rE=e=>e.activeSuggestion.suggestion,oE=e=>e.activeSuggestion.contentType,iE=j({name:"activeSuggestion",initialState:nE,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(Z,()=>nE)}}),{setActiveSuggestion:Cn,resetActiveSuggestion:vg}=iE.actions,sE=iE.reducer;var Sg={};Te(Sg,{enUS:()=>hR,nlNL:()=>yR});var hR={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"}]},yR={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 vR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var aE=({ui:e})=>e.overlayCollapsed;var lE=j({name:"ui",initialState:vR,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:ga,setInputHasFocus:hi,setOverlayCollapsed:yi,setOpenOverlayWhenTyping:uE,setOverlayCollapsedUserOverwrite:cE}=lE.actions,dE=lE.reducer;var ha=S(O()),pE=S(C()),fE=ha.default.createContext(null),ya=({broadcastEvents:e,children:t})=>{let n=ha.default.useMemo(()=>e,[]);return(0,pE.jsx)(fE.Provider,{value:n,children:t})},kt=()=>{let e=(0,ha.useContext)(fE);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var SR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Tn=e=>e.auth.isLoggedIn,mE=e=>e.auth.loginFetchState,gE=e=>e.auth.verifyFetchState,hE=e=>e.auth.showLoginOverlay,to=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),yE=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),va=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),vE=j({name:"auth",initialState:SR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(to.pending,t=>{t.loginFetchState="loading"}),e.addCase(to.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(to.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(va.pending,t=>{t.verifyFetchState="loading"}),e.addCase(va.rejected,t=>{t.verifyFetchState="error"}),e.addCase(va.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Kc,setShowLoginOverlay:SE}=vE.actions,wE=vE.reducer;var wg="SetActiveSuggestion",vi="ShowLoginOverlay",xg="UserLoggedIn",_n="ApplySuggestion",Eg="ApplyImageSuggestion",wR="ShowCommandPalette",xR=e=>({[wg]:t=>{e.dispatch(eE(t.state)),e.dispatch(Cn({contentType:t.contentType,suggestion:t.suggestion}))},[wR]:t=>{e.dispatch(it(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[vi]:t=>{e.dispatch(SE(t))},[xg]:()=>{e.dispatch(to())},[Eg]:t=>{e.dispatch(xc({suggestion:t.suggestion}))},[_n]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),xE=xR;var Cg=S(C()),ER=()=>{var v;let[e,t]=(0,EE.useState)(!1),n=A(rE),r=A(oE),o=A(gi),i=K(),s=kt(),a=H(Sg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(vg()),i(hi(!0)),i(Ge.actions.reset())},c=(y,g)=>{i(vg()),i(hi(!0)),s.send(_n,{text:y,suggestion:g})};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(Cn({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(Cn({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Cg.jsx)(oi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Cg.jsx)(zc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},CE=ER;var Wc=S(X()),Ut=S(O());var _E=S(X());var TE={root:"_root_1ukx5_1"};var bE=S(C()),CR=({className:e,value:t,...n})=>{let r=P("TextInput",TE);return(0,bE.jsx)("input",{className:(0,_E.default)(e,r.root),type:"text",value:t,...n})},Sa=CR;var Tg={};Te(Tg,{enUS:()=>TR,nlNL:()=>_R});var TR={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"}]},_R={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 PE={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=S(C());var bR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},PR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=H(Tg),s=P("LoginTokenDialog",PE),a=A(gE),l=K(),u=F("productName"),[c,p]=(0,Ut.useState)(e||""),[d,h]=(0,Ut.useState)(0),[v,y]=(0,Ut.useState)(""),g=(0,Ut.useCallback)(async x=>{x.preventDefault(),l(yE({email:c})),h(1)},[n,c]),m=()=>{y(""),h(0)},f=(0,Ut.useCallback)(async x=>{x.preventDefault();let T=bR(x.target.elements.token.value);if(!T){y(i("verifyCodeError",{login:w}));return}l(va({token:T}))},[n]),w=(0,Ut.useMemo)(()=>x=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,Ut.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:w})),a==="done"&&r()},[a]),(0,he.jsx)(oi,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Sa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>p(x.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:f,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Sa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,he.jsx)("div",{className:s.errorMessage,children:v}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Wc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},kE=PR;var IE=S(C()),kR=()=>{let e=A(hE),t=A(Ix),n=F("adminUrl"),r=kt(),o=()=>r.send(vi,!1),i=()=>{r.send(vi,!1),r.send(xg)};return(0,IE.jsx)(kE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},RE=kR;var nC=S(Pg()),st=S(O());var $R={data:null,fetchState:"idle"},NE=e=>e.contentTypes.data,wa=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),qR=j({name:"contentTypes",initialState:$R,reducers:{},extraReducers:e=>{e.addCase(wa.pending,t=>{t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),ME=qR.reducer;function xa(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 DE=S(O());function FE(e,t){(0,DE.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 Ea=S(O());var jE={data:null,fetchState:"idle"},$c=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},zt=M("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),GR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),QR=j({name:"entities",initialState:jE,reducers:{},extraReducers:e=>{e.addCase(zt.pending,t=>{t.fetchState="loading"}).addCase(zt.rejected,t=>{t.fetchState="error"}).addCase(zt.fulfilled,(t,n)=>{t.fetchState="done",t.data=GR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(Z,()=>jE)}}),HE=QR.reducer;var kg={};Te(kg,{enUS:()=>XR,nlNL:()=>YR});var XR={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},YR={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var BE={root:"_root_17kae_1",empty:"_empty_17kae_5"};var no=S(C()),ZR=({onCopy:e,onUse:t})=>{let n=(0,Ea.useRef)(null),r=P("EntitiesList",BE),o=H(kg),i=A($c),s=K();return(0,Ea.useEffect)(()=>{s(zt())},[]),(0,Ea.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,no.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,no.jsx)(ee.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,no.jsx)(ee.List,{children:i.map((a,l)=>(0,no.jsx)(ee.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,no.jsx)("p",{className:r.empty,children:o("noResults")})]})},UE=ZR;var Vt=S(O());var zE={data:null,fetchState:"idle"},VE=e=>e.summary.data,KE=e=>e.summary.fetchState==="error",bn=M("summary/getSummary",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let o=r.conversationQuery,i=await o();if(i.length===0)return Promise.reject(new Error("No messages are included"));let s=await n.getSummary(i);return{original:i,summary:s}}),JR=j({name:"summary",initialState:zE,reducers:{},extraReducers:e=>{e.addCase(bn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(bn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(bn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(Z,()=>zE)}}),WE=JR.reducer;var Rg={};Te(Rg,{enUS:()=>eI,nlNL:()=>tI});var eI={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."}]},tI={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var $E={root:"_root_18y7z_1",actions:"_actions_18y7z_5",main:"_main_18y7z_11",textInput:"_textInput_18y7z_15",loading:"_loading_18y7z_34",error:"_error_18y7z_38"};var Pn=S(C()),nI=({onCopy:e})=>{let t=(0,Vt.useRef)(null),n=P("SummaryForm",$E),[r,o]=(0,Vt.useState)(""),i=H(Rg),s=A(VE),a=A(KE),l=K(),u=()=>{l(ot({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(ot({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Vt.useEffect)(()=>{l(bn())},[]),(0,Vt.useEffect)(()=>{o(s||"")},[s]),(0,Vt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Vt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Pn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Pn.jsx)("p",{className:n.error,children:i("error")}):(0,Pn.jsxs)(Vt.Fragment,{children:[(0,Pn.jsx)("div",{className:n.main,children:(0,Pn.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,Pn.jsx)("div",{className:n.actions,children:(0,Pn.jsx)(ee.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},qE=nI;var Ig={};Te(Ig,{enUS:()=>rI,nlNL:()=>oI});var rI={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"}],knowledgeSearch:[{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?"}]},oI={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:"Vat gesprek samen"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeSearch:[{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 ro=S(O());var Lg={};Te(Lg,{enUS:()=>iI,nlNL:()=>sI});var iI={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"}]},sI={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 GE={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Ag={data:[],fetchState:"idle"},QE=e=>{var t;return(t=e.answer)==null?void 0:t.data},XE=e=>e.answer.fetchState,Ca=fe("answer/resetKnowledgeSearch"),Si=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().profile.data)==null?void 0:s.code;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeSearch({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),aI=j({name:"answer",initialState:Ag,reducers:{},extraReducers:e=>{e.addCase(Si.pending,t=>{t.fetchState="loading"}).addCase(Si.rejected,t=>{t.fetchState="error"}).addCase(Si.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(Z,()=>Ag).addCase(Ca,()=>Ag)}}),YE=aI.reducer;var Ta=S(C()),ZE=()=>(0,Ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ta.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ta.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Ye=S(C()),lI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=ro.default.useState(""),{setSelected:s}=vr(),a=(0,ro.useRef)(null),l=P("EntitiesList",GE),u=H(Lg),c=K(),p=A(QE),d=A(XE),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(Si({question:o,promptInstruction:r}))},v=(y,g)=>{c(ot({name:"knowledge assist source viewed",data:{question:g,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,ro.useEffect)(()=>{var y;n&&d==="idle"?c(Si({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,ro.useEffect)(()=>{d==="done"&&(c(ot({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(0),i(""))},[d,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(ee.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(ee.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:g},m)=>(0,Ye.jsx)(ee.List,{children:(0,Ye.jsx)(ee.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:f=>v(f,y),sources:g.sources,styles:{title:l.question,description:l.answer},children:y})},`${g.answer}_${m}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,Ye.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,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(ZE,{})})]})]})]})},JE=lI;var uI={data:null,fetchState:"idle"},wi=e=>e.profile.data,qc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],_a=M("profile/getProfile",async(e,t)=>{let{deepdeskAPI:n}=t.extra,o=t.getState().conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return n.getProfile(o.profileCode)}),cI=j({name:"profile",initialState:uI,reducers:{},extraReducers:e=>{e.addCase(_a.pending,t=>{t.fetchState="loading"}).addCase(_a.rejected,t=>{t.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),eC=cI.reducer;var Ce=S(C()),dI=200,fI=5,pI=4,mI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),tC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),gI=()=>{let e=K(),t=kt(),n=H(Ig),[r,o]=(0,st.useState)(!1),[i,s]=(0,st.useState)(""),a=A(Mx),l=A(wi),[u,c]=(0,st.useState)(null),[p,d]=(0,st.useState)([]),[h,v]=(0,st.useState)(),y=A(Tn),g=F("showSearch"),m=F("showEntitiesCommand"),f=F("showSummaryCommand"),w=F("showKnowledgeSearch"),x=F("showImageSearch"),T=F("searchTriggerKey"),E=A(NE),_=A(Dx),R=A(Nx),k=I=>sn(_.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:k("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:k("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:k("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:k("IMAGE"),listOrientation:"horizontal",shouldShow:x}].filter(I=>I.shouldShow),te=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:m&&tC(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&tC(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeSearch")}: ${i}`:n("knowledgeSearch"),onClick:()=>e(Ue("knowledgeSearch")),shouldShow:w,experimental:!0}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:k(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,st.useCallback)((0,nC.default)((I,W)=>{e(Jr({query:I,type:W,tags:["search-overlay"]}))},dI),[]),on=mI([...z,...N]),Kt=(0,st.useCallback)((I,W)=>{if(!W)return;let Lt=[...N,...z].find(({value:jn})=>jn===W);Lt&&(e(Ue("edit")),c(I),d(Lt.list))},[e,u,z]),ao=(0,st.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Eg,{suggestion:W});break;default:t.send(_n,{text:I,suggestion:W})}e(it(!1))},[e]),Ii=I=>{xa(I.text),e(ot({name:"entity copied",data:{entity:I,type:"copy"}})),e(it(!1))},_r=I=>{t.send(_n,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(ot({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ca()),e(it(!1))},Fa=I=>{xa(I),e(it(!1))},ja=I=>{t.send(_n,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(it(!1))},Li=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ai=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function sn(I,W){return I.slice(0,h?10:W.toLowerCase()==="image"?pI:fI)}function Oi(I,W,Lt){return W.reduce((jn,an)=>Lt&&h===Lt?an.length+jn:sn(an,Lt).length+jn,I)}function br(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,st.useEffect)(()=>{i?je(i,h):e(Hc())},[i,h]),(0,st.useEffect)(()=>{y&&e(wa())},[y]),FE(T,()=>e(it(!0))),!g||!l?null:(0,Ce.jsxs)(ee,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:br(I=>e(it(I))),onChangeType:I=>v(I),onChangePage:br(I=>e(Ue(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...N],children:[(0,Ce.jsx)(ee.Page,{id:"search",children:(0,Ce.jsxs)(ee.ActionsBar,{list:[...te.map(I=>({text:I.label,type:"command"})),...on.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>ao(I,on[W]),onSecondary:(I,W)=>Kt(on[W],on[W].type),children:[te.length>0&&(0,Ce.jsx)(ee.List,{heading:n("commands"),children:te.map((I,W)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...z,...N].map(({value:I,label:W,list:Lt,lineClamp:jn,listOrientation:an},Ni)=>(0,Ce.jsx)(ee.List,{heading:W,orientation:an==="horizontal"?"horizontal":"vertical",children:sn(Lt,I).map((ct,dt)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(te.length+dt,[...z,...N].slice(0,Ni).map(({list:Pr})=>Pr),I),closeOnSelect:!1,lineClamp:jn,onClick:()=>ao(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ce.jsx)(ee.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ce.jsx)(ee.Page,{id:"edit",onDismiss:br(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ce.jsx)(zc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Ai,onPrevious:Li,onUse:I=>{e(Ue("search")),ao(I,u),e(it(!1)),d([]),c(null)}})}),(0,Ce.jsx)(ee.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:br(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(UE,{onUse:ja,onCopy:Ii})}),(0,Ce.jsx)(ee.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:br(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(qE,{onCopy:Fa})}),(0,Ce.jsx)(ee.Page,{id:"knowledgeSearch",title:n("knowledgeSearch"),isExperimental:!0,onDismiss:br(()=>{e(Ca()),e(Ue("search"))}),children:(0,Ce.jsx)(JE,{promptInstruction:l.knowledgeSearchPromptInstruction,question:i,onUse:_r,onResetQuestion:()=>{e(Ca()),s("")}})})]})},rC=gI;var xi=S(C()),hI=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,xi.jsxs)(oC.Fragment,{children:[e&&(0,xi.jsx)(rC,{}),(0,xi.jsx)(CE,{}),t&&(0,xi.jsx)(RE,{})]})},iC=hI;var ba=S(C()),yI=({children:e})=>{let n=F("locale").replace("-","");return(0,ba.jsx)(Md.Provider,{value:n,children:e})},vI=({store:e,customStyles:t={},children:n})=>(0,ba.jsx)(Dm,{store:e,children:(0,ba.jsx)(yI,{children:(0,ba.jsx)(Di.Provider,{value:t,children:n})})}),Pa=vI;var Xc=S(X()),Ti=S(O());var sC=S(O());function aC(e,t){let[n,r]=(0,sC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return B.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){B.error(s)}}]}function Gc(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 uC=S(X()),kn=S(O());var Og={};Te(Og,{enUS:()=>SI,nlNL:()=>wI});var SI={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"}]}]},wI={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 lC={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var xr=S(C()),Ng=(e,t,n)=>r=>(0,xr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),xI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=H(Og),i=kt(),s=P("Login",lC),a=F("productName"),l=(0,kn.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,kn.useCallback)(y=>{y.preventDefault(),i.send(vi,!0)},[t]),c=(0,kn.useMemo)(()=>y=>(0,xr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,kn.useCallback)(y=>(0,xr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,kn.useMemo)(()=>({min:Ng(s,60*10,l),hour:Ng(s,60*60,l),day:Ng(s,60*60*12,l)}),[]);return(0,xr.jsxs)("div",{className:(0,uC.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,xr.jsxs)(kn.Fragment,{children:[(0,xr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},Qc=xI;var cC={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var ka=S(C()),EI=({title:e})=>{let t=P("SearchTrigger",cC),n=K();return(0,ka.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(it(!0)),children:[(0,ka.jsx)(pi,{}),(0,ka.jsx)("span",{className:t.text,children:e})]})},dC=EI;var vC=S(O());var Ci=S(O());var fC=S(O());function pC(e,t,n){(0,fC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var CI=/[.*+?^${}()|[\]\\]/g,TI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function _I(e){return e.replace(CI,"\\$&")}function bI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Mg(e){return e.search(TI)}function mC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${_I(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function gC(e){return e.replace(mo,'<mark data-type="placeholder">$1</mark>')}function Ei(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function PI(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 Dg(e,t,n={}){if(t){let r=bI(t.toLowerCase(),e.toLowerCase()),o=Ei(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Mg(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(vy).length>3||t.length>30?PI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ei(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var hC={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Fg=S(C()),RI=["search","personal-collection-search","studio-search"];function II(e,t,n,r={}){let o="";return RI.includes(t)?o=mC(Dg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Dg(e,n,r),r.placeholders===!0&&(o=gC(o)),o}var LI=()=>{},AI=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=A(ni),i=K(),s=P("TextSuggestion",hC),a=(0,Ci.useRef)(null);(0,Ci.useEffect)(()=>{let u=setTimeout(()=>{i(G0({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),pC(a,"click",()=>{i(Ec(e)),i(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Ci.useMemo)(()=>II(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Fg.jsx)(oe,{ref:a,as:"button",selected:t,onClick:LI,children:(0,Fg.jsx)(ii,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},yC=AI;var jg=S(C()),OI=({suggestions:e,selectedIndex:t})=>(0,jg.jsx)(vC.Fragment,{children:e.slice().map((n,r)=>(0,jg.jsx)(yC,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),SC=OI;var Hg={};Te(Hg,{enUS:()=>NI,nlNL:()=>MI});var NI={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"}]},MI={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 wC={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(C()),DI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=P("SuggestionsOverlay",wC),o=H(Hg),i=F("inlineSuggestions"),s=A(Gc),a=V0(),l=K(),u=(0,Ti.useRef)(null),c=F("searchTriggerKey"),p=F("productName"),d=A(aE),h=A(Tn),v=A(cc),[y,g]=(0,Ti.useState)(null),m=F("showSearch"),f=F("showTextSuggestions"),w=F("adminUrl"),x=F("isEmbedded"),[T,E]=aC("dd-snooze-until-ms",0),_=d||T>Date.now(),R=t.filter(te=>te.source!=="gpt").length,k=()=>{_&&E(0),l(cE(!_))},N=te=>{let z=Date.now()+te*1e3;E(z),B.info(`Snooze until: ${new Date(z)}`),l(yi({collapse:!0}))};return(0,Ti.useEffect)(()=>{R===0&&g(null)},[t,R]),ui(()=>{l(yi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||h===null||v===!1?null:h===!1?(0,ue.jsxs)("div",{ref:u,className:(0,Xc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("collapse"),onClick:k,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:k,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Qc,{loginUrl:w,isEmbedded:x,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,Xc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:m&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(Fc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,ue.jsx)(dC,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,Xc.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("collapse"),onClick:k,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:k,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(Wt,{children:(0,ue.jsx)(SC,{suggestions:t,selectedIndex:n})})})]})},FI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Yc=Gr(FI)(DI);var cd=S(X());var An=S(O());var xC=S(O()),jI=["div","span","mark","strong","b","i","u","em"];function Bg(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(jI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,xC.cloneElement)(r,{children:Bg(s,t,n+1)})]}return[...e,...t]}function Rn(e){return e.tagName.toLowerCase()==="textarea"}var EC={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var td=S(O());var zg=S(X()),Rt=S(O());var Zc=S(O()),HI=["bottom","height","left","right","top","width"],BI=(e={},t={})=>HI.some(n=>e[n]!==t[n]),In=new Map,CC,TC=()=>{let e=[],t=[];In.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();BI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{In.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),CC=window.requestAnimationFrame(TC)};function UI(e,t){return{observe(){let n=In.size===0;if(In.has(e)){let r=In.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else In.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&TC()},unobserve(){let n=In.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||In.delete(e),In.size||cancelAnimationFrame(CC)}}}}function Ug(e){let[t,n]=(0,Zc.useState)(null);return(0,Zc.useLayoutEffect)(()=>{if(!e.current)return;let r=UI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var _i=S(O()),bC=S(_u());var _C={root:"_root_1jq08_1"};var PC=({children:e})=>{let[t,n]=(0,_i.useState)(null),r=(0,_i.useContext)(Di);return(0,_i.useLayoutEffect)(()=>{let o=document.createElement("div");return Zr(o),o.classList.add(_C.root),r!=null&&r.rootNode&&o.classList.add(r==null?void 0:r.rootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,bC.createPortal)(e,t):null};var nn={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 Jc=S(C()),bi=(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 Vg(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 Pi=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Vg,...a})=>{let l=Ug(t),u=Ug(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,Jc.jsx)(PC,{children:(0,Jc.jsx)("div",{className:(0,zg.default)(nn.ref,{[nn.positionAbove]:r==="above",[nn.positionBelow]:r==="below",[nn.positionLeft]:r==="left",[nn.positionRight]:r==="right",[nn.alignStart]:o==="start",[nn.alignCenter]:o==="center",[nn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,Jc.jsx)("div",{className:(0,zg.default)(e,nn.root),children:i})})})};var Er=S(C()),zI=({inputStyle:e,inputElement:t})=>{let n=P("TabCompletion",_t),r=bi(document.activeElement===t);return ui(()=>r.close()),(0,td.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Er.jsxs)(td.Fragment,{children:[(0,Er.jsx)("mark",{className:_t.caret,ref:r.triggerRef}),r.opened&&(0,Er.jsx)(Pi,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Er.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Er.jsx)(Yc,{inline:!0})})})]})},ed=class extends Ht{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Rn(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Mg(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Er.jsx)(zI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var LC=S(X());var sd=S(O());function kC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function nd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function RC(e){return e!=null}var IC=S(X()),rd=S(O());var Kg=S(C()),od=(0,rd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,rd.useRef)(null),i=P("TabCompletion",_t);return(0,Kg.jsx)("div",{ref:nd([o,r]),className:(0,IC.default)(e,i.popoverContentContainer),...n,children:(0,Kg.jsx)("div",{className:i.popoverContent,children:t})})});var Cr=S(C()),VI=e=>t=>{let n=Vg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},KI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",_t),s=bi(),a=(0,sd.useMemo)(()=>VI(e.getBoundingClientRect()),[e]),[l,u]=Lc(e);return(0,sd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Cr.jsxs)("span",{children:[(0,Cr.jsx)("mark",{ref:nd([l,s.triggerRef]),className:(0,LC.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Cr.jsx)(Pi,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Cr.jsx)(od,{style:n,children:(0,Cr.jsx)("div",{className:i.hintText,children:o})})})]})},id=class extends Ht{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${kC(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(RC);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,Cr.jsx)(KI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ld=S(X());var Ve=S(O());var Wg=S(C()),AC=()=>(0,Wg.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,Wg.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var Tr=S(O());var NC=S(Pg());var OC={root:"_root_1muu8_1",content:"_content_1muu8_7"};function ad(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 $g(e){return e.replace("https://www.","").replace("https://","")}var It=S(C()),WI=3,$I=e=>({image:e.image||"",text:`https://${e.text}`,id:e.id,title:e.title}),qI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=WI})=>{let i=P("LinkSearch",OC),[s,a]=(0,Tr.useState)(""),l=K(),u=A(Gx("url")),c=A(Fx("URL",$I)),[p,d]=(0,Tr.useState)(c.length-1),h=F("fallbackImage"),v=f=>{let w=f.target;a(w.value)},y=(f,w)=>{f.stopPropagation(),f.preventDefault(),window.open(w,"_blank")},g=f=>{var T;let w=p-1<0?c.length-1:p-1,x=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(w),f.code==="ArrowDown"&&d(x),f.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,Tr.useCallback)((0,NC.default)(f=>{l(Jr({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Tr.useEffect)(()=>{s&&m(s)},[s]),(0,Tr.useEffect)(()=>()=>{l(Hc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(Wt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,w)=>(0,It.jsx)(oe,{selected:p===w,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:ad(f,"small",h||void 0),title:f.title||f.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:f.title||$g(f.text)}),f.title&&$g(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:x=>y(x,f.text)})})]})},f.text))}),(0,It.jsx)(Sa,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},MC=qI;var qg={};Te(qg,{enUS:()=>GI,nlNL:()=>QI});var GI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},QI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(C()),XI=(0,Ve.forwardRef)((e,t)=>{let n=P("TabCompletion",_t);return(0,ze.jsx)("mark",{ref:t,className:(0,ld.default)(n.matchSelection)},"selection-start")}),YI=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=H(qg),s=P("TabCompletion",_t),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),p=K(),d=bi(document.activeElement===r),[h]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ve.useEffect)(()=>()=>h.detach(),[]),(0,Ve.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(h.setStart(y,0),h.setEnd(g,0))},[e.current,a.current]),ui(()=>{d.close()});let v=(0,Ve.useCallback)(y=>{let g=h.toString(),m=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(yc({text:`[${g}](${m})`}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,ld.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(Pi,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(od,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,ld.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(AC,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(MC,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},ud=class extends Ht{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,ze.jsx)(XI,{ref:this.startRef}):(0,ze.jsx)(YI,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Ln=S(C()),ZI=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",EC),c=F("insertLink"),p=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),h=Oc(a),v=(0,An.useRef)(null);(0,An.useEffect)(()=>{Rn(a)&&h&&Nc(a,h)},[h]);let y=(0,An.useCallback)(f=>{if(!o||!n)return f;let w=[(0,Ln.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Ln.jsx)("span",{className:(0,cd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,Ln.jsx)("span",{className:(0,cd.default)(u.hint,u.resetIndent),children:(0,Ln.jsx)(ul,{keyCode:"tab"},"tabHint")})),Bg(f,w)},[o,n,r]),g=(0,An.useMemo)(()=>{let f=[];return d&&f.push(new ed("inline")),c&&f.push(new ud("selection")),f.push(new ai("placeholders")),i&&f.push(new id("keywords")),f},[d,c,i]),m=(0,An.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,Ln.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:m,children:[(0,Ln.jsx)(ii,{tagName:"span",containerTagName:"div",className:(0,cd.default)(u.container,u.agentText),disableLineBreaks:Rn(a),content:t||"\u200B",onAfterParse:y,matchers:g,selection:h,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Ln.jsx)("br",{})]}):null},JI=({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??Ei(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}},DC=Gr(JI)(ZI);var TT=S(X()),_T=S(O());var FC={list:[],fetchState:"idle",isInitialRequest:null},HC=e=>e.autoflows.list||[],jC=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},On=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gg=M("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(On(e.platformSessionId))}),Qg=M("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(On(e.platformSessionId))}),eL=j({name:"autoflows",initialState:FC,reducers:{},extraReducers:e=>{e.addCase(Gg.pending,(t,n)=>{let r=jC(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Qg.pending,(t,n)=>{let r=jC(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(On.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(On.rejected,t=>{t.fetchState="error"}),e.addCase(On.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(Z,()=>FC)}}),BC=M("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(On(e))}),o.on("sessionCompleted",()=>{n(On(e))})}),UC=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),zC=eL.reducer;var VC={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},KC=e=>e.customMessages.list,WC=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),$C=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),qC=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ra=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),dd=M("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),fd=M("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),GC=j({name:"customMessages",initialState:VC,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(dd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(dd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(fd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(fd.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(Z,()=>VC)}}),QC=M("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(GC.actions.onCustomMessage(i))})}),XC=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),YC=GC.reducer;var tL={jwt:null,accountUrl:null,interval:null},ZC=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},Xg=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),Yg=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(Xg()),setInterval(()=>r(Xg()),n)}),JC=j({name:"exchangeToken",initialState:tL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Xg.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(Yg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:eT}=JC.actions,tT=JC.reducer;function nT(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var dT=S(O());var lT=S(X()),uT=S(O());var oT=S(X());var rT={root:"_root_838fd_1"};var sT=S(C()),nL=({className:e,children:t})=>{let n=P("Unicode",rT);return(0,sT.jsx)("span",{className:(0,oT.default)(e,n.root),children:t})},iT=nL;var aT={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 Zg={};Te(Zg,{enUS:()=>rL,nlNL:()=>oL});var rL={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"}]},oL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var at=S(C()),sL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",aT),a=H(Zg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,lT.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(uT.Fragment,{children:[(0,at.jsx)(iT,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},cT=sL;var Jg=S(C()),aL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},lL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jg.jsx)(dT.Fragment,{children:e.map(o=>(0,Jg.jsx)(cT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||aL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),uL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},cL={onStartAutoflow:Gg,onStopAutoflow:Qg},fT=Gr(uL,cL)(lL);var pd=S(O());var nh=S(X());var eh=S(C()),th=()=>(0,eh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,eh.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 pT={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 rn=S(C()),dL=({entities:e})=>{let t=P("EntitiesWidgetList",pT),[n,r]=(0,pd.useState)(void 0),o=K(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),xa(a.text),o(ot({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,pd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,rn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,rn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,rn.jsx)("span",{className:t.entityText,children:a.text}),(0,rn.jsxs)("span",{className:t.iconWrapper,children:[(0,rn.jsx)("span",{className:(0,nh.default)(t.icon),children:(0,rn.jsx)(th,{})}),(0,rn.jsx)("span",{className:(0,nh.default)(t.icon,n===l&&t.iconClicked),children:(0,rn.jsx)(th,{})})]})]},a.text))})},mT=dL;var gT=S(X()),rh=S(O());var Ia={};Te(Ia,{enUS:()=>fL,nlNL:()=>pL});var fL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],answer:[{type:0,value:"Answer"}]},pL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],answer:[{type:0,value:"Antwoord"}]};var Nn={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 Ze=S(C()),mL=({suggestion:e})=>{let t=H(Ia),n=K(),r=A(WC(e.text)),o=A($C(e.text)),i=A(qC(e.text)),s=A(lc),{replyOptions:a}=e,l=(0,rh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(dd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,rh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(fd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Ze.jsxs)(oe,{onClick:l,className:(0,gT.default)(Nn.root,{[Nn.isUsed]:r,[Nn.hasError]:i}),children:[(0,Ze.jsx)(me,{children:(0,Ze.jsxs)(me.Content,{children:[(0,Ze.jsxs)(me.Title,{className:Nn.title,children:[e.text," ",(0,Ze.jsx)(cl,{className:Nn.label,children:"analyse tool"})," ",i&&(0,Ze.jsx)("span",{className:Nn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Ze.jsx)("ul",{className:Nn.quickReplies,children:a.map(c=>(0,Ze.jsx)("li",{className:Nn.quickReply,children:c.title},c.title))})]})}),(0,Ze.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Ze.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Ze.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Ze.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},hT=mL;var oh=S(C()),yT=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 vT=S(O());var lt=S(C()),gL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Bc(o),s=H(Ia),a=F("showImages"),l=F("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,vT.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:ad(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},ST=gL;var La=S(C()),hL=({contentType:e,lines:t,suggestions:n})=>{let r=kt(),o=A(gi),i=a=>{r.send(wg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(_n,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,La.jsx)(La.Fragment,{children:n.map(a=>(0,La.jsx)(ST,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wT=hL;var ih={};Te(ih,{enUS:()=>yL,nlNL:()=>vL});var yL={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xT={root:"_root_1bwme_1",loginText:"_loginText_1bwme_7",stateText:"_stateText_1bwme_8",sectionList:"_sectionList_1bwme_20",shortcutList:"_shortcutList_1bwme_24",shortcut:"_shortcut_1bwme_24",link:"_link_1bwme_50"};var sh=S(C()),ET=()=>(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 ah=S(C()),CT=()=>(0,ah.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ah.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 U=S(C()),md=(e,t)=>{let n=A(Tn);(0,_T.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},SL=()=>{let e=H(ih),t=K(),n=F("isEmbedded"),r=P("Widget",xT),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=A(wi),p=A(qc),d=A(HC),h=A($c),v=A(KC),y=A(uc),g=A(cc),m=A(Tn),f=A(lc),w=A(nT),x=A(gi),T=kt(),E=A(Xx),_=A(ZC("/admin/personal-collection")),R=F("adminUrl");if(md(()=>(t(Ra(f)),t(QC(f)),()=>{t(XC(f))}),[t,g,i,f]),md(()=>(t(On(f)),t(BC(f)),()=>{t(UC(f))}),[t,g,o,f]),md(()=>{p.forEach(({type:N})=>{t(N==="entities"?zt():En(N))})},[t,g,y,c]),md(()=>(t(Yg()),()=>{t(eT())}),[t,g,s,y]),g===!1)return(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,U.jsx)("div",{className:r.loginText,children:(0,U.jsx)("div",{children:(0,U.jsx)(Qc,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||m===null||E||w)return(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("waiting")})})},"waiting");let k=u||a||l||_;return(0,U.jsx)("div",{className:(0,TT.default)(r.root),"data-testid":"widget",children:(0,U.jsxs)(dl,{className:r.sectionList,children:[k&&(0,U.jsx)(Hn,{title:e("actions"),type:"shortcuts",children:(0,U.jsxs)("div",{className:r.shortcutList,children:[u&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,U.jsx)(pi,{}),e("linkSearch")]}),a&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,U.jsx)(CT,{}),e("linkSummary")]}),l&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeSearch"}),children:[(0,U.jsx)(ET,{}),e("linkKnowledgeSearch")]}),_&&(0,U.jsxs)("a",{className:r.shortcut,target:"_blank",href:_,rel:"noreferrer",children:[(0,U.jsx)(yT,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,U.jsx)(Hn,{type:"custom-messages","data-testid":"custom-messages",children:(0,U.jsx)(Wt,{withDivider:!0,children:v.map(N=>(0,U.jsx)(hT,{suggestion:N},N.text))})}),o&&d.length>0&&(0,U.jsx)(Hn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,U.jsx)(Wt,{withDivider:!0,children:(0,U.jsx)(fT,{})})}),p.map(({type:N,title:te,amount:z,lines:je})=>{var on;switch(N){case"entities":return h&&h.length>0&&(0,U.jsx)(Hn,{type:N,title:te,"data-testid":`type-${N}`,children:(0,U.jsx)(mT,{entities:h})},N);default:return((on=x[N])==null?void 0:on.fetchState)==="done"&&x[N].suggestions.length>0&&(0,U.jsx)(Hn,{type:N,title:te,"data-testid":`type-${N}`,children:(0,U.jsx)(Wt,{withDivider:!0,children:(0,U.jsx)(wT,{lines:je,contentType:N,suggestions:x[N].suggestions.slice(0,z)||[]})})},N)}})]})})},bT=SL;function PT(e){let t=new Range;return t.selectNodeContents(e),t}var Aa=/[\u200B-\u200D\uFEFF]/g;function oo(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){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Aa,""),d=o+p.length,h=t>=o&&t<=d,v=n>=o&&n<=d;if(h){let y=s(c,t-o);y===0&&!v?r.setStartBefore(l):r.setStart(l,y)}v&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gd(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let h=c.textContent;p&&(s=l+h.substring(0,r).replace(Aa,"").length),d&&(a=l+h.substring(0,i).replace(Aa,"").length),l+=h.replace(Aa,"").length;break}case Node.ELEMENT_NODE:{let{tagName:h}=c,v=c.nextSibling===null;h==="BR"&&!v&&l++;for(let y=0;y<c.childNodes.length&&(p&&y===r&&(s=l),u(c.childNodes[y]),d&&y===i-1&&(a=l),a===void 0);y++);!d&&h==="DIV"&&!v&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Oa(e,t){if(!e.contains(t.commonAncestorContainer))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(Aa,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let{tagName:d}=u,h=u.nextSibling===null;s===0&&d==="BR"&&!h&&(a+=`
20
+ `);for(let v=c?r:0;v<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[v]),s!==1);v++);!p&&s===0&&d==="DIV"&&!h&&(a+=`
21
+ `);break}default:break}p&&s++}return l(e),a}var io=class extends Sn{observer;getText(){let t=new Range;return t.selectNodeContents(this.element),Oa(this.element,t)}getHTML(){return this.element.innerHTML||""}getSelection(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:gd(this.element,n)}getSelectedText(){if(!this.currentSelection)return"";let{start:t,end:n}=this.currentSelection;return Oa(this.element,oo(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var lh=class{constructor(t){this.name=t;B.warn("BroadcastChannel is not supported")}postMessage(){}addEventListener(){}removeEventListener(){}close(){}},uh=class{constructor(t,n){this.name=t;this.options=n;this.broadcastChannel=new this.options.broadcastChannelConstructor(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()}},ch=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()}},dh=class{sessionId;deepdeskUrl;channel;broadcastChannelConstructor;eventMap;isIntegration;constructor(t){this.deepdeskUrl=t.deepdeskUrl,this.broadcastChannelConstructor=t.broadcastChannelConstructor||window.BroadcastChannel||lh,this.isIntegration=t.deepdeskUrl!==(t.origin||window.location.origin),this.eventMap=t.eventMap,this.setSessionId("deepdesk-general")}setSessionId(t){if(this.sessionId===t)return;this.cleanup(),B.info("Set sessionId",t),this.sessionId=t,this.channel=this.isIntegration?new ch(t,this.deepdeskUrl,{debug:!0}):new uh(t,{broadcastChannelConstructor:this.broadcastChannelConstructor});let n=r=>{var o,i;r.origin===this.deepdeskUrl&&r.data.type==="event"&&(B.info("Received broadcast event",this.sessionId,r),(i=(o=this.eventMap)[r.data.name])==null||i.call(o,r.data.payload))};this.channel.onMessage(n)}send(t,n){var o,i,s;if(!this.sessionId)return;B.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)}cleanup(){var t;(t=this.channel)==null||t.close(),delete this.channel}},kT=dh;var ki=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var fh=e=>new Promise(t=>{setTimeout(t,e)});var Ri=class extends ki{name="ClientError"},ph=class extends ki{name="ServerError"},Mn=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}async request(t,n={}){let r={isStale:!1},o=`${this.baseUrl}${t}`,i=this.fetch,{abortLatest:s=!1,attempts:a=1,retryDelay:l=500,refreshTokenOn401:u=!0,retryOnError:c=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:d="v1",...h}=n,v={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(v.headers={...v.headers,"X-CSRFToken":this.csrfToken}),typeof d=="string"&&(v.headers={...v.headers,"X-Deepdesk-API-Version":d});let y=a,g=!1;if(!i)throw new Error("fetch is not set");this.latestRequestByUrl[o]&&s&&(this.latestRequestByUrl[o].isStale=!0),this.latestRequestByUrl[o]=r;let m=async()=>(y--,i(o,v).then(async x=>p(x)&&!r.isStale&&y>0?(await fh(l),m()):x.status===401&&u===!0&&g===!1?(g=!0,await this.refreshToken(),m()):x).catch(async x=>{if(c(x)&&!r.isStale&&y>0)return await fh(l),m();throw x})),f=await m(),w=await f.json().catch(()=>null);if(r.isStale)throw new Error("Aborted");if(f.status>=500)throw new ph("Server Error",w);if(f.status===401)throw new Ri("Unauthorized",w);if(f.status===403)throw new Ri("Forbidden",w);if(f.status===404)throw new Ri("Not Found",w);if(f.status>=400)throw new Ri("Bad Request",w);return delete this.latestRequestByUrl[o],w}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 hd(e){return{...re(e),tags:e.tags}}var Dn=class e{constructor(t,n={}){this.options=n;this.client=new Mn(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(),B.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ee(t),tags:t.tags},{version:"v2"});return hd(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(),B.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 hd(i)}async isConversationSupported(t,n={}){B.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=Ee(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return hd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ee(o),tags:o.tags})),{version:"v2"})).map(o=>hd(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",Ee({...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:Ee({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(r=>r.text&&r.source)}})).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 B.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",Ee(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}`,Ee(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`,Ee(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",Ee(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ee(t),{version:"v2"});return re(n)}async knowledgeSearch(t,n,r){let o=await this.client.post("/api/knowledge-search/search",Ee({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(Sy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&B.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Na=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(pg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{B.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 xL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(xL||={});var Ma=class{constructor(t,n={}){this.apiUrl=t;this.client=new Mn(t,n)}client;streams={};logger=B;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`,Ee(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ee(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",Ee(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Na(`${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 RT={startTime:null,stopTime:null},IT=j({name:"handlingTime",initialState:RT,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(Z,()=>RT)}}),{handlingTimeStart:LT,handlingTimeStop:yd,handlingTimeReset:AT}=IT.actions,OT=IT.reducer;var NT=(e={})=>{let t={onAuthError:Kc(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mh={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var so=M("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return mh.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),EL=j({name:"styleSuggestions",initialState:mh,reducers:{},extraReducers:e=>{e.addCase(so.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(so.rejected,t=>{t.fetchState="error"}).addCase(so.fulfilled,(t,n)=>{t.fetchState="done",pr(t.list,n.payload)||(t.list=n.payload)}).addCase(Z,()=>mh)}}),MT=EL.reducer;var DT=(e={})=>{let t,n=!0,r={getStyleSuggestions:so,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 CL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var FT=(e={})=>{let t={getTextSuggestions:En,getAutocompleteSuggestions:ma,debounce:200,check:Gc,...e},n,r=!0;return o=>i=>s=>{var g;let{input:{userCommitted:a}}=o.getState(),l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{recommendTextSuggestions:c,showTabCompletion:p}=u.settings,d=(g=u.conversation.current)==null?void 0:g.id,h=s.type===Vc.toString();if(!d||!c&&!p)return l;let{input:{userCommitted:v}}=u;return CL(v,a)&&!r&&!h||(clearTimeout(n),!t.check(u))||(n=setTimeout(()=>{r=!1;let m=ni(u);m===""?o.dispatch(t.getTextSuggestions("default")):o.dispatch(t.getAutocompleteSuggestions(m))},h?0:t.debounce)),l}};var jT=so.fulfilled.toString();function TL(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 HT=e=>t=>n=>r=>{var c;if(r.type!==jT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current,{agentInfo:l}=i.info;if(o===s)return;let u=TL(o,s);r.type===jT&&u.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,agentId:l.agentId??(a==null?void 0:a.agentId),agentName:l.agentName??(a==null?void 0:a.agentName),agentEmail:l.agentEmail??(a==null?void 0:a.agentEmail),data:{keywordMatches:u}})};var _L=Au({activeSuggestion:sE,answer:YE,auth:wE,autoflows:zC,conversation:U0,contentTypes:ME,customMessages:YC,exchangeToken:tT,entities:HE,handlingTime:OT,info:Ox,input:Km.reducer,overlayInput:Ge.reducer,settings:A0,profile:eC,search:Hx,summary:WE,styleSuggestions:MT,ui:dE,textSuggestions:tE});function BT(e){return jw({reducer:_L,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),NT(),FT({debounce:200}),DT({debounce:500}),HT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var bL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},PL=e=>t=>n=>r=>{var a;let o=t.getState(),i=jm("inlineSuggestions")(o);switch(r.type){case Cn.toString():{let l=Qx(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 Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:bL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case yc.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 Zs.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case xc.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 zt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case bn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),summary:r.payload.summary}});break;case ot.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 vc.toString():e.handleKeyDown(r.payload);break;case Ys.toString():e.logSendMessage(r.payload);break;case Sc.toString():e.logSendEditSuggestionMessage(r.payload);break;case wc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Ys.toString():e.handleAfterSendMessage(r.payload);break;case ga.toString():e.onUpdateShowTabHint(r.payload);break;case yd.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(gr([])),t.dispatch(hr()));break}default:break}return s},UT=PL;function gh(e){return e.toISOString().replace("T"," ").replace("Z","")}function zT(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:gh(n),timeStop:gh(r)}}function hh(e,t,n){var T,E,_;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,pastes:c,cuts:p,deletions:d,textSuggestions:h,offeredTextSuggestions:v}}=t[e],y=r.length,m=h.reduce((R,{text:k,searchTerm:N})=>R+k.length-(N?N.length:0),0),f=u??Date.now(),w=(Date.now()-f)/1e3,x=o/w;return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:c,cuts:p,deletions:d,lenTextTyped:o,lenTextTotal:y,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:w,charsPerSecond:x,numPastes:l,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:v.filter(R=>R.source==="gpt").length}],agentId:(T=t.info.agentInfo)==null?void 0:T.agentId,agentName:(E=t.info.agentInfo)==null?void 0:E.agentName,agentEmail:(_=t.info.agentInfo)==null?void 0:_.agentEmail}}function VT(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?VT(r,t):null}function KT(e,t){return VT(e,t)}function WT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vd(e){return e instanceof HTMLElement&&(Rn(e)||Ac(e))}var $T=(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{B.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function kL(e){return e.offsetParent!==null}function qT(e){if(!kL(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 Sd(e,t,n=100){let r=qT(e);t({isVisible:r});let o=setInterval(()=>{let i=qT(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var ut=S(C()),GT=$T("showTabHint",!0),Da=class e{static version="10.1.2";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a}){let l=t.replace(/\/api$/,"");this.deepdeskApi=new Dn(l,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[UT({emit:(c,p,d)=>this.emit(c,p,d),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),handleInputChanged:c=>this.handleInputChanged(c),handleKeyDown:c=>this.handleKeyDown(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),logSendEditSuggestionMessage:c=>this.logSendEditMessage(c),onUpdateShowTabHint:c=>GT.update(c),sendEvent:(c,p)=>this.deepdeskApi.sendEvent(c,p)})]};n&&Object.assign(u,{deepdeskBrokerAPI:new Ma(n)}),this.store=BT(u),this.broadcastEvents=new kT({debug:!0,deepdeskUrl:l,eventMap:xE(this.store)}),this.store.dispatch(Qs),this.store.dispatch(ga(GT.value())),this.store.dispatch(Qs({locale:o,adminUrl:l,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?(B.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(B.warn("Profile has not been loaded (yet)"),!0):(B.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Kc(null)),this.store.dispatch(to()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Tn(r)&&mE(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){B.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(zm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(dc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(fc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Vm(t))).payload}async postMessages(t){return(await this.store.dispatch(mc(t))).payload}async updateConversation(t){return(await this.store.dispatch(pc(t))).payload}resetConversation(){this.store.dispatch(Z()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(bn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Qs(t))}setVisitorInfo(t){this.store.dispatch(Ax(t))}async setAgentInfo(t){await this.store.dispatch(ca(t))}async setAgentSettings(t){await this.store.dispatch(mg(t))}async getAgentSettings(){return(await this.store.dispatch(gg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();let t=[];return this.store.dispatch(Vc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(wc(t))}syncInputHtml(t){this.store.dispatch(ex(t))}notifyKeyDown(t){this.store.dispatch(vc(t))}notifyPaste(t,n){this.store.dispatch(Z0({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(X0(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(Jx(t.contentType,t.suggestions)),this.store.dispatch(Cn({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(yi({collapse:!1})),this.inputMediator&&this.store.dispatch(K0({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(gr([])))}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(Y0(hc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(q0()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Q0());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(Zs()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Ec(-1)),this.store.dispatch(Zs()),t.preventDefault()):n||(this.store.dispatch(yi({collapse:!0})),this.store.dispatch(uE(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(ga(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(Ft({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(hr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(J0()),this.store.dispatch(gr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(B.info("Start handling time"),this.store.dispatch(LT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(B.info("Stop handling time"),this.store.dispatch(yd()))}logSendMessage(t){let n=hh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=hh("overlayInput",this.state,{version:"v2"});t&&Object.assign(n,{text:t}),this.store.dispatch($0(this.state.overlayInput.metrics)),this.deepdeskApi.sendEvent("suggestion edited",{data:n})}logHandlingTime(){let t=zT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(AT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Ys(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){B.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),B.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]=di(r,o);return i.dataset.testid=t,n!=null&&n.rootNode&&i.classList.add(n.rootNode),this.unmountHandlers.push(()=>{(0,Fn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Zr(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,Fn.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(!vd(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:g,inlineSuggestions:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:m});let f=y&&KT(t,y)||void 0,w=this.overlayContainerFactory("deepdesk-tab-completion",r,t,{appendTo:g,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()}),x=this.overlayContainerFactory("deepdesk-suggestions-overlay",r,f||t,{appendTo:g});n.automaticHandlingTime&&this.setupHandlingTime(t),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(DC,{inputElement:t})})}),w),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(Yc,{})})}),x),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(iC,{})})}),this.createContainer("deepdesk-overlays")),Zr(t),this.inputMediator=v||(Rn(t)?new wn(t):new io(t)),this.inputMediator.on("change",({plainText:E})=>{this.notifyInputChanged(E)}),this.inputMediator.on("updated",({rawHtml:E})=>{E!=null&&this.syncInputHtml(E)}),this.inputMediator.on("keydown",E=>{this.notifyKeyDown(E)}),this.inputMediator.on("paste",({pastedText:E,selectionText:_})=>{this.notifyPaste(E,_)}),this.inputMediator.on("cut",({selectionText:E})=>{this.notifyCut(E)});let T;this.inputMediator.on("selection",E=>{clearTimeout(T),E===null?T=setTimeout(()=>{E!==null&&this.store.dispatch(Wm(E))},500):this.store.dispatch(Wm(E))}),this.inputMediator.on("disabled",()=>{var E;(E=this.inputMediator)==null||E.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(hi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(hi(!0))),this.store.dispatch(W0({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var E;this.broadcastEvents.setSessionId((E=this.state.conversation.current)==null?void 0:E.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&&B.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,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(bT,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Fn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Sd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){WT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(_a());let t=wi(this.state);t&&this.store.dispatch(Qs({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeSearch,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(B.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;B.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=qc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(zt()):this.store.dispatch(En(r))})}catch(r){this.handleError(r)}}};async function QT(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 XT(e,t,n={}){let r=n.replace?oo(e,n.replace.start,n.replace.end):PT(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),t.split(`
22
+ `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}),r.commonAncestorContainer===e&&r.surroundContents(document.createElement("div"))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?oo(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function YT(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ZT(e,t,n){await new Dn(e).authenticateWithKey(t,n)}async function JT(e){let n=await new Mn(e).get("/platform/config/",{version:null});return re(n)}async function RL(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 e1(e,t){let n=await RL(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 s1(IL);})();
23
23
  /*! Bundled license information:
24
24
 
25
+ classnames/index.js:
26
+ (*!
27
+ Copyright (c) 2018 Jed Watson.
28
+ Licensed under the MIT License (MIT), see
29
+ http://jedwatson.github.io/classnames
30
+ *)
31
+
25
32
  object-assign/index.js:
26
33
  (*
27
34
  object-assign
@@ -39,6 +46,16 @@ react/cjs/react.production.min.js:
39
46
  * LICENSE file in the root directory of this source tree.
40
47
  *)
41
48
 
49
+ react/cjs/react-jsx-runtime.production.min.js:
50
+ (** @license React v17.0.2
51
+ * react-jsx-runtime.production.min.js
52
+ *
53
+ * Copyright (c) Facebook, Inc. and its affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ *)
58
+
42
59
  scheduler/cjs/scheduler.production.min.js:
43
60
  (** @license React v0.20.2
44
61
  * scheduler.production.min.js
@@ -102,23 +119,6 @@ react-is/cjs/react-is.production.min.js:
102
119
  * LICENSE file in the root directory of this source tree.
103
120
  *)
104
121
 
105
- classnames/index.js:
106
- (*!
107
- Copyright (c) 2018 Jed Watson.
108
- Licensed under the MIT License (MIT), see
109
- http://jedwatson.github.io/classnames
110
- *)
111
-
112
- react/cjs/react-jsx-runtime.production.min.js:
113
- (** @license React v17.0.2
114
- * react-jsx-runtime.production.min.js
115
- *
116
- * Copyright (c) Facebook, Inc. and its affiliates.
117
- *
118
- * This source code is licensed under the MIT license found in the
119
- * LICENSE file in the root directory of this source tree.
120
- *)
121
-
122
122
  escape-html/index.js:
123
123
  (*!
124
124
  * escape-html