@deepdesk/deepdesk-sdk 19.3.2-beta.6 → 19.4.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- "use strict";var Deepdesk=(()=>{var O_=Object.create;var al=Object.defineProperty,L_=Object.defineProperties,D_=Object.getOwnPropertyDescriptor,F_=Object.getOwnPropertyDescriptors,z_=Object.getOwnPropertyNames,_u=Object.getOwnPropertySymbols,H_=Object.getPrototypeOf,mg=Object.prototype.hasOwnProperty,gx=Object.prototype.propertyIsEnumerable;var gg=Math.pow,pg=(e,t,n)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))mg.call(t,n)&&pg(e,n,t[n]);if(_u)for(var n of _u(t))gx.call(t,n)&&pg(e,n,t[n]);return e},A=(e,t)=>L_(e,F_(t));var hg=e=>typeof e=="symbol"?e:e+"",ie=(e,t)=>{var n={};for(var r in e)mg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_u)for(var r of _u(e))t.indexOf(r)<0&&gx.call(e,r)&&(n[r]=e[r]);return n};var un=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},ht=(e,t)=>{for(var n in t)al(e,n,{get:t[n],enumerable:!0})},hx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z_(t))!mg.call(e,o)&&o!==n&&al(e,o,{get:()=>t[o],enumerable:!(r=D_(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?O_(H_(e)):{},hx(t||!e||!e.__esModule?al(n,"default",{value:e,enumerable:!0}):n,e)),B_=e=>hx(al({},"__esModule",{value:!0}),e);var xe=(e,t,n)=>pg(e,typeof t!="symbol"?t+"":t,n);var M=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(c){o(c)}},s=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});var De=un((Sz,Mu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=r(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)e.call(o,s)&&o[s]&&(i=r(i,s));return i}function r(o,i){return i?o?o+" "+i:o+i:o}typeof Mu!="undefined"&&Mu.exports?(t.default=t,Mu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Px=un(he=>{"use strict";var ll=Symbol.for("react.element"),U_=Symbol.for("react.portal"),V_=Symbol.for("react.fragment"),W_=Symbol.for("react.strict_mode"),$_=Symbol.for("react.profiler"),j_=Symbol.for("react.provider"),K_=Symbol.for("react.context"),G_=Symbol.for("react.forward_ref"),q_=Symbol.for("react.suspense"),Y_=Symbol.for("react.memo"),X_=Symbol.for("react.lazy"),yx=Symbol.iterator;function Q_(e){return e===null||typeof e!="object"?null:(e=yx&&e[yx]||e["@@iterator"],typeof e=="function"?e:null)}var xx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wx=Object.assign,bx={};function Fs(e,t,n){this.props=e,this.context=t,this.refs=bx,this.updater=n||xx}Fs.prototype.isReactComponent={};Fs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ex(){}Ex.prototype=Fs.prototype;function vg(e,t,n){this.props=e,this.context=t,this.refs=bx,this.updater=n||xx}var Sg=vg.prototype=new Ex;Sg.constructor=vg;wx(Sg,Fs.prototype);Sg.isPureReactComponent=!0;var vx=Array.isArray,Cx=Object.prototype.hasOwnProperty,xg={current:null},Tx={key:!0,ref:!0,__self:!0,__source:!0};function kx(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)Cx.call(t,r)&&!Tx.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),c=0;c<a;c++)l[c]=arguments[c+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:ll,type:e,key:i,ref:s,props:o,_owner:xg.current}}function Z_(e,t){return{$$typeof:ll,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wg(e){return typeof e=="object"&&e!==null&&e.$$typeof===ll}function J_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Sx=/\/+/g;function yg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?J_(""+e.key):t.toString(36)}function Ou(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 ll:case U_:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+yg(s,0):r,vx(o)?(n="",e!=null&&(n=e.replace(Sx,"$&/")+"/"),Ou(o,t,n,"",function(c){return c})):o!=null&&(wg(o)&&(o=Z_(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Sx,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",vx(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+yg(i,a);s+=Ou(i,t,n,l,o)}else if(l=Q_(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+yg(i,a++),s+=Ou(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Nu(e,t,n){if(e==null)return e;var r=[],o=0;return Ou(e,r,"","",function(i){return t.call(n,i,o++)}),r}function eM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qt={current:null},Lu={transition:null},tM={ReactCurrentDispatcher:qt,ReactCurrentBatchConfig:Lu,ReactCurrentOwner:xg};function Rx(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:Nu,forEach:function(e,t,n){Nu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nu(e,function(){t++}),t},toArray:function(e){return Nu(e,function(t){return t})||[]},only:function(e){if(!wg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Fs;he.Fragment=V_;he.Profiler=$_;he.PureComponent=vg;he.StrictMode=W_;he.Suspense=q_;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tM;he.act=Rx;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=wx({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=xg.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Cx.call(t,l)&&!Tx.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:ll,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:K_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:j_,_context:e},e.Consumer=e};he.createElement=kx;he.createFactory=function(e){var t=kx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:G_,render:e}};he.isValidElement=wg;he.lazy=function(e){return{$$typeof:X_,_payload:{_status:-1,_result:e},_init:eM}};he.memo=function(e,t){return{$$typeof:Y_,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Lu.transition;Lu.transition={};try{e()}finally{Lu.transition=t}};he.unstable_act=Rx;he.useCallback=function(e,t){return qt.current.useCallback(e,t)};he.useContext=function(e){return qt.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return qt.current.useDeferredValue(e)};he.useEffect=function(e,t){return qt.current.useEffect(e,t)};he.useId=function(){return qt.current.useId()};he.useImperativeHandle=function(e,t,n){return qt.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return qt.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return qt.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return qt.current.useMemo(e,t)};he.useReducer=function(e,t,n){return qt.current.useReducer(e,t,n)};he.useRef=function(e){return qt.current.useRef(e)};he.useState=function(e){return qt.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return qt.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return qt.current.useTransition()};he.version="18.3.1"});var Z=un((wz,Ix)=>{"use strict";Ix.exports=Px()});var Nx=un(Fu=>{"use strict";var nM=Z(),rM=Symbol.for("react.element"),oM=Symbol.for("react.fragment"),iM=Object.prototype.hasOwnProperty,sM=nM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aM={key:!0,ref:!0,__self:!0,__source:!0};function Mx(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)iM.call(t,r)&&!aM.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:rM,type:e,key:i,ref:s,props:o,_owner:sM.current}}Fu.Fragment=oM;Fu.jsx=Mx;Fu.jsxs=Mx});var I=un((Iz,Ox)=>{"use strict";Ox.exports=Nx()});var ow=un(rw=>{"use strict";var ul=Z();function TM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kM=typeof Object.is=="function"?Object.is:TM,RM=ul.useSyncExternalStore,PM=ul.useRef,IM=ul.useEffect,AM=ul.useMemo,_M=ul.useDebugValue;rw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=PM(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=AM(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var m=s.value;if(o(m,p))return f=m}return f=p}if(m=f,kM(u,p))return m;var g=r(p);return o!==void 0&&o(m,g)?(u=p,m):(u=p,f=g)}var c=!1,u,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=RM(e,i[0],i[1]);return IM(function(){s.hasValue=!0,s.value=a},[a]),_M(a),a}});var sw=un((t8,iw)=>{"use strict";iw.exports=ow()});var dC=un(Fe=>{"use strict";function Xh(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<ef(o,t))e[r]=t,e[n]=o,n=r;else break e}}function sr(e){return e.length===0?null:e[0]}function nf(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,a=e[s],l=s+1,c=e[l];if(0>ef(a,n))l<o&&0>ef(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>ef(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function ef(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(nC=performance,Fe.unstable_now=function(){return nC.now()}):(Gh=Date,rC=Gh.now(),Fe.unstable_now=function(){return Gh.now()-rC});var nC,Gh,rC,Mr=[],$o=[],P2=1,Vn=null,Ht=3,rf=!1,Wi=!1,$l=!1,sC=typeof setTimeout=="function"?setTimeout:null,aC=typeof clearTimeout=="function"?clearTimeout:null,oC=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Qh(e){for(var t=sr($o);t!==null;){if(t.callback===null)nf($o);else if(t.startTime<=e)nf($o),t.sortIndex=t.expirationTime,Xh(Mr,t);else break;t=sr($o)}}function Zh(e){if($l=!1,Qh(e),!Wi)if(sr(Mr)!==null)Wi=!0,ey(Jh);else{var t=sr($o);t!==null&&ty(Zh,t.startTime-e)}}function Jh(e,t){Wi=!1,$l&&($l=!1,aC(jl),jl=-1),rf=!0;var n=Ht;try{for(Qh(t),Vn=sr(Mr);Vn!==null&&(!(Vn.expirationTime>t)||e&&!uC());){var r=Vn.callback;if(typeof r=="function"){Vn.callback=null,Ht=Vn.priorityLevel;var o=r(Vn.expirationTime<=t);t=Fe.unstable_now(),typeof o=="function"?Vn.callback=o:Vn===sr(Mr)&&nf(Mr),Qh(t)}else nf(Mr);Vn=sr(Mr)}if(Vn!==null)var i=!0;else{var s=sr($o);s!==null&&ty(Zh,s.startTime-t),i=!1}return i}finally{Vn=null,Ht=n,rf=!1}}var of=!1,tf=null,jl=-1,lC=5,cC=-1;function uC(){return!(Fe.unstable_now()-cC<lC)}function qh(){if(tf!==null){var e=Fe.unstable_now();cC=e;var t=!0;try{t=tf(!0,e)}finally{t?Wl():(of=!1,tf=null)}}else of=!1}var Wl;typeof oC=="function"?Wl=function(){oC(qh)}:typeof MessageChannel!="undefined"?(Yh=new MessageChannel,iC=Yh.port2,Yh.port1.onmessage=qh,Wl=function(){iC.postMessage(null)}):Wl=function(){sC(qh,0)};var Yh,iC;function ey(e){tf=e,of||(of=!0,Wl())}function ty(e,t){jl=sC(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_continueExecution=function(){Wi||rf||(Wi=!0,ey(Jh))};Fe.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"):lC=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Ht};Fe.unstable_getFirstCallbackNode=function(){return sr(Mr)};Fe.unstable_next=function(e){switch(Ht){case 1:case 2:case 3:var t=3;break;default:t=Ht}var n=Ht;Ht=t;try{return e()}finally{Ht=n}};Fe.unstable_pauseExecution=function(){};Fe.unstable_requestPaint=function(){};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ht;Ht=e;try{return t()}finally{Ht=n}};Fe.unstable_scheduleCallback=function(e,t,n){var r=Fe.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:P2++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Xh($o,e),sr(Mr)===null&&e===sr($o)&&($l?(aC(jl),jl=-1):$l=!0,ty(Zh,n-r))):(e.sortIndex=o,Xh(Mr,e),Wi||rf||(Wi=!0,ey(Jh))),e};Fe.unstable_shouldYield=uC;Fe.unstable_wrapCallback=function(e){var t=Ht;return function(){var n=Ht;Ht=t;try{return e.apply(this,arguments)}finally{Ht=n}}}});var pC=un((UU,fC)=>{"use strict";fC.exports=dC()});var yk=un(On=>{"use strict";var I2=Z(),Mn=pC();function H(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 xT=new Set,pc={};function ns(e,t){xa(e,t),xa(e+"Capture",t)}function xa(e,t){for(pc[e]=t,e=0;e<t.length;e++)xT.add(t[e])}var fo=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Cy=Object.prototype.hasOwnProperty,A2=/^[: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]*$/,mC={},gC={};function _2(e){return Cy.call(gC,e)?!0:Cy.call(mC,e)?!1:A2.test(e)?gC[e]=!0:(mC[e]=!0,!1)}function M2(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 N2(e,t,n,r){if(t===null||typeof t=="undefined"||M2(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 en(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 Nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nt[e]=new en(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nt[t]=new en(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nt[e]=new en(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nt[e]=new en(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){Nt[e]=new en(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nt[e]=new en(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nt[e]=new en(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nt[e]=new en(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nt[e]=new en(e,5,!1,e.toLowerCase(),null,!1,!1)});var hv=/[\-:]([a-z])/g;function yv(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(hv,yv);Nt[t]=new en(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(hv,yv);Nt[t]=new en(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(hv,yv);Nt[t]=new en(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nt[e]=new en(e,1,!1,e.toLowerCase(),null,!1,!1)});Nt.xlinkHref=new en("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nt[e]=new en(e,1,!1,e.toLowerCase(),null,!0,!0)});function vv(e,t,n,r){var o=Nt.hasOwnProperty(t)?Nt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(N2(t,n,o,r)&&(n=null),r||o===null?_2(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 ho=I2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sf=Symbol.for("react.element"),na=Symbol.for("react.portal"),ra=Symbol.for("react.fragment"),Sv=Symbol.for("react.strict_mode"),Ty=Symbol.for("react.profiler"),wT=Symbol.for("react.provider"),bT=Symbol.for("react.context"),xv=Symbol.for("react.forward_ref"),ky=Symbol.for("react.suspense"),Ry=Symbol.for("react.suspense_list"),wv=Symbol.for("react.memo"),Ko=Symbol.for("react.lazy"),ET=Symbol.for("react.offscreen"),hC=Symbol.iterator;function Kl(e){return e===null||typeof e!="object"?null:(e=hC&&e[hC]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,ny;function ec(e){if(ny===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ny=t&&t[1]||""}return`
2
- `+ny+e}var ry=!1;function oy(e,t){if(!e||ry)return"";ry=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
1
+ "use strict";var Deepdesk=(()=>{var L_=Object.create;var al=Object.defineProperty,D_=Object.defineProperties,F_=Object.getOwnPropertyDescriptor,z_=Object.getOwnPropertyDescriptors,H_=Object.getOwnPropertyNames,_u=Object.getOwnPropertySymbols,B_=Object.getPrototypeOf,mg=Object.prototype.hasOwnProperty,hx=Object.prototype.propertyIsEnumerable;var gg=Math.pow,pg=(e,t,n)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))mg.call(t,n)&&pg(e,n,t[n]);if(_u)for(var n of _u(t))hx.call(t,n)&&pg(e,n,t[n]);return e},A=(e,t)=>D_(e,z_(t));var hg=e=>typeof e=="symbol"?e:e+"",ie=(e,t)=>{var n={};for(var r in e)mg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_u)for(var r of _u(e))t.indexOf(r)<0&&hx.call(e,r)&&(n[r]=e[r]);return n};var un=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},ht=(e,t)=>{for(var n in t)al(e,n,{get:t[n],enumerable:!0})},yx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of H_(t))!mg.call(e,o)&&o!==n&&al(e,o,{get:()=>t[o],enumerable:!(r=F_(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?L_(B_(e)):{},yx(t||!e||!e.__esModule?al(n,"default",{value:e,enumerable:!0}):n,e)),U_=e=>yx(al({},"__esModule",{value:!0}),e);var xe=(e,t,n)=>pg(e,typeof t!="symbol"?t+"":t,n);var M=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(c){o(c)}},s=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});var De=un((xz,Mu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=r(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)e.call(o,s)&&o[s]&&(i=r(i,s));return i}function r(o,i){return i?o?o+" "+i:o+i:o}typeof Mu!="undefined"&&Mu.exports?(t.default=t,Mu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Ix=un(he=>{"use strict";var ll=Symbol.for("react.element"),V_=Symbol.for("react.portal"),W_=Symbol.for("react.fragment"),$_=Symbol.for("react.strict_mode"),j_=Symbol.for("react.profiler"),K_=Symbol.for("react.provider"),G_=Symbol.for("react.context"),q_=Symbol.for("react.forward_ref"),Y_=Symbol.for("react.suspense"),X_=Symbol.for("react.memo"),Q_=Symbol.for("react.lazy"),vx=Symbol.iterator;function Z_(e){return e===null||typeof e!="object"?null:(e=vx&&e[vx]||e["@@iterator"],typeof e=="function"?e:null)}var wx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bx=Object.assign,Ex={};function Fs(e,t,n){this.props=e,this.context=t,this.refs=Ex,this.updater=n||wx}Fs.prototype.isReactComponent={};Fs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cx(){}Cx.prototype=Fs.prototype;function vg(e,t,n){this.props=e,this.context=t,this.refs=Ex,this.updater=n||wx}var Sg=vg.prototype=new Cx;Sg.constructor=vg;bx(Sg,Fs.prototype);Sg.isPureReactComponent=!0;var Sx=Array.isArray,Tx=Object.prototype.hasOwnProperty,xg={current:null},kx={key:!0,ref:!0,__self:!0,__source:!0};function Rx(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)Tx.call(t,r)&&!kx.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),c=0;c<a;c++)l[c]=arguments[c+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:ll,type:e,key:i,ref:s,props:o,_owner:xg.current}}function J_(e,t){return{$$typeof:ll,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wg(e){return typeof e=="object"&&e!==null&&e.$$typeof===ll}function eM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xx=/\/+/g;function yg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?eM(""+e.key):t.toString(36)}function Ou(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 ll:case V_:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+yg(s,0):r,Sx(o)?(n="",e!=null&&(n=e.replace(xx,"$&/")+"/"),Ou(o,t,n,"",function(c){return c})):o!=null&&(wg(o)&&(o=J_(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(xx,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Sx(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+yg(i,a);s+=Ou(i,t,n,l,o)}else if(l=Z_(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+yg(i,a++),s+=Ou(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Nu(e,t,n){if(e==null)return e;var r=[],o=0;return Ou(e,r,"","",function(i){return t.call(n,i,o++)}),r}function tM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yt={current:null},Lu={transition:null},nM={ReactCurrentDispatcher:Yt,ReactCurrentBatchConfig:Lu,ReactCurrentOwner:xg};function Px(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:Nu,forEach:function(e,t,n){Nu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nu(e,function(){t++}),t},toArray:function(e){return Nu(e,function(t){return t})||[]},only:function(e){if(!wg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Fs;he.Fragment=W_;he.Profiler=j_;he.PureComponent=vg;he.StrictMode=$_;he.Suspense=Y_;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nM;he.act=Px;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=bx({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=xg.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Tx.call(t,l)&&!kx.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:ll,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:G_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:K_,_context:e},e.Consumer=e};he.createElement=Rx;he.createFactory=function(e){var t=Rx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:q_,render:e}};he.isValidElement=wg;he.lazy=function(e){return{$$typeof:Q_,_payload:{_status:-1,_result:e},_init:tM}};he.memo=function(e,t){return{$$typeof:X_,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Lu.transition;Lu.transition={};try{e()}finally{Lu.transition=t}};he.unstable_act=Px;he.useCallback=function(e,t){return Yt.current.useCallback(e,t)};he.useContext=function(e){return Yt.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Yt.current.useDeferredValue(e)};he.useEffect=function(e,t){return Yt.current.useEffect(e,t)};he.useId=function(){return Yt.current.useId()};he.useImperativeHandle=function(e,t,n){return Yt.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Yt.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Yt.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Yt.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Yt.current.useReducer(e,t,n)};he.useRef=function(e){return Yt.current.useRef(e)};he.useState=function(e){return Yt.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Yt.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Yt.current.useTransition()};he.version="18.3.1"});var Z=un((bz,Ax)=>{"use strict";Ax.exports=Ix()});var Ox=un(Fu=>{"use strict";var rM=Z(),oM=Symbol.for("react.element"),iM=Symbol.for("react.fragment"),sM=Object.prototype.hasOwnProperty,aM=rM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lM={key:!0,ref:!0,__self:!0,__source:!0};function Nx(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)sM.call(t,r)&&!lM.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:oM,type:e,key:i,ref:s,props:o,_owner:aM.current}}Fu.Fragment=iM;Fu.jsx=Nx;Fu.jsxs=Nx});var I=un((Az,Lx)=>{"use strict";Lx.exports=Ox()});var iw=un(ow=>{"use strict";var ul=Z();function kM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var RM=typeof Object.is=="function"?Object.is:kM,PM=ul.useSyncExternalStore,IM=ul.useRef,AM=ul.useEffect,_M=ul.useMemo,MM=ul.useDebugValue;ow.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=IM(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=_M(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var m=s.value;if(o(m,p))return f=m}return f=p}if(m=f,RM(u,p))return m;var g=r(p);return o!==void 0&&o(m,g)?(u=p,m):(u=p,f=g)}var c=!1,u,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=PM(e,i[0],i[1]);return AM(function(){s.hasValue=!0,s.value=a},[a]),MM(a),a}});var aw=un((n8,sw)=>{"use strict";sw.exports=iw()});var fC=un(Fe=>{"use strict";function Qh(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<ef(o,t))e[r]=t,e[n]=o,n=r;else break e}}function sr(e){return e.length===0?null:e[0]}function nf(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,a=e[s],l=s+1,c=e[l];if(0>ef(a,n))l<o&&0>ef(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>ef(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function ef(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(rC=performance,Fe.unstable_now=function(){return rC.now()}):(qh=Date,oC=qh.now(),Fe.unstable_now=function(){return qh.now()-oC});var rC,qh,oC,Mr=[],$o=[],I2=1,Vn=null,Ht=3,rf=!1,Wi=!1,$l=!1,aC=typeof setTimeout=="function"?setTimeout:null,lC=typeof clearTimeout=="function"?clearTimeout:null,iC=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Zh(e){for(var t=sr($o);t!==null;){if(t.callback===null)nf($o);else if(t.startTime<=e)nf($o),t.sortIndex=t.expirationTime,Qh(Mr,t);else break;t=sr($o)}}function Jh(e){if($l=!1,Zh(e),!Wi)if(sr(Mr)!==null)Wi=!0,ty(ey);else{var t=sr($o);t!==null&&ny(Jh,t.startTime-e)}}function ey(e,t){Wi=!1,$l&&($l=!1,lC(jl),jl=-1),rf=!0;var n=Ht;try{for(Zh(t),Vn=sr(Mr);Vn!==null&&(!(Vn.expirationTime>t)||e&&!dC());){var r=Vn.callback;if(typeof r=="function"){Vn.callback=null,Ht=Vn.priorityLevel;var o=r(Vn.expirationTime<=t);t=Fe.unstable_now(),typeof o=="function"?Vn.callback=o:Vn===sr(Mr)&&nf(Mr),Zh(t)}else nf(Mr);Vn=sr(Mr)}if(Vn!==null)var i=!0;else{var s=sr($o);s!==null&&ny(Jh,s.startTime-t),i=!1}return i}finally{Vn=null,Ht=n,rf=!1}}var of=!1,tf=null,jl=-1,cC=5,uC=-1;function dC(){return!(Fe.unstable_now()-uC<cC)}function Yh(){if(tf!==null){var e=Fe.unstable_now();uC=e;var t=!0;try{t=tf(!0,e)}finally{t?Wl():(of=!1,tf=null)}}else of=!1}var Wl;typeof iC=="function"?Wl=function(){iC(Yh)}:typeof MessageChannel!="undefined"?(Xh=new MessageChannel,sC=Xh.port2,Xh.port1.onmessage=Yh,Wl=function(){sC.postMessage(null)}):Wl=function(){aC(Yh,0)};var Xh,sC;function ty(e){tf=e,of||(of=!0,Wl())}function ny(e,t){jl=aC(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_continueExecution=function(){Wi||rf||(Wi=!0,ty(ey))};Fe.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"):cC=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Ht};Fe.unstable_getFirstCallbackNode=function(){return sr(Mr)};Fe.unstable_next=function(e){switch(Ht){case 1:case 2:case 3:var t=3;break;default:t=Ht}var n=Ht;Ht=t;try{return e()}finally{Ht=n}};Fe.unstable_pauseExecution=function(){};Fe.unstable_requestPaint=function(){};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ht;Ht=e;try{return t()}finally{Ht=n}};Fe.unstable_scheduleCallback=function(e,t,n){var r=Fe.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:I2++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Qh($o,e),sr(Mr)===null&&e===sr($o)&&($l?(lC(jl),jl=-1):$l=!0,ny(Jh,n-r))):(e.sortIndex=o,Qh(Mr,e),Wi||rf||(Wi=!0,ty(ey))),e};Fe.unstable_shouldYield=dC;Fe.unstable_wrapCallback=function(e){var t=Ht;return function(){var n=Ht;Ht=t;try{return e.apply(this,arguments)}finally{Ht=n}}}});var mC=un((VU,pC)=>{"use strict";pC.exports=fC()});var vk=un(On=>{"use strict";var A2=Z(),Mn=mC();function H(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 wT=new Set,pc={};function ns(e,t){xa(e,t),xa(e+"Capture",t)}function xa(e,t){for(pc[e]=t,e=0;e<t.length;e++)wT.add(t[e])}var fo=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Ty=Object.prototype.hasOwnProperty,_2=/^[: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]*$/,gC={},hC={};function M2(e){return Ty.call(hC,e)?!0:Ty.call(gC,e)?!1:_2.test(e)?hC[e]=!0:(gC[e]=!0,!1)}function N2(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 O2(e,t,n,r){if(t===null||typeof t=="undefined"||N2(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 tn(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 Nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nt[e]=new tn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nt[t]=new tn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nt[e]=new tn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nt[e]=new tn(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){Nt[e]=new tn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nt[e]=new tn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nt[e]=new tn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nt[e]=new tn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nt[e]=new tn(e,5,!1,e.toLowerCase(),null,!1,!1)});var yv=/[\-:]([a-z])/g;function vv(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(yv,vv);Nt[t]=new tn(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(yv,vv);Nt[t]=new tn(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(yv,vv);Nt[t]=new tn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nt[e]=new tn(e,1,!1,e.toLowerCase(),null,!1,!1)});Nt.xlinkHref=new tn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nt[e]=new tn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sv(e,t,n,r){var o=Nt.hasOwnProperty(t)?Nt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O2(t,n,o,r)&&(n=null),r||o===null?M2(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 ho=A2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sf=Symbol.for("react.element"),na=Symbol.for("react.portal"),ra=Symbol.for("react.fragment"),xv=Symbol.for("react.strict_mode"),ky=Symbol.for("react.profiler"),bT=Symbol.for("react.provider"),ET=Symbol.for("react.context"),wv=Symbol.for("react.forward_ref"),Ry=Symbol.for("react.suspense"),Py=Symbol.for("react.suspense_list"),bv=Symbol.for("react.memo"),Ko=Symbol.for("react.lazy"),CT=Symbol.for("react.offscreen"),yC=Symbol.iterator;function Kl(e){return e===null||typeof e!="object"?null:(e=yC&&e[yC]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,ry;function ec(e){if(ry===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ry=t&&t[1]||""}return`
2
+ `+ry+e}var oy=!1;function iy(e,t){if(!e||oy)return"";oy=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.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]){var l=`
5
- `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{ry=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ec(e):""}function O2(e){switch(e.tag){case 5:return ec(e.type);case 16:return ec("Lazy");case 13:return ec("Suspense");case 19:return ec("SuspenseList");case 0:case 2:case 15:return e=oy(e.type,!1),e;case 11:return e=oy(e.type.render,!1),e;case 1:return e=oy(e.type,!0),e;default:return""}}function Py(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 ra:return"Fragment";case na:return"Portal";case Ty:return"Profiler";case Sv:return"StrictMode";case ky:return"Suspense";case Ry:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bT:return(e.displayName||"Context")+".Consumer";case wT:return(e._context.displayName||"Context")+".Provider";case xv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wv:return t=e.displayName||null,t!==null?t:Py(e.type)||"Memo";case Ko:t=e._payload,e=e._init;try{return Py(e(t))}catch(n){}}return null}function L2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Py(t);case 8:return t===Sv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D2(e){var t=CT(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&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 af(e){e._valueTracker||(e._valueTracker=D2(e))}function TT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=CT(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lf(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Iy(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function yC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(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 kT(e,t){t=t.checked,t!=null&&vv(e,"checked",t,!1)}function Ay(e,t){kT(e,t);var n=si(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")?_y(e,t.type,n):t.hasOwnProperty("defaultValue")&&_y(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vC(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 _y(e,t,n){(t!=="number"||Lf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tc=Array.isArray;function ma(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=""+si(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 My(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function SC(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(tc(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:si(n)}}function RT(e,t){var n=si(t.value),r=si(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 xC(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function PT(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 Ny(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?PT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var lf,IT=(function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(lf=lf||document.createElement("div"),lf.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=lf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var oc={animationIterationCount:!0,aspectRatio:!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},F2=["Webkit","ms","Moz","O"];Object.keys(oc).forEach(function(e){F2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oc[t]=oc[e]})});function AT(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||oc.hasOwnProperty(e)&&oc[e]?(""+t).trim():t+"px"}function _T(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=AT(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var z2=qe({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 Oy(e,t){if(t){if(z2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Ly(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}}var Dy=null;function bv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fy=null,ga=null,ha=null;function wC(e){if(e=Mc(e)){if(typeof Fy!="function")throw Error(H(280));var t=e.stateNode;t&&(t=cp(t),Fy(e.stateNode,e.type,t))}}function MT(e){ga?ha?ha.push(e):ha=[e]:ga=e}function NT(){if(ga){var e=ga,t=ha;if(ha=ga=null,wC(e),t)for(e=0;e<t.length;e++)wC(t[e])}}function OT(e,t){return e(t)}function LT(){}var iy=!1;function DT(e,t,n){if(iy)return e(t,n);iy=!0;try{return OT(e,t,n)}finally{iy=!1,(ga!==null||ha!==null)&&(LT(),NT())}}function gc(e,t){var n=e.stateNode;if(n===null)return null;var r=cp(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(H(231,t,typeof n));return n}var zy=!1;if(fo)try{ea={},Object.defineProperty(ea,"passive",{get:function(){zy=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch(e){zy=!1}var ea;function H2(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ic=!1,Df=null,Ff=!1,Hy=null,B2={onError:function(e){ic=!0,Df=e}};function U2(e,t,n,r,o,i,s,a,l){ic=!1,Df=null,H2.apply(B2,arguments)}function V2(e,t,n,r,o,i,s,a,l){if(U2.apply(this,arguments),ic){if(ic){var c=Df;ic=!1,Df=null}else throw Error(H(198));Ff||(Ff=!0,Hy=c)}}function rs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function FT(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 bC(e){if(rs(e)!==e)throw Error(H(188))}function W2(e){var t=e.alternate;if(!t){if(t=rs(e),t===null)throw Error(H(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 bC(o),e;if(i===r)return bC(o),t;i=i.sibling}throw Error(H(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(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function zT(e){return e=W2(e),e!==null?HT(e):null}function HT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=HT(e);if(t!==null)return t;e=e.sibling}return null}var BT=Mn.unstable_scheduleCallback,EC=Mn.unstable_cancelCallback,$2=Mn.unstable_shouldYield,j2=Mn.unstable_requestPaint,Je=Mn.unstable_now,K2=Mn.unstable_getCurrentPriorityLevel,Ev=Mn.unstable_ImmediatePriority,UT=Mn.unstable_UserBlockingPriority,zf=Mn.unstable_NormalPriority,G2=Mn.unstable_LowPriority,VT=Mn.unstable_IdlePriority,ip=null,Dr=null;function q2(e){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ip,e,void 0,(e.current.flags&128)===128)}catch(t){}}var dr=Math.clz32?Math.clz32:Q2,Y2=Math.log,X2=Math.LN2;function Q2(e){return e>>>=0,e===0?32:31-(Y2(e)/X2|0)|0}var cf=64,uf=4194304;function nc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=nc(a):(i&=s,i!==0&&(r=nc(i)))}else s=n&~o,s!==0?r=nc(s):i!==0&&(r=nc(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-dr(t),o=1<<n,r|=e[n],t&=~o;return r}function Z2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function J2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-dr(i),a=1<<s,l=o[s];l===-1?((a&n)===0||(a&r)!==0)&&(o[s]=Z2(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function By(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function WT(){var e=cf;return cf<<=1,(cf&4194240)===0&&(cf=64),e}function sy(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ac(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dr(t),e[t]=n}function eD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-dr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Cv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _e=0;function $T(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var jT,Tv,KT,GT,qT,Uy=!1,df=[],Zo=null,Jo=null,ei=null,hc=new Map,yc=new Map,qo=[],tD="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 CC(e,t){switch(e){case"focusin":case"focusout":Zo=null;break;case"dragenter":case"dragleave":Jo=null;break;case"mouseover":case"mouseout":ei=null;break;case"pointerover":case"pointerout":hc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yc.delete(t.pointerId)}}function Gl(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Mc(t),t!==null&&Tv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function nD(e,t,n,r,o){switch(t){case"focusin":return Zo=Gl(Zo,e,t,n,r,o),!0;case"dragenter":return Jo=Gl(Jo,e,t,n,r,o),!0;case"mouseover":return ei=Gl(ei,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return hc.set(i,Gl(hc.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,yc.set(i,Gl(yc.get(i)||null,e,t,n,r,o)),!0}return!1}function YT(e){var t=Ki(e.target);if(t!==null){var n=rs(t);if(n!==null){if(t=n.tag,t===13){if(t=FT(n),t!==null){e.blockedOn=t,qT(e.priority,function(){KT(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dy=r,n.target.dispatchEvent(r),Dy=null}else return t=Mc(n),t!==null&&Tv(t),e.blockedOn=n,!1;t.shift()}return!0}function TC(e,t,n){Tf(e)&&n.delete(t)}function rD(){Uy=!1,Zo!==null&&Tf(Zo)&&(Zo=null),Jo!==null&&Tf(Jo)&&(Jo=null),ei!==null&&Tf(ei)&&(ei=null),hc.forEach(TC),yc.forEach(TC)}function ql(e,t){e.blockedOn===t&&(e.blockedOn=null,Uy||(Uy=!0,Mn.unstable_scheduleCallback(Mn.unstable_NormalPriority,rD)))}function vc(e){function t(o){return ql(o,e)}if(0<df.length){ql(df[0],e);for(var n=1;n<df.length;n++){var r=df[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Zo!==null&&ql(Zo,e),Jo!==null&&ql(Jo,e),ei!==null&&ql(ei,e),hc.forEach(t),yc.forEach(t),n=0;n<qo.length;n++)r=qo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qo.length&&(n=qo[0],n.blockedOn===null);)YT(n),n.blockedOn===null&&qo.shift()}var ya=ho.ReactCurrentBatchConfig,Bf=!0;function oD(e,t,n,r){var o=_e,i=ya.transition;ya.transition=null;try{_e=1,kv(e,t,n,r)}finally{_e=o,ya.transition=i}}function iD(e,t,n,r){var o=_e,i=ya.transition;ya.transition=null;try{_e=4,kv(e,t,n,r)}finally{_e=o,ya.transition=i}}function kv(e,t,n,r){if(Bf){var o=Vy(e,t,n,r);if(o===null)py(e,t,r,Uf,n),CC(e,r);else if(nD(o,e,t,n,r))r.stopPropagation();else if(CC(e,r),t&4&&-1<tD.indexOf(e)){for(;o!==null;){var i=Mc(o);if(i!==null&&jT(i),i=Vy(e,t,n,r),i===null&&py(e,t,r,Uf,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else py(e,t,r,null,n)}}var Uf=null;function Vy(e,t,n,r){if(Uf=null,e=bv(r),e=Ki(e),e!==null)if(t=rs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=FT(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Uf=e,null}function XT(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(K2()){case Ev:return 1;case UT:return 4;case zf:case G2:return 16;case VT:return 536870912;default:return 16}default:return 16}}var Xo=null,Rv=null,kf=null;function QT(){if(kf)return kf;var e,t=Rv,n=t.length,r,o="value"in Xo?Xo.value:Xo.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 kf=o.slice(e,1<r?1-r:void 0)}function Rf(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 ff(){return!0}function kC(){return!1}function Nn(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)?ff:kC,this.isPropagationStopped=kC,this}return qe(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=ff)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ff)},persist:function(){},isPersistent:ff}),t}var Ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pv=Nn(Ra),_c=qe({},Ra,{view:0,detail:0}),sD=Nn(_c),ay,ly,Yl,sp=qe({},_c,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iv,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!==Yl&&(Yl&&e.type==="mousemove"?(ay=e.screenX-Yl.screenX,ly=e.screenY-Yl.screenY):ly=ay=0,Yl=e),ay)},movementY:function(e){return"movementY"in e?e.movementY:ly}}),RC=Nn(sp),aD=qe({},sp,{dataTransfer:0}),lD=Nn(aD),cD=qe({},_c,{relatedTarget:0}),cy=Nn(cD),uD=qe({},Ra,{animationName:0,elapsedTime:0,pseudoElement:0}),dD=Nn(uD),fD=qe({},Ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pD=Nn(fD),mD=qe({},Ra,{data:0}),PC=Nn(mD),gD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hD={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"},yD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yD[e])?!!t[e]:!1}function Iv(){return vD}var SD=qe({},_c,{key:function(e){if(e.key){var t=gD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Rf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iv,charCode:function(e){return e.type==="keypress"?Rf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Rf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xD=Nn(SD),wD=qe({},sp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IC=Nn(wD),bD=qe({},_c,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iv}),ED=Nn(bD),CD=qe({},Ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),TD=Nn(CD),kD=qe({},sp,{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}),RD=Nn(kD),PD=[9,13,27,32],Av=fo&&"CompositionEvent"in window,sc=null;fo&&"documentMode"in document&&(sc=document.documentMode);var ID=fo&&"TextEvent"in window&&!sc,ZT=fo&&(!Av||sc&&8<sc&&11>=sc),AC=" ",_C=!1;function JT(e,t){switch(e){case"keyup":return PD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function e1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oa=!1;function AD(e,t){switch(e){case"compositionend":return e1(t);case"keypress":return t.which!==32?null:(_C=!0,AC);case"textInput":return e=t.data,e===AC&&_C?null:e;default:return null}}function _D(e,t){if(oa)return e==="compositionend"||!Av&&JT(e,t)?(e=QT(),kf=Rv=Xo=null,oa=!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 ZT&&t.locale!=="ko"?null:t.data;default:return null}}var MD={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 MC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!MD[e.type]:t==="textarea"}function t1(e,t,n,r){MT(r),t=Vf(t,"onChange"),0<t.length&&(n=new Pv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ac=null,Sc=null;function ND(e){f1(e,0)}function ap(e){var t=aa(e);if(TT(t))return e}function OD(e,t){if(e==="change")return t}var n1=!1;fo&&(fo?(mf="oninput"in document,mf||(uy=document.createElement("div"),uy.setAttribute("oninput","return;"),mf=typeof uy.oninput=="function"),pf=mf):pf=!1,n1=pf&&(!document.documentMode||9<document.documentMode));var pf,mf,uy;function NC(){ac&&(ac.detachEvent("onpropertychange",r1),Sc=ac=null)}function r1(e){if(e.propertyName==="value"&&ap(Sc)){var t=[];t1(t,Sc,e,bv(e)),DT(ND,t)}}function LD(e,t,n){e==="focusin"?(NC(),ac=t,Sc=n,ac.attachEvent("onpropertychange",r1)):e==="focusout"&&NC()}function DD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ap(Sc)}function FD(e,t){if(e==="click")return ap(t)}function zD(e,t){if(e==="input"||e==="change")return ap(t)}function HD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pr=typeof Object.is=="function"?Object.is:HD;function xc(e,t){if(pr(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++){var o=n[r];if(!Cy.call(t,o)||!pr(e[o],t[o]))return!1}return!0}function OC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function LC(e,t){var n=OC(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=OC(n)}}function o1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?o1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function i1(){for(var e=window,t=Lf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Lf(e.document)}return t}function _v(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")}function BD(e){var t=i1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&o1(n.ownerDocument.documentElement,n)){if(r!==null&&_v(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=LC(n,i);var s=LC(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var UD=fo&&"documentMode"in document&&11>=document.documentMode,ia=null,Wy=null,lc=null,$y=!1;function DC(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$y||ia==null||ia!==Lf(r)||(r=ia,"selectionStart"in r&&_v(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}),lc&&xc(lc,r)||(lc=r,r=Vf(Wy,"onSelect"),0<r.length&&(t=new Pv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ia)))}function gf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:gf("Animation","AnimationEnd"),animationiteration:gf("Animation","AnimationIteration"),animationstart:gf("Animation","AnimationStart"),transitionend:gf("Transition","TransitionEnd")},dy={},s1={};fo&&(s1=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function lp(e){if(dy[e])return dy[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in s1)return dy[e]=t[n];return e}var a1=lp("animationend"),l1=lp("animationiteration"),c1=lp("animationstart"),u1=lp("transitionend"),d1=new Map,FC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function li(e,t){d1.set(e,t),ns(t,[e])}for(hf=0;hf<FC.length;hf++)yf=FC[hf],zC=yf.toLowerCase(),HC=yf[0].toUpperCase()+yf.slice(1),li(zC,"on"+HC);var yf,zC,HC,hf;li(a1,"onAnimationEnd");li(l1,"onAnimationIteration");li(c1,"onAnimationStart");li("dblclick","onDoubleClick");li("focusin","onFocus");li("focusout","onBlur");li(u1,"onTransitionEnd");xa("onMouseEnter",["mouseout","mouseover"]);xa("onMouseLeave",["mouseout","mouseover"]);xa("onPointerEnter",["pointerout","pointerover"]);xa("onPointerLeave",["pointerout","pointerover"]);ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),VD=new Set("cancel close invalid load scroll toggle".split(" ").concat(rc));function BC(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,V2(r,t,void 0,e),e.currentTarget=null}function f1(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,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;BC(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;BC(o,a,c),i=l}}}if(Ff)throw e=Hy,Ff=!1,Hy=null,e}function He(e,t){var n=t[Yy];n===void 0&&(n=t[Yy]=new Set);var r=e+"__bubble";n.has(r)||(p1(t,e,2,!1),n.add(r))}function fy(e,t,n){var r=0;t&&(r|=4),p1(n,e,r,t)}var vf="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[vf]){e[vf]=!0,xT.forEach(function(n){n!=="selectionchange"&&(VD.has(n)||fy(n,!1,e),fy(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vf]||(t[vf]=!0,fy("selectionchange",!1,t))}}function p1(e,t,n,r){switch(XT(t)){case 1:var o=oD;break;case 4:o=iD;break;default:o=kv}n=o.bind(null,t,n,e),o=void 0,!zy||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 py(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&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=Ki(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}DT(function(){var c=i,u=bv(n),f=[];e:{var d=d1.get(e);if(d!==void 0){var p=Pv,m=e;switch(e){case"keypress":if(Rf(n)===0)break e;case"keydown":case"keyup":p=xD;break;case"focusin":m="focus",p=cy;break;case"focusout":m="blur",p=cy;break;case"beforeblur":case"afterblur":p=cy;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":p=RC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=lD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=ED;break;case a1:case l1:case c1:p=dD;break;case u1:p=TD;break;case"scroll":p=sD;break;case"wheel":p=RD;break;case"copy":case"cut":case"paste":p=pD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=IC}var g=(t&4)!==0,v=!g&&e==="scroll",h=g?d!==null?d+"Capture":null:d;g=[];for(var y=c,S;y!==null;){S=y;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,h!==null&&(x=gc(y,h),x!=null&&g.push(bc(y,x,S)))),v)break;y=y.return}0<g.length&&(d=new p(d,m,null,n,u),f.push({event:d,listeners:g}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&n!==Dy&&(m=n.relatedTarget||n.fromElement)&&(Ki(m)||m[po]))break e;if((p||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?Ki(m):null,m!==null&&(v=rs(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(g=RC,x="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=IC,x="onPointerLeave",h="onPointerEnter",y="pointer"),v=p==null?d:aa(p),S=m==null?d:aa(m),d=new g(x,y+"leave",p,n,u),d.target=v,d.relatedTarget=S,x=null,Ki(u)===c&&(g=new g(h,y+"enter",m,n,u),g.target=S,g.relatedTarget=v,x=g),v=x,p&&m)t:{for(g=p,h=m,y=0,S=g;S;S=ta(S))y++;for(S=0,x=h;x;x=ta(x))S++;for(;0<y-S;)g=ta(g),y--;for(;0<S-y;)h=ta(h),S--;for(;y--;){if(g===h||h!==null&&g===h.alternate)break t;g=ta(g),h=ta(h)}g=null}else g=null;p!==null&&UC(f,d,p,g,!1),m!==null&&v!==null&&UC(f,v,m,g,!0)}}e:{if(d=c?aa(c):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var T=OD;else if(MC(d))if(n1)T=zD;else{T=DD;var C=LD}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=FD);if(T&&(T=T(e,c))){t1(f,T,n,u);break e}C&&C(e,d,c),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&_y(d,"number",d.value)}switch(C=c?aa(c):window,e){case"focusin":(MC(C)||C.contentEditable==="true")&&(ia=C,Wy=c,lc=null);break;case"focusout":lc=Wy=ia=null;break;case"mousedown":$y=!0;break;case"contextmenu":case"mouseup":case"dragend":$y=!1,DC(f,n,u);break;case"selectionchange":if(UD)break;case"keydown":case"keyup":DC(f,n,u)}var k;if(Av)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 oa?JT(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(ZT&&n.locale!=="ko"&&(oa||R!=="onCompositionStart"?R==="onCompositionEnd"&&oa&&(k=QT()):(Xo=u,Rv="value"in Xo?Xo.value:Xo.textContent,oa=!0)),C=Vf(c,R),0<C.length&&(R=new PC(R,e,null,n,u),f.push({event:R,listeners:C}),k?R.data=k:(k=e1(n),k!==null&&(R.data=k)))),(k=ID?AD(e,n):_D(e,n))&&(c=Vf(c,"onBeforeInput"),0<c.length&&(u=new PC("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=k))}f1(f,t)})}function bc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vf(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=gc(e,n),i!=null&&r.unshift(bc(e,i,o)),i=gc(e,t),i!=null&&r.push(bc(e,i,o))),e=e.return}return r}function ta(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function UC(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=gc(n,i),l!=null&&s.unshift(bc(n,l,a))):o||(l=gc(n,i),l!=null&&s.push(bc(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var WD=/\r\n?/g,$D=/\u0000|\uFFFD/g;function VC(e){return(typeof e=="string"?e:""+e).replace(WD,`
6
- `).replace($D,"")}function Sf(e,t,n){if(t=VC(t),VC(e)!==t&&n)throw Error(H(425))}function Wf(){}var jy=null,Ky=null;function Gy(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qy=typeof setTimeout=="function"?setTimeout:void 0,jD=typeof clearTimeout=="function"?clearTimeout:void 0,WC=typeof Promise=="function"?Promise:void 0,KD=typeof queueMicrotask=="function"?queueMicrotask:typeof WC!="undefined"?function(e){return WC.resolve(null).then(e).catch(GD)}:qy;function GD(e){setTimeout(function(){throw e})}function my(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),vc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);vc(t)}function ti(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function $C(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 Pa=Math.random().toString(36).slice(2),Lr="__reactFiber$"+Pa,Ec="__reactProps$"+Pa,po="__reactContainer$"+Pa,Yy="__reactEvents$"+Pa,qD="__reactListeners$"+Pa,YD="__reactHandles$"+Pa;function Ki(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[po]||n[Lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$C(e);e!==null;){if(n=e[Lr])return n;e=$C(e)}return t}e=n,n=e.parentNode}return null}function Mc(e){return e=e[Lr]||e[po],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function aa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function cp(e){return e[Ec]||null}var Xy=[],la=-1;function ci(e){return{current:e}}function Be(e){0>la||(e.current=Xy[la],Xy[la]=null,la--)}function ze(e,t){la++,Xy[la]=e.current,e.current=t}var ai={},Wt=ci(ai),yn=ci(!1),Qi=ai;function wa(e,t){var n=e.type.contextTypes;if(!n)return ai;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 vn(e){return e=e.childContextTypes,e!=null}function $f(){Be(yn),Be(Wt)}function jC(e,t,n){if(Wt.current!==ai)throw Error(H(168));ze(Wt,t),ze(yn,n)}function m1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(H(108,L2(e)||"Unknown",o));return qe({},n,r)}function jf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ai,Qi=Wt.current,ze(Wt,e),ze(yn,yn.current),!0}function KC(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=m1(e,t,Qi),r.__reactInternalMemoizedMergedChildContext=e,Be(yn),Be(Wt),ze(Wt,e)):Be(yn),ze(yn,n)}var ao=null,up=!1,gy=!1;function g1(e){ao===null?ao=[e]:ao.push(e)}function XD(e){up=!0,g1(e)}function ui(){if(!gy&&ao!==null){gy=!0;var e=0,t=_e;try{var n=ao;for(_e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ao=null,up=!1}catch(o){throw ao!==null&&(ao=ao.slice(e+1)),BT(Ev,ui),o}finally{_e=t,gy=!1}}return null}var ca=[],ua=0,Kf=null,Gf=0,Wn=[],$n=0,Zi=null,lo=1,co="";function $i(e,t){ca[ua++]=Gf,ca[ua++]=Kf,Kf=e,Gf=t}function h1(e,t,n){Wn[$n++]=lo,Wn[$n++]=co,Wn[$n++]=Zi,Zi=e;var r=lo;e=co;var o=32-dr(r)-1;r&=~(1<<o),n+=1;var i=32-dr(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,lo=1<<32-dr(t)+o|n<<o|r,co=i+e}else lo=1<<i|n<<o|r,co=e}function Mv(e){e.return!==null&&($i(e,1),h1(e,1,0))}function Nv(e){for(;e===Kf;)Kf=ca[--ua],ca[ua]=null,Gf=ca[--ua],ca[ua]=null;for(;e===Zi;)Zi=Wn[--$n],Wn[$n]=null,co=Wn[--$n],Wn[$n]=null,lo=Wn[--$n],Wn[$n]=null}var _n=null,An=null,We=!1,ur=null;function y1(e,t){var n=jn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function GC(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,_n=e,An=ti(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_n=e,An=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zi!==null?{id:lo,overflow:co}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=jn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_n=e,An=null,!0):!1;default:return!1}}function Qy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zy(e){if(We){var t=An;if(t){var n=t;if(!GC(e,t)){if(Qy(e))throw Error(H(418));t=ti(n.nextSibling);var r=_n;t&&GC(e,t)?y1(r,n):(e.flags=e.flags&-4097|2,We=!1,_n=e)}}else{if(Qy(e))throw Error(H(418));e.flags=e.flags&-4097|2,We=!1,_n=e}}}function qC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function xf(e){if(e!==_n)return!1;if(!We)return qC(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gy(e.type,e.memoizedProps)),t&&(t=An)){if(Qy(e))throw v1(),Error(H(418));for(;t;)y1(e,t),t=ti(t.nextSibling)}if(qC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){An=ti(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}An=null}}else An=_n?ti(e.stateNode.nextSibling):null;return!0}function v1(){for(var e=An;e;)e=ti(e.nextSibling)}function ba(){An=_n=null,We=!1}function Ov(e){ur===null?ur=[e]:ur.push(e)}var QD=ho.ReactCurrentBatchConfig;function Xl(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(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function wf(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function YC(e){var t=e._init;return t(e._payload)}function S1(e){function t(h,y){if(e){var S=h.deletions;S===null?(h.deletions=[y],h.flags|=16):S.push(y)}}function n(h,y){if(!e)return null;for(;y!==null;)t(h,y),y=y.sibling;return null}function r(h,y){for(h=new Map;y!==null;)y.key!==null?h.set(y.key,y):h.set(y.index,y),y=y.sibling;return h}function o(h,y){return h=ii(h,y),h.index=0,h.sibling=null,h}function i(h,y,S){return h.index=S,e?(S=h.alternate,S!==null?(S=S.index,S<y?(h.flags|=2,y):S):(h.flags|=2,y)):(h.flags|=1048576,y)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,y,S,x){return y===null||y.tag!==6?(y=by(S,h.mode,x),y.return=h,y):(y=o(y,S),y.return=h,y)}function l(h,y,S,x){var T=S.type;return T===ra?u(h,y,S.props.children,x,S.key):y!==null&&(y.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ko&&YC(T)===y.type)?(x=o(y,S.props),x.ref=Xl(h,y,S),x.return=h,x):(x=Of(S.type,S.key,S.props,null,h.mode,x),x.ref=Xl(h,y,S),x.return=h,x)}function c(h,y,S,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==S.containerInfo||y.stateNode.implementation!==S.implementation?(y=Ey(S,h.mode,x),y.return=h,y):(y=o(y,S.children||[]),y.return=h,y)}function u(h,y,S,x,T){return y===null||y.tag!==7?(y=Xi(S,h.mode,x,T),y.return=h,y):(y=o(y,S),y.return=h,y)}function f(h,y,S){if(typeof y=="string"&&y!==""||typeof y=="number")return y=by(""+y,h.mode,S),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case sf:return S=Of(y.type,y.key,y.props,null,h.mode,S),S.ref=Xl(h,null,y),S.return=h,S;case na:return y=Ey(y,h.mode,S),y.return=h,y;case Ko:var x=y._init;return f(h,x(y._payload),S)}if(tc(y)||Kl(y))return y=Xi(y,h.mode,S,null),y.return=h,y;wf(h,y)}return null}function d(h,y,S,x){var T=y!==null?y.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return T!==null?null:a(h,y,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case sf:return S.key===T?l(h,y,S,x):null;case na:return S.key===T?c(h,y,S,x):null;case Ko:return T=S._init,d(h,y,T(S._payload),x)}if(tc(S)||Kl(S))return T!==null?null:u(h,y,S,x,null);wf(h,S)}return null}function p(h,y,S,x,T){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(S)||null,a(y,h,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case sf:return h=h.get(x.key===null?S:x.key)||null,l(y,h,x,T);case na:return h=h.get(x.key===null?S:x.key)||null,c(y,h,x,T);case Ko:var C=x._init;return p(h,y,S,C(x._payload),T)}if(tc(x)||Kl(x))return h=h.get(S)||null,u(y,h,x,T,null);wf(y,x)}return null}function m(h,y,S,x){for(var T=null,C=null,k=y,R=y=0,F=null;k!==null&&R<S.length;R++){k.index>R?(F=k,k=null):F=k.sibling;var O=d(h,k,S[R],x);if(O===null){k===null&&(k=F);break}e&&k&&O.alternate===null&&t(h,k),y=i(O,y,R),C===null?T=O:C.sibling=O,C=O,k=F}if(R===S.length)return n(h,k),We&&$i(h,R),T;if(k===null){for(;R<S.length;R++)k=f(h,S[R],x),k!==null&&(y=i(k,y,R),C===null?T=k:C.sibling=k,C=k);return We&&$i(h,R),T}for(k=r(h,k);R<S.length;R++)F=p(k,h,R,S[R],x),F!==null&&(e&&F.alternate!==null&&k.delete(F.key===null?R:F.key),y=i(F,y,R),C===null?T=F:C.sibling=F,C=F);return e&&k.forEach(function(U){return t(h,U)}),We&&$i(h,R),T}function g(h,y,S,x){var T=Kl(S);if(typeof T!="function")throw Error(H(150));if(S=T.call(S),S==null)throw Error(H(151));for(var C=T=null,k=y,R=y=0,F=null,O=S.next();k!==null&&!O.done;R++,O=S.next()){k.index>R?(F=k,k=null):F=k.sibling;var U=d(h,k,O.value,x);if(U===null){k===null&&(k=F);break}e&&k&&U.alternate===null&&t(h,k),y=i(U,y,R),C===null?T=U:C.sibling=U,C=U,k=F}if(O.done)return n(h,k),We&&$i(h,R),T;if(k===null){for(;!O.done;R++,O=S.next())O=f(h,O.value,x),O!==null&&(y=i(O,y,R),C===null?T=O:C.sibling=O,C=O);return We&&$i(h,R),T}for(k=r(h,k);!O.done;R++,O=S.next())O=p(k,h,R,O.value,x),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?R:O.key),y=i(O,y,R),C===null?T=O:C.sibling=O,C=O);return e&&k.forEach(function(J){return t(h,J)}),We&&$i(h,R),T}function v(h,y,S,x){if(typeof S=="object"&&S!==null&&S.type===ra&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case sf:e:{for(var T=S.key,C=y;C!==null;){if(C.key===T){if(T=S.type,T===ra){if(C.tag===7){n(h,C.sibling),y=o(C,S.props.children),y.return=h,h=y;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ko&&YC(T)===C.type){n(h,C.sibling),y=o(C,S.props),y.ref=Xl(h,C,S),y.return=h,h=y;break e}n(h,C);break}else t(h,C);C=C.sibling}S.type===ra?(y=Xi(S.props.children,h.mode,x,S.key),y.return=h,h=y):(x=Of(S.type,S.key,S.props,null,h.mode,x),x.ref=Xl(h,y,S),x.return=h,h=x)}return s(h);case na:e:{for(C=S.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===S.containerInfo&&y.stateNode.implementation===S.implementation){n(h,y.sibling),y=o(y,S.children||[]),y.return=h,h=y;break e}else{n(h,y);break}else t(h,y);y=y.sibling}y=Ey(S,h.mode,x),y.return=h,h=y}return s(h);case Ko:return C=S._init,v(h,y,C(S._payload),x)}if(tc(S))return m(h,y,S,x);if(Kl(S))return g(h,y,S,x);wf(h,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,y!==null&&y.tag===6?(n(h,y.sibling),y=o(y,S),y.return=h,h=y):(n(h,y),y=by(S,h.mode,x),y.return=h,h=y),s(h)):n(h,y)}return v}var Ea=S1(!0),x1=S1(!1),qf=ci(null),Yf=null,da=null,Lv=null;function Dv(){Lv=da=Yf=null}function Fv(e){var t=qf.current;Be(qf),e._currentValue=t}function Jy(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function va(e,t){Yf=e,Lv=da=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(hn=!0),e.firstContext=null)}function Gn(e){var t=e._currentValue;if(Lv!==e)if(e={context:e,memoizedValue:t,next:null},da===null){if(Yf===null)throw Error(H(308));da=e,Yf.dependencies={lanes:0,firstContext:e}}else da=da.next=e;return t}var Gi=null;function zv(e){Gi===null?Gi=[e]:Gi.push(e)}function w1(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,zv(t)):(n.next=o.next,o.next=n),t.interleaved=n,mo(e,r)}function mo(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}var Go=!1;function Hv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function b1(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 uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ni(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,mo(e,n)}return o=r.interleaved,o===null?(t.next=t,zv(r)):(t.next=o.next,o.next=t),r.interleaved=t,mo(e,n)}function Pf(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cv(e,n)}}function XC(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 Xf(e,t,n,r){var o=e.updateQueue;Go=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;s=0,u=c=l=null,a=i;do{var d=a.lane,p=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(d=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,d=typeof m=="function"?m.call(p,f,d):m,d==null)break e;f=qe({},f,d);break e;case 2:Go=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=f):u=u.next=p,s|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(u===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);es|=s,e.lanes=s,e.memoizedState=f}}function QC(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(H(191,o));o.call(r)}}}var Nc={},Fr=ci(Nc),Cc=ci(Nc),Tc=ci(Nc);function qi(e){if(e===Nc)throw Error(H(174));return e}function Bv(e,t){switch(ze(Tc,t),ze(Cc,e),ze(Fr,Nc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ny(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ny(t,e)}Be(Fr),ze(Fr,t)}function Ca(){Be(Fr),Be(Cc),Be(Tc)}function E1(e){qi(Tc.current);var t=qi(Fr.current),n=Ny(t,e.type);t!==n&&(ze(Cc,e),ze(Fr,n))}function Uv(e){Cc.current===e&&(Be(Fr),Be(Cc))}var Ke=ci(0);function Qf(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&128)!==0)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 hy=[];function Vv(){for(var e=0;e<hy.length;e++)hy[e]._workInProgressVersionPrimary=null;hy.length=0}var If=ho.ReactCurrentDispatcher,yy=ho.ReactCurrentBatchConfig,Ji=0,Ge=null,ct=null,St=null,Zf=!1,cc=!1,kc=0,ZD=0;function Bt(){throw Error(H(321))}function Wv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function $v(e,t,n,r,o,i){if(Ji=i,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,If.current=e===null||e.memoizedState===null?n3:r3,e=n(r,o),cc){i=0;do{if(cc=!1,kc=0,25<=i)throw Error(H(301));i+=1,St=ct=null,t.updateQueue=null,If.current=o3,e=n(r,o)}while(cc)}if(If.current=Jf,t=ct!==null&&ct.next!==null,Ji=0,St=ct=Ge=null,Zf=!1,t)throw Error(H(300));return e}function jv(){var e=kc!==0;return kc=0,e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Ge.memoizedState=St=e:St=St.next=e,St}function qn(){if(ct===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=St===null?Ge.memoizedState:St.next;if(t!==null)St=t,ct=e;else{if(e===null)throw Error(H(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},St===null?Ge.memoizedState=St=e:St=St.next=e}return St}function Rc(e,t){return typeof t=="function"?t(e):t}function vy(e){var t=qn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=ct,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){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Ji&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,s=r):l=l.next=f,Ge.lanes|=u,es|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,pr(r,t.memoizedState)||(hn=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Ge.lanes|=i,es|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sy(e){var t=qn(),n=t.queue;if(n===null)throw Error(H(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);pr(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function C1(){}function T1(e,t){var n=Ge,r=qn(),o=t(),i=!pr(r.memoizedState,o);if(i&&(r.memoizedState=o,hn=!0),r=r.queue,Kv(P1.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||St!==null&&St.memoizedState.tag&1){if(n.flags|=2048,Pc(9,R1.bind(null,n,r,o,t),void 0,null),xt===null)throw Error(H(349));(Ji&30)!==0||k1(n,t,o)}return o}function k1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function R1(e,t,n,r){t.value=n,t.getSnapshot=r,I1(t)&&A1(e)}function P1(e,t,n){return n(function(){I1(t)&&A1(e)})}function I1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch(r){return!0}}function A1(e){var t=mo(e,1);t!==null&&fr(t,e,1,-1)}function ZC(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rc,lastRenderedState:e},t.queue=e,e=e.dispatch=t3.bind(null,Ge,e),[t.memoizedState,e]}function Pc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores: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 _1(){return qn().memoizedState}function Af(e,t,n,r){var o=Or();Ge.flags|=e,o.memoizedState=Pc(1|t,n,void 0,r===void 0?null:r)}function dp(e,t,n,r){var o=qn();r=r===void 0?null:r;var i=void 0;if(ct!==null){var s=ct.memoizedState;if(i=s.destroy,r!==null&&Wv(r,s.deps)){o.memoizedState=Pc(t,n,i,r);return}}Ge.flags|=e,o.memoizedState=Pc(1|t,n,i,r)}function JC(e,t){return Af(8390656,8,e,t)}function Kv(e,t){return dp(2048,8,e,t)}function M1(e,t){return dp(4,2,e,t)}function N1(e,t){return dp(4,4,e,t)}function O1(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 L1(e,t,n){return n=n!=null?n.concat([e]):null,dp(4,4,O1.bind(null,t,e),n)}function Gv(){}function D1(e,t){var n=qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function F1(e,t){var n=qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function z1(e,t,n){return(Ji&21)===0?(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=n):(pr(n,t)||(n=WT(),Ge.lanes|=n,es|=n,e.baseState=!0),t)}function JD(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var r=yy.transition;yy.transition={};try{e(!1),t()}finally{_e=n,yy.transition=r}}function H1(){return qn().memoizedState}function e3(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},B1(e))U1(t,n);else if(n=w1(e,t,n,r),n!==null){var o=Jt();fr(n,e,r,o),V1(n,t,r)}}function t3(e,t,n){var r=oi(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(B1(e))U1(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,pr(a,s)){var l=t.interleaved;l===null?(o.next=o,zv(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}n=w1(e,t,o,r),n!==null&&(o=Jt(),fr(n,e,r,o),V1(n,t,r))}}function B1(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function U1(e,t){cc=Zf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function V1(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cv(e,n)}}var Jf={readContext:Gn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},n3={readContext:Gn,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:Gn,useEffect:JC,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Af(4194308,4,O1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Af(4194308,4,e,t)},useInsertionEffect:function(e,t){return Af(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={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=e3.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=Or();return e={current:e},t.memoizedState=e},useState:ZC,useDebugValue:Gv,useDeferredValue:function(e){return Or().memoizedState=e},useTransition:function(){var e=ZC(!1),t=e[0];return e=JD.bind(null,e[1]),Or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,o=Or();if(We){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),xt===null)throw Error(H(349));(Ji&30)!==0||k1(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,JC(P1.bind(null,r,i,e),[e]),r.flags|=2048,Pc(9,R1.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Or(),t=xt.identifierPrefix;if(We){var n=co,r=lo;n=(r&~(1<<32-dr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=kc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ZD++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},r3={readContext:Gn,useCallback:D1,useContext:Gn,useEffect:Kv,useImperativeHandle:L1,useInsertionEffect:M1,useLayoutEffect:N1,useMemo:F1,useReducer:vy,useRef:_1,useState:function(){return vy(Rc)},useDebugValue:Gv,useDeferredValue:function(e){var t=qn();return z1(t,ct.memoizedState,e)},useTransition:function(){var e=vy(Rc)[0],t=qn().memoizedState;return[e,t]},useMutableSource:C1,useSyncExternalStore:T1,useId:H1,unstable_isNewReconciler:!1},o3={readContext:Gn,useCallback:D1,useContext:Gn,useEffect:Kv,useImperativeHandle:L1,useInsertionEffect:M1,useLayoutEffect:N1,useMemo:F1,useReducer:Sy,useRef:_1,useState:function(){return Sy(Rc)},useDebugValue:Gv,useDeferredValue:function(e){var t=qn();return ct===null?t.memoizedState=e:z1(t,ct.memoizedState,e)},useTransition:function(){var e=Sy(Rc)[0],t=qn().memoizedState;return[e,t]},useMutableSource:C1,useSyncExternalStore:T1,useId:H1,unstable_isNewReconciler:!1};function lr(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ev(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fp={isMounted:function(e){return(e=e._reactInternals)?rs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Jt(),o=oi(e),i=uo(r,o);i.payload=t,n!=null&&(i.callback=n),t=ni(e,i,o),t!==null&&(fr(t,e,o,r),Pf(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Jt(),o=oi(e),i=uo(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ni(e,i,o),t!==null&&(fr(t,e,o,r),Pf(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Jt(),r=oi(e),o=uo(n,r);o.tag=2,t!=null&&(o.callback=t),t=ni(e,o,r),t!==null&&(fr(t,e,r,n),Pf(t,e,r))}};function eT(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?!xc(n,r)||!xc(o,i):!0}function W1(e,t,n){var r=!1,o=ai,i=t.contextType;return typeof i=="object"&&i!==null?i=Gn(i):(o=vn(t)?Qi:Wt.current,r=t.contextTypes,i=(r=r!=null)?wa(e,o):ai),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fp,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function tT(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&&fp.enqueueReplaceState(t,t.state,null)}function tv(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Hv(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Gn(i):(i=vn(t)?Qi:Wt.current,o.context=wa(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ev(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&&fp.enqueueReplaceState(o,o.state,null),Xf(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ta(e,t){try{var n="",r=t;do n+=O2(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{oy=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ec(e):""}function L2(e){switch(e.tag){case 5:return ec(e.type);case 16:return ec("Lazy");case 13:return ec("Suspense");case 19:return ec("SuspenseList");case 0:case 2:case 15:return e=iy(e.type,!1),e;case 11:return e=iy(e.type.render,!1),e;case 1:return e=iy(e.type,!0),e;default:return""}}function Iy(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 ra:return"Fragment";case na:return"Portal";case ky:return"Profiler";case xv:return"StrictMode";case Ry:return"Suspense";case Py:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ET:return(e.displayName||"Context")+".Consumer";case bT:return(e._context.displayName||"Context")+".Provider";case wv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bv:return t=e.displayName||null,t!==null?t:Iy(e.type)||"Memo";case Ko:t=e._payload,e=e._init;try{return Iy(e(t))}catch(n){}}return null}function D2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Iy(t);case 8:return t===xv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function TT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function F2(e){var t=TT(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&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 af(e){e._valueTracker||(e._valueTracker=F2(e))}function kT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=TT(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lf(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ay(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function vC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(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 RT(e,t){t=t.checked,t!=null&&Sv(e,"checked",t,!1)}function _y(e,t){RT(e,t);var n=si(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")?My(e,t.type,n):t.hasOwnProperty("defaultValue")&&My(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function SC(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 My(e,t,n){(t!=="number"||Lf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tc=Array.isArray;function ma(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=""+si(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 Ny(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xC(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(tc(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:si(n)}}function PT(e,t){var n=si(t.value),r=si(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 wC(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function IT(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 Oy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?IT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var lf,AT=(function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(lf=lf||document.createElement("div"),lf.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=lf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var oc={animationIterationCount:!0,aspectRatio:!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},z2=["Webkit","ms","Moz","O"];Object.keys(oc).forEach(function(e){z2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oc[t]=oc[e]})});function _T(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||oc.hasOwnProperty(e)&&oc[e]?(""+t).trim():t+"px"}function MT(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=_T(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var H2=qe({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 Ly(e,t){if(t){if(H2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Dy(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}}var Fy=null;function Ev(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zy=null,ga=null,ha=null;function bC(e){if(e=Mc(e)){if(typeof zy!="function")throw Error(H(280));var t=e.stateNode;t&&(t=cp(t),zy(e.stateNode,e.type,t))}}function NT(e){ga?ha?ha.push(e):ha=[e]:ga=e}function OT(){if(ga){var e=ga,t=ha;if(ha=ga=null,bC(e),t)for(e=0;e<t.length;e++)bC(t[e])}}function LT(e,t){return e(t)}function DT(){}var sy=!1;function FT(e,t,n){if(sy)return e(t,n);sy=!0;try{return LT(e,t,n)}finally{sy=!1,(ga!==null||ha!==null)&&(DT(),OT())}}function gc(e,t){var n=e.stateNode;if(n===null)return null;var r=cp(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(H(231,t,typeof n));return n}var Hy=!1;if(fo)try{ea={},Object.defineProperty(ea,"passive",{get:function(){Hy=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch(e){Hy=!1}var ea;function B2(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ic=!1,Df=null,Ff=!1,By=null,U2={onError:function(e){ic=!0,Df=e}};function V2(e,t,n,r,o,i,s,a,l){ic=!1,Df=null,B2.apply(U2,arguments)}function W2(e,t,n,r,o,i,s,a,l){if(V2.apply(this,arguments),ic){if(ic){var c=Df;ic=!1,Df=null}else throw Error(H(198));Ff||(Ff=!0,By=c)}}function rs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zT(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 EC(e){if(rs(e)!==e)throw Error(H(188))}function $2(e){var t=e.alternate;if(!t){if(t=rs(e),t===null)throw Error(H(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 EC(o),e;if(i===r)return EC(o),t;i=i.sibling}throw Error(H(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(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function HT(e){return e=$2(e),e!==null?BT(e):null}function BT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=BT(e);if(t!==null)return t;e=e.sibling}return null}var UT=Mn.unstable_scheduleCallback,CC=Mn.unstable_cancelCallback,j2=Mn.unstable_shouldYield,K2=Mn.unstable_requestPaint,Je=Mn.unstable_now,G2=Mn.unstable_getCurrentPriorityLevel,Cv=Mn.unstable_ImmediatePriority,VT=Mn.unstable_UserBlockingPriority,zf=Mn.unstable_NormalPriority,q2=Mn.unstable_LowPriority,WT=Mn.unstable_IdlePriority,ip=null,Dr=null;function Y2(e){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ip,e,void 0,(e.current.flags&128)===128)}catch(t){}}var dr=Math.clz32?Math.clz32:Z2,X2=Math.log,Q2=Math.LN2;function Z2(e){return e>>>=0,e===0?32:31-(X2(e)/Q2|0)|0}var cf=64,uf=4194304;function nc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=nc(a):(i&=s,i!==0&&(r=nc(i)))}else s=n&~o,s!==0?r=nc(s):i!==0&&(r=nc(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-dr(t),o=1<<n,r|=e[n],t&=~o;return r}function J2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function eD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-dr(i),a=1<<s,l=o[s];l===-1?((a&n)===0||(a&r)!==0)&&(o[s]=J2(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Uy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $T(){var e=cf;return cf<<=1,(cf&4194240)===0&&(cf=64),e}function ay(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ac(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dr(t),e[t]=n}function tD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-dr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Tv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _e=0;function jT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var KT,kv,GT,qT,YT,Vy=!1,df=[],Zo=null,Jo=null,ei=null,hc=new Map,yc=new Map,qo=[],nD="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 TC(e,t){switch(e){case"focusin":case"focusout":Zo=null;break;case"dragenter":case"dragleave":Jo=null;break;case"mouseover":case"mouseout":ei=null;break;case"pointerover":case"pointerout":hc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yc.delete(t.pointerId)}}function Gl(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Mc(t),t!==null&&kv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function rD(e,t,n,r,o){switch(t){case"focusin":return Zo=Gl(Zo,e,t,n,r,o),!0;case"dragenter":return Jo=Gl(Jo,e,t,n,r,o),!0;case"mouseover":return ei=Gl(ei,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return hc.set(i,Gl(hc.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,yc.set(i,Gl(yc.get(i)||null,e,t,n,r,o)),!0}return!1}function XT(e){var t=Ki(e.target);if(t!==null){var n=rs(t);if(n!==null){if(t=n.tag,t===13){if(t=zT(n),t!==null){e.blockedOn=t,YT(e.priority,function(){GT(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Fy=r,n.target.dispatchEvent(r),Fy=null}else return t=Mc(n),t!==null&&kv(t),e.blockedOn=n,!1;t.shift()}return!0}function kC(e,t,n){Tf(e)&&n.delete(t)}function oD(){Vy=!1,Zo!==null&&Tf(Zo)&&(Zo=null),Jo!==null&&Tf(Jo)&&(Jo=null),ei!==null&&Tf(ei)&&(ei=null),hc.forEach(kC),yc.forEach(kC)}function ql(e,t){e.blockedOn===t&&(e.blockedOn=null,Vy||(Vy=!0,Mn.unstable_scheduleCallback(Mn.unstable_NormalPriority,oD)))}function vc(e){function t(o){return ql(o,e)}if(0<df.length){ql(df[0],e);for(var n=1;n<df.length;n++){var r=df[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Zo!==null&&ql(Zo,e),Jo!==null&&ql(Jo,e),ei!==null&&ql(ei,e),hc.forEach(t),yc.forEach(t),n=0;n<qo.length;n++)r=qo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qo.length&&(n=qo[0],n.blockedOn===null);)XT(n),n.blockedOn===null&&qo.shift()}var ya=ho.ReactCurrentBatchConfig,Bf=!0;function iD(e,t,n,r){var o=_e,i=ya.transition;ya.transition=null;try{_e=1,Rv(e,t,n,r)}finally{_e=o,ya.transition=i}}function sD(e,t,n,r){var o=_e,i=ya.transition;ya.transition=null;try{_e=4,Rv(e,t,n,r)}finally{_e=o,ya.transition=i}}function Rv(e,t,n,r){if(Bf){var o=Wy(e,t,n,r);if(o===null)my(e,t,r,Uf,n),TC(e,r);else if(rD(o,e,t,n,r))r.stopPropagation();else if(TC(e,r),t&4&&-1<nD.indexOf(e)){for(;o!==null;){var i=Mc(o);if(i!==null&&KT(i),i=Wy(e,t,n,r),i===null&&my(e,t,r,Uf,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else my(e,t,r,null,n)}}var Uf=null;function Wy(e,t,n,r){if(Uf=null,e=Ev(r),e=Ki(e),e!==null)if(t=rs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zT(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Uf=e,null}function QT(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(G2()){case Cv:return 1;case VT:return 4;case zf:case q2:return 16;case WT:return 536870912;default:return 16}default:return 16}}var Xo=null,Pv=null,kf=null;function ZT(){if(kf)return kf;var e,t=Pv,n=t.length,r,o="value"in Xo?Xo.value:Xo.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 kf=o.slice(e,1<r?1-r:void 0)}function Rf(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 ff(){return!0}function RC(){return!1}function Nn(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)?ff:RC,this.isPropagationStopped=RC,this}return qe(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=ff)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ff)},persist:function(){},isPersistent:ff}),t}var Ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Iv=Nn(Ra),_c=qe({},Ra,{view:0,detail:0}),aD=Nn(_c),ly,cy,Yl,sp=qe({},_c,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Av,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!==Yl&&(Yl&&e.type==="mousemove"?(ly=e.screenX-Yl.screenX,cy=e.screenY-Yl.screenY):cy=ly=0,Yl=e),ly)},movementY:function(e){return"movementY"in e?e.movementY:cy}}),PC=Nn(sp),lD=qe({},sp,{dataTransfer:0}),cD=Nn(lD),uD=qe({},_c,{relatedTarget:0}),uy=Nn(uD),dD=qe({},Ra,{animationName:0,elapsedTime:0,pseudoElement:0}),fD=Nn(dD),pD=qe({},Ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mD=Nn(pD),gD=qe({},Ra,{data:0}),IC=Nn(gD),hD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yD={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"},vD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vD[e])?!!t[e]:!1}function Av(){return SD}var xD=qe({},_c,{key:function(e){if(e.key){var t=hD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Rf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Av,charCode:function(e){return e.type==="keypress"?Rf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Rf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wD=Nn(xD),bD=qe({},sp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AC=Nn(bD),ED=qe({},_c,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Av}),CD=Nn(ED),TD=qe({},Ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),kD=Nn(TD),RD=qe({},sp,{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}),PD=Nn(RD),ID=[9,13,27,32],_v=fo&&"CompositionEvent"in window,sc=null;fo&&"documentMode"in document&&(sc=document.documentMode);var AD=fo&&"TextEvent"in window&&!sc,JT=fo&&(!_v||sc&&8<sc&&11>=sc),_C=" ",MC=!1;function e1(e,t){switch(e){case"keyup":return ID.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oa=!1;function _D(e,t){switch(e){case"compositionend":return t1(t);case"keypress":return t.which!==32?null:(MC=!0,_C);case"textInput":return e=t.data,e===_C&&MC?null:e;default:return null}}function MD(e,t){if(oa)return e==="compositionend"||!_v&&e1(e,t)?(e=ZT(),kf=Pv=Xo=null,oa=!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 JT&&t.locale!=="ko"?null:t.data;default:return null}}var ND={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 NC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ND[e.type]:t==="textarea"}function n1(e,t,n,r){NT(r),t=Vf(t,"onChange"),0<t.length&&(n=new Iv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ac=null,Sc=null;function OD(e){p1(e,0)}function ap(e){var t=aa(e);if(kT(t))return e}function LD(e,t){if(e==="change")return t}var r1=!1;fo&&(fo?(mf="oninput"in document,mf||(dy=document.createElement("div"),dy.setAttribute("oninput","return;"),mf=typeof dy.oninput=="function"),pf=mf):pf=!1,r1=pf&&(!document.documentMode||9<document.documentMode));var pf,mf,dy;function OC(){ac&&(ac.detachEvent("onpropertychange",o1),Sc=ac=null)}function o1(e){if(e.propertyName==="value"&&ap(Sc)){var t=[];n1(t,Sc,e,Ev(e)),FT(OD,t)}}function DD(e,t,n){e==="focusin"?(OC(),ac=t,Sc=n,ac.attachEvent("onpropertychange",o1)):e==="focusout"&&OC()}function FD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ap(Sc)}function zD(e,t){if(e==="click")return ap(t)}function HD(e,t){if(e==="input"||e==="change")return ap(t)}function BD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pr=typeof Object.is=="function"?Object.is:BD;function xc(e,t){if(pr(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++){var o=n[r];if(!Ty.call(t,o)||!pr(e[o],t[o]))return!1}return!0}function LC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function DC(e,t){var n=LC(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=LC(n)}}function i1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?i1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function s1(){for(var e=window,t=Lf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Lf(e.document)}return t}function Mv(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")}function UD(e){var t=s1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&i1(n.ownerDocument.documentElement,n)){if(r!==null&&Mv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=DC(n,i);var s=DC(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var VD=fo&&"documentMode"in document&&11>=document.documentMode,ia=null,$y=null,lc=null,jy=!1;function FC(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jy||ia==null||ia!==Lf(r)||(r=ia,"selectionStart"in r&&Mv(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}),lc&&xc(lc,r)||(lc=r,r=Vf($y,"onSelect"),0<r.length&&(t=new Iv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ia)))}function gf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:gf("Animation","AnimationEnd"),animationiteration:gf("Animation","AnimationIteration"),animationstart:gf("Animation","AnimationStart"),transitionend:gf("Transition","TransitionEnd")},fy={},a1={};fo&&(a1=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function lp(e){if(fy[e])return fy[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in a1)return fy[e]=t[n];return e}var l1=lp("animationend"),c1=lp("animationiteration"),u1=lp("animationstart"),d1=lp("transitionend"),f1=new Map,zC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function li(e,t){f1.set(e,t),ns(t,[e])}for(hf=0;hf<zC.length;hf++)yf=zC[hf],HC=yf.toLowerCase(),BC=yf[0].toUpperCase()+yf.slice(1),li(HC,"on"+BC);var yf,HC,BC,hf;li(l1,"onAnimationEnd");li(c1,"onAnimationIteration");li(u1,"onAnimationStart");li("dblclick","onDoubleClick");li("focusin","onFocus");li("focusout","onBlur");li(d1,"onTransitionEnd");xa("onMouseEnter",["mouseout","mouseover"]);xa("onMouseLeave",["mouseout","mouseover"]);xa("onPointerEnter",["pointerout","pointerover"]);xa("onPointerLeave",["pointerout","pointerover"]);ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),WD=new Set("cancel close invalid load scroll toggle".split(" ").concat(rc));function UC(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,W2(r,t,void 0,e),e.currentTarget=null}function p1(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,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;UC(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;UC(o,a,c),i=l}}}if(Ff)throw e=By,Ff=!1,By=null,e}function He(e,t){var n=t[Xy];n===void 0&&(n=t[Xy]=new Set);var r=e+"__bubble";n.has(r)||(m1(t,e,2,!1),n.add(r))}function py(e,t,n){var r=0;t&&(r|=4),m1(n,e,r,t)}var vf="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[vf]){e[vf]=!0,wT.forEach(function(n){n!=="selectionchange"&&(WD.has(n)||py(n,!1,e),py(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vf]||(t[vf]=!0,py("selectionchange",!1,t))}}function m1(e,t,n,r){switch(QT(t)){case 1:var o=iD;break;case 4:o=sD;break;default:o=Rv}n=o.bind(null,t,n,e),o=void 0,!Hy||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 my(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&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=Ki(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}FT(function(){var c=i,u=Ev(n),f=[];e:{var d=f1.get(e);if(d!==void 0){var p=Iv,m=e;switch(e){case"keypress":if(Rf(n)===0)break e;case"keydown":case"keyup":p=wD;break;case"focusin":m="focus",p=uy;break;case"focusout":m="blur",p=uy;break;case"beforeblur":case"afterblur":p=uy;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":p=PC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=cD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=CD;break;case l1:case c1:case u1:p=fD;break;case d1:p=kD;break;case"scroll":p=aD;break;case"wheel":p=PD;break;case"copy":case"cut":case"paste":p=mD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=AC}var g=(t&4)!==0,v=!g&&e==="scroll",h=g?d!==null?d+"Capture":null:d;g=[];for(var y=c,S;y!==null;){S=y;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,h!==null&&(x=gc(y,h),x!=null&&g.push(bc(y,x,S)))),v)break;y=y.return}0<g.length&&(d=new p(d,m,null,n,u),f.push({event:d,listeners:g}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&n!==Fy&&(m=n.relatedTarget||n.fromElement)&&(Ki(m)||m[po]))break e;if((p||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?Ki(m):null,m!==null&&(v=rs(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(g=PC,x="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=AC,x="onPointerLeave",h="onPointerEnter",y="pointer"),v=p==null?d:aa(p),S=m==null?d:aa(m),d=new g(x,y+"leave",p,n,u),d.target=v,d.relatedTarget=S,x=null,Ki(u)===c&&(g=new g(h,y+"enter",m,n,u),g.target=S,g.relatedTarget=v,x=g),v=x,p&&m)t:{for(g=p,h=m,y=0,S=g;S;S=ta(S))y++;for(S=0,x=h;x;x=ta(x))S++;for(;0<y-S;)g=ta(g),y--;for(;0<S-y;)h=ta(h),S--;for(;y--;){if(g===h||h!==null&&g===h.alternate)break t;g=ta(g),h=ta(h)}g=null}else g=null;p!==null&&VC(f,d,p,g,!1),m!==null&&v!==null&&VC(f,v,m,g,!0)}}e:{if(d=c?aa(c):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var T=LD;else if(NC(d))if(r1)T=HD;else{T=FD;var C=DD}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=zD);if(T&&(T=T(e,c))){n1(f,T,n,u);break e}C&&C(e,d,c),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&My(d,"number",d.value)}switch(C=c?aa(c):window,e){case"focusin":(NC(C)||C.contentEditable==="true")&&(ia=C,$y=c,lc=null);break;case"focusout":lc=$y=ia=null;break;case"mousedown":jy=!0;break;case"contextmenu":case"mouseup":case"dragend":jy=!1,FC(f,n,u);break;case"selectionchange":if(VD)break;case"keydown":case"keyup":FC(f,n,u)}var k;if(_v)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 oa?e1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(JT&&n.locale!=="ko"&&(oa||R!=="onCompositionStart"?R==="onCompositionEnd"&&oa&&(k=ZT()):(Xo=u,Pv="value"in Xo?Xo.value:Xo.textContent,oa=!0)),C=Vf(c,R),0<C.length&&(R=new IC(R,e,null,n,u),f.push({event:R,listeners:C}),k?R.data=k:(k=t1(n),k!==null&&(R.data=k)))),(k=AD?_D(e,n):MD(e,n))&&(c=Vf(c,"onBeforeInput"),0<c.length&&(u=new IC("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=k))}p1(f,t)})}function bc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vf(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=gc(e,n),i!=null&&r.unshift(bc(e,i,o)),i=gc(e,t),i!=null&&r.push(bc(e,i,o))),e=e.return}return r}function ta(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function VC(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=gc(n,i),l!=null&&s.unshift(bc(n,l,a))):o||(l=gc(n,i),l!=null&&s.push(bc(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var $D=/\r\n?/g,jD=/\u0000|\uFFFD/g;function WC(e){return(typeof e=="string"?e:""+e).replace($D,`
6
+ `).replace(jD,"")}function Sf(e,t,n){if(t=WC(t),WC(e)!==t&&n)throw Error(H(425))}function Wf(){}var Ky=null,Gy=null;function qy(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yy=typeof setTimeout=="function"?setTimeout:void 0,KD=typeof clearTimeout=="function"?clearTimeout:void 0,$C=typeof Promise=="function"?Promise:void 0,GD=typeof queueMicrotask=="function"?queueMicrotask:typeof $C!="undefined"?function(e){return $C.resolve(null).then(e).catch(qD)}:Yy;function qD(e){setTimeout(function(){throw e})}function gy(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),vc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);vc(t)}function ti(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function jC(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 Pa=Math.random().toString(36).slice(2),Lr="__reactFiber$"+Pa,Ec="__reactProps$"+Pa,po="__reactContainer$"+Pa,Xy="__reactEvents$"+Pa,YD="__reactListeners$"+Pa,XD="__reactHandles$"+Pa;function Ki(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[po]||n[Lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jC(e);e!==null;){if(n=e[Lr])return n;e=jC(e)}return t}e=n,n=e.parentNode}return null}function Mc(e){return e=e[Lr]||e[po],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function aa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function cp(e){return e[Ec]||null}var Qy=[],la=-1;function ci(e){return{current:e}}function Be(e){0>la||(e.current=Qy[la],Qy[la]=null,la--)}function ze(e,t){la++,Qy[la]=e.current,e.current=t}var ai={},Wt=ci(ai),yn=ci(!1),Qi=ai;function wa(e,t){var n=e.type.contextTypes;if(!n)return ai;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 vn(e){return e=e.childContextTypes,e!=null}function $f(){Be(yn),Be(Wt)}function KC(e,t,n){if(Wt.current!==ai)throw Error(H(168));ze(Wt,t),ze(yn,n)}function g1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(H(108,D2(e)||"Unknown",o));return qe({},n,r)}function jf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ai,Qi=Wt.current,ze(Wt,e),ze(yn,yn.current),!0}function GC(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=g1(e,t,Qi),r.__reactInternalMemoizedMergedChildContext=e,Be(yn),Be(Wt),ze(Wt,e)):Be(yn),ze(yn,n)}var ao=null,up=!1,hy=!1;function h1(e){ao===null?ao=[e]:ao.push(e)}function QD(e){up=!0,h1(e)}function ui(){if(!hy&&ao!==null){hy=!0;var e=0,t=_e;try{var n=ao;for(_e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ao=null,up=!1}catch(o){throw ao!==null&&(ao=ao.slice(e+1)),UT(Cv,ui),o}finally{_e=t,hy=!1}}return null}var ca=[],ua=0,Kf=null,Gf=0,Wn=[],$n=0,Zi=null,lo=1,co="";function $i(e,t){ca[ua++]=Gf,ca[ua++]=Kf,Kf=e,Gf=t}function y1(e,t,n){Wn[$n++]=lo,Wn[$n++]=co,Wn[$n++]=Zi,Zi=e;var r=lo;e=co;var o=32-dr(r)-1;r&=~(1<<o),n+=1;var i=32-dr(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,lo=1<<32-dr(t)+o|n<<o|r,co=i+e}else lo=1<<i|n<<o|r,co=e}function Nv(e){e.return!==null&&($i(e,1),y1(e,1,0))}function Ov(e){for(;e===Kf;)Kf=ca[--ua],ca[ua]=null,Gf=ca[--ua],ca[ua]=null;for(;e===Zi;)Zi=Wn[--$n],Wn[$n]=null,co=Wn[--$n],Wn[$n]=null,lo=Wn[--$n],Wn[$n]=null}var _n=null,An=null,We=!1,ur=null;function v1(e,t){var n=jn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function qC(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,_n=e,An=ti(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_n=e,An=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zi!==null?{id:lo,overflow:co}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=jn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_n=e,An=null,!0):!1;default:return!1}}function Zy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jy(e){if(We){var t=An;if(t){var n=t;if(!qC(e,t)){if(Zy(e))throw Error(H(418));t=ti(n.nextSibling);var r=_n;t&&qC(e,t)?v1(r,n):(e.flags=e.flags&-4097|2,We=!1,_n=e)}}else{if(Zy(e))throw Error(H(418));e.flags=e.flags&-4097|2,We=!1,_n=e}}}function YC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function xf(e){if(e!==_n)return!1;if(!We)return YC(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qy(e.type,e.memoizedProps)),t&&(t=An)){if(Zy(e))throw S1(),Error(H(418));for(;t;)v1(e,t),t=ti(t.nextSibling)}if(YC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){An=ti(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}An=null}}else An=_n?ti(e.stateNode.nextSibling):null;return!0}function S1(){for(var e=An;e;)e=ti(e.nextSibling)}function ba(){An=_n=null,We=!1}function Lv(e){ur===null?ur=[e]:ur.push(e)}var ZD=ho.ReactCurrentBatchConfig;function Xl(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(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function wf(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function XC(e){var t=e._init;return t(e._payload)}function x1(e){function t(h,y){if(e){var S=h.deletions;S===null?(h.deletions=[y],h.flags|=16):S.push(y)}}function n(h,y){if(!e)return null;for(;y!==null;)t(h,y),y=y.sibling;return null}function r(h,y){for(h=new Map;y!==null;)y.key!==null?h.set(y.key,y):h.set(y.index,y),y=y.sibling;return h}function o(h,y){return h=ii(h,y),h.index=0,h.sibling=null,h}function i(h,y,S){return h.index=S,e?(S=h.alternate,S!==null?(S=S.index,S<y?(h.flags|=2,y):S):(h.flags|=2,y)):(h.flags|=1048576,y)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,y,S,x){return y===null||y.tag!==6?(y=Ey(S,h.mode,x),y.return=h,y):(y=o(y,S),y.return=h,y)}function l(h,y,S,x){var T=S.type;return T===ra?u(h,y,S.props.children,x,S.key):y!==null&&(y.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ko&&XC(T)===y.type)?(x=o(y,S.props),x.ref=Xl(h,y,S),x.return=h,x):(x=Of(S.type,S.key,S.props,null,h.mode,x),x.ref=Xl(h,y,S),x.return=h,x)}function c(h,y,S,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==S.containerInfo||y.stateNode.implementation!==S.implementation?(y=Cy(S,h.mode,x),y.return=h,y):(y=o(y,S.children||[]),y.return=h,y)}function u(h,y,S,x,T){return y===null||y.tag!==7?(y=Xi(S,h.mode,x,T),y.return=h,y):(y=o(y,S),y.return=h,y)}function f(h,y,S){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Ey(""+y,h.mode,S),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case sf:return S=Of(y.type,y.key,y.props,null,h.mode,S),S.ref=Xl(h,null,y),S.return=h,S;case na:return y=Cy(y,h.mode,S),y.return=h,y;case Ko:var x=y._init;return f(h,x(y._payload),S)}if(tc(y)||Kl(y))return y=Xi(y,h.mode,S,null),y.return=h,y;wf(h,y)}return null}function d(h,y,S,x){var T=y!==null?y.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return T!==null?null:a(h,y,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case sf:return S.key===T?l(h,y,S,x):null;case na:return S.key===T?c(h,y,S,x):null;case Ko:return T=S._init,d(h,y,T(S._payload),x)}if(tc(S)||Kl(S))return T!==null?null:u(h,y,S,x,null);wf(h,S)}return null}function p(h,y,S,x,T){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(S)||null,a(y,h,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case sf:return h=h.get(x.key===null?S:x.key)||null,l(y,h,x,T);case na:return h=h.get(x.key===null?S:x.key)||null,c(y,h,x,T);case Ko:var C=x._init;return p(h,y,S,C(x._payload),T)}if(tc(x)||Kl(x))return h=h.get(S)||null,u(y,h,x,T,null);wf(y,x)}return null}function m(h,y,S,x){for(var T=null,C=null,k=y,R=y=0,O=null;k!==null&&R<S.length;R++){k.index>R?(O=k,k=null):O=k.sibling;var L=d(h,k,S[R],x);if(L===null){k===null&&(k=O);break}e&&k&&L.alternate===null&&t(h,k),y=i(L,y,R),C===null?T=L:C.sibling=L,C=L,k=O}if(R===S.length)return n(h,k),We&&$i(h,R),T;if(k===null){for(;R<S.length;R++)k=f(h,S[R],x),k!==null&&(y=i(k,y,R),C===null?T=k:C.sibling=k,C=k);return We&&$i(h,R),T}for(k=r(h,k);R<S.length;R++)O=p(k,h,R,S[R],x),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?R:O.key),y=i(O,y,R),C===null?T=O:C.sibling=O,C=O);return e&&k.forEach(function(U){return t(h,U)}),We&&$i(h,R),T}function g(h,y,S,x){var T=Kl(S);if(typeof T!="function")throw Error(H(150));if(S=T.call(S),S==null)throw Error(H(151));for(var C=T=null,k=y,R=y=0,O=null,L=S.next();k!==null&&!L.done;R++,L=S.next()){k.index>R?(O=k,k=null):O=k.sibling;var U=d(h,k,L.value,x);if(U===null){k===null&&(k=O);break}e&&k&&U.alternate===null&&t(h,k),y=i(U,y,R),C===null?T=U:C.sibling=U,C=U,k=O}if(L.done)return n(h,k),We&&$i(h,R),T;if(k===null){for(;!L.done;R++,L=S.next())L=f(h,L.value,x),L!==null&&(y=i(L,y,R),C===null?T=L:C.sibling=L,C=L);return We&&$i(h,R),T}for(k=r(h,k);!L.done;R++,L=S.next())L=p(k,h,R,L.value,x),L!==null&&(e&&L.alternate!==null&&k.delete(L.key===null?R:L.key),y=i(L,y,R),C===null?T=L:C.sibling=L,C=L);return e&&k.forEach(function(J){return t(h,J)}),We&&$i(h,R),T}function v(h,y,S,x){if(typeof S=="object"&&S!==null&&S.type===ra&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case sf:e:{for(var T=S.key,C=y;C!==null;){if(C.key===T){if(T=S.type,T===ra){if(C.tag===7){n(h,C.sibling),y=o(C,S.props.children),y.return=h,h=y;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ko&&XC(T)===C.type){n(h,C.sibling),y=o(C,S.props),y.ref=Xl(h,C,S),y.return=h,h=y;break e}n(h,C);break}else t(h,C);C=C.sibling}S.type===ra?(y=Xi(S.props.children,h.mode,x,S.key),y.return=h,h=y):(x=Of(S.type,S.key,S.props,null,h.mode,x),x.ref=Xl(h,y,S),x.return=h,h=x)}return s(h);case na:e:{for(C=S.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===S.containerInfo&&y.stateNode.implementation===S.implementation){n(h,y.sibling),y=o(y,S.children||[]),y.return=h,h=y;break e}else{n(h,y);break}else t(h,y);y=y.sibling}y=Cy(S,h.mode,x),y.return=h,h=y}return s(h);case Ko:return C=S._init,v(h,y,C(S._payload),x)}if(tc(S))return m(h,y,S,x);if(Kl(S))return g(h,y,S,x);wf(h,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,y!==null&&y.tag===6?(n(h,y.sibling),y=o(y,S),y.return=h,h=y):(n(h,y),y=Ey(S,h.mode,x),y.return=h,h=y),s(h)):n(h,y)}return v}var Ea=x1(!0),w1=x1(!1),qf=ci(null),Yf=null,da=null,Dv=null;function Fv(){Dv=da=Yf=null}function zv(e){var t=qf.current;Be(qf),e._currentValue=t}function ev(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function va(e,t){Yf=e,Dv=da=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(hn=!0),e.firstContext=null)}function Gn(e){var t=e._currentValue;if(Dv!==e)if(e={context:e,memoizedValue:t,next:null},da===null){if(Yf===null)throw Error(H(308));da=e,Yf.dependencies={lanes:0,firstContext:e}}else da=da.next=e;return t}var Gi=null;function Hv(e){Gi===null?Gi=[e]:Gi.push(e)}function b1(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Hv(t)):(n.next=o.next,o.next=n),t.interleaved=n,mo(e,r)}function mo(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}var Go=!1;function Bv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function E1(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 uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ni(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,mo(e,n)}return o=r.interleaved,o===null?(t.next=t,Hv(r)):(t.next=o.next,o.next=t),r.interleaved=t,mo(e,n)}function Pf(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tv(e,n)}}function QC(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 Xf(e,t,n,r){var o=e.updateQueue;Go=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;s=0,u=c=l=null,a=i;do{var d=a.lane,p=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(d=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,d=typeof m=="function"?m.call(p,f,d):m,d==null)break e;f=qe({},f,d);break e;case 2:Go=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=f):u=u.next=p,s|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(u===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);es|=s,e.lanes=s,e.memoizedState=f}}function ZC(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(H(191,o));o.call(r)}}}var Nc={},Fr=ci(Nc),Cc=ci(Nc),Tc=ci(Nc);function qi(e){if(e===Nc)throw Error(H(174));return e}function Uv(e,t){switch(ze(Tc,t),ze(Cc,e),ze(Fr,Nc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oy(t,e)}Be(Fr),ze(Fr,t)}function Ca(){Be(Fr),Be(Cc),Be(Tc)}function C1(e){qi(Tc.current);var t=qi(Fr.current),n=Oy(t,e.type);t!==n&&(ze(Cc,e),ze(Fr,n))}function Vv(e){Cc.current===e&&(Be(Fr),Be(Cc))}var Ke=ci(0);function Qf(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&128)!==0)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 yy=[];function Wv(){for(var e=0;e<yy.length;e++)yy[e]._workInProgressVersionPrimary=null;yy.length=0}var If=ho.ReactCurrentDispatcher,vy=ho.ReactCurrentBatchConfig,Ji=0,Ge=null,ct=null,St=null,Zf=!1,cc=!1,kc=0,JD=0;function Bt(){throw Error(H(321))}function $v(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function jv(e,t,n,r,o,i){if(Ji=i,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,If.current=e===null||e.memoizedState===null?r3:o3,e=n(r,o),cc){i=0;do{if(cc=!1,kc=0,25<=i)throw Error(H(301));i+=1,St=ct=null,t.updateQueue=null,If.current=i3,e=n(r,o)}while(cc)}if(If.current=Jf,t=ct!==null&&ct.next!==null,Ji=0,St=ct=Ge=null,Zf=!1,t)throw Error(H(300));return e}function Kv(){var e=kc!==0;return kc=0,e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Ge.memoizedState=St=e:St=St.next=e,St}function qn(){if(ct===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=St===null?Ge.memoizedState:St.next;if(t!==null)St=t,ct=e;else{if(e===null)throw Error(H(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},St===null?Ge.memoizedState=St=e:St=St.next=e}return St}function Rc(e,t){return typeof t=="function"?t(e):t}function Sy(e){var t=qn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=ct,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){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Ji&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,s=r):l=l.next=f,Ge.lanes|=u,es|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,pr(r,t.memoizedState)||(hn=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Ge.lanes|=i,es|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xy(e){var t=qn(),n=t.queue;if(n===null)throw Error(H(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);pr(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function T1(){}function k1(e,t){var n=Ge,r=qn(),o=t(),i=!pr(r.memoizedState,o);if(i&&(r.memoizedState=o,hn=!0),r=r.queue,Gv(I1.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||St!==null&&St.memoizedState.tag&1){if(n.flags|=2048,Pc(9,P1.bind(null,n,r,o,t),void 0,null),xt===null)throw Error(H(349));(Ji&30)!==0||R1(n,t,o)}return o}function R1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function P1(e,t,n,r){t.value=n,t.getSnapshot=r,A1(t)&&_1(e)}function I1(e,t,n){return n(function(){A1(t)&&_1(e)})}function A1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch(r){return!0}}function _1(e){var t=mo(e,1);t!==null&&fr(t,e,1,-1)}function JC(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rc,lastRenderedState:e},t.queue=e,e=e.dispatch=n3.bind(null,Ge,e),[t.memoizedState,e]}function Pc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores: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 M1(){return qn().memoizedState}function Af(e,t,n,r){var o=Or();Ge.flags|=e,o.memoizedState=Pc(1|t,n,void 0,r===void 0?null:r)}function dp(e,t,n,r){var o=qn();r=r===void 0?null:r;var i=void 0;if(ct!==null){var s=ct.memoizedState;if(i=s.destroy,r!==null&&$v(r,s.deps)){o.memoizedState=Pc(t,n,i,r);return}}Ge.flags|=e,o.memoizedState=Pc(1|t,n,i,r)}function eT(e,t){return Af(8390656,8,e,t)}function Gv(e,t){return dp(2048,8,e,t)}function N1(e,t){return dp(4,2,e,t)}function O1(e,t){return dp(4,4,e,t)}function L1(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 D1(e,t,n){return n=n!=null?n.concat([e]):null,dp(4,4,L1.bind(null,t,e),n)}function qv(){}function F1(e,t){var n=qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$v(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function z1(e,t){var n=qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$v(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function H1(e,t,n){return(Ji&21)===0?(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=n):(pr(n,t)||(n=$T(),Ge.lanes|=n,es|=n,e.baseState=!0),t)}function e3(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var r=vy.transition;vy.transition={};try{e(!1),t()}finally{_e=n,vy.transition=r}}function B1(){return qn().memoizedState}function t3(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},U1(e))V1(t,n);else if(n=b1(e,t,n,r),n!==null){var o=en();fr(n,e,r,o),W1(n,t,r)}}function n3(e,t,n){var r=oi(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(U1(e))V1(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,pr(a,s)){var l=t.interleaved;l===null?(o.next=o,Hv(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}n=b1(e,t,o,r),n!==null&&(o=en(),fr(n,e,r,o),W1(n,t,r))}}function U1(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function V1(e,t){cc=Zf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function W1(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tv(e,n)}}var Jf={readContext:Gn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},r3={readContext:Gn,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:Gn,useEffect:eT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Af(4194308,4,L1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Af(4194308,4,e,t)},useInsertionEffect:function(e,t){return Af(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={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=t3.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=Or();return e={current:e},t.memoizedState=e},useState:JC,useDebugValue:qv,useDeferredValue:function(e){return Or().memoizedState=e},useTransition:function(){var e=JC(!1),t=e[0];return e=e3.bind(null,e[1]),Or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,o=Or();if(We){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),xt===null)throw Error(H(349));(Ji&30)!==0||R1(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,eT(I1.bind(null,r,i,e),[e]),r.flags|=2048,Pc(9,P1.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Or(),t=xt.identifierPrefix;if(We){var n=co,r=lo;n=(r&~(1<<32-dr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=kc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=JD++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},o3={readContext:Gn,useCallback:F1,useContext:Gn,useEffect:Gv,useImperativeHandle:D1,useInsertionEffect:N1,useLayoutEffect:O1,useMemo:z1,useReducer:Sy,useRef:M1,useState:function(){return Sy(Rc)},useDebugValue:qv,useDeferredValue:function(e){var t=qn();return H1(t,ct.memoizedState,e)},useTransition:function(){var e=Sy(Rc)[0],t=qn().memoizedState;return[e,t]},useMutableSource:T1,useSyncExternalStore:k1,useId:B1,unstable_isNewReconciler:!1},i3={readContext:Gn,useCallback:F1,useContext:Gn,useEffect:Gv,useImperativeHandle:D1,useInsertionEffect:N1,useLayoutEffect:O1,useMemo:z1,useReducer:xy,useRef:M1,useState:function(){return xy(Rc)},useDebugValue:qv,useDeferredValue:function(e){var t=qn();return ct===null?t.memoizedState=e:H1(t,ct.memoizedState,e)},useTransition:function(){var e=xy(Rc)[0],t=qn().memoizedState;return[e,t]},useMutableSource:T1,useSyncExternalStore:k1,useId:B1,unstable_isNewReconciler:!1};function lr(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function tv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fp={isMounted:function(e){return(e=e._reactInternals)?rs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=en(),o=oi(e),i=uo(r,o);i.payload=t,n!=null&&(i.callback=n),t=ni(e,i,o),t!==null&&(fr(t,e,o,r),Pf(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=en(),o=oi(e),i=uo(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ni(e,i,o),t!==null&&(fr(t,e,o,r),Pf(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=en(),r=oi(e),o=uo(n,r);o.tag=2,t!=null&&(o.callback=t),t=ni(e,o,r),t!==null&&(fr(t,e,r,n),Pf(t,e,r))}};function tT(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?!xc(n,r)||!xc(o,i):!0}function $1(e,t,n){var r=!1,o=ai,i=t.contextType;return typeof i=="object"&&i!==null?i=Gn(i):(o=vn(t)?Qi:Wt.current,r=t.contextTypes,i=(r=r!=null)?wa(e,o):ai),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fp,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function nT(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&&fp.enqueueReplaceState(t,t.state,null)}function nv(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Bv(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Gn(i):(i=vn(t)?Qi:Wt.current,o.context=wa(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(tv(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&&fp.enqueueReplaceState(o,o.state,null),Xf(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ta(e,t){try{var n="",r=t;do n+=L2(r),r=r.return;while(r);var o=n}catch(i){o=`
7
7
  Error generating stack: `+i.message+`
8
- `+i.stack}return{value:e,source:t,stack:o,digest:null}}function xy(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function nv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var i3=typeof WeakMap=="function"?WeakMap:Map;function $1(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){tp||(tp=!0,fv=r),nv(e,t)},n}function j1(e,t,n){n=uo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){nv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){nv(e,t),typeof r!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function nT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new i3;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=S3.bind(null,e,t,n),t.then(e,e))}function rT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function oT(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,ni(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var s3=ho.ReactCurrentOwner,hn=!1;function Zt(e,t,n,r){t.child=e===null?x1(t,null,n,r):Ea(t,e.child,n,r)}function iT(e,t,n,r,o){n=n.render;var i=t.ref;return va(t,o),r=$v(e,t,n,r,i,o),n=jv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,go(e,t,o)):(We&&n&&Mv(t),t.flags|=1,Zt(e,t,r,o),t.child)}function sT(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!t0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,K1(e,t,i,r,o)):(e=Of(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:xc,n(s,r)&&e.ref===t.ref)return go(e,t,o)}return t.flags|=1,e=ii(i,r),e.ref=t.ref,e.return=t,t.child=e}function K1(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(xc(i,r)&&e.ref===t.ref)if(hn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(hn=!0);else return t.lanes=e.lanes,go(e,t,o)}return rv(e,t,n,r,o)}function G1(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(pa,In),In|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(pa,In),In|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ze(pa,In),In|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ze(pa,In),In|=r;return Zt(e,t,o,n),t.child}function q1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rv(e,t,n,r,o){var i=vn(n)?Qi:Wt.current;return i=wa(t,i),va(t,o),n=$v(e,t,n,r,i,o),r=jv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,go(e,t,o)):(We&&r&&Mv(t),t.flags|=1,Zt(e,t,n,o),t.child)}function aT(e,t,n,r,o){if(vn(n)){var i=!0;jf(t)}else i=!1;if(va(t,o),t.stateNode===null)_f(e,t),W1(t,n,r),tv(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Gn(c):(c=vn(n)?Qi:Wt.current,c=wa(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&tT(t,s,r,c),Go=!1;var d=t.memoizedState;s.state=d,Xf(t,r,s,o),l=t.memoizedState,a!==r||d!==l||yn.current||Go?(typeof u=="function"&&(ev(t,n,u,r),l=t.memoizedState),(a=Go||eT(t,n,a,r,d,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,b1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:lr(t.type,a),s.props=c,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Gn(l):(l=vn(n)?Qi:Wt.current,l=wa(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&tT(t,s,r,l),Go=!1,d=t.memoizedState,s.state=d,Xf(t,r,s,o);var m=t.memoizedState;a!==f||d!==m||yn.current||Go?(typeof p=="function"&&(ev(t,n,p,r),m=t.memoizedState),(c=Go||eT(t,n,c,r,d,m,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(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|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=l,r=c):(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|=1024),r=!1)}return ov(e,t,n,r,i,o)}function ov(e,t,n,r,o,i){q1(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&KC(t,n,!1),go(e,t,i);r=t.stateNode,s3.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,a,i)):Zt(e,t,a,i),t.memoizedState=r.state,o&&KC(t,n,!0),t.child}function Y1(e){var t=e.stateNode;t.pendingContext?jC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jC(e,t.context,!1),Bv(e,t.containerInfo)}function lT(e,t,n,r,o){return ba(),Ov(o),t.flags|=256,Zt(e,t,n,r),t.child}var iv={dehydrated:null,treeContext:null,retryLane:0};function sv(e){return{baseLanes:e,cachePool:null,transitions:null}}function X1(e,t,n){var r=t.pendingProps,o=Ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ze(Ke,o&1),e===null)return Zy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=gp(s,r,0,null),e=Xi(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sv(n),t.memoizedState=iv,e):qv(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return a3(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ii(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=ii(a,i):(i=Xi(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?sv(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=iv,r}return i=e.child,e=i.sibling,r=ii(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function qv(e,t){return t=gp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bf(e,t,n,r){return r!==null&&Ov(r),Ea(t,e.child,null,n),e=qv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function a3(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=xy(Error(H(422))),bf(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=gp({mode:"visible",children:r.children},o,0,null),i=Xi(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Ea(t,e.child,null,s),t.child.memoizedState=sv(s),t.memoizedState=iv,i);if((t.mode&1)===0)return bf(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(H(419)),r=xy(i,r,void 0),bf(e,t,s,r)}if(a=(s&e.childLanes)!==0,hn||a){if(r=xt,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,mo(e,o),fr(r,e,o,-1))}return e0(),r=xy(Error(H(421))),bf(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=x3.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,An=ti(o.nextSibling),_n=t,We=!0,ur=null,e!==null&&(Wn[$n++]=lo,Wn[$n++]=co,Wn[$n++]=Zi,lo=e.id,co=e.overflow,Zi=t),t=qv(t,r.children),t.flags|=4096,t)}function cT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jy(e.return,t,n)}function wy(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Q1(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Zt(e,t,r.children,n),r=Ke.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cT(e,n,t);else if(e.tag===19)cT(e,n,t);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(ze(Ke,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Qf(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),wy(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Qf(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}wy(t,!0,n,null,i);break;case"together":wy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _f(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function go(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l3(e,t,n){switch(t.tag){case 3:Y1(t),ba();break;case 5:E1(t);break;case 1:vn(t.type)&&jf(t);break;case 4:Bv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ze(qf,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ze(Ke,Ke.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?X1(e,t,n):(ze(Ke,Ke.current&1),e=go(e,t,n),e!==null?e.sibling:null);ze(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Q1(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ze(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,G1(e,t,n)}return go(e,t,n)}var Z1,av,J1,ek;Z1=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}};av=function(){};J1=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,qi(Fr.current);var i=null;switch(n){case"input":o=Iy(e,o),r=Iy(e,r),i=[];break;case"select":o=qe({},o,{value:void 0}),r=qe({},r,{value:void 0}),i=[];break;case"textarea":o=My(e,o),r=My(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Wf)}Oy(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(pc.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(pc.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&He("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};ek=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ql(e,t){if(!We)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 Ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function c3(e,t,n){var r=t.pendingProps;switch(Nv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(t),null;case 1:return vn(t.type)&&$f(),Ut(t),null;case 3:return r=t.stateNode,Ca(),Be(yn),Be(Wt),Vv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ur!==null&&(gv(ur),ur=null))),av(e,t),Ut(t),null;case 5:Uv(t);var o=qi(Tc.current);if(n=t.type,e!==null&&t.stateNode!=null)J1(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ut(t),null}if(e=qi(Fr.current),xf(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Lr]=t,r[Ec]=i,e=(t.mode&1)!==0,n){case"dialog":He("cancel",r),He("close",r);break;case"iframe":case"object":case"embed":He("load",r);break;case"video":case"audio":for(o=0;o<rc.length;o++)He(rc[o],r);break;case"source":He("error",r);break;case"img":case"image":case"link":He("error",r),He("load",r);break;case"details":He("toggle",r);break;case"input":yC(r,i),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},He("invalid",r);break;case"textarea":SC(r,i),He("invalid",r)}Oy(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Sf(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Sf(r.textContent,a,e),o=["children",""+a]):pc.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&He("scroll",r)}switch(n){case"input":af(r),vC(r,i,!0);break;case"textarea":af(r),xC(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Wf)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=PT(n)),e==="http://www.w3.org/1999/xhtml"?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[Lr]=t,e[Ec]=r,Z1(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ly(n,r),n){case"dialog":He("cancel",e),He("close",e),o=r;break;case"iframe":case"object":case"embed":He("load",e),o=r;break;case"video":case"audio":for(o=0;o<rc.length;o++)He(rc[o],e);o=r;break;case"source":He("error",e),o=r;break;case"img":case"image":case"link":He("error",e),He("load",e),o=r;break;case"details":He("toggle",e),o=r;break;case"input":yC(e,r),o=Iy(e,r),He("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=qe({},r,{value:void 0}),He("invalid",e);break;case"textarea":SC(e,r),o=My(e,r),He("invalid",e);break;default:o=r}Oy(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?_T(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&IT(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&mc(e,l):typeof l=="number"&&mc(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(pc.hasOwnProperty(i)?l!=null&&i==="onScroll"&&He("scroll",e):l!=null&&vv(e,i,l,s))}switch(n){case"input":af(e),vC(e,r,!1);break;case"textarea":af(e),xC(e);break;case"option":r.value!=null&&e.setAttribute("value",""+si(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ma(e,!!r.multiple,i,!1):r.defaultValue!=null&&ma(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Wf)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ut(t),null;case 6:if(e&&t.stateNode!=null)ek(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=qi(Tc.current),qi(Fr.current),xf(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(i=r.nodeValue!==n)&&(e=_n,e!==null))switch(e.tag){case 3:Sf(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sf(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Ut(t),null;case 13:if(Be(Ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&An!==null&&(t.mode&1)!==0&&(t.flags&128)===0)v1(),ba(),t.flags|=98560,i=!1;else if(i=xf(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[Lr]=t}else ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ut(t),i=!1}else ur!==null&&(gv(ur),ur=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ke.current&1)!==0?ut===0&&(ut=3):e0())),t.updateQueue!==null&&(t.flags|=4),Ut(t),null);case 4:return Ca(),av(e,t),e===null&&wc(t.stateNode.containerInfo),Ut(t),null;case 10:return Fv(t.type._context),Ut(t),null;case 17:return vn(t.type)&&$f(),Ut(t),null;case 19:if(Be(Ke),i=t.memoizedState,i===null)return Ut(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Ql(i,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Qf(e),s!==null){for(t.flags|=128,Ql(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,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.subtreeFlags=0,i.deletions=null,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 ze(Ke,Ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Je()>ka&&(t.flags|=128,r=!0,Ql(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ql(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!We)return Ut(t),null}else 2*Je()-i.renderingStartTime>ka&&n!==1073741824&&(t.flags|=128,r=!0,Ql(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,n=Ke.current,ze(Ke,r?n&1|2:n&1),t):(Ut(t),null);case 22:case 23:return Jv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(In&1073741824)!==0&&(Ut(t),t.subtreeFlags&6&&(t.flags|=8192)):Ut(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function u3(e,t){switch(Nv(t),t.tag){case 1:return vn(t.type)&&$f(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(),Be(yn),Be(Wt),Vv(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Uv(t),null;case 13:if(Be(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Ke),null;case 4:return Ca(),null;case 10:return Fv(t.type._context),null;case 22:case 23:return Jv(),null;case 24:return null;default:return null}}var Ef=!1,Vt=!1,d3=typeof WeakSet=="function"?WeakSet:Set,Q=null;function fa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function lv(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var uT=!1;function f3(e,t){if(jy=Bf,e=i1(),_v(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(x){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var p;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++c===o&&(a=s),d===i&&++u===r&&(l=s),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ky={focusedElem:e,selectionRange:n},Bf=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,h=t.stateNode,y=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:lr(t.type,g),v);h.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(x){Xe(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=uT,uT=!1,m}function uc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&lv(t,n,i)}o=o.next}while(o!==r)}}function pp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cv(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function tk(e){var t=e.alternate;t!==null&&(e.alternate=null,tk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Ec],delete t[Yy],delete t[qD],delete t[YD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nk(e){return e.tag===5||e.tag===3||e.tag===4}function dT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,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=Wf));else if(r!==4&&(e=e.child,e!==null))for(uv(e,t,n),e=e.sibling;e!==null;)uv(e,t,n),e=e.sibling}function dv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dv(e,t,n),e=e.sibling;e!==null;)dv(e,t,n),e=e.sibling}var _t=null,cr=!1;function jo(e,t,n){for(n=n.child;n!==null;)rk(e,t,n),n=n.sibling}function rk(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ip,n)}catch(a){}switch(n.tag){case 5:Vt||fa(n,t);case 6:var r=_t,o=cr;_t=null,jo(e,t,n),_t=r,cr=o,_t!==null&&(cr?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&(cr?(e=_t,n=n.stateNode,e.nodeType===8?my(e.parentNode,n):e.nodeType===1&&my(e,n),vc(e)):my(_t,n.stateNode));break;case 4:r=_t,o=cr,_t=n.stateNode.containerInfo,cr=!0,jo(e,t,n),_t=r,cr=o;break;case 0:case 11:case 14:case 15:if(!Vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&lv(n,t,s),o=o.next}while(o!==r)}jo(e,t,n);break;case 1:if(!Vt&&(fa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Xe(n,t,a)}jo(e,t,n);break;case 21:jo(e,t,n);break;case 22:n.mode&1?(Vt=(r=Vt)||n.memoizedState!==null,jo(e,t,n),Vt=r):jo(e,t,n);break;default:jo(e,t,n)}}function fT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new d3),t.forEach(function(r){var o=w3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ar(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:_t=a.stateNode,cr=!1;break e;case 3:_t=a.stateNode.containerInfo,cr=!0;break e;case 4:_t=a.stateNode.containerInfo,cr=!0;break e}a=a.return}if(_t===null)throw Error(H(160));rk(i,s,o),_t=null,cr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Xe(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ok(t,e),t=t.sibling}function ok(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ar(t,e),Nr(e),r&4){try{uc(3,e,e.return),pp(3,e)}catch(g){Xe(e,e.return,g)}try{uc(5,e,e.return)}catch(g){Xe(e,e.return,g)}}break;case 1:ar(t,e),Nr(e),r&512&&n!==null&&fa(n,n.return);break;case 5:if(ar(t,e),Nr(e),r&512&&n!==null&&fa(n,n.return),e.flags&32){var o=e.stateNode;try{mc(o,"")}catch(g){Xe(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&kT(o,i),Ly(a,s);var c=Ly(a,i);for(s=0;s<l.length;s+=2){var u=l[s],f=l[s+1];u==="style"?_T(o,f):u==="dangerouslySetInnerHTML"?IT(o,f):u==="children"?mc(o,f):vv(o,u,f,c)}switch(a){case"input":Ay(o,i);break;case"textarea":RT(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ma(o,!!i.multiple,p,!1):d!==!!i.multiple&&(i.defaultValue!=null?ma(o,!!i.multiple,i.defaultValue,!0):ma(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ec]=i}catch(g){Xe(e,e.return,g)}}break;case 6:if(ar(t,e),Nr(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Xe(e,e.return,g)}}break;case 3:if(ar(t,e),Nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vc(t.containerInfo)}catch(g){Xe(e,e.return,g)}break;case 4:ar(t,e),Nr(e);break;case 13:ar(t,e),Nr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Qv=Je())),r&4&&fT(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Vt=(c=Vt)||u,ar(t,e),Vt=c):ar(t,e),Nr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(Q=e,u=e.child;u!==null;){for(f=Q=u;Q!==null;){switch(d=Q,p=d.child,d.tag){case 0:case 11:case 14:case 15:uc(4,d,d.return);break;case 1:fa(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Xe(r,n,g)}}break;case 5:fa(d,d.return);break;case 22:if(d.memoizedState!==null){mT(f);continue}}p!==null?(p.return=d,Q=p):mT(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=AT("display",s))}catch(g){Xe(e,e.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){Xe(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ar(t,e),Nr(e),r&4&&fT(e);break;case 21:break;default:ar(t,e),Nr(e)}}function Nr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(nk(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(mc(o,""),r.flags&=-33);var i=dT(e);dv(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=dT(e);uv(e,a,s);break;default:throw Error(H(161))}}catch(l){Xe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p3(e,t,n){Q=e,ik(e,t,n)}function ik(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var o=Q,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ef;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Vt;a=Ef;var c=Vt;if(Ef=s,(Vt=l)&&!c)for(Q=o;Q!==null;)s=Q,l=s.child,s.tag===22&&s.memoizedState!==null?gT(o):l!==null?(l.return=s,Q=l):gT(o);for(;i!==null;)Q=i,ik(i,t,n),i=i.sibling;Q=o,Ef=a,Vt=c}pT(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,Q=i):pT(e,t,n)}}function pT(e){for(;Q!==null;){var t=Q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Vt||pp(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Vt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lr(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&QC(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}QC(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&vc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}Vt||t.flags&512&&cv(t)}catch(d){Xe(t,t.return,d)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function mT(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function gT(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pp(4,t)}catch(l){Xe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Xe(t,o,l)}}var i=t.return;try{cv(t)}catch(l){Xe(t,i,l)}break;case 5:var s=t.return;try{cv(t)}catch(l){Xe(t,s,l)}}}catch(l){Xe(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var m3=Math.ceil,ep=ho.ReactCurrentDispatcher,Yv=ho.ReactCurrentOwner,Kn=ho.ReactCurrentBatchConfig,Ce=0,xt=null,rt=null,Mt=0,In=0,pa=ci(0),ut=0,Ic=null,es=0,mp=0,Xv=0,dc=null,gn=null,Qv=0,ka=1/0,so=null,tp=!1,fv=null,ri=null,Cf=!1,Qo=null,np=0,fc=0,pv=null,Mf=-1,Nf=0;function Jt(){return(Ce&6)!==0?Je():Mf!==-1?Mf:Mf=Je()}function oi(e){return(e.mode&1)===0?1:(Ce&2)!==0&&Mt!==0?Mt&-Mt:QD.transition!==null?(Nf===0&&(Nf=WT()),Nf):(e=_e,e!==0||(e=window.event,e=e===void 0?16:XT(e.type)),e)}function fr(e,t,n,r){if(50<fc)throw fc=0,pv=null,Error(H(185));Ac(e,n,r),((Ce&2)===0||e!==xt)&&(e===xt&&((Ce&2)===0&&(mp|=n),ut===4&&Yo(e,Mt)),Sn(e,r),n===1&&Ce===0&&(t.mode&1)===0&&(ka=Je()+500,up&&ui()))}function Sn(e,t){var n=e.callbackNode;J2(e,t);var r=Hf(e,e===xt?Mt:0);if(r===0)n!==null&&EC(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&EC(n),t===1)e.tag===0?XD(hT.bind(null,e)):g1(hT.bind(null,e)),KD(function(){(Ce&6)===0&&ui()}),n=null;else{switch($T(r)){case 1:n=Ev;break;case 4:n=UT;break;case 16:n=zf;break;case 536870912:n=VT;break;default:n=zf}n=pk(n,sk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sk(e,t){if(Mf=-1,Nf=0,(Ce&6)!==0)throw Error(H(327));var n=e.callbackNode;if(Sa()&&e.callbackNode!==n)return null;var r=Hf(e,e===xt?Mt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=rp(e,r);else{t=r;var o=Ce;Ce|=2;var i=lk();(xt!==e||Mt!==t)&&(so=null,ka=Je()+500,Yi(e,t));do try{y3();break}catch(a){ak(e,a)}while(!0);Dv(),ep.current=i,Ce=o,rt!==null?t=0:(xt=null,Mt=0,t=ut)}if(t!==0){if(t===2&&(o=By(e),o!==0&&(r=o,t=mv(e,o))),t===1)throw n=Ic,Yi(e,0),Yo(e,r),Sn(e,Je()),n;if(t===6)Yo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!g3(o)&&(t=rp(e,r),t===2&&(i=By(e),i!==0&&(r=i,t=mv(e,i))),t===1))throw n=Ic,Yi(e,0),Yo(e,r),Sn(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:ji(e,gn,so);break;case 3:if(Yo(e,r),(r&130023424)===r&&(t=Qv+500-Je(),10<t)){if(Hf(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Jt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qy(ji.bind(null,e,gn,so),t);break}ji(e,gn,so);break;case 4:if(Yo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-dr(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m3(r/1960))-r,10<r){e.timeoutHandle=qy(ji.bind(null,e,gn,so),r);break}ji(e,gn,so);break;case 5:ji(e,gn,so);break;default:throw Error(H(329))}}}return Sn(e,Je()),e.callbackNode===n?sk.bind(null,e):null}function mv(e,t){var n=dc;return e.current.memoizedState.isDehydrated&&(Yi(e,t).flags|=256),e=rp(e,t),e!==2&&(t=gn,gn=n,t!==null&&gv(t)),e}function gv(e){gn===null?gn=e:gn.push.apply(gn,e)}function g3(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!pr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yo(e,t){for(t&=~Xv,t&=~mp,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dr(t),r=1<<n;e[n]=-1,t&=~r}}function hT(e){if((Ce&6)!==0)throw Error(H(327));Sa();var t=Hf(e,0);if((t&1)===0)return Sn(e,Je()),null;var n=rp(e,t);if(e.tag!==0&&n===2){var r=By(e);r!==0&&(t=r,n=mv(e,r))}if(n===1)throw n=Ic,Yi(e,0),Yo(e,t),Sn(e,Je()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ji(e,gn,so),Sn(e,Je()),null}function Zv(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(ka=Je()+500,up&&ui())}}function ts(e){Qo!==null&&Qo.tag===0&&(Ce&6)===0&&Sa();var t=Ce;Ce|=1;var n=Kn.transition,r=_e;try{if(Kn.transition=null,_e=1,e)return e()}finally{_e=r,Kn.transition=n,Ce=t,(Ce&6)===0&&ui()}}function Jv(){In=pa.current,Be(pa)}function Yi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jD(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(Nv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&$f();break;case 3:Ca(),Be(yn),Be(Wt),Vv();break;case 5:Uv(r);break;case 4:Ca();break;case 13:Be(Ke);break;case 19:Be(Ke);break;case 10:Fv(r.type._context);break;case 22:case 23:Jv()}n=n.return}if(xt=e,rt=e=ii(e.current,null),Mt=In=t,ut=0,Ic=null,Xv=mp=es=0,gn=dc=null,Gi!==null){for(t=0;t<Gi.length;t++)if(n=Gi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Gi=null}return e}function ak(e,t){do{var n=rt;try{if(Dv(),If.current=Jf,Zf){for(var r=Ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Zf=!1}if(Ji=0,St=ct=Ge=null,cc=!1,kc=0,Yv.current=null,n===null||n.return===null){ut=1,Ic=t,rt=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Mt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if((u.mode&1)===0&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=rT(s);if(p!==null){p.flags&=-257,oT(p,s,a,i,t),p.mode&1&&nT(i,c,t),t=p,l=c;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if((t&1)===0){nT(i,c,t),e0();break e}l=Error(H(426))}}else if(We&&a.mode&1){var v=rT(s);if(v!==null){(v.flags&65536)===0&&(v.flags|=256),oT(v,s,a,i,t),Ov(Ta(l,a));break e}}i=l=Ta(l,a),ut!==4&&(ut=2),dc===null?dc=[i]:dc.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=$1(i,l,t);XC(i,h);break e;case 1:a=l;var y=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ri===null||!ri.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=j1(i,a,t);XC(i,x);break e}}i=i.return}while(i!==null)}uk(n)}catch(T){t=T,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function lk(){var e=ep.current;return ep.current=Jf,e===null?Jf:e}function e0(){(ut===0||ut===3||ut===2)&&(ut=4),xt===null||(es&268435455)===0&&(mp&268435455)===0||Yo(xt,Mt)}function rp(e,t){var n=Ce;Ce|=2;var r=lk();(xt!==e||Mt!==t)&&(so=null,Yi(e,t));do try{h3();break}catch(o){ak(e,o)}while(!0);if(Dv(),Ce=n,ep.current=r,rt!==null)throw Error(H(261));return xt=null,Mt=0,ut}function h3(){for(;rt!==null;)ck(rt)}function y3(){for(;rt!==null&&!$2();)ck(rt)}function ck(e){var t=fk(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?uk(e):rt=t,Yv.current=null}function uk(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=c3(n,t,In),n!==null){rt=n;return}}else{if(n=u3(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,rt=null;return}}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);ut===0&&(ut=5)}function ji(e,t,n){var r=_e,o=Kn.transition;try{Kn.transition=null,_e=1,v3(e,t,n,r)}finally{Kn.transition=o,_e=r}return null}function v3(e,t,n,r){do Sa();while(Qo!==null);if((Ce&6)!==0)throw Error(H(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(eD(e,i),e===xt&&(rt=xt=null,Mt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Cf||(Cf=!0,pk(zf,function(){return Sa(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Kn.transition,Kn.transition=null;var s=_e;_e=1;var a=Ce;Ce|=4,Yv.current=null,f3(e,n),ok(n,e),BD(Ky),Bf=!!jy,Ky=jy=null,e.current=n,p3(n,e,o),j2(),Ce=a,_e=s,Kn.transition=i}else e.current=n;if(Cf&&(Cf=!1,Qo=e,np=o),i=e.pendingLanes,i===0&&(ri=null),q2(n.stateNode,r),Sn(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(tp)throw tp=!1,e=fv,fv=null,e;return(np&1)!==0&&e.tag!==0&&Sa(),i=e.pendingLanes,(i&1)!==0?e===pv?fc++:(fc=0,pv=e):fc=0,ui(),null}function Sa(){if(Qo!==null){var e=$T(np),t=Kn.transition,n=_e;try{if(Kn.transition=null,_e=16>e?16:e,Qo===null)var r=!1;else{if(e=Qo,Qo=null,np=0,(Ce&6)!==0)throw Error(H(331));var o=Ce;for(Ce|=4,Q=e.current;Q!==null;){var i=Q,s=i.child;if((Q.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Q=c;Q!==null;){var u=Q;switch(u.tag){case 0:case 11:case 15:uc(8,u,i)}var f=u.child;if(f!==null)f.return=u,Q=f;else for(;Q!==null;){u=Q;var d=u.sibling,p=u.return;if(tk(u),u===c){Q=null;break}if(d!==null){d.return=p,Q=d;break}Q=p}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}Q=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,Q=s;else e:for(;Q!==null;){if(i=Q,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:uc(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,Q=h;break e}Q=i.return}}var y=e.current;for(Q=y;Q!==null;){s=Q;var S=s.child;if((s.subtreeFlags&2064)!==0&&S!==null)S.return=s,Q=S;else e:for(s=y;Q!==null;){if(a=Q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:pp(9,a)}}catch(T){Xe(a,a.return,T)}if(a===s){Q=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,Q=x;break e}Q=a.return}}if(Ce=o,ui(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ip,e)}catch(T){}r=!0}return r}finally{_e=n,Kn.transition=t}}return!1}function yT(e,t,n){t=Ta(n,t),t=$1(e,t,1),e=ni(e,t,1),t=Jt(),e!==null&&(Ac(e,1,t),Sn(e,t))}function Xe(e,t,n){if(e.tag===3)yT(e,e,n);else for(;t!==null;){if(t.tag===3){yT(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ri===null||!ri.has(r))){e=Ta(n,e),e=j1(t,e,1),t=ni(t,e,1),e=Jt(),t!==null&&(Ac(t,1,e),Sn(t,e));break}}t=t.return}}function S3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Jt(),e.pingedLanes|=e.suspendedLanes&n,xt===e&&(Mt&n)===n&&(ut===4||ut===3&&(Mt&130023424)===Mt&&500>Je()-Qv?Yi(e,0):Xv|=n),Sn(e,t)}function dk(e,t){t===0&&((e.mode&1)===0?t=1:(t=uf,uf<<=1,(uf&130023424)===0&&(uf=4194304)));var n=Jt();e=mo(e,t),e!==null&&(Ac(e,t,n),Sn(e,n))}function x3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dk(e,n)}function w3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),dk(e,n)}var fk;fk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)hn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return hn=!1,l3(e,t,n);hn=(e.flags&131072)!==0}else hn=!1,We&&(t.flags&1048576)!==0&&h1(t,Gf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_f(e,t),e=t.pendingProps;var o=wa(t,Wt.current);va(t,n),o=$v(null,t,r,e,o,n);var i=jv();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vn(r)?(i=!0,jf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Hv(t),o.updater=fp,t.stateNode=o,o._reactInternals=t,tv(t,r,e,n),t=ov(null,t,r,!0,i,n)):(t.tag=0,We&&i&&Mv(t),Zt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_f(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=E3(r),e=lr(r,e),o){case 0:t=rv(null,t,r,e,n);break e;case 1:t=aT(null,t,r,e,n);break e;case 11:t=iT(null,t,r,e,n);break e;case 14:t=sT(null,t,r,lr(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),rv(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),aT(e,t,r,o,n);case 3:e:{if(Y1(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,b1(e,t),Xf(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ta(Error(H(423)),t),t=lT(e,t,r,n,o);break e}else if(r!==o){o=Ta(Error(H(424)),t),t=lT(e,t,r,n,o);break e}else for(An=ti(t.stateNode.containerInfo.firstChild),_n=t,We=!0,ur=null,n=x1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ba(),r===o){t=go(e,t,n);break e}Zt(e,t,r,n)}t=t.child}return t;case 5:return E1(t),e===null&&Zy(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Gy(r,o)?s=null:i!==null&&Gy(r,i)&&(t.flags|=32),q1(e,t),Zt(e,t,s,n),t.child;case 6:return e===null&&Zy(t),null;case 13:return X1(e,t,n);case 4:return Bv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Zt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),iT(e,t,r,o,n);case 7:return Zt(e,t,t.pendingProps,n),t.child;case 8:return Zt(e,t,t.pendingProps.children,n),t.child;case 12:return Zt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ze(qf,r._currentValue),r._currentValue=s,i!==null)if(pr(i.value,s)){if(i.children===o.children&&!yn.current){t=go(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=uo(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Jy(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(H(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Jy(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Zt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,va(t,n),o=Gn(o),r=r(o),t.flags|=1,Zt(e,t,r,n),t.child;case 14:return r=t.type,o=lr(r,t.pendingProps),o=lr(r.type,o),sT(e,t,r,o,n);case 15:return K1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),_f(e,t),t.tag=1,vn(r)?(e=!0,jf(t)):e=!1,va(t,n),W1(t,r,o),tv(t,r,o,n),ov(null,t,r,!0,e,n);case 19:return Q1(e,t,n);case 22:return G1(e,t,n)}throw Error(H(156,t.tag))};function pk(e,t){return BT(e,t)}function b3(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(e,t,n,r){return new b3(e,t,n,r)}function t0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function E3(e){if(typeof e=="function")return t0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xv)return 11;if(e===wv)return 14}return 2}function ii(e,t){var n=e.alternate;return n===null?(n=jn(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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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 Of(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")t0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ra:return Xi(n.children,o,i,t);case Sv:s=8,o|=8;break;case Ty:return e=jn(12,n,t,o|2),e.elementType=Ty,e.lanes=i,e;case ky:return e=jn(13,n,t,o),e.elementType=ky,e.lanes=i,e;case Ry:return e=jn(19,n,t,o),e.elementType=Ry,e.lanes=i,e;case ET:return gp(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wT:s=10;break e;case bT:s=9;break e;case xv:s=11;break e;case wv:s=14;break e;case Ko:s=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=jn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Xi(e,t,n,r){return e=jn(7,e,r,t),e.lanes=n,e}function gp(e,t,n,r){return e=jn(22,e,r,t),e.elementType=ET,e.lanes=n,e.stateNode={isHidden:!1},e}function by(e,t,n){return e=jn(6,e,null,t),e.lanes=n,e}function Ey(e,t,n){return t=jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function C3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sy(0),this.expirationTimes=sy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sy(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function n0(e,t,n,r,o,i,s,a,l){return e=new C3(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hv(i),e}function T3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:na,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function mk(e){if(!e)return ai;e=e._reactInternals;e:{if(rs(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(vn(n))return m1(e,n,t)}return t}function gk(e,t,n,r,o,i,s,a,l){return e=n0(n,r,!0,e,o,i,s,a,l),e.context=mk(null),n=e.current,r=Jt(),o=oi(n),i=uo(r,o),i.callback=t!=null?t:null,ni(n,i,o),e.current.lanes=o,Ac(e,o,r),Sn(e,r),e}function hp(e,t,n,r){var o=t.current,i=Jt(),s=oi(o);return n=mk(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ni(o,t,s),e!==null&&(fr(e,o,s,i),Pf(e,o,s)),s}function op(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function vT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function r0(e,t){vT(e,t),(e=e.alternate)&&vT(e,t)}function k3(){return null}var hk=typeof reportError=="function"?reportError:function(e){console.error(e)};function o0(e){this._internalRoot=e}yp.prototype.render=o0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));hp(e,t,null,null)};yp.prototype.unmount=o0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ts(function(){hp(null,e,null,null)}),t[po]=null}};function yp(e){this._internalRoot=e}yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=GT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qo.length&&t!==0&&t<qo[n].priority;n++);qo.splice(n,0,e),n===0&&YT(e)}};function i0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ST(){}function R3(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=op(s);i.call(c)}}var s=gk(t,r,e,0,null,!1,!1,"",ST);return e._reactRootContainer=s,e[po]=s.current,wc(e.nodeType===8?e.parentNode:e),ts(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=op(l);a.call(c)}}var l=n0(e,0,!1,null,null,!1,!1,"",ST);return e._reactRootContainer=l,e[po]=l.current,wc(e.nodeType===8?e.parentNode:e),ts(function(){hp(t,l,n,r)}),l}function Sp(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=op(s);a.call(l)}}hp(t,s,e,o)}else s=R3(n,t,e,o,r);return op(s)}jT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nc(t.pendingLanes);n!==0&&(Cv(t,n|1),Sn(t,Je()),(Ce&6)===0&&(ka=Je()+500,ui()))}break;case 13:ts(function(){var r=mo(e,1);if(r!==null){var o=Jt();fr(r,e,1,o)}}),r0(e,1)}};Tv=function(e){if(e.tag===13){var t=mo(e,134217728);if(t!==null){var n=Jt();fr(t,e,134217728,n)}r0(e,134217728)}};KT=function(e){if(e.tag===13){var t=oi(e),n=mo(e,t);if(n!==null){var r=Jt();fr(n,e,t,r)}r0(e,t)}};GT=function(){return _e};qT=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}};Fy=function(e,t,n){switch(t){case"input":if(Ay(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=cp(r);if(!o)throw Error(H(90));TT(r),Ay(r,o)}}}break;case"textarea":RT(e,n);break;case"select":t=n.value,t!=null&&ma(e,!!n.multiple,t,!1)}};OT=Zv;LT=ts;var P3={usingClientEntryPoint:!1,Events:[Mc,aa,cp,MT,NT,Zv]},Zl={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I3={bundleType:Zl.bundleType,version:Zl.version,rendererPackageName:Zl.rendererPackageName,rendererConfig:Zl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ho.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zT(e),e===null?null:e.stateNode},findFiberByHostInstance:Zl.findFiberByHostInstance||k3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Jl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Jl.isDisabled&&Jl.supportsFiber))try{ip=Jl.inject(I3),Dr=Jl}catch(e){}var Jl;On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P3;On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i0(t))throw Error(H(200));return T3(e,t,null,n)};On.createRoot=function(e,t){if(!i0(e))throw Error(H(299));var n=!1,r="",o=hk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=n0(e,1,!1,null,null,n,!1,r,o),e[po]=t.current,wc(e.nodeType===8?e.parentNode:e),new o0(t)};On.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=zT(t),e=e===null?null:e.stateNode,e};On.flushSync=function(e){return ts(e)};On.hydrate=function(e,t,n){if(!vp(t))throw Error(H(200));return Sp(null,e,t,!0,n)};On.hydrateRoot=function(e,t,n){if(!i0(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=hk;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=gk(t,null,e,1,n!=null?n:null,o,!1,i,s),e[po]=t.current,wc(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new yp(t)};On.render=function(e,t,n){if(!vp(t))throw Error(H(200));return Sp(null,e,t,!1,n)};On.unmountComponentAtNode=function(e){if(!vp(e))throw Error(H(40));return e._reactRootContainer?(ts(function(){Sp(null,null,e,!1,function(){e._reactRootContainer=null,e[po]=null})}),!0):!1};On.unstable_batchedUpdates=Zv;On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vp(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Sp(e,t,n,!1,r)};On.version="18.3.1-next-f1338f8080-20240426"});var Oc=un((WU,Sk)=>{"use strict";function vk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vk)}catch(e){console.error(e)}}vk(),Sk.exports=yk()});var oP=un(j0=>{"use strict";var rP=Oc();j0.createRoot=rP.createRoot,j0.hydrateRoot=rP.hydrateRoot;var KW});var X0=un((O$,gP)=>{"use strict";var CF="Expected a function",pP=NaN,TF="[object Symbol]",kF=/^\s+|\s+$/g,RF=/^[-+]0x[0-9a-f]+$/i,PF=/^0b[01]+$/i,IF=/^0o[0-7]+$/i,AF=parseInt,_F=typeof global=="object"&&global&&global.Object===Object&&global,MF=typeof self=="object"&&self&&self.Object===Object&&self,NF=_F||MF||Function("return this")(),OF=Object.prototype,LF=OF.toString,DF=Math.max,FF=Math.min,q0=function(){return NF.Date.now()};function zF(e,t,n){var r,o,i,s,a,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(CF);t=mP(t)||0,Y0(n)&&(u=!!n.leading,f="maxWait"in n,i=f?DF(mP(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(C){var k=r,R=o;return r=o=void 0,c=C,s=e.apply(R,k),s}function m(C){return c=C,a=setTimeout(h,t),u?p(C):s}function g(C){var k=C-l,R=C-c,F=t-k;return f?FF(F,i-R):F}function v(C){var k=C-l,R=C-c;return l===void 0||k>=t||k<0||f&&R>=i}function h(){var C=q0();if(v(C))return y(C);a=setTimeout(h,g(C))}function y(C){return a=void 0,d&&r?p(C):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function x(){return a===void 0?s:y(q0())}function T(){var C=q0(),k=v(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return m(l);if(f)return a=setTimeout(h,t),p(l)}return a===void 0&&(a=setTimeout(h,t)),s}return T.cancel=S,T.flush=x,T}function Y0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function HF(e){return!!e&&typeof e=="object"}function BF(e){return typeof e=="symbol"||HF(e)&&LF.call(e)==TF}function mP(e){if(typeof e=="number")return e;if(BF(e))return pP;if(Y0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Y0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(kF,"");var n=PF.test(e);return n||IF.test(e)?AF(e.slice(2),n?2:8):RF.test(e)?pP:+e}gP.exports=zF});var IP=un((lj,PP)=>{"use strict";var XF=/["'&<>]/;PP.exports=QF;function QF(e){var t=""+e,n=XF.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 yz={};ht(yz,{Card:()=>we,ContentEditableInput:()=>Rs,DeepdeskAPI:()=>Mo,DeepdeskSDK:()=>bu,HTTPClient:()=>As,InputMediator:()=>_o,InputType:()=>Ai,KeyboardHint:()=>Uu,Label:()=>Bx,Locale:()=>yl,Section:()=>Tr,SectionList:()=>Hs,Sources:()=>kr,Suggestion:()=>pe,SuggestionList:()=>Tt,TextAreaInput:()=>Ps,ToggleButton:()=>Ii,attachFile:()=>d_,authenticateWithKey:()=>f_,createFullRange:()=>tl,createOverlayContainer:()=>wu,createRangeFromOffsets:()=>Ti,escapeHTML:()=>ja,formatTextMarkup:()=>p_,getRangeOffsets:()=>vu,getRangeText:()=>Su,insertCKEditor:()=>y_,isHTML:()=>Zc,isSupportedInputElement:()=>Gm,logEvent:()=>Id,updateContentEditable:()=>g_,updateTextArea:()=>m_,useClickOutsideRoot:()=>di,useStyles:()=>z,waitForElementVisibilityChange:()=>Xm});var Eg=b(De()),Bn=b(Z());var Du=b(Z()),Ax=b(De());var cl=Du.default.createContext({});function z(e,t){let i=(0,Du.useContext)(cl),{debug:n}=i,o=ie(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let c=o==null?void 0:o[a];return A(E({},s),{[a]:(0,Ax.default)(l,c,n?`${e}__${a}`:!1)})},{})}var _x={root:"dd-4s9wq"};var Ri=b(I()),zu=()=>(0,Ri.jsxs)("svg",{className:_x.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ri.jsx)("defs",{children:(0,Ri.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Ri.jsx)("title",{children:"Failed loading image"}),(0,Ri.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 bg={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var Pi=b(I()),Hu=(0,Bn.createContext)(bg),lM=({title:e,src:t})=>{let n=(0,Bn.useContext)(Hu),[r,o]=(0,Bn.useState)(!1);return(0,Bn.useEffect)(()=>{o(!1)},[t]),(0,Pi.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Pi.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Pi.jsx)(zu,{})})},cM=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Bn.useContext)(Hu);return(0,Pi.jsx)("div",{className:(0,Eg.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},uM=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=ie(s,["as","cropText","className","children"]);let a=(0,Bn.useContext)(Hu);return Bn.default.createElement(e,E({className:(0,Eg.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Bu=({children:e})=>{let t=z("Card",bg);return(0,Pi.jsx)("div",{className:t.root,children:(0,Pi.jsx)(Hu.Provider,{value:t,children:e})})};Bu.Image=lM;Bu.Content=cM;Bu.Title=uM;var we=Bu;var Dx=b(De());var Lx={root:"dd-llBx9"};var Fx=b(I());var dM={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},fM=r=>{var o=r,{className:e,keyCode:t}=o,n=ie(o,["className","keyCode"]);let i=z("KeyboardHint",Lx);return(0,Fx.jsx)("span",E({"data-key":dM[t],className:(0,Dx.default)(e,i.root)},n))},Uu=fM;var Hx=b(De());var zx={root:"dd-e6HXZ"};var Ux=b(I()),pM=r=>{var o=r,{className:e,children:t}=o,n=ie(o,["className","children"]);let i=z("Label",zx);return(0,Ux.jsx)("span",A(E({},n),{className:(0,Hx.default)(e,i.root),children:t}))},Bx=pM;var Vx={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var zs=b(I()),mM=o=>{var i=o,{title:e,children:t,type:n}=i,r=ie(i,["title","children","type"]);let s=z("Section",Vx);return(0,zs.jsxs)("section",A(E({},r),{className:s.root,"data-section-type":n,children:[e&&(0,zs.jsx)("div",{className:s.subTitleContainer,children:(0,zs.jsx)("span",{className:s.subtitle,children:e})}),(0,zs.jsx)("div",{className:s.suggestions,children:t})]}))},Tr=mM;var Gx=b(De()),qx=b(Z());var Lo=b(Z()),jx=b(I()),Wx=(0,Lo.createContext)(null),$x=({scrollContainerRef:e,children:t})=>{let n=(0,Lo.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:i}=o.getBoundingClientRect(),{top:s}=r.getBoundingClientRect(),a=o.scrollTop+(s-i);typeof o.scrollTo=="function"?o.scrollTo({top:a}):o.scrollTop=a},[]);return(0,jx.jsx)(Wx.Provider,{value:n,children:t})},Vu=e=>{let t=(0,Lo.useContext)(Wx);(0,Lo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Kx={root:"dd-uoTXh"};var Cg=b(I()),gM=({className:e,children:t})=>{let n=z("SectionList",Kx),r=(0,qx.useRef)(null);return(0,Cg.jsx)($x,{scrollContainerRef:r,children:(0,Cg.jsx)("div",{ref:r,className:(0,Gx.default)(n.root,e),children:t})})},Hs=gM;var Bs=b(De()),dn=b(Z());var Tg={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonPrimary:"dd-aYDCB",buttonSecondary:"dd--cpPL",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var Yt=b(I()),Do=(0,dn.createContext)(Tg),hM=r=>{var o=r,{fixed:e,children:t}=o,n=ie(o,["fixed","children"]);let i=(0,dn.useContext)(Do);return(0,Yt.jsx)("div",A(E({},n),{className:(0,Bs.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function yM(l){var c=l,{as:e,className:t,icon:n,title:r,children:o,disabled:i,variant:s}=c,a=ie(c,["as","className","icon","title","children","disabled","variant"]);let u=(0,dn.useContext)(Do);return(0,Yt.jsxs)(e||"button",A(E({type:"button",className:(0,Bs.default)(u.button,{[u.buttonWithIcon]:n,[u.buttonDisabled]:i,[u.buttonPrimary]:s==="primary",[u.buttonSecondary]:s==="secondary"},t),title:r,"aria-label":r},a),{children:[n&&(0,Yt.jsx)("span",{className:u.icon,children:n}),o]}))}var vM=({children:e})=>{let t=(0,dn.useContext)(Do);return(0,Yt.jsx)("div",{className:t.buttonsContainer,children:e})},SM=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,dn.useContext)(Do);return(0,Yt.jsxs)("div",{className:(0,Bs.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,Yt.jsx)("ul",{className:i.dropdownList,children:o})]})},xM=({index:e,label:t,onClick:n})=>{let r=(0,dn.useContext)(Do);return(0,Yt.jsx)("li",{className:r.dropdownItem,children:(0,Yt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},wM=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,dn.useContext)(Do);return(0,Yt.jsx)("button",{type:"button",className:(0,Bs.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},bM=({labels:e})=>{let t=(0,dn.useContext)(Do);return(0,Yt.jsx)("div",{className:t.labels,children:e.map(n=>(0,Yt.jsx)("span",{className:t.label,children:n},n))})},Fo=dn.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=ie(l,["className","selected","onClick","children","as"]);let c=z("Suggestion",Tg),u=(0,dn.useCallback)(f=>{f.preventDefault(),n&&n(f)},[n]);return(0,Yt.jsx)(o,A(E({},i),{ref:s,className:(0,Bs.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,Yt.jsx)(Do.Provider,{value:c,children:r})}))});Fo.Labels=bM;Fo.Actions=hM;Fo.ActionButton=wM;Fo.DropdownButton=SM;Fo.DropdownItem=xM;Fo.ButtonsContainer=vM;Fo.Button=yM;var pe=Fo;var Xx=b(De());var Yx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var Qx=b(I()),EM=({withDivider:e,children:t})=>{let n=z("SuggestionList",Yx);return(0,Qx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Xx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Tt=EM;var Jx=b(De());var Zx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Wu=b(I()),CM=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=z("ToggleButton",Zx);return(0,Wu.jsx)("button",{type:"button",className:(0,Jx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Wu.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Wu.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Ii=CM;var ew=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,$u=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var tw=/x-deepdesk-(([a-z0-9\-_])+-version)/,ju=["cues","custom-data","custom-data-banner","knowledge-assist"],nw=Intl.DateTimeFormat().resolvedOptions().timeZone,kr=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v.STYLE="style",v))(kr||{}),Ai=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(Ai||{});var et=b(Z());var le=b(Z(),1),ww=b(sw(),1);var MM=le.version.startsWith("19"),NM=Symbol.for(MM?"react.transitional.element":"react.element"),OM=Symbol.for("react.portal"),LM=Symbol.for("react.fragment"),DM=Symbol.for("react.strict_mode"),FM=Symbol.for("react.profiler"),zM=Symbol.for("react.consumer"),HM=Symbol.for("react.context"),pw=Symbol.for("react.forward_ref"),BM=Symbol.for("react.suspense"),UM=Symbol.for("react.suspense_list"),_g=Symbol.for("react.memo"),VM=Symbol.for("react.lazy");var WM=pw,$M=_g;function jM(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case NM:switch(e=e.type,e){case LM:case FM:case DM:case BM:case UM:return e;default:switch(e=e&&e.$$typeof,e){case HM:case pw:case VM:case _g:return e;case zM:return e;default:return t}}case OM:return t}}}function KM(e){return jM(e)===_g}function GM(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,c,u,f,d;function p(y,S){return l=y,c=S,u=e(l,c),f=t(r,c),d=n(u,f,c),a=!0,d}function m(){return u=e(l,c),t.dependsOnOwnProps&&(f=t(r,c)),d=n(u,f,c),d}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(f=t(r,c)),d=n(u,f,c),d}function v(){let y=e(l,c),S=!s(y,u);return u=y,S&&(d=n(u,f,c)),d}function h(y,S){let x=!i(S,c),T=!o(y,l,S,c);return l=y,c=S,x&&T?m():x?g():T?v():d}return function(S,x){return a?h(S,x):p(S,x)}}function qM(e,i){var s=i,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=s,o=ie(s,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return GM(a,l,c,e,o)}function YM(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 Ig(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function aw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function mw(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=aw(e);let c=i(a,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=aw(c),c=i(a,l)),c},i}}function Mg(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function XM(e){return e&&typeof e=="object"?Ig(t=>YM(e,t)):e?typeof e=="function"?mw(e,"mapDispatchToProps"):Mg(e,"mapDispatchToProps"):Ig(t=>({dispatch:t}))}function QM(e){return e?typeof e=="function"?mw(e,"mapStateToProps"):Mg(e,"mapStateToProps"):Ig(()=>({}))}function ZM(e,t,n){return E(E(E({},n),e),t)}function JM(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,c,u){let f=e(l,c,u);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function eN(e){return e?typeof e=="function"?JM(e):Mg(e,"mergeProps"):()=>ZM}function tN(e){e()}function nN(){let e=null,t=null;return{clear(){e=null,t=null},notify(){tN(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var lw={notify(){},get:()=>[]};function gw(e,t){let n,r=lw,o=0,i=!1;function s(g){u();let v=r.subscribe(g),h=!1;return()=>{h||(h=!0,v(),f())}}function a(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=nN())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=lw)}function d(){i||(i=!0,u())}function p(){i&&(i=!1,f())}let m={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:p,getListeners:()=>r};return m}var rN=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",oN=rN(),iN=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",sN=iN(),aN=()=>oN||sN?le.useLayoutEffect:le.useEffect,Ku=aN();function cw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function kg(e,t){if(cw(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])||!cw(e[n[o]],t[n[o]]))return!1;return!0}var lN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},uN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},dN={[WM]:uN,[$M]:hw};function uw(e){return KM(e)?hw:dN[e.$$typeof]||lN}var fN=Object.defineProperty,pN=Object.getOwnPropertyNames,dw=Object.getOwnPropertySymbols,mN=Object.getOwnPropertyDescriptor,gN=Object.getPrototypeOf,fw=Object.prototype;function Ag(e,t){if(typeof t!="string"){if(fw){let i=gN(t);i&&i!==fw&&Ag(e,i)}let n=pN(t);dw&&(n=n.concat(dw(t)));let r=uw(e),o=uw(t);for(let i=0;i<n.length;++i){let s=n[i];if(!cN[s]&&!(o&&o[s])&&!(r&&r[s])){let a=mN(t,s);try{fN(e,s,a)}catch(l){}}}}return e}var Rg=Symbol.for("react-redux-context"),Pg=typeof globalThis!="undefined"?globalThis:{};function hN(){var n;if(!le.createContext)return{};let e=(n=Pg[Rg])!=null?n:Pg[Rg]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var Xr=hN(),yN=[null,null];function vN(e,t,n){Ku(()=>e(...t),n)}function SN(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function xN(e,t,n,r,o,i,s,a,l,c,u){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let g=t.getState(),v,h;try{v=r(g,o.current)}catch(y){h=y,d=y}h||(d=null),v===i.current?s.current||c():(i.current=v,l.current=v,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wN(e,t){return e===t}function bN(e,t,n,{pure:r,areStatesEqual:o=wN,areOwnPropsEqual:i=kg,areStatePropsEqual:s=kg,areMergedPropsEqual:a=kg,forwardRef:l=!1,context:c=Xr}={}){let u=c,f=QM(e),d=XM(t),p=eN(n),m=!!e;return v=>{let h=v.displayName||v.name||"Component",y=`Connect(${h})`,S={shouldHandleStateChanges:m,displayName:y,wrappedComponentName:h,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[R,F,O]=le.useMemo(()=>{let me=k,{reactReduxForwardedRef:oe}=me,re=ie(me,["reactReduxForwardedRef"]);return[k.context,oe,re]},[k]),U=le.useMemo(()=>{let oe=u;return R!=null&&R.Consumer,oe},[R,u]),J=le.useContext(U),Y=!!k.store&&!!k.store.getState&&!!k.store.dispatch,_=!!J&&!!J.store,V=Y?k.store:J.store,B=_?J.getServerState:V.getState,W=le.useMemo(()=>qM(V.dispatch,S),[V]),[N,q]=le.useMemo(()=>{if(!m)return yN;let oe=gw(V,Y?void 0:J.subscription),re=oe.notifyNestedSubs.bind(oe);return[oe,re]},[V,Y,J]),j=le.useMemo(()=>Y?J:A(E({},J),{subscription:N}),[Y,J,N]),K=le.useRef(void 0),ue=le.useRef(O),ne=le.useRef(void 0),Qe=le.useRef(!1),Se=le.useRef(!1),tt=le.useRef(void 0);Ku(()=>(Se.current=!0,()=>{Se.current=!1}),[]);let pt=le.useMemo(()=>()=>ne.current&&O===ue.current?ne.current:W(V.getState(),O),[V,O]),Le=le.useMemo(()=>re=>N?xN(m,V,N,W,ue,K,Qe,Se,ne,q,re):()=>{},[N]);vN(SN,[ue,K,Qe,O,ne,q]);let Ne;try{Ne=le.useSyncExternalStore(Le,pt,B?()=>W(B(),O):pt)}catch(oe){throw tt.current&&(oe.message+=`
8
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function wy(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function rv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var s3=typeof WeakMap=="function"?WeakMap:Map;function j1(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){tp||(tp=!0,pv=r),rv(e,t)},n}function K1(e,t,n){n=uo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){rv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rv(e,t),typeof r!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function rT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new s3;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=x3.bind(null,e,t,n),t.then(e,e))}function oT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function iT(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,ni(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var a3=ho.ReactCurrentOwner,hn=!1;function Jt(e,t,n,r){t.child=e===null?w1(t,null,n,r):Ea(t,e.child,n,r)}function sT(e,t,n,r,o){n=n.render;var i=t.ref;return va(t,o),r=jv(e,t,n,r,i,o),n=Kv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,go(e,t,o)):(We&&n&&Nv(t),t.flags|=1,Jt(e,t,r,o),t.child)}function aT(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!n0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,G1(e,t,i,r,o)):(e=Of(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:xc,n(s,r)&&e.ref===t.ref)return go(e,t,o)}return t.flags|=1,e=ii(i,r),e.ref=t.ref,e.return=t,t.child=e}function G1(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(xc(i,r)&&e.ref===t.ref)if(hn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(hn=!0);else return t.lanes=e.lanes,go(e,t,o)}return ov(e,t,n,r,o)}function q1(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(pa,In),In|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(pa,In),In|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ze(pa,In),In|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ze(pa,In),In|=r;return Jt(e,t,o,n),t.child}function Y1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ov(e,t,n,r,o){var i=vn(n)?Qi:Wt.current;return i=wa(t,i),va(t,o),n=jv(e,t,n,r,i,o),r=Kv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,go(e,t,o)):(We&&r&&Nv(t),t.flags|=1,Jt(e,t,n,o),t.child)}function lT(e,t,n,r,o){if(vn(n)){var i=!0;jf(t)}else i=!1;if(va(t,o),t.stateNode===null)_f(e,t),$1(t,n,r),nv(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Gn(c):(c=vn(n)?Qi:Wt.current,c=wa(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&nT(t,s,r,c),Go=!1;var d=t.memoizedState;s.state=d,Xf(t,r,s,o),l=t.memoizedState,a!==r||d!==l||yn.current||Go?(typeof u=="function"&&(tv(t,n,u,r),l=t.memoizedState),(a=Go||tT(t,n,a,r,d,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,E1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:lr(t.type,a),s.props=c,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Gn(l):(l=vn(n)?Qi:Wt.current,l=wa(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&nT(t,s,r,l),Go=!1,d=t.memoizedState,s.state=d,Xf(t,r,s,o);var m=t.memoizedState;a!==f||d!==m||yn.current||Go?(typeof p=="function"&&(tv(t,n,p,r),m=t.memoizedState),(c=Go||tT(t,n,c,r,d,m,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(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|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=l,r=c):(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|=1024),r=!1)}return iv(e,t,n,r,i,o)}function iv(e,t,n,r,o,i){Y1(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&GC(t,n,!1),go(e,t,i);r=t.stateNode,a3.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,a,i)):Jt(e,t,a,i),t.memoizedState=r.state,o&&GC(t,n,!0),t.child}function X1(e){var t=e.stateNode;t.pendingContext?KC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&KC(e,t.context,!1),Uv(e,t.containerInfo)}function cT(e,t,n,r,o){return ba(),Lv(o),t.flags|=256,Jt(e,t,n,r),t.child}var sv={dehydrated:null,treeContext:null,retryLane:0};function av(e){return{baseLanes:e,cachePool:null,transitions:null}}function Q1(e,t,n){var r=t.pendingProps,o=Ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ze(Ke,o&1),e===null)return Jy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=gp(s,r,0,null),e=Xi(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=av(n),t.memoizedState=sv,e):Yv(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return l3(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ii(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=ii(a,i):(i=Xi(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?av(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=sv,r}return i=e.child,e=i.sibling,r=ii(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Yv(e,t){return t=gp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bf(e,t,n,r){return r!==null&&Lv(r),Ea(t,e.child,null,n),e=Yv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function l3(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=wy(Error(H(422))),bf(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=gp({mode:"visible",children:r.children},o,0,null),i=Xi(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Ea(t,e.child,null,s),t.child.memoizedState=av(s),t.memoizedState=sv,i);if((t.mode&1)===0)return bf(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(H(419)),r=wy(i,r,void 0),bf(e,t,s,r)}if(a=(s&e.childLanes)!==0,hn||a){if(r=xt,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,mo(e,o),fr(r,e,o,-1))}return t0(),r=wy(Error(H(421))),bf(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=w3.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,An=ti(o.nextSibling),_n=t,We=!0,ur=null,e!==null&&(Wn[$n++]=lo,Wn[$n++]=co,Wn[$n++]=Zi,lo=e.id,co=e.overflow,Zi=t),t=Yv(t,r.children),t.flags|=4096,t)}function uT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ev(e.return,t,n)}function by(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Z1(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Jt(e,t,r.children,n),r=Ke.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uT(e,n,t);else if(e.tag===19)uT(e,n,t);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(ze(Ke,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Qf(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),by(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Qf(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}by(t,!0,n,null,i);break;case"together":by(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _f(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function go(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function c3(e,t,n){switch(t.tag){case 3:X1(t),ba();break;case 5:C1(t);break;case 1:vn(t.type)&&jf(t);break;case 4:Uv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ze(qf,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ze(Ke,Ke.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Q1(e,t,n):(ze(Ke,Ke.current&1),e=go(e,t,n),e!==null?e.sibling:null);ze(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Z1(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ze(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,q1(e,t,n)}return go(e,t,n)}var J1,lv,ek,tk;J1=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}};lv=function(){};ek=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,qi(Fr.current);var i=null;switch(n){case"input":o=Ay(e,o),r=Ay(e,r),i=[];break;case"select":o=qe({},o,{value:void 0}),r=qe({},r,{value:void 0}),i=[];break;case"textarea":o=Ny(e,o),r=Ny(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Wf)}Ly(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(pc.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(pc.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&He("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};tk=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ql(e,t){if(!We)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 Ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function u3(e,t,n){var r=t.pendingProps;switch(Ov(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(t),null;case 1:return vn(t.type)&&$f(),Ut(t),null;case 3:return r=t.stateNode,Ca(),Be(yn),Be(Wt),Wv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ur!==null&&(hv(ur),ur=null))),lv(e,t),Ut(t),null;case 5:Vv(t);var o=qi(Tc.current);if(n=t.type,e!==null&&t.stateNode!=null)ek(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ut(t),null}if(e=qi(Fr.current),xf(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Lr]=t,r[Ec]=i,e=(t.mode&1)!==0,n){case"dialog":He("cancel",r),He("close",r);break;case"iframe":case"object":case"embed":He("load",r);break;case"video":case"audio":for(o=0;o<rc.length;o++)He(rc[o],r);break;case"source":He("error",r);break;case"img":case"image":case"link":He("error",r),He("load",r);break;case"details":He("toggle",r);break;case"input":vC(r,i),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},He("invalid",r);break;case"textarea":xC(r,i),He("invalid",r)}Ly(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Sf(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Sf(r.textContent,a,e),o=["children",""+a]):pc.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&He("scroll",r)}switch(n){case"input":af(r),SC(r,i,!0);break;case"textarea":af(r),wC(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Wf)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=IT(n)),e==="http://www.w3.org/1999/xhtml"?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[Lr]=t,e[Ec]=r,J1(e,t,!1,!1),t.stateNode=e;e:{switch(s=Dy(n,r),n){case"dialog":He("cancel",e),He("close",e),o=r;break;case"iframe":case"object":case"embed":He("load",e),o=r;break;case"video":case"audio":for(o=0;o<rc.length;o++)He(rc[o],e);o=r;break;case"source":He("error",e),o=r;break;case"img":case"image":case"link":He("error",e),He("load",e),o=r;break;case"details":He("toggle",e),o=r;break;case"input":vC(e,r),o=Ay(e,r),He("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=qe({},r,{value:void 0}),He("invalid",e);break;case"textarea":xC(e,r),o=Ny(e,r),He("invalid",e);break;default:o=r}Ly(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?MT(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&AT(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&mc(e,l):typeof l=="number"&&mc(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(pc.hasOwnProperty(i)?l!=null&&i==="onScroll"&&He("scroll",e):l!=null&&Sv(e,i,l,s))}switch(n){case"input":af(e),SC(e,r,!1);break;case"textarea":af(e),wC(e);break;case"option":r.value!=null&&e.setAttribute("value",""+si(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ma(e,!!r.multiple,i,!1):r.defaultValue!=null&&ma(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Wf)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ut(t),null;case 6:if(e&&t.stateNode!=null)tk(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=qi(Tc.current),qi(Fr.current),xf(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(i=r.nodeValue!==n)&&(e=_n,e!==null))switch(e.tag){case 3:Sf(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sf(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Ut(t),null;case 13:if(Be(Ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&An!==null&&(t.mode&1)!==0&&(t.flags&128)===0)S1(),ba(),t.flags|=98560,i=!1;else if(i=xf(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[Lr]=t}else ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ut(t),i=!1}else ur!==null&&(hv(ur),ur=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ke.current&1)!==0?ut===0&&(ut=3):t0())),t.updateQueue!==null&&(t.flags|=4),Ut(t),null);case 4:return Ca(),lv(e,t),e===null&&wc(t.stateNode.containerInfo),Ut(t),null;case 10:return zv(t.type._context),Ut(t),null;case 17:return vn(t.type)&&$f(),Ut(t),null;case 19:if(Be(Ke),i=t.memoizedState,i===null)return Ut(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Ql(i,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Qf(e),s!==null){for(t.flags|=128,Ql(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,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.subtreeFlags=0,i.deletions=null,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 ze(Ke,Ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Je()>ka&&(t.flags|=128,r=!0,Ql(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ql(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!We)return Ut(t),null}else 2*Je()-i.renderingStartTime>ka&&n!==1073741824&&(t.flags|=128,r=!0,Ql(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,n=Ke.current,ze(Ke,r?n&1|2:n&1),t):(Ut(t),null);case 22:case 23:return e0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(In&1073741824)!==0&&(Ut(t),t.subtreeFlags&6&&(t.flags|=8192)):Ut(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function d3(e,t){switch(Ov(t),t.tag){case 1:return vn(t.type)&&$f(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(),Be(yn),Be(Wt),Wv(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Vv(t),null;case 13:if(Be(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Ke),null;case 4:return Ca(),null;case 10:return zv(t.type._context),null;case 22:case 23:return e0(),null;case 24:return null;default:return null}}var Ef=!1,Vt=!1,f3=typeof WeakSet=="function"?WeakSet:Set,Q=null;function fa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function cv(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var dT=!1;function p3(e,t){if(Ky=Bf,e=s1(),Mv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(x){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var p;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++c===o&&(a=s),d===i&&++u===r&&(l=s),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gy={focusedElem:e,selectionRange:n},Bf=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,h=t.stateNode,y=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:lr(t.type,g),v);h.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(x){Xe(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=dT,dT=!1,m}function uc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&cv(t,n,i)}o=o.next}while(o!==r)}}function pp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function uv(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function nk(e){var t=e.alternate;t!==null&&(e.alternate=null,nk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Ec],delete t[Xy],delete t[YD],delete t[XD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rk(e){return e.tag===5||e.tag===3||e.tag===4}function fT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,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=Wf));else if(r!==4&&(e=e.child,e!==null))for(dv(e,t,n),e=e.sibling;e!==null;)dv(e,t,n),e=e.sibling}function fv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(fv(e,t,n),e=e.sibling;e!==null;)fv(e,t,n),e=e.sibling}var _t=null,cr=!1;function jo(e,t,n){for(n=n.child;n!==null;)ok(e,t,n),n=n.sibling}function ok(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ip,n)}catch(a){}switch(n.tag){case 5:Vt||fa(n,t);case 6:var r=_t,o=cr;_t=null,jo(e,t,n),_t=r,cr=o,_t!==null&&(cr?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&(cr?(e=_t,n=n.stateNode,e.nodeType===8?gy(e.parentNode,n):e.nodeType===1&&gy(e,n),vc(e)):gy(_t,n.stateNode));break;case 4:r=_t,o=cr,_t=n.stateNode.containerInfo,cr=!0,jo(e,t,n),_t=r,cr=o;break;case 0:case 11:case 14:case 15:if(!Vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&cv(n,t,s),o=o.next}while(o!==r)}jo(e,t,n);break;case 1:if(!Vt&&(fa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Xe(n,t,a)}jo(e,t,n);break;case 21:jo(e,t,n);break;case 22:n.mode&1?(Vt=(r=Vt)||n.memoizedState!==null,jo(e,t,n),Vt=r):jo(e,t,n);break;default:jo(e,t,n)}}function pT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f3),t.forEach(function(r){var o=b3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ar(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:_t=a.stateNode,cr=!1;break e;case 3:_t=a.stateNode.containerInfo,cr=!0;break e;case 4:_t=a.stateNode.containerInfo,cr=!0;break e}a=a.return}if(_t===null)throw Error(H(160));ok(i,s,o),_t=null,cr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Xe(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ik(t,e),t=t.sibling}function ik(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ar(t,e),Nr(e),r&4){try{uc(3,e,e.return),pp(3,e)}catch(g){Xe(e,e.return,g)}try{uc(5,e,e.return)}catch(g){Xe(e,e.return,g)}}break;case 1:ar(t,e),Nr(e),r&512&&n!==null&&fa(n,n.return);break;case 5:if(ar(t,e),Nr(e),r&512&&n!==null&&fa(n,n.return),e.flags&32){var o=e.stateNode;try{mc(o,"")}catch(g){Xe(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&RT(o,i),Dy(a,s);var c=Dy(a,i);for(s=0;s<l.length;s+=2){var u=l[s],f=l[s+1];u==="style"?MT(o,f):u==="dangerouslySetInnerHTML"?AT(o,f):u==="children"?mc(o,f):Sv(o,u,f,c)}switch(a){case"input":_y(o,i);break;case"textarea":PT(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ma(o,!!i.multiple,p,!1):d!==!!i.multiple&&(i.defaultValue!=null?ma(o,!!i.multiple,i.defaultValue,!0):ma(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ec]=i}catch(g){Xe(e,e.return,g)}}break;case 6:if(ar(t,e),Nr(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Xe(e,e.return,g)}}break;case 3:if(ar(t,e),Nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vc(t.containerInfo)}catch(g){Xe(e,e.return,g)}break;case 4:ar(t,e),Nr(e);break;case 13:ar(t,e),Nr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Zv=Je())),r&4&&pT(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Vt=(c=Vt)||u,ar(t,e),Vt=c):ar(t,e),Nr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(Q=e,u=e.child;u!==null;){for(f=Q=u;Q!==null;){switch(d=Q,p=d.child,d.tag){case 0:case 11:case 14:case 15:uc(4,d,d.return);break;case 1:fa(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Xe(r,n,g)}}break;case 5:fa(d,d.return);break;case 22:if(d.memoizedState!==null){gT(f);continue}}p!==null?(p.return=d,Q=p):gT(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=_T("display",s))}catch(g){Xe(e,e.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){Xe(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ar(t,e),Nr(e),r&4&&pT(e);break;case 21:break;default:ar(t,e),Nr(e)}}function Nr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(rk(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(mc(o,""),r.flags&=-33);var i=fT(e);fv(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=fT(e);dv(e,a,s);break;default:throw Error(H(161))}}catch(l){Xe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function m3(e,t,n){Q=e,sk(e,t,n)}function sk(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var o=Q,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ef;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Vt;a=Ef;var c=Vt;if(Ef=s,(Vt=l)&&!c)for(Q=o;Q!==null;)s=Q,l=s.child,s.tag===22&&s.memoizedState!==null?hT(o):l!==null?(l.return=s,Q=l):hT(o);for(;i!==null;)Q=i,sk(i,t,n),i=i.sibling;Q=o,Ef=a,Vt=c}mT(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,Q=i):mT(e,t,n)}}function mT(e){for(;Q!==null;){var t=Q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Vt||pp(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Vt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lr(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&ZC(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ZC(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&vc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}Vt||t.flags&512&&uv(t)}catch(d){Xe(t,t.return,d)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function gT(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function hT(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pp(4,t)}catch(l){Xe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Xe(t,o,l)}}var i=t.return;try{uv(t)}catch(l){Xe(t,i,l)}break;case 5:var s=t.return;try{uv(t)}catch(l){Xe(t,s,l)}}}catch(l){Xe(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var g3=Math.ceil,ep=ho.ReactCurrentDispatcher,Xv=ho.ReactCurrentOwner,Kn=ho.ReactCurrentBatchConfig,Ce=0,xt=null,rt=null,Mt=0,In=0,pa=ci(0),ut=0,Ic=null,es=0,mp=0,Qv=0,dc=null,gn=null,Zv=0,ka=1/0,so=null,tp=!1,pv=null,ri=null,Cf=!1,Qo=null,np=0,fc=0,mv=null,Mf=-1,Nf=0;function en(){return(Ce&6)!==0?Je():Mf!==-1?Mf:Mf=Je()}function oi(e){return(e.mode&1)===0?1:(Ce&2)!==0&&Mt!==0?Mt&-Mt:ZD.transition!==null?(Nf===0&&(Nf=$T()),Nf):(e=_e,e!==0||(e=window.event,e=e===void 0?16:QT(e.type)),e)}function fr(e,t,n,r){if(50<fc)throw fc=0,mv=null,Error(H(185));Ac(e,n,r),((Ce&2)===0||e!==xt)&&(e===xt&&((Ce&2)===0&&(mp|=n),ut===4&&Yo(e,Mt)),Sn(e,r),n===1&&Ce===0&&(t.mode&1)===0&&(ka=Je()+500,up&&ui()))}function Sn(e,t){var n=e.callbackNode;eD(e,t);var r=Hf(e,e===xt?Mt:0);if(r===0)n!==null&&CC(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&CC(n),t===1)e.tag===0?QD(yT.bind(null,e)):h1(yT.bind(null,e)),GD(function(){(Ce&6)===0&&ui()}),n=null;else{switch(jT(r)){case 1:n=Cv;break;case 4:n=VT;break;case 16:n=zf;break;case 536870912:n=WT;break;default:n=zf}n=mk(n,ak.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ak(e,t){if(Mf=-1,Nf=0,(Ce&6)!==0)throw Error(H(327));var n=e.callbackNode;if(Sa()&&e.callbackNode!==n)return null;var r=Hf(e,e===xt?Mt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=rp(e,r);else{t=r;var o=Ce;Ce|=2;var i=ck();(xt!==e||Mt!==t)&&(so=null,ka=Je()+500,Yi(e,t));do try{v3();break}catch(a){lk(e,a)}while(!0);Fv(),ep.current=i,Ce=o,rt!==null?t=0:(xt=null,Mt=0,t=ut)}if(t!==0){if(t===2&&(o=Uy(e),o!==0&&(r=o,t=gv(e,o))),t===1)throw n=Ic,Yi(e,0),Yo(e,r),Sn(e,Je()),n;if(t===6)Yo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!h3(o)&&(t=rp(e,r),t===2&&(i=Uy(e),i!==0&&(r=i,t=gv(e,i))),t===1))throw n=Ic,Yi(e,0),Yo(e,r),Sn(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:ji(e,gn,so);break;case 3:if(Yo(e,r),(r&130023424)===r&&(t=Zv+500-Je(),10<t)){if(Hf(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){en(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Yy(ji.bind(null,e,gn,so),t);break}ji(e,gn,so);break;case 4:if(Yo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-dr(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*g3(r/1960))-r,10<r){e.timeoutHandle=Yy(ji.bind(null,e,gn,so),r);break}ji(e,gn,so);break;case 5:ji(e,gn,so);break;default:throw Error(H(329))}}}return Sn(e,Je()),e.callbackNode===n?ak.bind(null,e):null}function gv(e,t){var n=dc;return e.current.memoizedState.isDehydrated&&(Yi(e,t).flags|=256),e=rp(e,t),e!==2&&(t=gn,gn=n,t!==null&&hv(t)),e}function hv(e){gn===null?gn=e:gn.push.apply(gn,e)}function h3(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!pr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yo(e,t){for(t&=~Qv,t&=~mp,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dr(t),r=1<<n;e[n]=-1,t&=~r}}function yT(e){if((Ce&6)!==0)throw Error(H(327));Sa();var t=Hf(e,0);if((t&1)===0)return Sn(e,Je()),null;var n=rp(e,t);if(e.tag!==0&&n===2){var r=Uy(e);r!==0&&(t=r,n=gv(e,r))}if(n===1)throw n=Ic,Yi(e,0),Yo(e,t),Sn(e,Je()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ji(e,gn,so),Sn(e,Je()),null}function Jv(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(ka=Je()+500,up&&ui())}}function ts(e){Qo!==null&&Qo.tag===0&&(Ce&6)===0&&Sa();var t=Ce;Ce|=1;var n=Kn.transition,r=_e;try{if(Kn.transition=null,_e=1,e)return e()}finally{_e=r,Kn.transition=n,Ce=t,(Ce&6)===0&&ui()}}function e0(){In=pa.current,Be(pa)}function Yi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,KD(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(Ov(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&$f();break;case 3:Ca(),Be(yn),Be(Wt),Wv();break;case 5:Vv(r);break;case 4:Ca();break;case 13:Be(Ke);break;case 19:Be(Ke);break;case 10:zv(r.type._context);break;case 22:case 23:e0()}n=n.return}if(xt=e,rt=e=ii(e.current,null),Mt=In=t,ut=0,Ic=null,Qv=mp=es=0,gn=dc=null,Gi!==null){for(t=0;t<Gi.length;t++)if(n=Gi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Gi=null}return e}function lk(e,t){do{var n=rt;try{if(Fv(),If.current=Jf,Zf){for(var r=Ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Zf=!1}if(Ji=0,St=ct=Ge=null,cc=!1,kc=0,Xv.current=null,n===null||n.return===null){ut=1,Ic=t,rt=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Mt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if((u.mode&1)===0&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=oT(s);if(p!==null){p.flags&=-257,iT(p,s,a,i,t),p.mode&1&&rT(i,c,t),t=p,l=c;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if((t&1)===0){rT(i,c,t),t0();break e}l=Error(H(426))}}else if(We&&a.mode&1){var v=oT(s);if(v!==null){(v.flags&65536)===0&&(v.flags|=256),iT(v,s,a,i,t),Lv(Ta(l,a));break e}}i=l=Ta(l,a),ut!==4&&(ut=2),dc===null?dc=[i]:dc.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=j1(i,l,t);QC(i,h);break e;case 1:a=l;var y=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ri===null||!ri.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=K1(i,a,t);QC(i,x);break e}}i=i.return}while(i!==null)}dk(n)}catch(T){t=T,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function ck(){var e=ep.current;return ep.current=Jf,e===null?Jf:e}function t0(){(ut===0||ut===3||ut===2)&&(ut=4),xt===null||(es&268435455)===0&&(mp&268435455)===0||Yo(xt,Mt)}function rp(e,t){var n=Ce;Ce|=2;var r=ck();(xt!==e||Mt!==t)&&(so=null,Yi(e,t));do try{y3();break}catch(o){lk(e,o)}while(!0);if(Fv(),Ce=n,ep.current=r,rt!==null)throw Error(H(261));return xt=null,Mt=0,ut}function y3(){for(;rt!==null;)uk(rt)}function v3(){for(;rt!==null&&!j2();)uk(rt)}function uk(e){var t=pk(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?dk(e):rt=t,Xv.current=null}function dk(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=u3(n,t,In),n!==null){rt=n;return}}else{if(n=d3(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,rt=null;return}}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);ut===0&&(ut=5)}function ji(e,t,n){var r=_e,o=Kn.transition;try{Kn.transition=null,_e=1,S3(e,t,n,r)}finally{Kn.transition=o,_e=r}return null}function S3(e,t,n,r){do Sa();while(Qo!==null);if((Ce&6)!==0)throw Error(H(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(tD(e,i),e===xt&&(rt=xt=null,Mt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Cf||(Cf=!0,mk(zf,function(){return Sa(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Kn.transition,Kn.transition=null;var s=_e;_e=1;var a=Ce;Ce|=4,Xv.current=null,p3(e,n),ik(n,e),UD(Gy),Bf=!!Ky,Gy=Ky=null,e.current=n,m3(n,e,o),K2(),Ce=a,_e=s,Kn.transition=i}else e.current=n;if(Cf&&(Cf=!1,Qo=e,np=o),i=e.pendingLanes,i===0&&(ri=null),Y2(n.stateNode,r),Sn(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(tp)throw tp=!1,e=pv,pv=null,e;return(np&1)!==0&&e.tag!==0&&Sa(),i=e.pendingLanes,(i&1)!==0?e===mv?fc++:(fc=0,mv=e):fc=0,ui(),null}function Sa(){if(Qo!==null){var e=jT(np),t=Kn.transition,n=_e;try{if(Kn.transition=null,_e=16>e?16:e,Qo===null)var r=!1;else{if(e=Qo,Qo=null,np=0,(Ce&6)!==0)throw Error(H(331));var o=Ce;for(Ce|=4,Q=e.current;Q!==null;){var i=Q,s=i.child;if((Q.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Q=c;Q!==null;){var u=Q;switch(u.tag){case 0:case 11:case 15:uc(8,u,i)}var f=u.child;if(f!==null)f.return=u,Q=f;else for(;Q!==null;){u=Q;var d=u.sibling,p=u.return;if(nk(u),u===c){Q=null;break}if(d!==null){d.return=p,Q=d;break}Q=p}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}Q=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,Q=s;else e:for(;Q!==null;){if(i=Q,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:uc(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,Q=h;break e}Q=i.return}}var y=e.current;for(Q=y;Q!==null;){s=Q;var S=s.child;if((s.subtreeFlags&2064)!==0&&S!==null)S.return=s,Q=S;else e:for(s=y;Q!==null;){if(a=Q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:pp(9,a)}}catch(T){Xe(a,a.return,T)}if(a===s){Q=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,Q=x;break e}Q=a.return}}if(Ce=o,ui(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ip,e)}catch(T){}r=!0}return r}finally{_e=n,Kn.transition=t}}return!1}function vT(e,t,n){t=Ta(n,t),t=j1(e,t,1),e=ni(e,t,1),t=en(),e!==null&&(Ac(e,1,t),Sn(e,t))}function Xe(e,t,n){if(e.tag===3)vT(e,e,n);else for(;t!==null;){if(t.tag===3){vT(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ri===null||!ri.has(r))){e=Ta(n,e),e=K1(t,e,1),t=ni(t,e,1),e=en(),t!==null&&(Ac(t,1,e),Sn(t,e));break}}t=t.return}}function x3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=en(),e.pingedLanes|=e.suspendedLanes&n,xt===e&&(Mt&n)===n&&(ut===4||ut===3&&(Mt&130023424)===Mt&&500>Je()-Zv?Yi(e,0):Qv|=n),Sn(e,t)}function fk(e,t){t===0&&((e.mode&1)===0?t=1:(t=uf,uf<<=1,(uf&130023424)===0&&(uf=4194304)));var n=en();e=mo(e,t),e!==null&&(Ac(e,t,n),Sn(e,n))}function w3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fk(e,n)}function b3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),fk(e,n)}var pk;pk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)hn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return hn=!1,c3(e,t,n);hn=(e.flags&131072)!==0}else hn=!1,We&&(t.flags&1048576)!==0&&y1(t,Gf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_f(e,t),e=t.pendingProps;var o=wa(t,Wt.current);va(t,n),o=jv(null,t,r,e,o,n);var i=Kv();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vn(r)?(i=!0,jf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Bv(t),o.updater=fp,t.stateNode=o,o._reactInternals=t,nv(t,r,e,n),t=iv(null,t,r,!0,i,n)):(t.tag=0,We&&i&&Nv(t),Jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_f(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=C3(r),e=lr(r,e),o){case 0:t=ov(null,t,r,e,n);break e;case 1:t=lT(null,t,r,e,n);break e;case 11:t=sT(null,t,r,e,n);break e;case 14:t=aT(null,t,r,lr(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),ov(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),lT(e,t,r,o,n);case 3:e:{if(X1(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,E1(e,t),Xf(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ta(Error(H(423)),t),t=cT(e,t,r,n,o);break e}else if(r!==o){o=Ta(Error(H(424)),t),t=cT(e,t,r,n,o);break e}else for(An=ti(t.stateNode.containerInfo.firstChild),_n=t,We=!0,ur=null,n=w1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ba(),r===o){t=go(e,t,n);break e}Jt(e,t,r,n)}t=t.child}return t;case 5:return C1(t),e===null&&Jy(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,qy(r,o)?s=null:i!==null&&qy(r,i)&&(t.flags|=32),Y1(e,t),Jt(e,t,s,n),t.child;case 6:return e===null&&Jy(t),null;case 13:return Q1(e,t,n);case 4:return Uv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),sT(e,t,r,o,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ze(qf,r._currentValue),r._currentValue=s,i!==null)if(pr(i.value,s)){if(i.children===o.children&&!yn.current){t=go(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=uo(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ev(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(H(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ev(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,va(t,n),o=Gn(o),r=r(o),t.flags|=1,Jt(e,t,r,n),t.child;case 14:return r=t.type,o=lr(r,t.pendingProps),o=lr(r.type,o),aT(e,t,r,o,n);case 15:return G1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lr(r,o),_f(e,t),t.tag=1,vn(r)?(e=!0,jf(t)):e=!1,va(t,n),$1(t,r,o),nv(t,r,o,n),iv(null,t,r,!0,e,n);case 19:return Z1(e,t,n);case 22:return q1(e,t,n)}throw Error(H(156,t.tag))};function mk(e,t){return UT(e,t)}function E3(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(e,t,n,r){return new E3(e,t,n,r)}function n0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function C3(e){if(typeof e=="function")return n0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wv)return 11;if(e===bv)return 14}return 2}function ii(e,t){var n=e.alternate;return n===null?(n=jn(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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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 Of(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")n0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ra:return Xi(n.children,o,i,t);case xv:s=8,o|=8;break;case ky:return e=jn(12,n,t,o|2),e.elementType=ky,e.lanes=i,e;case Ry:return e=jn(13,n,t,o),e.elementType=Ry,e.lanes=i,e;case Py:return e=jn(19,n,t,o),e.elementType=Py,e.lanes=i,e;case CT:return gp(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bT:s=10;break e;case ET:s=9;break e;case wv:s=11;break e;case bv:s=14;break e;case Ko:s=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=jn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Xi(e,t,n,r){return e=jn(7,e,r,t),e.lanes=n,e}function gp(e,t,n,r){return e=jn(22,e,r,t),e.elementType=CT,e.lanes=n,e.stateNode={isHidden:!1},e}function Ey(e,t,n){return e=jn(6,e,null,t),e.lanes=n,e}function Cy(e,t,n){return t=jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function T3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ay(0),this.expirationTimes=ay(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ay(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function r0(e,t,n,r,o,i,s,a,l){return e=new T3(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bv(i),e}function k3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:na,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function gk(e){if(!e)return ai;e=e._reactInternals;e:{if(rs(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(vn(n))return g1(e,n,t)}return t}function hk(e,t,n,r,o,i,s,a,l){return e=r0(n,r,!0,e,o,i,s,a,l),e.context=gk(null),n=e.current,r=en(),o=oi(n),i=uo(r,o),i.callback=t!=null?t:null,ni(n,i,o),e.current.lanes=o,Ac(e,o,r),Sn(e,r),e}function hp(e,t,n,r){var o=t.current,i=en(),s=oi(o);return n=gk(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ni(o,t,s),e!==null&&(fr(e,o,s,i),Pf(e,o,s)),s}function op(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function ST(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function o0(e,t){ST(e,t),(e=e.alternate)&&ST(e,t)}function R3(){return null}var yk=typeof reportError=="function"?reportError:function(e){console.error(e)};function i0(e){this._internalRoot=e}yp.prototype.render=i0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));hp(e,t,null,null)};yp.prototype.unmount=i0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ts(function(){hp(null,e,null,null)}),t[po]=null}};function yp(e){this._internalRoot=e}yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=qT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qo.length&&t!==0&&t<qo[n].priority;n++);qo.splice(n,0,e),n===0&&XT(e)}};function s0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xT(){}function P3(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=op(s);i.call(c)}}var s=hk(t,r,e,0,null,!1,!1,"",xT);return e._reactRootContainer=s,e[po]=s.current,wc(e.nodeType===8?e.parentNode:e),ts(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=op(l);a.call(c)}}var l=r0(e,0,!1,null,null,!1,!1,"",xT);return e._reactRootContainer=l,e[po]=l.current,wc(e.nodeType===8?e.parentNode:e),ts(function(){hp(t,l,n,r)}),l}function Sp(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=op(s);a.call(l)}}hp(t,s,e,o)}else s=P3(n,t,e,o,r);return op(s)}KT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nc(t.pendingLanes);n!==0&&(Tv(t,n|1),Sn(t,Je()),(Ce&6)===0&&(ka=Je()+500,ui()))}break;case 13:ts(function(){var r=mo(e,1);if(r!==null){var o=en();fr(r,e,1,o)}}),o0(e,1)}};kv=function(e){if(e.tag===13){var t=mo(e,134217728);if(t!==null){var n=en();fr(t,e,134217728,n)}o0(e,134217728)}};GT=function(e){if(e.tag===13){var t=oi(e),n=mo(e,t);if(n!==null){var r=en();fr(n,e,t,r)}o0(e,t)}};qT=function(){return _e};YT=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}};zy=function(e,t,n){switch(t){case"input":if(_y(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=cp(r);if(!o)throw Error(H(90));kT(r),_y(r,o)}}}break;case"textarea":PT(e,n);break;case"select":t=n.value,t!=null&&ma(e,!!n.multiple,t,!1)}};LT=Jv;DT=ts;var I3={usingClientEntryPoint:!1,Events:[Mc,aa,cp,NT,OT,Jv]},Zl={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A3={bundleType:Zl.bundleType,version:Zl.version,rendererPackageName:Zl.rendererPackageName,rendererConfig:Zl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ho.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=HT(e),e===null?null:e.stateNode},findFiberByHostInstance:Zl.findFiberByHostInstance||R3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Jl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Jl.isDisabled&&Jl.supportsFiber))try{ip=Jl.inject(A3),Dr=Jl}catch(e){}var Jl;On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I3;On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s0(t))throw Error(H(200));return k3(e,t,null,n)};On.createRoot=function(e,t){if(!s0(e))throw Error(H(299));var n=!1,r="",o=yk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=r0(e,1,!1,null,null,n,!1,r,o),e[po]=t.current,wc(e.nodeType===8?e.parentNode:e),new i0(t)};On.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=HT(t),e=e===null?null:e.stateNode,e};On.flushSync=function(e){return ts(e)};On.hydrate=function(e,t,n){if(!vp(t))throw Error(H(200));return Sp(null,e,t,!0,n)};On.hydrateRoot=function(e,t,n){if(!s0(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=yk;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=hk(t,null,e,1,n!=null?n:null,o,!1,i,s),e[po]=t.current,wc(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new yp(t)};On.render=function(e,t,n){if(!vp(t))throw Error(H(200));return Sp(null,e,t,!1,n)};On.unmountComponentAtNode=function(e){if(!vp(e))throw Error(H(40));return e._reactRootContainer?(ts(function(){Sp(null,null,e,!1,function(){e._reactRootContainer=null,e[po]=null})}),!0):!1};On.unstable_batchedUpdates=Jv;On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vp(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Sp(e,t,n,!1,r)};On.version="18.3.1-next-f1338f8080-20240426"});var Oc=un(($U,xk)=>{"use strict";function Sk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sk)}catch(e){console.error(e)}}Sk(),xk.exports=vk()});var iP=un(K0=>{"use strict";var oP=Oc();K0.createRoot=oP.createRoot,K0.hydrateRoot=oP.hydrateRoot;var GW});var Q0=un((L$,hP)=>{"use strict";var TF="Expected a function",mP=NaN,kF="[object Symbol]",RF=/^\s+|\s+$/g,PF=/^[-+]0x[0-9a-f]+$/i,IF=/^0b[01]+$/i,AF=/^0o[0-7]+$/i,_F=parseInt,MF=typeof global=="object"&&global&&global.Object===Object&&global,NF=typeof self=="object"&&self&&self.Object===Object&&self,OF=MF||NF||Function("return this")(),LF=Object.prototype,DF=LF.toString,FF=Math.max,zF=Math.min,Y0=function(){return OF.Date.now()};function HF(e,t,n){var r,o,i,s,a,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(TF);t=gP(t)||0,X0(n)&&(u=!!n.leading,f="maxWait"in n,i=f?FF(gP(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(C){var k=r,R=o;return r=o=void 0,c=C,s=e.apply(R,k),s}function m(C){return c=C,a=setTimeout(h,t),u?p(C):s}function g(C){var k=C-l,R=C-c,O=t-k;return f?zF(O,i-R):O}function v(C){var k=C-l,R=C-c;return l===void 0||k>=t||k<0||f&&R>=i}function h(){var C=Y0();if(v(C))return y(C);a=setTimeout(h,g(C))}function y(C){return a=void 0,d&&r?p(C):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function x(){return a===void 0?s:y(Y0())}function T(){var C=Y0(),k=v(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return m(l);if(f)return a=setTimeout(h,t),p(l)}return a===void 0&&(a=setTimeout(h,t)),s}return T.cancel=S,T.flush=x,T}function X0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function BF(e){return!!e&&typeof e=="object"}function UF(e){return typeof e=="symbol"||BF(e)&&DF.call(e)==kF}function gP(e){if(typeof e=="number")return e;if(UF(e))return mP;if(X0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=X0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(RF,"");var n=IF.test(e);return n||AF.test(e)?_F(e.slice(2),n?2:8):PF.test(e)?mP:+e}hP.exports=HF});var AP=un((cj,IP)=>{"use strict";var QF=/["'&<>]/;IP.exports=ZF;function ZF(e){var t=""+e,n=QF.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 vz={};ht(vz,{Card:()=>be,ContentEditableInput:()=>Rs,DeepdeskAPI:()=>Mo,DeepdeskSDK:()=>bu,HTTPClient:()=>As,InputMediator:()=>_o,InputType:()=>Ai,KeyboardHint:()=>Uu,Label:()=>Ux,Locale:()=>yl,Section:()=>Tr,SectionList:()=>Hs,Sources:()=>kr,Suggestion:()=>pe,SuggestionList:()=>Tt,TextAreaInput:()=>Ps,ToggleButton:()=>Ii,attachFile:()=>f_,authenticateWithKey:()=>p_,createFullRange:()=>tl,createOverlayContainer:()=>wu,createRangeFromOffsets:()=>Ti,escapeHTML:()=>ja,formatTextMarkup:()=>m_,getRangeOffsets:()=>vu,getRangeText:()=>Su,insertCKEditor:()=>v_,isHTML:()=>Zc,isSupportedInputElement:()=>Gm,logEvent:()=>Id,updateContentEditable:()=>h_,updateTextArea:()=>g_,useClickOutsideRoot:()=>di,useStyles:()=>z,waitForElementVisibilityChange:()=>Xm});var Eg=b(De()),Bn=b(Z());var Du=b(Z()),_x=b(De());var cl=Du.default.createContext({});function z(e,t){let i=(0,Du.useContext)(cl),{debug:n}=i,o=ie(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let c=o==null?void 0:o[a];return A(E({},s),{[a]:(0,_x.default)(l,c,n?`${e}__${a}`:!1)})},{})}var Mx={root:"dd-4s9wq"};var Ri=b(I()),zu=()=>(0,Ri.jsxs)("svg",{className:Mx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ri.jsx)("defs",{children:(0,Ri.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Ri.jsx)("title",{children:"Failed loading image"}),(0,Ri.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 bg={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var Pi=b(I()),Hu=(0,Bn.createContext)(bg),cM=({title:e,src:t})=>{let n=(0,Bn.useContext)(Hu),[r,o]=(0,Bn.useState)(!1);return(0,Bn.useEffect)(()=>{o(!1)},[t]),(0,Pi.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Pi.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Pi.jsx)(zu,{})})},uM=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Bn.useContext)(Hu);return(0,Pi.jsx)("div",{className:(0,Eg.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},dM=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=ie(s,["as","cropText","className","children"]);let a=(0,Bn.useContext)(Hu);return Bn.default.createElement(e,E({className:(0,Eg.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Bu=({children:e})=>{let t=z("Card",bg);return(0,Pi.jsx)("div",{className:t.root,children:(0,Pi.jsx)(Hu.Provider,{value:t,children:e})})};Bu.Image=cM;Bu.Content=uM;Bu.Title=dM;var be=Bu;var Fx=b(De());var Dx={root:"dd-llBx9"};var zx=b(I());var fM={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},pM=r=>{var o=r,{className:e,keyCode:t}=o,n=ie(o,["className","keyCode"]);let i=z("KeyboardHint",Dx);return(0,zx.jsx)("span",E({"data-key":fM[t],className:(0,Fx.default)(e,i.root)},n))},Uu=pM;var Bx=b(De());var Hx={root:"dd-e6HXZ"};var Vx=b(I()),mM=r=>{var o=r,{className:e,children:t}=o,n=ie(o,["className","children"]);let i=z("Label",Hx);return(0,Vx.jsx)("span",A(E({},n),{className:(0,Bx.default)(e,i.root),children:t}))},Ux=mM;var Wx={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var zs=b(I()),gM=o=>{var i=o,{title:e,children:t,type:n}=i,r=ie(i,["title","children","type"]);let s=z("Section",Wx);return(0,zs.jsxs)("section",A(E({},r),{className:s.root,"data-section-type":n,children:[e&&(0,zs.jsx)("div",{className:s.subTitleContainer,children:(0,zs.jsx)("span",{className:s.subtitle,children:e})}),(0,zs.jsx)("div",{className:s.suggestions,children:t})]}))},Tr=gM;var qx=b(De()),Yx=b(Z());var Lo=b(Z()),Kx=b(I()),$x=(0,Lo.createContext)(null),jx=({scrollContainerRef:e,children:t})=>{let n=(0,Lo.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:i}=o.getBoundingClientRect(),{top:s}=r.getBoundingClientRect(),a=o.scrollTop+(s-i);typeof o.scrollTo=="function"?o.scrollTo({top:a}):o.scrollTop=a},[]);return(0,Kx.jsx)($x.Provider,{value:n,children:t})},Vu=e=>{let t=(0,Lo.useContext)($x);(0,Lo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Gx={root:"dd-uoTXh"};var Cg=b(I()),hM=({className:e,children:t})=>{let n=z("SectionList",Gx),r=(0,Yx.useRef)(null);return(0,Cg.jsx)(jx,{scrollContainerRef:r,children:(0,Cg.jsx)("div",{ref:r,className:(0,qx.default)(n.root,e),children:t})})},Hs=hM;var Bs=b(De()),dn=b(Z());var Tg={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonPrimary:"dd-aYDCB",buttonSecondary:"dd--cpPL",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var Xt=b(I()),Do=(0,dn.createContext)(Tg),yM=r=>{var o=r,{fixed:e,children:t}=o,n=ie(o,["fixed","children"]);let i=(0,dn.useContext)(Do);return(0,Xt.jsx)("div",A(E({},n),{className:(0,Bs.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function vM(l){var c=l,{as:e,className:t,icon:n,title:r,children:o,disabled:i,variant:s}=c,a=ie(c,["as","className","icon","title","children","disabled","variant"]);let u=(0,dn.useContext)(Do);return(0,Xt.jsxs)(e||"button",A(E({type:"button",className:(0,Bs.default)(u.button,{[u.buttonWithIcon]:n,[u.buttonDisabled]:i,[u.buttonPrimary]:s==="primary",[u.buttonSecondary]:s==="secondary"},t),title:r,"aria-label":r},a),{children:[n&&(0,Xt.jsx)("span",{className:u.icon,children:n}),o]}))}var SM=({children:e})=>{let t=(0,dn.useContext)(Do);return(0,Xt.jsx)("div",{className:t.buttonsContainer,children:e})},xM=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,dn.useContext)(Do);return(0,Xt.jsxs)("div",{className:(0,Bs.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})]})},wM=({index:e,label:t,onClick:n})=>{let r=(0,dn.useContext)(Do);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})})},bM=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,dn.useContext)(Do);return(0,Xt.jsx)("button",{type:"button",className:(0,Bs.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},EM=({labels:e})=>{let t=(0,dn.useContext)(Do);return(0,Xt.jsx)("div",{className:t.labels,children:e.map(n=>(0,Xt.jsx)("span",{className:t.label,children:n},n))})},Fo=dn.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=ie(l,["className","selected","onClick","children","as"]);let c=z("Suggestion",Tg),u=(0,dn.useCallback)(f=>{f.preventDefault(),n&&n(f)},[n]);return(0,Xt.jsx)(o,A(E({},i),{ref:s,className:(0,Bs.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,Xt.jsx)(Do.Provider,{value:c,children:r})}))});Fo.Labels=EM;Fo.Actions=yM;Fo.ActionButton=bM;Fo.DropdownButton=xM;Fo.DropdownItem=wM;Fo.ButtonsContainer=SM;Fo.Button=vM;var pe=Fo;var Qx=b(De());var Xx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var Zx=b(I()),CM=({withDivider:e,children:t})=>{let n=z("SuggestionList",Xx);return(0,Zx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Qx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Tt=CM;var ew=b(De());var Jx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Wu=b(I()),TM=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=z("ToggleButton",Jx);return(0,Wu.jsx)("button",{type:"button",className:(0,ew.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Wu.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Wu.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Ii=TM;var tw=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,$u=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var nw=/x-deepdesk-(([a-z0-9\-_])+-version)/,ju=["cues","custom-data","custom-data-banner","knowledge-assist"],rw=Intl.DateTimeFormat().resolvedOptions().timeZone,kr=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v.STYLE="style",v))(kr||{}),Ai=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(Ai||{});var et=b(Z());var le=b(Z(),1),bw=b(aw(),1);var NM=le.version.startsWith("19"),OM=Symbol.for(NM?"react.transitional.element":"react.element"),LM=Symbol.for("react.portal"),DM=Symbol.for("react.fragment"),FM=Symbol.for("react.strict_mode"),zM=Symbol.for("react.profiler"),HM=Symbol.for("react.consumer"),BM=Symbol.for("react.context"),mw=Symbol.for("react.forward_ref"),UM=Symbol.for("react.suspense"),VM=Symbol.for("react.suspense_list"),_g=Symbol.for("react.memo"),WM=Symbol.for("react.lazy");var $M=mw,jM=_g;function KM(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case OM:switch(e=e.type,e){case DM:case zM:case FM:case UM:case VM:return e;default:switch(e=e&&e.$$typeof,e){case BM:case mw:case WM:case _g:return e;case HM:return e;default:return t}}case LM:return t}}}function GM(e){return KM(e)===_g}function qM(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,c,u,f,d;function p(y,S){return l=y,c=S,u=e(l,c),f=t(r,c),d=n(u,f,c),a=!0,d}function m(){return u=e(l,c),t.dependsOnOwnProps&&(f=t(r,c)),d=n(u,f,c),d}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(f=t(r,c)),d=n(u,f,c),d}function v(){let y=e(l,c),S=!s(y,u);return u=y,S&&(d=n(u,f,c)),d}function h(y,S){let x=!i(S,c),T=!o(y,l,S,c);return l=y,c=S,x&&T?m():x?g():T?v():d}return function(S,x){return a?h(S,x):p(S,x)}}function YM(e,i){var s=i,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=s,o=ie(s,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return qM(a,l,c,e,o)}function XM(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 Ig(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function lw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function gw(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=lw(e);let c=i(a,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=lw(c),c=i(a,l)),c},i}}function Mg(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function QM(e){return e&&typeof e=="object"?Ig(t=>XM(e,t)):e?typeof e=="function"?gw(e,"mapDispatchToProps"):Mg(e,"mapDispatchToProps"):Ig(t=>({dispatch:t}))}function ZM(e){return e?typeof e=="function"?gw(e,"mapStateToProps"):Mg(e,"mapStateToProps"):Ig(()=>({}))}function JM(e,t,n){return E(E(E({},n),e),t)}function eN(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,c,u){let f=e(l,c,u);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function tN(e){return e?typeof e=="function"?eN(e):Mg(e,"mergeProps"):()=>JM}function nN(e){e()}function rN(){let e=null,t=null;return{clear(){e=null,t=null},notify(){nN(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var cw={notify(){},get:()=>[]};function hw(e,t){let n,r=cw,o=0,i=!1;function s(g){u();let v=r.subscribe(g),h=!1;return()=>{h||(h=!0,v(),f())}}function a(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=rN())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=cw)}function d(){i||(i=!0,u())}function p(){i&&(i=!1,f())}let m={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:p,getListeners:()=>r};return m}var oN=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",iN=oN(),sN=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",aN=sN(),lN=()=>iN||aN?le.useLayoutEffect:le.useEffect,Ku=lN();function uw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function kg(e,t){if(uw(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])||!uw(e[n[o]],t[n[o]]))return!1;return!0}var cN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fN={[$M]:dN,[jM]:yw};function dw(e){return GM(e)?yw:fN[e.$$typeof]||cN}var pN=Object.defineProperty,mN=Object.getOwnPropertyNames,fw=Object.getOwnPropertySymbols,gN=Object.getOwnPropertyDescriptor,hN=Object.getPrototypeOf,pw=Object.prototype;function Ag(e,t){if(typeof t!="string"){if(pw){let i=hN(t);i&&i!==pw&&Ag(e,i)}let n=mN(t);fw&&(n=n.concat(fw(t)));let r=dw(e),o=dw(t);for(let i=0;i<n.length;++i){let s=n[i];if(!uN[s]&&!(o&&o[s])&&!(r&&r[s])){let a=gN(t,s);try{pN(e,s,a)}catch(l){}}}}return e}var Rg=Symbol.for("react-redux-context"),Pg=typeof globalThis!="undefined"?globalThis:{};function yN(){var n;if(!le.createContext)return{};let e=(n=Pg[Rg])!=null?n:Pg[Rg]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var Xr=yN(),vN=[null,null];function SN(e,t,n){Ku(()=>e(...t),n)}function xN(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function wN(e,t,n,r,o,i,s,a,l,c,u){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let g=t.getState(),v,h;try{v=r(g,o.current)}catch(y){h=y,d=y}h||(d=null),v===i.current?s.current||c():(i.current=v,l.current=v,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function bN(e,t){return e===t}function EN(e,t,n,{pure:r,areStatesEqual:o=bN,areOwnPropsEqual:i=kg,areStatePropsEqual:s=kg,areMergedPropsEqual:a=kg,forwardRef:l=!1,context:c=Xr}={}){let u=c,f=ZM(e),d=QM(t),p=tN(n),m=!!e;return v=>{let h=v.displayName||v.name||"Component",y=`Connect(${h})`,S={shouldHandleStateChanges:m,displayName:y,wrappedComponentName:h,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[R,O,L]=le.useMemo(()=>{let me=k,{reactReduxForwardedRef:oe}=me,re=ie(me,["reactReduxForwardedRef"]);return[k.context,oe,re]},[k]),U=le.useMemo(()=>{let oe=u;return R!=null&&R.Consumer,oe},[R,u]),J=le.useContext(U),Y=!!k.store&&!!k.store.getState&&!!k.store.dispatch,_=!!J&&!!J.store,V=Y?k.store:J.store,B=_?J.getServerState:V.getState,W=le.useMemo(()=>YM(V.dispatch,S),[V]),[N,q]=le.useMemo(()=>{if(!m)return vN;let oe=hw(V,Y?void 0:J.subscription),re=oe.notifyNestedSubs.bind(oe);return[oe,re]},[V,Y,J]),j=le.useMemo(()=>Y?J:A(E({},J),{subscription:N}),[Y,J,N]),K=le.useRef(void 0),ue=le.useRef(L),ne=le.useRef(void 0),Qe=le.useRef(!1),Se=le.useRef(!1),tt=le.useRef(void 0);Ku(()=>(Se.current=!0,()=>{Se.current=!1}),[]);let pt=le.useMemo(()=>()=>ne.current&&L===ue.current?ne.current:W(V.getState(),L),[V,L]),Le=le.useMemo(()=>re=>N?wN(m,V,N,W,ue,K,Qe,Se,ne,q,re):()=>{},[N]);SN(xN,[ue,K,Qe,L,ne,q]);let Ne;try{Ne=le.useSyncExternalStore(Le,pt,B?()=>W(B(),L):pt)}catch(oe){throw tt.current&&(oe.message+=`
9
9
  The error may be correlated with this previous error:
10
10
  ${tt.current.stack}
11
11
 
12
- `),oe}Ku(()=>{tt.current=void 0,ne.current=void 0,K.current=Ne});let at=le.useMemo(()=>le.createElement(v,A(E({},Ne),{ref:F})),[F,v,Ne]);return le.useMemo(()=>m?le.createElement(U.Provider,{value:j},at):at,[U,at,j])}let C=le.memo(x);if(C.WrappedComponent=v,C.displayName=x.displayName=y,l){let R=le.forwardRef(function(O,U){return le.createElement(C,A(E({},O),{reactReduxForwardedRef:U}))});return R.displayName=y,R.WrappedComponent=v,Ag(R,v)}return Ag(C,v)}}var yw=bN;function EN(e){let{children:t,context:n,serverState:r,store:o}=e,i=le.useMemo(()=>{let l=gw(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),s=le.useMemo(()=>o.getState(),[o]);return Ku(()=>{let{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]),le.createElement((n||Xr).Provider,{value:i},t)}var vw=EN;function Ng(e=Xr){return function(){return le.useContext(e)}}var Sw=Ng();function xw(e=Xr){let t=e===Xr?Sw:Ng(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var CN=xw();function TN(e=Xr){let t=e===Xr?CN:xw(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Ee=TN(),kN=(e,t)=>e===t;function RN(e=Xr){let t=e===Xr?Sw:Ng(e),n=(r,o={})=>{let{equalityFn:i=kN}=typeof o=="function"?{equalityFn:o}:o,s=t(),{store:a,subscription:l,getServerState:c}=s,u=le.useRef(!0),f=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),d=(0,ww.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,f,i);return le.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var G=RN();function kt(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 PN=typeof Symbol=="function"&&Symbol.observable||"@@observable",bw=PN,Og=()=>Math.random().toString(36).substring(7).split("").join("."),IN={INIT:`@@redux/INIT${Og()}`,REPLACE:`@@redux/REPLACE${Og()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Og()}`},Gu=IN;function qu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lg(e,t,n){if(typeof e!="function")throw new Error(kt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(kt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(kt(1));return n(Lg)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,l=!1;function c(){s===i&&(s=new Map,i.forEach((v,h)=>{s.set(h,v)}))}function u(){if(l)throw new Error(kt(3));return o}function f(v){if(typeof v!="function")throw new Error(kt(4));if(l)throw new Error(kt(5));let h=!0;c();let y=a++;return s.set(y,v),function(){if(h){if(l)throw new Error(kt(6));h=!1,c(),s.delete(y),i=null}}}function d(v){if(!qu(v))throw new Error(kt(7));if(typeof v.type=="undefined")throw new Error(kt(8));if(typeof v.type!="string")throw new Error(kt(17));if(l)throw new Error(kt(9));try{l=!0,o=r(o,v)}finally{l=!1}return(i=s).forEach(y=>{y()}),v}function p(v){if(typeof v!="function")throw new Error(kt(10));r=v,d({type:Gu.REPLACE})}function m(){let v=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(kt(11));function y(){let x=h;x.next&&x.next(u())}return y(),{unsubscribe:v(y)}},[bw](){return this}}}return d({type:Gu.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:p,[bw]:m}}function AN(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Gu.INIT})=="undefined")throw new Error(kt(12));if(typeof n(void 0,{type:Gu.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(kt(13))})}function Yu(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,i;try{AN(n)}catch(s){i=s}return function(a={},l){if(i)throw i;let c=!1,u={};for(let f=0;f<r.length;f++){let d=r[f],p=n[d],m=a[d],g=p(m,l);if(typeof g=="undefined"){let v=l&&l.type;throw new Error(kt(14))}u[d]=g,c=c||g!==m}return c=c||r.length!==Object.keys(a).length,c?u:a}}function dl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Ew(...e){return t=>(n,r)=>{let o=t(n,r),i=()=>{throw new Error(kt(15))},s={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},a=e.map(l=>l(s));return i=dl(...a)(o.dispatch),A(E({},o),{dispatch:i})}}function Cw(e){return qu(e)&&"type"in e&&typeof e.type=="string"}var Nw=Symbol.for("immer-nothing"),Tw=Symbol.for("immer-draftable"),Ft=Symbol.for("immer-state");function nr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cn=Object,Vs=Cn.getPrototypeOf,Ju="constructor",id="prototype",Hg="configurable",ed="enumerable",Qu="writable",fl="value",Rr=e=>!!e&&!!e[Ft];function Tn(e){var t;return e?Ow(e)||ad(e)||!!e[Tw]||!!((t=e[Ju])!=null&&t[Tw])||ld(e)||cd(e):!1}var _N=Cn[id][Ju].toString(),kw=new WeakMap;function Ow(e){if(!e||!Gg(e))return!1;let t=Vs(e);if(t===null||t===Cn[id])return!0;let n=Cn.hasOwnProperty.call(t,Ju)&&t[Ju];if(n===Object)return!0;if(!Us(n))return!1;let r=kw.get(n);return r===void 0&&(r=Function.toString.call(n),kw.set(n,r)),r===_N}function sd(e,t,n=!0){gl(e)===0?(n?Reflect.ownKeys(e):Cn.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function gl(e){let t=e[Ft];return t?t.type_:ad(e)?1:ld(e)?2:cd(e)?3:0}var Dg=(e,t,n=gl(e))=>n===2?e.has(t):Cn[id].hasOwnProperty.call(e,t),Bg=(e,t,n=gl(e))=>n===2?e.get(t):e[t],td=(e,t,n,r=gl(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function MN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ad=Array.isArray,ld=e=>e instanceof Map,cd=e=>e instanceof Set,Gg=e=>typeof e=="object",Us=e=>typeof e=="function",Fg=e=>typeof e=="boolean";function NN(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Qr=e=>e.copy_||e.base_;var qg=e=>e.modified_?e.copy_:e.base_;function Ug(e,t){if(ld(e))return new Map(e);if(cd(e))return new Set(e);if(ad(e))return Array[id].slice.call(e);let n=Ow(e);if(t===!0||t==="class_only"&&!n){let r=Cn.getOwnPropertyDescriptors(e);delete r[Ft];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){let s=o[i],a=r[s];a[Qu]===!1&&(a[Qu]=!0,a[Hg]=!0),(a.get||a.set)&&(r[s]={[Hg]:!0,[Qu]:!0,[ed]:a[ed],[fl]:e[s]})}return Cn.create(Vs(e),r)}else{let r=Vs(e);if(r!==null&&n)return E({},e);let o=Cn.create(r);return Cn.assign(o,e)}}function Yg(e,t=!1){return ud(e)||Rr(e)||!Tn(e)||(gl(e)>1&&Cn.defineProperties(e,{set:Xu,add:Xu,clear:Xu,delete:Xu}),Cn.freeze(e),t&&sd(e,(n,r)=>{Yg(r,!0)},!1)),e}function ON(){nr(2)}var Xu={[fl]:ON};function ud(e){return e===null||!Gg(e)?!0:Cn.isFrozen(e)}var nd="MapSet",Vg="Patches",Rw="ArrayMethods",Lw={};function _i(e){let t=Lw[e];return t||nr(0,e),t}var Pw=e=>!!Lw[e];var pl,Dw=()=>pl,LN=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Pw(nd)?_i(nd):void 0,arrayMethodsPlugin_:Pw(Rw)?_i(Rw):void 0});function Iw(e,t){t&&(e.patchPlugin_=_i(Vg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wg(e){$g(e),e.drafts_.forEach(DN),e.drafts_=null}function $g(e){e===pl&&(pl=e.parent_)}var Aw=e=>pl=LN(pl,e);function DN(e){let t=e[Ft];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _w(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ft].modified_&&(Wg(t),nr(4)),Tn(e)&&(e=Mw(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(n[Ft].base_,e,t)}else e=Mw(t,n);return FN(t,e,!0),Wg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nw?e:void 0}function Mw(e,t){if(ud(t))return t;let n=t[Ft];if(!n)return rd(t,e.handledSet_,e);if(!dd(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Hw(n,e)}return n.copy_}function FN(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yg(t,n)}function Fw(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dd=(e,t)=>e.scope_===t,zN=[];function zw(e,t,n,r){var a;let o=Qr(e),i=e.type_;if(r!==void 0&&Bg(o,r,i)===t){td(o,r,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;sd(o,(c,u)=>{if(Rr(u)){let f=l.get(u)||[];f.push(c),l.set(u,f)}})}let s=(a=e.draftLocations_.get(t))!=null?a:zN;for(let l of s)td(o,l,n,i)}function HN(e,t,n){e.callbacks_.push(function(o){var a,l;let i=t;if(!i||!dd(i,o))return;(a=o.mapSetPlugin_)==null||a.fixSetContents(i);let s=qg(i);zw(e,(l=i.draft_)!=null?l:i,s,n),Hw(i,o)})}function Hw(e,t){var r,o;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||((o=(r=e.assigned_)==null?void 0:r.size)!=null?o:0)>0)){let{patchPlugin_:i}=t;if(i){let s=i.getPath(e);s&&i.generatePatches_(e,s,t)}Fw(e)}}function BN(e,t,n){let{scope_:r}=e;if(Rr(n)){let o=n[Ft];dd(o,r)&&o.callbacks_.push(function(){Zu(e);let s=qg(o);zw(e,n,s,t)})}else Tn(n)&&e.callbacks_.push(function(){var s;let i=Qr(e);e.type_===3?i.has(n)&&rd(n,r.handledSet_,r):Bg(i,t,e.type_)===n&&r.drafts_.length>1&&((s=e.assigned_.get(t))!=null?s:!1)===!0&&e.copy_&&rd(Bg(e.copy_,t,e.type_),r.handledSet_,r)})}function rd(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Rr(e)||t.has(e)||!Tn(e)||ud(e)||(t.add(e),sd(e,(r,o)=>{if(Rr(o)){let i=o[Ft];if(dd(i,n)){let s=qg(i);td(e,r,s,e.type_),Fw(i)}}else Tn(o)&&rd(o,t,n)})),e}function UN(e,t){let n=ad(e),r={type_:n?1:0,scope_:t?t.scope_:Dw(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=r,i=od;n&&(o=[r],i=ml);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,[a,r]}var od={get(e,t){if(t===Ft)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let o=Qr(e);if(!Dg(o,t,e.type_))return WN(e,o,t);let i=o[t];if(e.finalized_||!Tn(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&NN(t))return i;if(i===zg(e.base_,t)||VN(e,t,i)){Zu(e);let s=e.type_===1?+t:t,a=Kg(e.scope_,i,e,s);return e.copy_[s]=a}return i},has(e,t){return t in Qr(e)},ownKeys(e){return Reflect.ownKeys(Qr(e))},set(e,t,n){let r=Bw(Qr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=zg(Qr(e),t),i=o==null?void 0:o[Ft];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(MN(n,o)&&(n!==void 0||Dg(e.base_,t,e.type_)))return!0;Zu(e),jg(e)}return e.copy_[t]===n&&(n!==void 0||Dg(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),BN(e,t,n)),!0},deleteProperty(e,t){return Zu(e),zg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),jg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Qr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Qu]:!0,[Hg]:e.type_!==1||t!=="length",[ed]:r[ed],[fl]:n[t]}},defineProperty(){nr(11)},getPrototypeOf(e){return Vs(e.base_)},setPrototypeOf(){nr(12)}},ml={};for(let e in od){let t=od[e];ml[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}ml.deleteProperty=function(e,t){return ml.set.call(this,e,t,void 0)};ml.set=function(e,t,n){return od.set.call(this,e[0],t,n,e[0])};function zg(e,t){let n=e[Ft];return(n?Qr(n):e)[t]}function VN(e,t,n){var r;return e.type_!==1||!e.allIndicesReassigned_||(r=e.assigned_)!=null&&r.get(t)||!Tn(n)||n[Ft]?!1:e.baseRefs_.has(n)}function WN(e,t,n){var o;let r=Bw(t,n);return r?fl in r?r[fl]:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Bw(e,t){if(!(t in e))return;let n=Vs(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vs(n)}}function jg(e){e.modified_||(e.modified_=!0,e.parent_&&jg(e.parent_))}function Zu(e){e.copy_||(e.assigned_=new Map,e.copy_=Ug(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $N=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(Us(t)&&!Us(n)){let i=n;n=t;let s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}Us(n)||nr(6),r!==void 0&&!Us(r)&&nr(7);let o;if(Tn(t)){let i=Aw(this),s=Kg(i,t,void 0),a=!0;try{o=n(s),a=!1}finally{a?Wg(i):$g(i)}return Iw(i,r),_w(o,i)}else if(!t||!Gg(t)){if(o=n(t),o===void 0&&(o=t),o===Nw&&(o=void 0),this.autoFreeze_&&Yg(o,!0),r){let i=[],s=[];_i(Vg).generateReplacementPatches_(t,o,{patches_:i,inversePatches_:s}),r(i,s)}return o}else nr(1,t)},this.produceWithPatches=(t,n)=>{if(Us(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},Fg(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Fg(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Fg(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Tn(e)||nr(8),Rr(e)&&(e=Uw(e));let t=Aw(this),n=Kg(t,e,void 0);return n[Ft].isManual_=!0,$g(t),n}finishDraft(e,t){let n=e&&e[Ft];(!n||!n.isManual_)&&nr(9);let{scope_:r}=n;return Iw(r,t),_w(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=_i(Vg).applyPatches_;return Rr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Kg(e,t,n,r){var a,l;let[o,i]=ld(t)?_i(nd).proxyMap_(t,n):cd(t)?_i(nd).proxySet_(t,n):UN(t,n);return((a=n==null?void 0:n.scope_)!=null?a:Dw()).drafts_.push(o),i.callbacks_=(l=n==null?void 0:n.callbacks_)!=null?l:[],i.key_=r,n&&r!==void 0?HN(n,i,r):i.callbacks_.push(function(u){var d;(d=u.mapSetPlugin_)==null||d.fixSetContents(i);let{patchPlugin_:f}=u;i.modified_&&f&&f.generatePatches_(i,[],u)}),o}function Uw(e){return Rr(e)||nr(10,e),Vw(e)}function Vw(e){if(!Tn(e)||ud(e))return e;let t=e[Ft],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ug(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ug(e,!0);return sd(n,(o,i)=>{td(n,o,Vw(i))},r),t&&(t.finalized_=!1),n}var jN=new $N,Xg=jN.produce;function KN(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function GN(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ww=e=>Array.isArray(e)?e:[e];function qN(e){let t=Array.isArray(e[0])?e[0]:e;return GN(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YN(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var XN=class{constructor(e){this.value=e}deref(){return this.value}},QN=()=>typeof WeakRef=="undefined"?XN:WeakRef,jw=QN(),ZN=0,$w=1;function fd(){return{s:ZN,v:void 0,o:null,p:null}}function JN(e){return e instanceof jw?e.deref():e}function Kw(e,t={}){let n=fd(),{resultEqualityCheck:r}=t,o,i=0;function s(){let a=n,{length:l}=arguments;for(let f=0,d=l;f<d;f++){let p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);let g=m.get(p);g===void 0?(a=fd(),m.set(p,a)):a=g}else{let m=a.p;m===null&&(a.p=m=new Map);let g=m.get(p);g===void 0?(a=fd(),m.set(p,a)):a=g}}let c=a,u;if(a.s===$w)u=a.v;else if(u=e.apply(null,arguments),i++,r){let f=JN(o);f!=null&&r(f,u)&&(u=f,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new jw(u):u}return c.s=$w,c.v=u,u}return s.clearCache=()=>{n=fd(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function eO(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),KN(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=E(E({},n),l),{memoize:f,memoizeOptions:d=[],argsMemoize:p=Kw,argsMemoizeOptions:m=[]}=u,g=Ww(d),v=Ww(m),h=qN(o),y=f(function(){return i++,c.apply(null,arguments)},...g),S=!0,x=p(function(){s++;let C=YN(h,arguments);return a=y.apply(null,C),a},...v);return Object.assign(x,{resultFunc:c,memoizedResultFunc:y,dependencies:h,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var fn=eO(Kw);function Gw(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var qw=Gw(),Yw=Gw;var tO=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dl:dl.apply(null,arguments)},v8=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},nO=e=>e&&typeof e.match=="function";function Rt(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Zr(0));return E(E({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Cw(r)&&r.type===e,n}var eb=class hl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,hl.prototype)}static get[Symbol.species](){return hl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new hl(...t[0].concat(this)):new hl(...t.concat(this))}};function Xw(e){return Tn(e)?Xg(e,()=>{}):e}function pd(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function rO(e){return typeof e=="boolean"}var oO=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t!=null?t:{},s=new eb;return n&&(rO(n)?s.push(qw):s.push(Yw(n.extraArgument))),s},iO="RTK_autoBatch";var Qw=e=>t=>{setTimeout(t,e)},sO=(e,t)=>n=>{let r=!1,o=()=>{r||(r=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=e(o),s=setTimeout(o,t)},aO=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,i=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?sO(window.requestAnimationFrame,100):Qw(10):e.type==="callback"?e.queueNotification:Qw(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let f=()=>o&&u(),d=r.subscribe(f);return a.add(u),()=>{d(),a.delete(u)}},dispatch(u){var f;try{return o=!((f=u==null?void 0:u.meta)!=null&&f[iO]),i=!o,i&&(s||(s=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},lO=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new eb(e);return r&&o.push(aO(typeof r=="object"?r:void 0)),o};function tb(e){let t=oO(),{reducer:n=void 0,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{},l;if(typeof n=="function")l=n;else if(qu(n))l=Yu(n);else throw new Error(Zr(1));let c;typeof r=="function"?c=r(t):c=t();let u=dl;o&&(u=tO(E({trace:!1},typeof o=="object"&&o)));let f=Ew(...c),d=lO(f),p=typeof a=="function"?a(d):d(),m=u(...p);return Lg(l,s,m)}function nb(e){let t={},n=[],r,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Zr(28));if(a in t)throw new Error(Zr(29));return t[a]=s,o},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function cO(e){return typeof e=="function"}function uO(e,t){let[n,r,o]=nb(t),i;if(cO(e))i=()=>Xw(e());else{let a=Xw(e);i=()=>a}function s(a=i(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,f)=>{if(f)if(Rr(u)){let p=f(u,l);return p===void 0?u:p}else{if(Tn(u))return Xg(u,d=>f(d,l));{let d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},a)}return s.getInitialState=i,s}var dO=(e,t)=>nO(e)?e.match(t):e(t);function fO(...e){return t=>e.some(n=>dO(n,t))}var pO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",mO=(e=21)=>{let t="",n=e;for(;n--;)t+=pO[Math.random()*64|0];return t},gO=["name","message","stack","code"],Qg=class{constructor(e,t){xe(this,"payload");xe(this,"meta");xe(this,"_type");this.payload=e,this.meta=t}},Zw=class{constructor(e,t){xe(this,"payload");xe(this,"meta");xe(this,"_type");this.payload=e,this.meta=t}},hO=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of gO)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Jw="External signal was aborted",ge=(()=>{function e(t,n,r){let o=Rt(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:A(E({},f||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),i=Rt(t+"/pending",(l,c,u)=>({payload:void 0,meta:A(E({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),s=Rt(t+"/rejected",(l,c,u,f,d)=>({payload:f,error:(r&&r.serializeError||hO)(l||"Rejected"),meta:A(E({},d||{}),{arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,f,d)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):mO(),m=new AbortController,g,v;function h(S){v=S,m.abort()}c&&(c.aborted?h(Jw):c.addEventListener("abort",()=>h(Jw),{once:!0}));let y=(function(){return M(this,null,function*(){var T,C;let S;try{let k=(T=r==null?void 0:r.condition)==null?void 0:T.call(r,l,{getState:f,extra:d});if(vO(k)&&(k=yield k),k===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let R=new Promise((F,O)=>{g=()=>{O({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",g,{once:!0})});u(i(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),S=yield Promise.race([R,Promise.resolve(n(l,{dispatch:u,getState:f,extra:d,requestId:p,signal:m.signal,abort:h,rejectWithValue:((F,O)=>new Qg(F,O)),fulfillWithValue:((F,O)=>new Zw(F,O))})).then(F=>{if(F instanceof Qg)throw F;return F instanceof Zw?o(F.payload,p,l,F.meta):o(F,p,l)})])}catch(k){S=k instanceof Qg?s(null,p,l,k.payload,k.meta):s(k,p,l)}finally{g&&m.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(S)&&S.meta.condition||u(S),S})})();return Object.assign(y,{abort:h,requestId:p,arg:l,unwrap(){return y.then(yO)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:fO(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function yO(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function vO(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var rb=Symbol.for("rtk-slice-createasyncthunk"),x8={[rb]:ge};function SO(e,t){return`${e}/${t}`}function xO({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[rb];return function(o){let{name:i,reducerPath:s=i}=o;if(!i)throw new Error(Zr(11));let a=(typeof o.reducers=="function"?o.reducers(bO()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(x,T){let C=typeof x=="string"?x:x.type;if(!C)throw new Error(Zr(12));if(C in c.sliceCaseReducersByType)throw new Error(Zr(13));return c.sliceCaseReducersByType[C]=T,u},addMatcher(x,T){return c.sliceMatchers.push({matcher:x,reducer:T}),u},exposeAction(x,T){return c.actionCreators[x]=T,u},exposeCaseReducer(x,T){return c.sliceCaseReducersByName[x]=T,u}};l.forEach(x=>{let T=a[x],C={reducerName:x,type:SO(i,x),createNotation:typeof o.reducers=="function"};CO(T)?kO(C,T,u,t):EO(C,T,u)});function f(){let[x={},T=[],C=void 0]=typeof o.extraReducers=="function"?nb(o.extraReducers):[o.extraReducers],k=E(E({},x),c.sliceCaseReducersByType);return uO(o.initialState,R=>{for(let F in k)R.addCase(F,k[F]);for(let F of c.sliceMatchers)R.addMatcher(F.matcher,F.reducer);for(let F of T)R.addMatcher(F.matcher,F.reducer);C&&R.addDefaultCase(C)})}let d=x=>x,p=new Map,m=new WeakMap,g;function v(x,T){return g||(g=f()),g(x,T)}function h(){return g||(g=f()),g.getInitialState()}function y(x,T=!1){function C(R){let F=R[x];return typeof F=="undefined"&&T&&(F=pd(m,C,h)),F}function k(R=d){let F=pd(p,T,()=>new WeakMap);return pd(F,R,()=>{var U;let O={};for(let[J,Y]of Object.entries((U=o.selectors)!=null?U:{}))O[J]=wO(Y,R,()=>pd(m,R,h),T);return O})}return{reducerPath:x,getSelectors:k,get selectors(){return k(C)},selectSlice:C}}let S=A(E({name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:h},y(s)),{injectInto(x,k={}){var R=k,{reducerPath:T}=R,C=ie(R,["reducerPath"]);let F=T!=null?T:s;return x.inject({reducerPath:F,reducer:v},C),E(E({},S),y(F,!0))}});return S}}function wO(e,t,n,r){function o(i,...s){let a=t(i);return typeof a=="undefined"&&r&&(a=n()),e(a,...s)}return o.unwrapped=e,o}var Re=xO();function bO(){function e(t,n){return E({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function EO({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!TO(r))throw new Error(Zr(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Rt(e,s):Rt(e))}function CO(e){return e._reducerDefinitionType==="asyncThunk"}function TO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function kO({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Zr(18));let{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,f=o(e,i,u);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:s||md,pending:a||md,rejected:l||md,settled:c||md})}function md(){}var ob="listener",ib="completed",sb="cancelled",w8=`task-${sb}`,b8=`task-${ib}`,E8=`${ob}-${sb}`,C8=`${ob}-${ib}`;var{assign:ab}=Object;var Zg="listenerMiddleware";var RO=ab(Rt(`${Zg}/add`),{withTypes:()=>RO}),T8=Rt(`${Zg}/removeAll`),PO=ab(Rt(`${Zg}/remove`),{withTypes:()=>PO});function Zr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yl=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(yl||{});var IO={isLoggedIn:null,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1,loginError:null},Pt=e=>e.auth.isLoggedIn;var lb=e=>e.auth.verifyFetchState,cb=e=>e.auth.showLoginOverlay,ub=e=>e.auth.loginError,Jr=ge("auth/validate",(e,t)=>M(null,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),db=ge("auth/requestLogin",(n,r)=>M(null,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),Jg=ge("auth/loginWithPassword",(r,o)=>M(null,[r,o],function*({username:e,password:t},n){let{deepdeskAPI:i}=n.extra;return i.loginWithPassword(e,t)})),gd=ge("auth/logout",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;yield n.logout()})),vl=ge("auth/verifyLoginToken",(n,r)=>M(null,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),fb=Re({name:"auth",initialState:IO,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload},setLoginError(e,t){e.loginError=t.payload},clearLoginError(e){e.loginError=null}},extraReducers:e=>{e.addCase(Jr.pending,t=>{t.loginFetchState="loading"}),e.addCase(Jr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Jr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Jg.pending,t=>{t.loginFetchState="loading",t.loginError=null}),e.addCase(Jg.fulfilled,t=>{t.isLoggedIn=!0,t.loginFetchState="done",t.loginError=null,t.showLoginOverlay=!1}),e.addCase(Jg.rejected,(t,n)=>{t.loginFetchState="error",t.isLoggedIn=!1,t.loginError=n.error.message==="Bad Request"?"Invalid credentials":"Login failed"}),e.addCase(gd.fulfilled,t=>{t.isLoggedIn=!1,t.loginFetchState="idle",t.loginError=null}),e.addCase(gd.rejected,t=>{t.isLoggedIn=!1,t.loginFetchState="error"}),e.addCase(vl.pending,t=>{t.verifyFetchState="loading"}),e.addCase(vl.rejected,t=>{t.verifyFetchState="error"}),e.addCase(vl.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ws,setShowLoginOverlay:pb,setLoginError:eh,clearLoginError:hd}=fb.actions,mb=fb.reducer;var Sl=class{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);let i=this.castInput(t,r),s=this.castInput(n,r),a=this.removeEmpty(this.tokenize(i,r)),l=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(a,l,r,o)}diffWithOptionsObj(t,n,r,o){var i;let s=y=>{if(y=this.postProcess(y,r),o){setTimeout(function(){o(y)},0);return}else return y},a=n.length,l=t.length,c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let f=(i=r.timeout)!==null&&i!==void 0?i:1/0,d=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],n,t,0,r);if(p[0].oldPos+1>=l&&m+1>=a)return s(this.buildValues(p[0].lastComponent,n,t));let g=-1/0,v=1/0,h=()=>{for(let y=Math.max(g,-c);y<=Math.min(v,c);y+=2){let S,x=p[y-1],T=p[y+1];x&&(p[y-1]=void 0);let C=!1;if(T){let R=T.oldPos-y;C=T&&0<=R&&R<a}let k=x&&x.oldPos+1<l;if(!C&&!k){p[y]=void 0;continue}if(!k||C&&x.oldPos<T.oldPos?S=this.addToPath(T,!0,!1,0,r):S=this.addToPath(x,!1,!0,1,r),m=this.extractCommon(S,n,t,y,r),S.oldPos+1>=l&&m+1>=a)return s(this.buildValues(S.lastComponent,n,t))||!0;p[y]=S,S.oldPos+1>=l&&(v=Math.min(v,y-1)),m+1>=a&&(g=Math.max(g,y+1))}c++};if(o)(function y(){setTimeout(function(){if(c>u||Date.now()>d)return o(void 0);h()||y()},0)})();else for(;c<=u&&Date.now()<=d;){let y=h();if(y)return y}}addToPath(t,n,r,o,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===n&&s.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}}extractCommon(t,n,r,o,i){let s=n.length,a=r.length,l=t.oldPos,c=l-o,u=0;for(;c+1<s&&l+1<a&&this.equals(r[l+1],n[c+1],i);)c++,l++,u++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!i.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,c}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let o=[],i;for(;t;)o.push(t),i=t.previousComponent,delete t.previousComponent,t=i;o.reverse();let s=o.length,a=0,l=0,c=0;for(;a<s;a++){let u=o[a];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=n.slice(l,l+u.count);f=f.map(function(d,p){let m=r[c+p];return m.length>d.length?m:d}),u.value=this.join(f)}else u.value=this.join(n.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return o}};var th=class extends Sl{},gb=new th;function nh(e,t,n){return gb.diff(e,t,n)}function hb(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function zo(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)=>zo(i,t[s],n-1)):hb(e)&&hb(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>zo(e[s],t[s],n-1)):!1}function AO(e){return Math.max(...e.map(t=>t.length))}function _O(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return A(E({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function yb(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AO(r);o++){let i=_O(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 MO=2;function vb(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=yb(e,MO);return n&&n.text!==t?n:e[0]}var NO={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},te=NO;var Sb={current:null,isSupported:null},lt=Rt("resetConversation"),yd=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Pr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},$s=e=>e.conversation.isSupported,rh=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),vd=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Sd=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),xd=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),oh=ge("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,metadata:l})})}),ih=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>E({},o)))}),OO=[vd.rejected,Sd.rejected,xd.rejected,ih.rejected].map(e=>e==null?void 0:e.toString());function LO(e){return OO.includes(e.type)}var DO=Re({name:"conversation",initialState:Sb,reducers:{},extraReducers:e=>{e.addCase(rh.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(vd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(Sd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(oh.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(lt,()=>Sb).addMatcher(LO,(t,n)=>{var r;throw te.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),xb=DO.reducer;var Mi={text:"",html:null,suggestionTextStart:0,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],pinnedSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function sh(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 wd=Rt("input/applyImageSuggestion"),wb=Re({name:"input",initialState:Mi,reducers:{setInput(e,t){var s,a;let{beforeInputChange:n}=e,{text:r,html:o,suggestionTextStart:i}=t.payload;if(e.text=r,e.html=o!=null?o:null,e.suggestionTextStart=r===""?0:Math.max(0,i!=null?i:0),r==="")e.metrics=Mi.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:l,shiftKey:c,ctrlKey:u,metaKey:f,altKey:d}=n.keyDown;switch(l){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:p}=e,m=nh(n.text,p);n.text.length-p.length>1&&e.metrics.deletions.push(...m.filter(g=>g.removed).map(g=>g.value)),e.metrics.numCharsDeleted+=n.text.length-p.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(u||f)break;default:if(!u&&!f&&!d){e.metrics.numCharsTyped+=1;let p=((s=n.selection)==null?void 0:s.start)!==void 0&&((a=n.selection)==null?void 0:a.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;p&&p.length>0&&(e.metrics.numCharsDeleted+=p.length,e.metrics.deletions.push(p))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},sendMessage(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(n=>!e.metrics.textSuggestions.some(r=>r.text===n.text&&r.source===n.source))},setSelection(e,t){t.payload!==null&&(zo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:i,abTestName:s,trainingJobs:a,sourceText:l,searchTerm:c,assistantCode:u,text:f},eventMetrics:{inputType:d},replace:p}=n,m=o==="search"||o==="personal-collection-search",g=r.slice(e.text.substring(0,e.selection.start).length);(m||p==="selection")&&(g=r),n.suggestion.source==="search-overlay"&&(g=f),e.metrics.textSuggestions.push({text:g,source:o,assistantCode:u,abVariant:i,abTestName:s,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:m?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=A(E({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o!=null&&o.length?o.length:0),s=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=A(E({},e.metrics),{numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=Ni({input:e}),r=vb(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setPinnedSuggestions(e,t){e.pinnedSuggestions=t.payload},removePinnedSuggestions(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(r=>r.source!==t.payload.source||t.payload.assistantCode&&r.assistantCode!==t.payload.assistantCode?!0:t.payload.text?r.text!==t.payload.text:!1);let n=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex>n-1&&(e.selectedSuggestionIndex=-1)},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Mi.metrics}},extraReducers:e=>{e.addCase(lt,t=>{t.mixedSuggestion=Mi.mixedSuggestion,t.textSuggestions=Mi.textSuggestions,t.selectedSuggestionIndex=Mi.selectedSuggestionIndex,t.metrics=Mi.metrics})}}),Ni=e=>{let{text:t,selection:n,suggestionTextStart:r}=e.input;return t.slice(r,n.end)},FO=e=>e.input.mixedSuggestion,zO=e=>e.input.pinnedSuggestions,HO=e=>e.input.textSuggestions,xl=e=>e.input.selectedSuggestionIndex,Oi=fn([HO,zO],(e,t)=>[...e,...t]),js=fn([Oi,FO,xl],(e,t,n)=>n>-1?e[n]:t),bb=e=>e.input.selection,{commitSuggestion:kn,offeredTextSuggestion:Eb,registerCut:Cb,registerKeyDown:Tb,registerKeyUp:kb,registerPaste:Rb,selectNextTextSuggestion:Pb,selectPreviousTextSuggestion:Ib,selectTextSuggestionByIndex:bd,setInput:Ed,setMetrics:Ab,setPinnedSuggestions:Ks,removePinnedSuggestions:Li,setSelection:Cd,setTextSuggestions:Ho,resetMetrics:_b,sendMessage:Di}=wb.actions,Mb=wb.reducer;function Nb(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var BO={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle",showNicknameDialog:!1},Gs=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},Ob=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},Lb=e=>{var t;return(t=e.info.customData)!=null?t:null},bl=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&Nb(e.visitorTimeZone)?e.visitorTimeZone:nw,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},UO=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Db=ge("info/setAgentNickname",(n,r)=>M(null,[n,r],function*({agentNickname:e},t){var s;let{deepdeskAPI:o}=t.extra,i=yield o.patchMe({nickname:e});return{agentNickname:(s=i==null?void 0:i.nickname)!=null?s:e}})),wl=ge("info/setAgentInfo",(e,t)=>M(null,null,function*(){var i,s,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=UO.reduce((c,[u,f])=>!r[f]&&u in e?A(E({},c),{[f]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(i=r.nickname)!=null?i:e.agentNickname,agentEmail:(s=r.email)!=null?s:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),ah=ge("info/setAgentSettings",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=E(E({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),lh=ge("info/getAgentSettings",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),Fb=Re({name:"info",initialState:BO,reducers:{setVisitorInfo(e,t){e.visitorInfo=E(E({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload},setShowNicknameDialog(e,t){e.showNicknameDialog=t.payload}},extraReducers:e=>{e.addCase(wl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=E(E({},t.agentInfo),n.meta.arg)}).addCase(wl.rejected,t=>{t.fetchState="error"}).addCase(wl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(ah.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(lh.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(lt,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:zb,setCustomData:Hb,setPlatformVariables:Bb,setShowNicknameDialog:Ub}=Fb.actions,Vb=Fb.reducer;function or(e,t){return t?e==null?(te.warn("replaceVars called with non-string text; upstream contract violation",{keys:Object.keys(t)}),e):Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var Td={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},Wb=e=>e.search.isOpen,$b=e=>e.search.page,ch=e=>e.search.list,jb=e=>e.search.aggregates,VO=fn([ch,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),Kb=e=>t=>VO(t,e),Fi=ge("search/getAll",(e,t)=>M(null,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:i}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:s,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:bl(r)});return{results:s.map(c=>A(E(E({},c),c.title&&i?{title:or(c.title,i)}:{}),{text:or(c.text,i!=null?i:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Gb=Re({name:"search",initialState:Td,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Td.fetchState,e.list=Td.list}},extraReducers:e=>{e.addCase(Fi.pending,t=>{t.fetchState="loading"}).addCase(Fi.rejected,(t,n)=>{t.fetchState="error",te.error(n.error)}).addCase(Fi.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(lt,()=>Td)}}),{resetSearch:kd,setIsOpen:ir,setPage:qs}=Gb.actions,qb=Gb.reducer;var uh="SetOutputs",Ys="ShowLoginOverlay",El="UserLoggedIn",WO="UserLoggedOut",eo="ApplySuggestion",dh="ApplyImageSuggestion",$O="ShowCommandPalette",Rd="ShowNicknameDialog",Pd="ReduxAction",jO="RemovePinnedSuggestion",KO=e=>({[uh]:t=>{var o,i;let n=(o=e.getState().conversation.current)==null?void 0:o.externalId,r=(i=t==null?void 0:t.payload)==null?void 0:i.externalConversationId;r&&r!==n||e.dispatch(A(E({},t),{isBroadcasted:!0}))},[Pd]:t=>{t.isBroadcasted||e.dispatch(A(E({},t),{isBroadcasted:!0}))},[jO]:t=>{e.dispatch(Li(t))},[$O]:t=>{e.dispatch(ir(t.isOpen)),t.page&&e.dispatch(qs(t.page))},[Rd]:t=>{e.dispatch(Ub(t.showNicknameDialog))},[Ys]:t=>{e.dispatch(pb(t))},[El]:()=>{e.dispatch(Jr())},[WO]:()=>{e.dispatch(Jr())},[dh]:t=>{e.dispatch(wd({suggestion:t.suggestion}))},[eo]:t=>{e.dispatch(kn(A(E({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),Yb=KO;function Id(e){return ge("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,A(E({conversationId:r},o),{data:t.data}))})(e)}function Ze(){let e=Ee();return(t,n)=>M(null,null,function*(){yield e(Id({name:t,data:n}))})}var Xs=b(Z());function Ad(e,t){let n=(0,Xs.useRef)(e);n.current=e;let[r,o]=(0,Xs.useState)(void 0),[i,s]=(0,Xs.useState)(void 0),[a,l]=(0,Xs.useState)("idle"),c=Ee();return{error:i,state:a,data:r,call:d=>M(null,null,function*(){l("loading"),yield c(n.current(d)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{s(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),s(void 0)}}}var Cl=b(Z()),Qb=b(I()),Xb=Cl.default.createContext(null),to=({broadcastEvents:e,children:t})=>{let n=Cl.default.useMemo(()=>e,[]);return(0,Qb.jsx)(Xb.Provider,{value:n,children:t})},pn=()=>{let e=(0,Cl.useContext)(Xb);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var zd=b(Z());var fh=function(e,t){return fh=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])},fh(e,t)};function Tl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fh(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Rn=function(){return Rn=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},Rn.apply(this,arguments)};function Zb(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 _d(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))}function Md(e,t){var n=t&&t.cache?t.cache:JO,r=t&&t.serializer?t.serializer:QO,o=t&&t.strategy?t.strategy:qO;return o(e,{cache:n,serializer:r})}function GO(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Jb(e,t,n,r){var o=GO(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function eE(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function ph(e,t,n,r,o){return n.bind(t,e,r,o)}function qO(e,t){var n=e.length===1?Jb:eE;return ph(e,this,n,t.cache.create(),t.serializer)}function YO(e,t){return ph(e,this,eE,t.cache.create(),t.serializer)}function XO(e,t){return ph(e,this,Jb,t.cache.create(),t.serializer)}var QO=function(){return JSON.stringify(arguments)},ZO=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),JO={create:function(){return new ZO}},Nd={variadic:YO,monadic:XO};var Od;(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"})(Od||(Od={}));var Ld=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Un;(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"})(Un||(Un={}));var Dd;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Dd||(Dd={}));function mh(e){return e.type===Un.literal}function gh(e){return e.type===Un.argument}function kl(e){return e.type===Un.number}function Rl(e){return e.type===Un.date}function Pl(e){return e.type===Un.time}function Il(e){return e.type===Un.select}function Al(e){return e.type===Un.plural}function tE(e){return e.type===Un.pound}function _l(e){return e.type===Un.tag}function Fd(e){return!!(e&&typeof e=="object"&&e.type===Dd.number)}function Ml(e){return!!(e&&typeof e=="object"&&e.type===Dd.dateTime)}function hh(e){e.forEach(function(t){if(delete t.location,Il(t)||Al(t))for(var n in t.options)delete t.options[n].location,hh(t.options[n].value);else kl(t)&&Fd(t.style)||(Rl(t)||Pl(t))&&Ml(t.style)?delete t.style.location:_l(t)&&hh(t.children)})}function nE(e,t){t===void 0&&(t={}),t=Rn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ld(e,t).parse();if(n.err){var r=SyntaxError(Od[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||hh(n.val),n.val}var zi;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(zi||(zi={}));var Nl=(function(e){Tl(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 yh=(function(e){Tl(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('", "'),'"'),zi.INVALID_VALUE,i)||this}return t})(Nl);var rE=(function(e){Tl(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),zi.INVALID_VALUE,o)||this}return t})(Nl);var oE=(function(e){Tl(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,'"'),zi.MISSING_VALUE,r)||this}return t})(Nl);var zt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(zt||(zt={}));function eL(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==zt.literal||n.type!==zt.literal?t.push(n):r.value+=n.value,t},[])}function tL(e){return typeof e=="function"}function Ol(e,t,n,r,o,i,s){if(e.length===1&&mh(e[0]))return[{type:zt.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(mh(u)){a.push({type:zt.literal,value:u.value});continue}if(tE(u)){typeof i=="number"&&a.push({type:zt.literal,value:n.getNumberFormat(t).format(i)});continue}var f=u.value;if(!(o&&f in o))throw new oE(f,s);var d=o[f];if(gh(u)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?zt.literal:zt.object,value:d});continue}if(Rl(u)){var p=typeof u.style=="string"?r.date[u.style]:Ml(u.style)?u.style.parsedOptions:void 0;a.push({type:zt.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Pl(u)){var p=typeof u.style=="string"?r.time[u.style]:Ml(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:zt.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(kl(u)){var p=typeof u.style=="string"?r.number[u.style]:Fd(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:zt.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(_l(u)){var m=u.children,g=u.value,v=o[g];if(!tL(v))throw new rE(g,"function",s);var h=Ol(m,t,n,r,o,i),y=v(h.map(function(T){return T.value}));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map(function(T){return{type:typeof T=="string"?zt.literal:zt.object,value:T}}))}if(Il(u)){var S=u.options[d]||u.options.other;if(!S)throw new yh(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ol(S.value,t,n,r,o));continue}if(Al(u)){var S=u.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Nl(`Intl.PluralRules is not available in this environment.
12
+ `),oe}Ku(()=>{tt.current=void 0,ne.current=void 0,K.current=Ne});let at=le.useMemo(()=>le.createElement(v,A(E({},Ne),{ref:O})),[O,v,Ne]);return le.useMemo(()=>m?le.createElement(U.Provider,{value:j},at):at,[U,at,j])}let C=le.memo(x);if(C.WrappedComponent=v,C.displayName=x.displayName=y,l){let R=le.forwardRef(function(L,U){return le.createElement(C,A(E({},L),{reactReduxForwardedRef:U}))});return R.displayName=y,R.WrappedComponent=v,Ag(R,v)}return Ag(C,v)}}var vw=EN;function CN(e){let{children:t,context:n,serverState:r,store:o}=e,i=le.useMemo(()=>{let l=hw(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),s=le.useMemo(()=>o.getState(),[o]);return Ku(()=>{let{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]),le.createElement((n||Xr).Provider,{value:i},t)}var Sw=CN;function Ng(e=Xr){return function(){return le.useContext(e)}}var xw=Ng();function ww(e=Xr){let t=e===Xr?xw:Ng(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var TN=ww();function kN(e=Xr){let t=e===Xr?TN:ww(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var we=kN(),RN=(e,t)=>e===t;function PN(e=Xr){let t=e===Xr?xw:Ng(e),n=(r,o={})=>{let{equalityFn:i=RN}=typeof o=="function"?{equalityFn:o}:o,s=t(),{store:a,subscription:l,getServerState:c}=s,u=le.useRef(!0),f=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),d=(0,bw.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,f,i);return le.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var G=PN();function kt(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 IN=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ew=IN,Og=()=>Math.random().toString(36).substring(7).split("").join("."),AN={INIT:`@@redux/INIT${Og()}`,REPLACE:`@@redux/REPLACE${Og()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Og()}`},Gu=AN;function qu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lg(e,t,n){if(typeof e!="function")throw new Error(kt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(kt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(kt(1));return n(Lg)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,l=!1;function c(){s===i&&(s=new Map,i.forEach((v,h)=>{s.set(h,v)}))}function u(){if(l)throw new Error(kt(3));return o}function f(v){if(typeof v!="function")throw new Error(kt(4));if(l)throw new Error(kt(5));let h=!0;c();let y=a++;return s.set(y,v),function(){if(h){if(l)throw new Error(kt(6));h=!1,c(),s.delete(y),i=null}}}function d(v){if(!qu(v))throw new Error(kt(7));if(typeof v.type=="undefined")throw new Error(kt(8));if(typeof v.type!="string")throw new Error(kt(17));if(l)throw new Error(kt(9));try{l=!0,o=r(o,v)}finally{l=!1}return(i=s).forEach(y=>{y()}),v}function p(v){if(typeof v!="function")throw new Error(kt(10));r=v,d({type:Gu.REPLACE})}function m(){let v=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(kt(11));function y(){let x=h;x.next&&x.next(u())}return y(),{unsubscribe:v(y)}},[Ew](){return this}}}return d({type:Gu.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:p,[Ew]:m}}function _N(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Gu.INIT})=="undefined")throw new Error(kt(12));if(typeof n(void 0,{type:Gu.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(kt(13))})}function Yu(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,i;try{_N(n)}catch(s){i=s}return function(a={},l){if(i)throw i;let c=!1,u={};for(let f=0;f<r.length;f++){let d=r[f],p=n[d],m=a[d],g=p(m,l);if(typeof g=="undefined"){let v=l&&l.type;throw new Error(kt(14))}u[d]=g,c=c||g!==m}return c=c||r.length!==Object.keys(a).length,c?u:a}}function dl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Cw(...e){return t=>(n,r)=>{let o=t(n,r),i=()=>{throw new Error(kt(15))},s={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},a=e.map(l=>l(s));return i=dl(...a)(o.dispatch),A(E({},o),{dispatch:i})}}function Tw(e){return qu(e)&&"type"in e&&typeof e.type=="string"}var Ow=Symbol.for("immer-nothing"),kw=Symbol.for("immer-draftable"),Ft=Symbol.for("immer-state");function nr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cn=Object,Vs=Cn.getPrototypeOf,Ju="constructor",id="prototype",Hg="configurable",ed="enumerable",Qu="writable",fl="value",Rr=e=>!!e&&!!e[Ft];function Tn(e){var t;return e?Lw(e)||ad(e)||!!e[kw]||!!((t=e[Ju])!=null&&t[kw])||ld(e)||cd(e):!1}var MN=Cn[id][Ju].toString(),Rw=new WeakMap;function Lw(e){if(!e||!Gg(e))return!1;let t=Vs(e);if(t===null||t===Cn[id])return!0;let n=Cn.hasOwnProperty.call(t,Ju)&&t[Ju];if(n===Object)return!0;if(!Us(n))return!1;let r=Rw.get(n);return r===void 0&&(r=Function.toString.call(n),Rw.set(n,r)),r===MN}function sd(e,t,n=!0){gl(e)===0?(n?Reflect.ownKeys(e):Cn.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function gl(e){let t=e[Ft];return t?t.type_:ad(e)?1:ld(e)?2:cd(e)?3:0}var Dg=(e,t,n=gl(e))=>n===2?e.has(t):Cn[id].hasOwnProperty.call(e,t),Bg=(e,t,n=gl(e))=>n===2?e.get(t):e[t],td=(e,t,n,r=gl(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function NN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ad=Array.isArray,ld=e=>e instanceof Map,cd=e=>e instanceof Set,Gg=e=>typeof e=="object",Us=e=>typeof e=="function",Fg=e=>typeof e=="boolean";function ON(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Qr=e=>e.copy_||e.base_;var qg=e=>e.modified_?e.copy_:e.base_;function Ug(e,t){if(ld(e))return new Map(e);if(cd(e))return new Set(e);if(ad(e))return Array[id].slice.call(e);let n=Lw(e);if(t===!0||t==="class_only"&&!n){let r=Cn.getOwnPropertyDescriptors(e);delete r[Ft];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){let s=o[i],a=r[s];a[Qu]===!1&&(a[Qu]=!0,a[Hg]=!0),(a.get||a.set)&&(r[s]={[Hg]:!0,[Qu]:!0,[ed]:a[ed],[fl]:e[s]})}return Cn.create(Vs(e),r)}else{let r=Vs(e);if(r!==null&&n)return E({},e);let o=Cn.create(r);return Cn.assign(o,e)}}function Yg(e,t=!1){return ud(e)||Rr(e)||!Tn(e)||(gl(e)>1&&Cn.defineProperties(e,{set:Xu,add:Xu,clear:Xu,delete:Xu}),Cn.freeze(e),t&&sd(e,(n,r)=>{Yg(r,!0)},!1)),e}function LN(){nr(2)}var Xu={[fl]:LN};function ud(e){return e===null||!Gg(e)?!0:Cn.isFrozen(e)}var nd="MapSet",Vg="Patches",Pw="ArrayMethods",Dw={};function _i(e){let t=Dw[e];return t||nr(0,e),t}var Iw=e=>!!Dw[e];var pl,Fw=()=>pl,DN=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Iw(nd)?_i(nd):void 0,arrayMethodsPlugin_:Iw(Pw)?_i(Pw):void 0});function Aw(e,t){t&&(e.patchPlugin_=_i(Vg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wg(e){$g(e),e.drafts_.forEach(FN),e.drafts_=null}function $g(e){e===pl&&(pl=e.parent_)}var _w=e=>pl=DN(pl,e);function FN(e){let t=e[Ft];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mw(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ft].modified_&&(Wg(t),nr(4)),Tn(e)&&(e=Nw(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(n[Ft].base_,e,t)}else e=Nw(t,n);return zN(t,e,!0),Wg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ow?e:void 0}function Nw(e,t){if(ud(t))return t;let n=t[Ft];if(!n)return rd(t,e.handledSet_,e);if(!dd(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Bw(n,e)}return n.copy_}function zN(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yg(t,n)}function zw(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dd=(e,t)=>e.scope_===t,HN=[];function Hw(e,t,n,r){var a;let o=Qr(e),i=e.type_;if(r!==void 0&&Bg(o,r,i)===t){td(o,r,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;sd(o,(c,u)=>{if(Rr(u)){let f=l.get(u)||[];f.push(c),l.set(u,f)}})}let s=(a=e.draftLocations_.get(t))!=null?a:HN;for(let l of s)td(o,l,n,i)}function BN(e,t,n){e.callbacks_.push(function(o){var a,l;let i=t;if(!i||!dd(i,o))return;(a=o.mapSetPlugin_)==null||a.fixSetContents(i);let s=qg(i);Hw(e,(l=i.draft_)!=null?l:i,s,n),Bw(i,o)})}function Bw(e,t){var r,o;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||((o=(r=e.assigned_)==null?void 0:r.size)!=null?o:0)>0)){let{patchPlugin_:i}=t;if(i){let s=i.getPath(e);s&&i.generatePatches_(e,s,t)}zw(e)}}function UN(e,t,n){let{scope_:r}=e;if(Rr(n)){let o=n[Ft];dd(o,r)&&o.callbacks_.push(function(){Zu(e);let s=qg(o);Hw(e,n,s,t)})}else Tn(n)&&e.callbacks_.push(function(){var s;let i=Qr(e);e.type_===3?i.has(n)&&rd(n,r.handledSet_,r):Bg(i,t,e.type_)===n&&r.drafts_.length>1&&((s=e.assigned_.get(t))!=null?s:!1)===!0&&e.copy_&&rd(Bg(e.copy_,t,e.type_),r.handledSet_,r)})}function rd(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Rr(e)||t.has(e)||!Tn(e)||ud(e)||(t.add(e),sd(e,(r,o)=>{if(Rr(o)){let i=o[Ft];if(dd(i,n)){let s=qg(i);td(e,r,s,e.type_),zw(i)}}else Tn(o)&&rd(o,t,n)})),e}function VN(e,t){let n=ad(e),r={type_:n?1:0,scope_:t?t.scope_:Fw(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=r,i=od;n&&(o=[r],i=ml);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,[a,r]}var od={get(e,t){if(t===Ft)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let o=Qr(e);if(!Dg(o,t,e.type_))return $N(e,o,t);let i=o[t];if(e.finalized_||!Tn(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&ON(t))return i;if(i===zg(e.base_,t)||WN(e,t,i)){Zu(e);let s=e.type_===1?+t:t,a=Kg(e.scope_,i,e,s);return e.copy_[s]=a}return i},has(e,t){return t in Qr(e)},ownKeys(e){return Reflect.ownKeys(Qr(e))},set(e,t,n){let r=Uw(Qr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=zg(Qr(e),t),i=o==null?void 0:o[Ft];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(NN(n,o)&&(n!==void 0||Dg(e.base_,t,e.type_)))return!0;Zu(e),jg(e)}return e.copy_[t]===n&&(n!==void 0||Dg(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),UN(e,t,n)),!0},deleteProperty(e,t){return Zu(e),zg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),jg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Qr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Qu]:!0,[Hg]:e.type_!==1||t!=="length",[ed]:r[ed],[fl]:n[t]}},defineProperty(){nr(11)},getPrototypeOf(e){return Vs(e.base_)},setPrototypeOf(){nr(12)}},ml={};for(let e in od){let t=od[e];ml[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}ml.deleteProperty=function(e,t){return ml.set.call(this,e,t,void 0)};ml.set=function(e,t,n){return od.set.call(this,e[0],t,n,e[0])};function zg(e,t){let n=e[Ft];return(n?Qr(n):e)[t]}function WN(e,t,n){var r;return e.type_!==1||!e.allIndicesReassigned_||(r=e.assigned_)!=null&&r.get(t)||!Tn(n)||n[Ft]?!1:e.baseRefs_.has(n)}function $N(e,t,n){var o;let r=Uw(t,n);return r?fl in r?r[fl]:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Uw(e,t){if(!(t in e))return;let n=Vs(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vs(n)}}function jg(e){e.modified_||(e.modified_=!0,e.parent_&&jg(e.parent_))}function Zu(e){e.copy_||(e.assigned_=new Map,e.copy_=Ug(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jN=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(Us(t)&&!Us(n)){let i=n;n=t;let s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}Us(n)||nr(6),r!==void 0&&!Us(r)&&nr(7);let o;if(Tn(t)){let i=_w(this),s=Kg(i,t,void 0),a=!0;try{o=n(s),a=!1}finally{a?Wg(i):$g(i)}return Aw(i,r),Mw(o,i)}else if(!t||!Gg(t)){if(o=n(t),o===void 0&&(o=t),o===Ow&&(o=void 0),this.autoFreeze_&&Yg(o,!0),r){let i=[],s=[];_i(Vg).generateReplacementPatches_(t,o,{patches_:i,inversePatches_:s}),r(i,s)}return o}else nr(1,t)},this.produceWithPatches=(t,n)=>{if(Us(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},Fg(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Fg(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Fg(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Tn(e)||nr(8),Rr(e)&&(e=Vw(e));let t=_w(this),n=Kg(t,e,void 0);return n[Ft].isManual_=!0,$g(t),n}finishDraft(e,t){let n=e&&e[Ft];(!n||!n.isManual_)&&nr(9);let{scope_:r}=n;return Aw(r,t),Mw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=_i(Vg).applyPatches_;return Rr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Kg(e,t,n,r){var a,l;let[o,i]=ld(t)?_i(nd).proxyMap_(t,n):cd(t)?_i(nd).proxySet_(t,n):VN(t,n);return((a=n==null?void 0:n.scope_)!=null?a:Fw()).drafts_.push(o),i.callbacks_=(l=n==null?void 0:n.callbacks_)!=null?l:[],i.key_=r,n&&r!==void 0?BN(n,i,r):i.callbacks_.push(function(u){var d;(d=u.mapSetPlugin_)==null||d.fixSetContents(i);let{patchPlugin_:f}=u;i.modified_&&f&&f.generatePatches_(i,[],u)}),o}function Vw(e){return Rr(e)||nr(10,e),Ww(e)}function Ww(e){if(!Tn(e)||ud(e))return e;let t=e[Ft],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ug(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ug(e,!0);return sd(n,(o,i)=>{td(n,o,Ww(i))},r),t&&(t.finalized_=!1),n}var KN=new jN,Xg=KN.produce;function GN(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qN(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var $w=e=>Array.isArray(e)?e:[e];function YN(e){let t=Array.isArray(e[0])?e[0]:e;return qN(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function XN(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var QN=class{constructor(e){this.value=e}deref(){return this.value}},ZN=()=>typeof WeakRef=="undefined"?QN:WeakRef,Kw=ZN(),JN=0,jw=1;function fd(){return{s:JN,v:void 0,o:null,p:null}}function eO(e){return e instanceof Kw?e.deref():e}function Gw(e,t={}){let n=fd(),{resultEqualityCheck:r}=t,o,i=0;function s(){let a=n,{length:l}=arguments;for(let f=0,d=l;f<d;f++){let p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);let g=m.get(p);g===void 0?(a=fd(),m.set(p,a)):a=g}else{let m=a.p;m===null&&(a.p=m=new Map);let g=m.get(p);g===void 0?(a=fd(),m.set(p,a)):a=g}}let c=a,u;if(a.s===jw)u=a.v;else if(u=e.apply(null,arguments),i++,r){let f=eO(o);f!=null&&r(f,u)&&(u=f,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Kw(u):u}return c.s=jw,c.v=u,u}return s.clearCache=()=>{n=fd(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function tO(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),GN(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=E(E({},n),l),{memoize:f,memoizeOptions:d=[],argsMemoize:p=Gw,argsMemoizeOptions:m=[]}=u,g=$w(d),v=$w(m),h=YN(o),y=f(function(){return i++,c.apply(null,arguments)},...g),S=!0,x=p(function(){s++;let C=XN(h,arguments);return a=y.apply(null,C),a},...v);return Object.assign(x,{resultFunc:c,memoizedResultFunc:y,dependencies:h,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var fn=tO(Gw);function qw(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var Yw=qw(),Xw=qw;var nO=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dl:dl.apply(null,arguments)},S8=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},rO=e=>e&&typeof e.match=="function";function Rt(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Zr(0));return E(E({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Tw(r)&&r.type===e,n}var tb=class hl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,hl.prototype)}static get[Symbol.species](){return hl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new hl(...t[0].concat(this)):new hl(...t.concat(this))}};function Qw(e){return Tn(e)?Xg(e,()=>{}):e}function pd(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function oO(e){return typeof e=="boolean"}var iO=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t!=null?t:{},s=new tb;return n&&(oO(n)?s.push(Yw):s.push(Xw(n.extraArgument))),s},sO="RTK_autoBatch";var Zw=e=>t=>{setTimeout(t,e)},aO=(e,t)=>n=>{let r=!1,o=()=>{r||(r=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=e(o),s=setTimeout(o,t)},lO=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,i=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?aO(window.requestAnimationFrame,100):Zw(10):e.type==="callback"?e.queueNotification:Zw(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let f=()=>o&&u(),d=r.subscribe(f);return a.add(u),()=>{d(),a.delete(u)}},dispatch(u){var f;try{return o=!((f=u==null?void 0:u.meta)!=null&&f[sO]),i=!o,i&&(s||(s=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},cO=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new tb(e);return r&&o.push(lO(typeof r=="object"?r:void 0)),o};function nb(e){let t=iO(),{reducer:n=void 0,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{},l;if(typeof n=="function")l=n;else if(qu(n))l=Yu(n);else throw new Error(Zr(1));let c;typeof r=="function"?c=r(t):c=t();let u=dl;o&&(u=nO(E({trace:!1},typeof o=="object"&&o)));let f=Cw(...c),d=cO(f),p=typeof a=="function"?a(d):d(),m=u(...p);return Lg(l,s,m)}function rb(e){let t={},n=[],r,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Zr(28));if(a in t)throw new Error(Zr(29));return t[a]=s,o},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function uO(e){return typeof e=="function"}function dO(e,t){let[n,r,o]=rb(t),i;if(uO(e))i=()=>Qw(e());else{let a=Qw(e);i=()=>a}function s(a=i(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,f)=>{if(f)if(Rr(u)){let p=f(u,l);return p===void 0?u:p}else{if(Tn(u))return Xg(u,d=>f(d,l));{let d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},a)}return s.getInitialState=i,s}var fO=(e,t)=>rO(e)?e.match(t):e(t);function pO(...e){return t=>e.some(n=>fO(n,t))}var mO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gO=(e=21)=>{let t="",n=e;for(;n--;)t+=mO[Math.random()*64|0];return t},hO=["name","message","stack","code"],Qg=class{constructor(e,t){xe(this,"payload");xe(this,"meta");xe(this,"_type");this.payload=e,this.meta=t}},Jw=class{constructor(e,t){xe(this,"payload");xe(this,"meta");xe(this,"_type");this.payload=e,this.meta=t}},yO=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of hO)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},eb="External signal was aborted",ge=(()=>{function e(t,n,r){let o=Rt(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:A(E({},f||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),i=Rt(t+"/pending",(l,c,u)=>({payload:void 0,meta:A(E({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),s=Rt(t+"/rejected",(l,c,u,f,d)=>({payload:f,error:(r&&r.serializeError||yO)(l||"Rejected"),meta:A(E({},d||{}),{arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,f,d)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):gO(),m=new AbortController,g,v;function h(S){v=S,m.abort()}c&&(c.aborted?h(eb):c.addEventListener("abort",()=>h(eb),{once:!0}));let y=(function(){return M(this,null,function*(){var T,C;let S;try{let k=(T=r==null?void 0:r.condition)==null?void 0:T.call(r,l,{getState:f,extra:d});if(SO(k)&&(k=yield k),k===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let R=new Promise((O,L)=>{g=()=>{L({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",g,{once:!0})});u(i(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),S=yield Promise.race([R,Promise.resolve(n(l,{dispatch:u,getState:f,extra:d,requestId:p,signal:m.signal,abort:h,rejectWithValue:((O,L)=>new Qg(O,L)),fulfillWithValue:((O,L)=>new Jw(O,L))})).then(O=>{if(O instanceof Qg)throw O;return O instanceof Jw?o(O.payload,p,l,O.meta):o(O,p,l)})])}catch(k){S=k instanceof Qg?s(null,p,l,k.payload,k.meta):s(k,p,l)}finally{g&&m.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(S)&&S.meta.condition||u(S),S})})();return Object.assign(y,{abort:h,requestId:p,arg:l,unwrap(){return y.then(vO)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:pO(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function vO(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function SO(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ob=Symbol.for("rtk-slice-createasyncthunk"),w8={[ob]:ge};function xO(e,t){return`${e}/${t}`}function wO({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[ob];return function(o){let{name:i,reducerPath:s=i}=o;if(!i)throw new Error(Zr(11));let a=(typeof o.reducers=="function"?o.reducers(EO()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(x,T){let C=typeof x=="string"?x:x.type;if(!C)throw new Error(Zr(12));if(C in c.sliceCaseReducersByType)throw new Error(Zr(13));return c.sliceCaseReducersByType[C]=T,u},addMatcher(x,T){return c.sliceMatchers.push({matcher:x,reducer:T}),u},exposeAction(x,T){return c.actionCreators[x]=T,u},exposeCaseReducer(x,T){return c.sliceCaseReducersByName[x]=T,u}};l.forEach(x=>{let T=a[x],C={reducerName:x,type:xO(i,x),createNotation:typeof o.reducers=="function"};TO(T)?RO(C,T,u,t):CO(C,T,u)});function f(){let[x={},T=[],C=void 0]=typeof o.extraReducers=="function"?rb(o.extraReducers):[o.extraReducers],k=E(E({},x),c.sliceCaseReducersByType);return dO(o.initialState,R=>{for(let O in k)R.addCase(O,k[O]);for(let O of c.sliceMatchers)R.addMatcher(O.matcher,O.reducer);for(let O of T)R.addMatcher(O.matcher,O.reducer);C&&R.addDefaultCase(C)})}let d=x=>x,p=new Map,m=new WeakMap,g;function v(x,T){return g||(g=f()),g(x,T)}function h(){return g||(g=f()),g.getInitialState()}function y(x,T=!1){function C(R){let O=R[x];return typeof O=="undefined"&&T&&(O=pd(m,C,h)),O}function k(R=d){let O=pd(p,T,()=>new WeakMap);return pd(O,R,()=>{var U;let L={};for(let[J,Y]of Object.entries((U=o.selectors)!=null?U:{}))L[J]=bO(Y,R,()=>pd(m,R,h),T);return L})}return{reducerPath:x,getSelectors:k,get selectors(){return k(C)},selectSlice:C}}let S=A(E({name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:h},y(s)),{injectInto(x,k={}){var R=k,{reducerPath:T}=R,C=ie(R,["reducerPath"]);let O=T!=null?T:s;return x.inject({reducerPath:O,reducer:v},C),E(E({},S),y(O,!0))}});return S}}function bO(e,t,n,r){function o(i,...s){let a=t(i);return typeof a=="undefined"&&r&&(a=n()),e(a,...s)}return o.unwrapped=e,o}var Re=wO();function EO(){function e(t,n){return E({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function CO({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!kO(r))throw new Error(Zr(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Rt(e,s):Rt(e))}function TO(e){return e._reducerDefinitionType==="asyncThunk"}function kO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function RO({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Zr(18));let{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,f=o(e,i,u);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:s||md,pending:a||md,rejected:l||md,settled:c||md})}function md(){}var ib="listener",sb="completed",ab="cancelled",b8=`task-${ab}`,E8=`task-${sb}`,C8=`${ib}-${ab}`,T8=`${ib}-${sb}`;var{assign:lb}=Object;var Zg="listenerMiddleware";var PO=lb(Rt(`${Zg}/add`),{withTypes:()=>PO}),k8=Rt(`${Zg}/removeAll`),IO=lb(Rt(`${Zg}/remove`),{withTypes:()=>IO});function Zr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yl=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(yl||{});var AO={isLoggedIn:null,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1,loginError:null},Pt=e=>e.auth.isLoggedIn;var cb=e=>e.auth.verifyFetchState,ub=e=>e.auth.showLoginOverlay,db=e=>e.auth.loginError,Jr=ge("auth/validate",(e,t)=>M(null,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),fb=ge("auth/requestLogin",(n,r)=>M(null,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),Jg=ge("auth/loginWithPassword",(r,o)=>M(null,[r,o],function*({username:e,password:t},n){let{deepdeskAPI:i}=n.extra;return i.loginWithPassword(e,t)})),gd=ge("auth/logout",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;yield n.logout()})),vl=ge("auth/verifyLoginToken",(n,r)=>M(null,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),pb=Re({name:"auth",initialState:AO,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload},setLoginError(e,t){e.loginError=t.payload},clearLoginError(e){e.loginError=null}},extraReducers:e=>{e.addCase(Jr.pending,t=>{t.loginFetchState="loading"}),e.addCase(Jr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Jr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Jg.pending,t=>{t.loginFetchState="loading",t.loginError=null}),e.addCase(Jg.fulfilled,t=>{t.isLoggedIn=!0,t.loginFetchState="done",t.loginError=null,t.showLoginOverlay=!1}),e.addCase(Jg.rejected,(t,n)=>{t.loginFetchState="error",t.isLoggedIn=!1,t.loginError=n.error.message==="Bad Request"?"Invalid credentials":"Login failed"}),e.addCase(gd.fulfilled,t=>{t.isLoggedIn=!1,t.loginFetchState="idle",t.loginError=null}),e.addCase(gd.rejected,t=>{t.isLoggedIn=!1,t.loginFetchState="error"}),e.addCase(vl.pending,t=>{t.verifyFetchState="loading"}),e.addCase(vl.rejected,t=>{t.verifyFetchState="error"}),e.addCase(vl.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ws,setShowLoginOverlay:mb,setLoginError:eh,clearLoginError:hd}=pb.actions,gb=pb.reducer;var Sl=class{diff(t,n,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);let i=this.castInput(t,r),s=this.castInput(n,r),a=this.removeEmpty(this.tokenize(i,r)),l=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(a,l,r,o)}diffWithOptionsObj(t,n,r,o){var i;let s=y=>{if(y=this.postProcess(y,r),o){setTimeout(function(){o(y)},0);return}else return y},a=n.length,l=t.length,c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let f=(i=r.timeout)!==null&&i!==void 0?i:1/0,d=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],n,t,0,r);if(p[0].oldPos+1>=l&&m+1>=a)return s(this.buildValues(p[0].lastComponent,n,t));let g=-1/0,v=1/0,h=()=>{for(let y=Math.max(g,-c);y<=Math.min(v,c);y+=2){let S,x=p[y-1],T=p[y+1];x&&(p[y-1]=void 0);let C=!1;if(T){let R=T.oldPos-y;C=T&&0<=R&&R<a}let k=x&&x.oldPos+1<l;if(!C&&!k){p[y]=void 0;continue}if(!k||C&&x.oldPos<T.oldPos?S=this.addToPath(T,!0,!1,0,r):S=this.addToPath(x,!1,!0,1,r),m=this.extractCommon(S,n,t,y,r),S.oldPos+1>=l&&m+1>=a)return s(this.buildValues(S.lastComponent,n,t))||!0;p[y]=S,S.oldPos+1>=l&&(v=Math.min(v,y-1)),m+1>=a&&(g=Math.max(g,y+1))}c++};if(o)(function y(){setTimeout(function(){if(c>u||Date.now()>d)return o(void 0);h()||y()},0)})();else for(;c<=u&&Date.now()<=d;){let y=h();if(y)return y}}addToPath(t,n,r,o,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===n&&s.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}}extractCommon(t,n,r,o,i){let s=n.length,a=r.length,l=t.oldPos,c=l-o,u=0;for(;c+1<s&&l+1<a&&this.equals(r[l+1],n[c+1],i);)c++,l++,u++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!i.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,c}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let o=[],i;for(;t;)o.push(t),i=t.previousComponent,delete t.previousComponent,t=i;o.reverse();let s=o.length,a=0,l=0,c=0;for(;a<s;a++){let u=o[a];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=n.slice(l,l+u.count);f=f.map(function(d,p){let m=r[c+p];return m.length>d.length?m:d}),u.value=this.join(f)}else u.value=this.join(n.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return o}};var th=class extends Sl{},hb=new th;function nh(e,t,n){return hb.diff(e,t,n)}function yb(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function zo(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)=>zo(i,t[s],n-1)):yb(e)&&yb(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>zo(e[s],t[s],n-1)):!1}function _O(e){return Math.max(...e.map(t=>t.length))}function MO(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return A(E({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function vb(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<_O(r);o++){let i=MO(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 NO=2;function Sb(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=vb(e,NO);return n&&n.text!==t?n:e[0]}var OO={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},te=OO;var xb={current:null,isSupported:null},lt=Rt("resetConversation"),yd=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Pr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},$s=e=>e.conversation.isSupported,rh=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),vd=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Sd=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),xd=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),oh=ge("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,metadata:l})})}),ih=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>E({},o)))}),LO=[vd.rejected,Sd.rejected,xd.rejected,ih.rejected].map(e=>e==null?void 0:e.toString());function DO(e){return LO.includes(e.type)}var FO=Re({name:"conversation",initialState:xb,reducers:{},extraReducers:e=>{e.addCase(rh.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(vd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(Sd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(oh.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xd.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(lt,()=>xb).addMatcher(DO,(t,n)=>{var r;throw te.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),wb=FO.reducer;var Mi={text:"",html:null,suggestionTextStart:0,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],pinnedSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function sh(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 wd=Rt("input/applyImageSuggestion"),bb=Re({name:"input",initialState:Mi,reducers:{setInput(e,t){var s,a;let{beforeInputChange:n}=e,{text:r,html:o,suggestionTextStart:i}=t.payload;if(e.text=r,e.html=o!=null?o:null,e.suggestionTextStart=r===""?0:Math.max(0,i!=null?i:0),r==="")e.metrics=Mi.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:l,shiftKey:c,ctrlKey:u,metaKey:f,altKey:d}=n.keyDown;switch(l){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:p}=e,m=nh(n.text,p);n.text.length-p.length>1&&e.metrics.deletions.push(...m.filter(g=>g.removed).map(g=>g.value)),e.metrics.numCharsDeleted+=n.text.length-p.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(u||f)break;default:if(!u&&!f&&!d){e.metrics.numCharsTyped+=1;let p=((s=n.selection)==null?void 0:s.start)!==void 0&&((a=n.selection)==null?void 0:a.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;p&&p.length>0&&(e.metrics.numCharsDeleted+=p.length,e.metrics.deletions.push(p))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},sendMessage(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(n=>!e.metrics.textSuggestions.some(r=>r.text===n.text&&r.source===n.source))},setSelection(e,t){t.payload!==null&&(zo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:i,abTestName:s,trainingJobs:a,sourceText:l,searchTerm:c,assistantCode:u,text:f},eventMetrics:{inputType:d},replace:p}=n,m=o==="search"||o==="personal-collection-search",g=r.slice(e.text.substring(0,e.selection.start).length);(m||p==="selection")&&(g=r),n.suggestion.source==="search-overlay"&&(g=f),e.metrics.textSuggestions.push({text:g,source:o,assistantCode:u,abVariant:i,abTestName:s,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:m?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=A(E({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o!=null&&o.length?o.length:0),s=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=A(E({},e.metrics),{numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=Ni({input:e}),r=Sb(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setPinnedSuggestions(e,t){e.pinnedSuggestions=t.payload},removePinnedSuggestions(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(r=>r.source!==t.payload.source||t.payload.assistantCode&&r.assistantCode!==t.payload.assistantCode?!0:t.payload.text?r.text!==t.payload.text:!1);let n=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex>n-1&&(e.selectedSuggestionIndex=-1)},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Mi.metrics}},extraReducers:e=>{e.addCase(lt,t=>{t.mixedSuggestion=Mi.mixedSuggestion,t.textSuggestions=Mi.textSuggestions,t.selectedSuggestionIndex=Mi.selectedSuggestionIndex,t.metrics=Mi.metrics})}}),Ni=e=>{let{text:t,selection:n,suggestionTextStart:r}=e.input;return t.slice(r,n.end)},zO=e=>e.input.mixedSuggestion,HO=e=>e.input.pinnedSuggestions,BO=e=>e.input.textSuggestions,xl=e=>e.input.selectedSuggestionIndex,Oi=fn([BO,HO],(e,t)=>[...e,...t]),js=fn([Oi,zO,xl],(e,t,n)=>n>-1?e[n]:t),Eb=e=>e.input.selection,{commitSuggestion:kn,offeredTextSuggestion:Cb,registerCut:Tb,registerKeyDown:kb,registerKeyUp:Rb,registerPaste:Pb,selectNextTextSuggestion:Ib,selectPreviousTextSuggestion:Ab,selectTextSuggestionByIndex:bd,setInput:Ed,setMetrics:_b,setPinnedSuggestions:Ks,removePinnedSuggestions:Li,setSelection:Cd,setTextSuggestions:Ho,resetMetrics:Mb,sendMessage:Di}=bb.actions,Nb=bb.reducer;function Ob(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var UO={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle",showNicknameDialog:!1},Gs=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},Lb=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},Db=e=>{var t;return(t=e.info.customData)!=null?t:null},bl=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&Ob(e.visitorTimeZone)?e.visitorTimeZone:rw,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},VO=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Fb=ge("info/setAgentNickname",(n,r)=>M(null,[n,r],function*({agentNickname:e},t){var s;let{deepdeskAPI:o}=t.extra,i=yield o.patchMe({nickname:e});return{agentNickname:(s=i==null?void 0:i.nickname)!=null?s:e}})),wl=ge("info/setAgentInfo",(e,t)=>M(null,null,function*(){var i,s,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=VO.reduce((c,[u,f])=>!r[f]&&u in e?A(E({},c),{[f]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(i=r.nickname)!=null?i:e.agentNickname,agentEmail:(s=r.email)!=null?s:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),ah=ge("info/setAgentSettings",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=E(E({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),lh=ge("info/getAgentSettings",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),zb=Re({name:"info",initialState:UO,reducers:{setVisitorInfo(e,t){e.visitorInfo=E(E({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload},setShowNicknameDialog(e,t){e.showNicknameDialog=t.payload}},extraReducers:e=>{e.addCase(wl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=E(E({},t.agentInfo),n.meta.arg)}).addCase(wl.rejected,t=>{t.fetchState="error"}).addCase(wl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(ah.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(lh.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(lt,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:Hb,setCustomData:Bb,setPlatformVariables:Ub,setShowNicknameDialog:Vb}=zb.actions,Wb=zb.reducer;function or(e,t){return t?e==null?(te.warn("replaceVars called with non-string text; upstream contract violation",{keys:Object.keys(t)}),e):Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var Td={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},$b=e=>e.search.isOpen,jb=e=>e.search.page,ch=e=>e.search.list,Kb=e=>e.search.aggregates,WO=fn([ch,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),Gb=e=>t=>WO(t,e),Fi=ge("search/getAll",(e,t)=>M(null,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:i}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:s,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:bl(r)});return{results:s.map(c=>A(E(E({},c),c.title&&i?{title:or(c.title,i)}:{}),{text:or(c.text,i!=null?i:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),qb=Re({name:"search",initialState:Td,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Td.fetchState,e.list=Td.list}},extraReducers:e=>{e.addCase(Fi.pending,t=>{t.fetchState="loading"}).addCase(Fi.rejected,(t,n)=>{t.fetchState="error",te.error(n.error)}).addCase(Fi.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(lt,()=>Td)}}),{resetSearch:kd,setIsOpen:ir,setPage:qs}=qb.actions,Yb=qb.reducer;var uh="SetOutputs",Ys="ShowLoginOverlay",El="UserLoggedIn",$O="UserLoggedOut",eo="ApplySuggestion",dh="ApplyImageSuggestion",jO="ShowCommandPalette",Rd="ShowNicknameDialog",Pd="ReduxAction",KO="RemovePinnedSuggestion",GO=e=>({[uh]:t=>{var o,i;let n=(o=e.getState().conversation.current)==null?void 0:o.externalId,r=(i=t==null?void 0:t.payload)==null?void 0:i.externalConversationId;r&&r!==n||e.dispatch(A(E({},t),{isBroadcasted:!0}))},[Pd]:t=>{t.isBroadcasted||e.dispatch(A(E({},t),{isBroadcasted:!0}))},[KO]:t=>{e.dispatch(Li(t))},[jO]:t=>{e.dispatch(ir(t.isOpen)),t.page&&e.dispatch(qs(t.page))},[Rd]:t=>{e.dispatch(Vb(t.showNicknameDialog))},[Ys]:t=>{e.dispatch(mb(t))},[El]:()=>{e.dispatch(Jr())},[$O]:()=>{e.dispatch(Jr())},[dh]:t=>{e.dispatch(wd({suggestion:t.suggestion}))},[eo]:t=>{e.dispatch(kn(A(E({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),Xb=GO;function Id(e){return ge("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,A(E({conversationId:r},o),{data:t.data}))})(e)}function Ze(){let e=we();return(t,n)=>M(null,null,function*(){yield e(Id({name:t,data:n}))})}var Xs=b(Z());function Ad(e,t){let n=(0,Xs.useRef)(e);n.current=e;let[r,o]=(0,Xs.useState)(void 0),[i,s]=(0,Xs.useState)(void 0),[a,l]=(0,Xs.useState)("idle"),c=we();return{error:i,state:a,data:r,call:d=>M(null,null,function*(){l("loading"),yield c(n.current(d)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{s(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),s(void 0)}}}var Cl=b(Z()),Zb=b(I()),Qb=Cl.default.createContext(null),to=({broadcastEvents:e,children:t})=>{let n=Cl.default.useMemo(()=>e,[]);return(0,Zb.jsx)(Qb.Provider,{value:n,children:t})},pn=()=>{let e=(0,Cl.useContext)(Qb);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var zd=b(Z());var fh=function(e,t){return fh=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])},fh(e,t)};function Tl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fh(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Rn=function(){return Rn=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},Rn.apply(this,arguments)};function Jb(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 _d(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))}function Md(e,t){var n=t&&t.cache?t.cache:eL,r=t&&t.serializer?t.serializer:ZO,o=t&&t.strategy?t.strategy:YO;return o(e,{cache:n,serializer:r})}function qO(e){return e==null||typeof e=="number"||typeof e=="boolean"}function eE(e,t,n,r){var o=qO(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function tE(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function ph(e,t,n,r,o){return n.bind(t,e,r,o)}function YO(e,t){var n=e.length===1?eE:tE;return ph(e,this,n,t.cache.create(),t.serializer)}function XO(e,t){return ph(e,this,tE,t.cache.create(),t.serializer)}function QO(e,t){return ph(e,this,eE,t.cache.create(),t.serializer)}var ZO=function(){return JSON.stringify(arguments)},JO=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),eL={create:function(){return new JO}},Nd={variadic:XO,monadic:QO};var Od;(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"})(Od||(Od={}));var Ld=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Un;(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"})(Un||(Un={}));var Dd;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Dd||(Dd={}));function mh(e){return e.type===Un.literal}function gh(e){return e.type===Un.argument}function kl(e){return e.type===Un.number}function Rl(e){return e.type===Un.date}function Pl(e){return e.type===Un.time}function Il(e){return e.type===Un.select}function Al(e){return e.type===Un.plural}function nE(e){return e.type===Un.pound}function _l(e){return e.type===Un.tag}function Fd(e){return!!(e&&typeof e=="object"&&e.type===Dd.number)}function Ml(e){return!!(e&&typeof e=="object"&&e.type===Dd.dateTime)}function hh(e){e.forEach(function(t){if(delete t.location,Il(t)||Al(t))for(var n in t.options)delete t.options[n].location,hh(t.options[n].value);else kl(t)&&Fd(t.style)||(Rl(t)||Pl(t))&&Ml(t.style)?delete t.style.location:_l(t)&&hh(t.children)})}function rE(e,t){t===void 0&&(t={}),t=Rn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ld(e,t).parse();if(n.err){var r=SyntaxError(Od[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||hh(n.val),n.val}var zi;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(zi||(zi={}));var Nl=(function(e){Tl(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 yh=(function(e){Tl(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('", "'),'"'),zi.INVALID_VALUE,i)||this}return t})(Nl);var oE=(function(e){Tl(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),zi.INVALID_VALUE,o)||this}return t})(Nl);var iE=(function(e){Tl(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,'"'),zi.MISSING_VALUE,r)||this}return t})(Nl);var zt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(zt||(zt={}));function tL(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==zt.literal||n.type!==zt.literal?t.push(n):r.value+=n.value,t},[])}function nL(e){return typeof e=="function"}function Ol(e,t,n,r,o,i,s){if(e.length===1&&mh(e[0]))return[{type:zt.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(mh(u)){a.push({type:zt.literal,value:u.value});continue}if(nE(u)){typeof i=="number"&&a.push({type:zt.literal,value:n.getNumberFormat(t).format(i)});continue}var f=u.value;if(!(o&&f in o))throw new iE(f,s);var d=o[f];if(gh(u)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?zt.literal:zt.object,value:d});continue}if(Rl(u)){var p=typeof u.style=="string"?r.date[u.style]:Ml(u.style)?u.style.parsedOptions:void 0;a.push({type:zt.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Pl(u)){var p=typeof u.style=="string"?r.time[u.style]:Ml(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:zt.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(kl(u)){var p=typeof u.style=="string"?r.number[u.style]:Fd(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:zt.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(_l(u)){var m=u.children,g=u.value,v=o[g];if(!nL(v))throw new oE(g,"function",s);var h=Ol(m,t,n,r,o,i),y=v(h.map(function(T){return T.value}));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map(function(T){return{type:typeof T=="string"?zt.literal:zt.object,value:T}}))}if(Il(u)){var S=u.options[d]||u.options.other;if(!S)throw new yh(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ol(S.value,t,n,r,o));continue}if(Al(u)){var S=u.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Nl(`Intl.PluralRules is not available in this environment.
13
13
  Try polyfilling it using "@formatjs/intl-pluralrules"
14
- `,zi.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));S=u.options[x]||u.options.other}if(!S)throw new yh(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ol(S.value,t,n,r,o,d-(u.offset||0)));continue}}return eL(a)}function nL(e,t){return t?Rn(Rn(Rn({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Rn(Rn({},e[r]),t[r]||{}),n},{})):e}function rL(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=nL(e[r],t[r]),n},Rn({},e)):e}function vh(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function oL(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.number),strategy:Nd.variadic}),getDateTimeFormat:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.dateTime),strategy:Nd.variadic}),getPluralRules:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.pluralRules),strategy:Nd.variadic})}}var Sh=(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(c){var u=i.formatToParts(c);if(u.length===1)return u[0].value;var f=u.reduce(function(d,p){return!d.length||p.type!==zt.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(c){return Ol(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.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=Zb(s,["formatters"]);this.ast=e.__parse(t,Rn(Rn({},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=rL(e.formats,r),this.formatters=o&&o.formatters||oL(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!="undefined"){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=nE,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 iL(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var sL="dummy",xh=(0,zd.createContext)(null);function se(e){var r;let t=(0,zd.useContext)(xh);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,i)=>{let s=iL(n,o);return s?new Sh(s).format(i):(t!==sL&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}function Th(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bi=Th();function uE(e){Bi=e}var Fl={exec:()=>null};function Ie(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Xt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Xt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},aL=/^(?:[ \t]*(?:\n|$))+/,lL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kh=/(?:[*+-]|\d{1,9}[.)])/,dE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fE=Ie(dE).replace(/bull/g,kh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dL=Ie(dE).replace(/bull/g,kh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Rh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fL=/^[^\n]+/,Ph=/(?!\s*\])(?:\\.|[^\[\]\\])+/,pL=Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ph).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),mL=Ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kh).getRegex(),$d="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ih=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gL=Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ih).replace("tag",$d).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pE=Ie(Rh).replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex(),hL=Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pE).getRegex(),Ah={blockquote:hL,code:lL,def:pL,fences:cL,heading:uL,hr:zl,html:gL,lheading:fE,list:mL,newline:aL,paragraph:pE,table:Fl,text:fL},iE=Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex(),yL=A(E({},Ah),{lheading:dL,table:iE,paragraph:Ie(Rh).replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",iE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex()}),vL=A(E({},Ah),{html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ih).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ie(Rh).replace("hr",zl).replace("heading",` *#{1,6} *[^
15
- ]`).replace("lheading",fE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),SL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mE=/^( {2,}|\\)\n(?!\s*$)/,wL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,jd=/[\p{P}\p{S}]/u,_h=/[\s\p{P}\p{S}]/u,gE=/[^\s\p{P}\p{S}]/u,bL=Ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_h).getRegex(),hE=/(?!~)[\p{P}\p{S}]/u,EL=/(?!~)[\s\p{P}\p{S}]/u,CL=/(?:[^\s\p{P}\p{S}]|~)/u,TL=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,yE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kL=Ie(yE,"u").replace(/punct/g,jd).getRegex(),RL=Ie(yE,"u").replace(/punct/g,hE).getRegex(),vE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",PL=Ie(vE,"gu").replace(/notPunctSpace/g,gE).replace(/punctSpace/g,_h).replace(/punct/g,jd).getRegex(),IL=Ie(vE,"gu").replace(/notPunctSpace/g,CL).replace(/punctSpace/g,EL).replace(/punct/g,hE).getRegex(),AL=Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gE).replace(/punctSpace/g,_h).replace(/punct/g,jd).getRegex(),_L=Ie(/\\(punct)/,"gu").replace(/punct/g,jd).getRegex(),ML=Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),NL=Ie(Ih).replace("(?:-->|$)","-->").getRegex(),OL=Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",NL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ud=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,LL=Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ud).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),SE=Ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Ud).replace("ref",Ph).getRegex(),xE=Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ph).getRegex(),DL=Ie("reflink|nolink(?!\\()","g").replace("reflink",SE).replace("nolink",xE).getRegex(),Mh={_backpedal:Fl,anyPunctuation:_L,autolink:ML,blockSkip:TL,br:mE,code:xL,del:Fl,emStrongLDelim:kL,emStrongRDelimAst:PL,emStrongRDelimUnd:AL,escape:SL,link:LL,nolink:xE,punctuation:bL,reflink:SE,reflinkSearch:DL,tag:OL,text:wL,url:Fl},FL=A(E({},Mh),{link:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Ud).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ud).getRegex()}),bh=A(E({},Mh),{emStrongRDelimAst:IL,emStrongLDelim:RL,url:Ie(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),zL=A(E({},bh),{br:Ie(mE).replace("{2,}","*").getRegex(),text:Ie(bh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Hd={normal:Ah,gfm:yL,pedantic:vL},Ll={normal:Mh,gfm:bh,breaks:zL,pedantic:FL},HL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sE=e=>HL[e];function Ir(e,t){if(t){if(Xt.escapeTest.test(e))return e.replace(Xt.escapeReplace,sE)}else if(Xt.escapeTestNoEncode.test(e))return e.replace(Xt.escapeReplaceNoEncode,sE);return e}function aE(e){try{e=encodeURI(e).replace(Xt.percentDecode,"%")}catch(t){return null}return e}function lE(e,t){var i;let n=e.replace(Xt.findPipe,(s,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Xt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Xt.slashPipe,"|");return r}function Dl(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r;){let i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function BL(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function cE(e,t,n,r,o){let i=t.href,s=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function UL(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
14
+ `,zi.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));S=u.options[x]||u.options.other}if(!S)throw new yh(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ol(S.value,t,n,r,o,d-(u.offset||0)));continue}}return tL(a)}function rL(e,t){return t?Rn(Rn(Rn({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Rn(Rn({},e[r]),t[r]||{}),n},{})):e}function oL(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=rL(e[r],t[r]),n},Rn({},e)):e}function vh(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function iL(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.number),strategy:Nd.variadic}),getDateTimeFormat:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.dateTime),strategy:Nd.variadic}),getPluralRules:Md(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,_d([void 0],n,!1)))},{cache:vh(e.pluralRules),strategy:Nd.variadic})}}var Sh=(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(c){var u=i.formatToParts(c);if(u.length===1)return u[0].value;var f=u.reduce(function(d,p){return!d.length||p.type!==zt.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(c){return Ol(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.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=Jb(s,["formatters"]);this.ast=e.__parse(t,Rn(Rn({},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=oL(e.formats,r),this.formatters=o&&o.formatters||iL(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!="undefined"){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=rE,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 sL(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var aL="dummy",xh=(0,zd.createContext)(null);function se(e){var r;let t=(0,zd.useContext)(xh);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,i)=>{let s=sL(n,o);return s?new Sh(s).format(i):(t!==aL&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}function Th(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bi=Th();function dE(e){Bi=e}var Fl={exec:()=>null};function Ie(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Qt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Qt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},lL=/^(?:[ \t]*(?:\n|$))+/,cL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,uL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kh=/(?:[*+-]|\d{1,9}[.)])/,fE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pE=Ie(fE).replace(/bull/g,kh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),fL=Ie(fE).replace(/bull/g,kh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Rh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,pL=/^[^\n]+/,Ph=/(?!\s*\])(?:\\.|[^\[\]\\])+/,mL=Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ph).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gL=Ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kh).getRegex(),$d="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ih=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hL=Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ih).replace("tag",$d).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mE=Ie(Rh).replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex(),yL=Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mE).getRegex(),Ah={blockquote:yL,code:cL,def:mL,fences:uL,heading:dL,hr:zl,html:hL,lheading:pE,list:gL,newline:lL,paragraph:mE,table:Fl,text:pL},sE=Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex(),vL=A(E({},Ah),{lheading:fL,table:sE,paragraph:Ie(Rh).replace("hr",zl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$d).getRegex()}),SL=A(E({},Ah),{html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ih).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ie(Rh).replace("hr",zl).replace("heading",` *#{1,6} *[^
15
+ ]`).replace("lheading",pE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),xL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gE=/^( {2,}|\\)\n(?!\s*$)/,bL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,jd=/[\p{P}\p{S}]/u,_h=/[\s\p{P}\p{S}]/u,hE=/[^\s\p{P}\p{S}]/u,EL=Ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_h).getRegex(),yE=/(?!~)[\p{P}\p{S}]/u,CL=/(?!~)[\s\p{P}\p{S}]/u,TL=/(?:[^\s\p{P}\p{S}]|~)/u,kL=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,vE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,RL=Ie(vE,"u").replace(/punct/g,jd).getRegex(),PL=Ie(vE,"u").replace(/punct/g,yE).getRegex(),SE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",IL=Ie(SE,"gu").replace(/notPunctSpace/g,hE).replace(/punctSpace/g,_h).replace(/punct/g,jd).getRegex(),AL=Ie(SE,"gu").replace(/notPunctSpace/g,TL).replace(/punctSpace/g,CL).replace(/punct/g,yE).getRegex(),_L=Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hE).replace(/punctSpace/g,_h).replace(/punct/g,jd).getRegex(),ML=Ie(/\\(punct)/,"gu").replace(/punct/g,jd).getRegex(),NL=Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),OL=Ie(Ih).replace("(?:-->|$)","-->").getRegex(),LL=Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",OL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ud=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,DL=Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ud).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xE=Ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Ud).replace("ref",Ph).getRegex(),wE=Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ph).getRegex(),FL=Ie("reflink|nolink(?!\\()","g").replace("reflink",xE).replace("nolink",wE).getRegex(),Mh={_backpedal:Fl,anyPunctuation:ML,autolink:NL,blockSkip:kL,br:gE,code:wL,del:Fl,emStrongLDelim:RL,emStrongRDelimAst:IL,emStrongRDelimUnd:_L,escape:xL,link:DL,nolink:wE,punctuation:EL,reflink:xE,reflinkSearch:FL,tag:LL,text:bL,url:Fl},zL=A(E({},Mh),{link:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Ud).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ud).getRegex()}),bh=A(E({},Mh),{emStrongRDelimAst:AL,emStrongLDelim:PL,url:Ie(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),HL=A(E({},bh),{br:Ie(gE).replace("{2,}","*").getRegex(),text:Ie(bh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Hd={normal:Ah,gfm:vL,pedantic:SL},Ll={normal:Mh,gfm:bh,breaks:HL,pedantic:zL},BL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},aE=e=>BL[e];function Ir(e,t){if(t){if(Qt.escapeTest.test(e))return e.replace(Qt.escapeReplace,aE)}else if(Qt.escapeTestNoEncode.test(e))return e.replace(Qt.escapeReplaceNoEncode,aE);return e}function lE(e){try{e=encodeURI(e).replace(Qt.percentDecode,"%")}catch(t){return null}return e}function cE(e,t){var i;let n=e.replace(Qt.findPipe,(s,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Qt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Qt.slashPipe,"|");return r}function Dl(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r;){let i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function UL(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function uE(e,t,n,r,o){let i=t.href,s=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function VL(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
16
16
  `).map(i=>{let s=i.match(n.other.beginningSpace);if(s===null)return i;let[a]=s;return a.length>=o.length?i.slice(o.length):i}).join(`
17
17
  `)}var Vd=class{constructor(e){xe(this,"options");xe(this,"rules");xe(this,"lexer");this.options=e||Bi}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Dl(n,`
18
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=UL(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Dl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Dl(t[0],`
18
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=VL(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Dl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Dl(t[0],`
19
19
  `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Dl(t[0],`
20
20
  `).split(`
21
21
  `),r="",o="",i=[];for(;n.length>0;){let s=!1,a=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))a.push(n[l]),s=!0;else if(!s)a.push(n[l]);else break;n=n.slice(l);let c=a.join(`
@@ -34,10 +34,10 @@ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
34
34
  `,1)[0],k;if(d=C,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),k=d):k=d.replace(this.rules.other.tabCharGlobal," "),S.test(d)||x.test(d)||T.test(d)||h.test(d)||y.test(d))break;if(k.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
35
35
  `+k.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||x.test(f)||y.test(f))break;u+=`
36
36
  `+d}!p&&!d.trim()&&(p=!0),c+=C+`
37
- `,e=e.substring(C.length+1),f=k.slice(m)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let g=null,v;this.options.gfm&&(g=this.rules.other.listIsTask.exec(u),g&&(v=g[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:c,task:!!g,checked:v,loose:!1,text:u,tokens:[]}),o.raw+=c}let a=o.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let l=0;l<o.items.length;l++)if(this.lexer.state.top=!1,o.items[l].tokens=this.lexer.blockTokens(o.items[l].text,[]),!o.loose){let c=o.items[l].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=u}if(o.loose)for(let l=0;l<o.items.length;l++)o.items[l].loose=!0;return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:o}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=lE(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
38
- `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of o)i.rows.push(lE(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
39
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Dl(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=BL(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),cE(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[r.toLowerCase()];if(!o){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return cE(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let i=[...r[0]].length-1,s,a,l=i,c=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){l+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let f=[...r[0]][0].length,d=e.slice(0,i+r.index+f+a);if(Math.min(i,a)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,r;let t;if(t=this.rules.inline.url.exec(e)){let o,i;if(t[2]==="@")o=t[0],i="mailto:"+o;else{let s;do s=t[0],t[0]=(r=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?r:"";while(s!==t[0]);o=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},no=class Eh{constructor(t){xe(this,"tokens");xe(this,"options");xe(this,"state");xe(this,"tokenizer");xe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Bi,this.options.tokenizer=this.options.tokenizer||new Vd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Xt,block:Hd.normal,inline:Ll.normal};this.options.pedantic?(n.block=Hd.pedantic,n.inline=Ll.pedantic):this.options.gfm&&(n.block=Hd.gfm,this.options.breaks?n.inline=Ll.breaks:n.inline=Ll.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hd,inline:Ll}}static lex(t,n){return new Eh(n).lex(t)}static lexInline(t,n){return new Eh(n).inlineTokens(t)}lex(t){t=t.replace(Xt.carriageReturn,`
40
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,i,s;for(this.options.pedantic&&(t=t.replace(Xt.tabCharGlobal," ").replace(Xt.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
37
+ `,e=e.substring(C.length+1),f=k.slice(m)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let g=null,v;this.options.gfm&&(g=this.rules.other.listIsTask.exec(u),g&&(v=g[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:c,task:!!g,checked:v,loose:!1,text:u,tokens:[]}),o.raw+=c}let a=o.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let l=0;l<o.items.length;l++)if(this.lexer.state.top=!1,o.items[l].tokens=this.lexer.blockTokens(o.items[l].text,[]),!o.loose){let c=o.items[l].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=u}if(o.loose)for(let l=0;l<o.items.length;l++)o.items[l].loose=!0;return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:o}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=cE(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
38
+ `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of o)i.rows.push(cE(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
39
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Dl(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=UL(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),uE(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[r.toLowerCase()];if(!o){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return uE(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let i=[...r[0]].length-1,s,a,l=i,c=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){l+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let f=[...r[0]][0].length,d=e.slice(0,i+r.index+f+a);if(Math.min(i,a)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,r;let t;if(t=this.rules.inline.url.exec(e)){let o,i;if(t[2]==="@")o=t[0],i="mailto:"+o;else{let s;do s=t[0],t[0]=(r=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?r:"";while(s!==t[0]);o=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},no=class Eh{constructor(t){xe(this,"tokens");xe(this,"options");xe(this,"state");xe(this,"tokenizer");xe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Bi,this.options.tokenizer=this.options.tokenizer||new Vd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Qt,block:Hd.normal,inline:Ll.normal};this.options.pedantic?(n.block=Hd.pedantic,n.inline=Ll.pedantic):this.options.gfm&&(n.block=Hd.gfm,this.options.breaks?n.inline=Ll.breaks:n.inline=Ll.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hd,inline:Ll}}static lex(t,n){return new Eh(n).lex(t)}static lexInline(t,n){return new Eh(n).inlineTokens(t)}lex(t){t=t.replace(Qt.carriageReturn,`
40
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,i,s;for(this.options.pedantic&&(t=t.replace(Qt.tabCharGlobal," ").replace(Qt.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
41
41
  `:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
42
42
  `+a.raw,c.text+=`
43
43
  `+a.text,this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
@@ -46,7 +46,7 @@ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
46
46
  `+a.raw,c.text+=`
47
47
  `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a),r=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
48
48
  `+a.raw,c.text+=`
49
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,s="";for(;t;){i||(s=""),i=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(d=>(u=d.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=n.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startInline){let d=1/0,p=t.slice(1),m;this.options.extensions.startInline.forEach(g=>{m=g.call({lexer:this},p),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),i=!0;let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},Wd=class{constructor(e){xe(this,"options");xe(this,"parser");this.options=e||Bi}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let r=(i=(t||"").match(Xt.notSpaceStart))==null?void 0:i[0],o=e.replace(Xt.endingNewline,"")+`
49
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,s="";for(;t;){i||(s=""),i=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(d=>(u=d.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=n.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startInline){let d=1/0,p=t.slice(1),m;this.options.extensions.startInline.forEach(g=>{m=g.call({lexer:this},p),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),i=!0;let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},Wd=class{constructor(e){xe(this,"options");xe(this,"parser");this.options=e||Bi}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let r=(i=(t||"").match(Qt.notSpaceStart))==null?void 0:i[0],o=e.replace(Qt.endingNewline,"")+`
50
50
  `;return r?'<pre><code class="language-'+Ir(r)+'">'+(n?o:Ir(o,!0))+`</code></pre>
51
51
  `:"<pre><code>"+(n?o:Ir(o,!0))+`</code></pre>
52
52
  `}blockquote({tokens:e}){return`<blockquote>
@@ -64,25 +64,25 @@ ${this.parser.parse(e)}</blockquote>
64
64
  `}tablerow({text:e}){return`<tr>
65
65
  ${e}</tr>
66
66
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
67
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ir(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=aE(e);if(o===null)return r;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+Ir(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=aE(e);if(o===null)return Ir(n);e=o;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${Ir(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ir(e.text)}},Nh=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ro=class Ch{constructor(t){xe(this,"options");xe(this,"renderer");xe(this,"textRenderer");this.options=t||Bi,this.options.renderer=this.options.renderer||new Wd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nh}static parse(t,n){return new Ch(n).parse(t)}static parseInline(t,n){return new Ch(n).parseInline(t)}parse(t,n=!0){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],u+=`
67
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ir(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=lE(e);if(o===null)return r;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+Ir(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=lE(e);if(o===null)return Ir(n);e=o;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${Ir(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ir(e.text)}},Nh=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ro=class Ch{constructor(t){xe(this,"options");xe(this,"renderer");xe(this,"textRenderer");this.options=t||Bi,this.options.renderer=this.options.renderer||new Wd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nh}static parse(t,n){return new Ch(n).parse(t)}static parseInline(t,n){return new Ch(n).parseInline(t)}parse(t,n=!0){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],u+=`
68
68
  `+this.renderer.text(c);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(t,n=this.renderer){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=c||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},wh,Bd=(wh=class{constructor(e){xe(this,"options");xe(this,"block");this.options=e||Bi}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?no.lex:no.lexInline}provideParser(){return this.block?ro.parse:ro.parseInline}},xe(wh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),wh),Oh=class{constructor(...e){xe(this,"defaults",Th());xe(this,"options",this.setOptions);xe(this,"parse",this.parseMarkdown(!0));xe(this,"parseInline",this.parseMarkdown(!1));xe(this,"Parser",ro);xe(this,"Renderer",Wd);xe(this,"TextRenderer",Nh);xe(this,"Lexer",no);xe(this,"Tokenizer",Vd);xe(this,"Hooks",Bd);this.use(...e)}walkTokens(e,t){var r,o;let n=[];for(let i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{let s=i;for(let a of s.header)n=n.concat(this.walkTokens(a.tokens,t));for(let a of s.rows)for(let l of a)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let s=i;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=i;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let l=s[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r=E({},n);if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let i=t.renderers[o.name];i?t.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=i.apply(this,s)),a}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[o.level];i?i.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),r.extensions=t),n.renderer){let o=this.defaults.renderer||new Wd(this.defaults);for(let i in n.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,a=n.renderer[s],l=o[s];o[s]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Vd(this.defaults);for(let i in n.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,a=n.tokenizer[s],l=o[s];o[s]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Bd;for(let i in n.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,a=n.hooks[s],l=o[s];Bd.passThroughHooks.has(i)?o[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(o,c)).then(f=>l.call(o,f));let u=a.call(o,c);return l.call(o,u)}:o[s]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(s){let a=[];return a.push(i.call(this,s)),o&&(a=a.concat(o.call(this,s))),a}}this.defaults=E(E({},this.defaults),r)}),this}setOptions(e){return this.defaults=E(E({},this.defaults),e),this}lexer(e,t){return no.lex(e,t!=null?t:this.defaults)}parser(e,t){return ro.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(n,r)=>{let o=E({},r),i=E(E({},this.defaults),o),s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&o.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n=="undefined"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let a=i.hooks?i.hooks.provideLexer():e?no.lex:no.lexInline,l=i.hooks?i.hooks.provideParser():e?ro.parse:ro.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(c=>a(c,i)).then(c=>i.hooks?i.hooks.processAllTokens(c):c).then(c=>i.walkTokens?Promise.all(this.walkTokens(c,i.walkTokens)).then(()=>c):c).then(c=>l(c,i)).then(c=>i.hooks?i.hooks.postprocess(c):c).catch(s);try{i.hooks&&(n=i.hooks.preprocess(n));let c=a(n,i);i.hooks&&(c=i.hooks.processAllTokens(c)),i.walkTokens&&this.walkTokens(c,i.walkTokens);let u=l(c,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(c){return s(c)}}}onError(e,t){return n=>{if(n.message+=`
69
- Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ir(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Hi=new Oh;function Pe(e,t){return Hi.parse(e,t)}Pe.options=Pe.setOptions=function(e){return Hi.setOptions(e),Pe.defaults=Hi.defaults,uE(Pe.defaults),Pe};Pe.getDefaults=Th;Pe.defaults=Bi;Pe.use=function(...e){return Hi.use(...e),Pe.defaults=Hi.defaults,uE(Pe.defaults),Pe};Pe.walkTokens=function(e,t){return Hi.walkTokens(e,t)};Pe.parseInline=Hi.parseInline;Pe.Parser=ro;Pe.parser=ro.parse;Pe.Renderer=Wd;Pe.TextRenderer=Nh;Pe.Lexer=no;Pe.lexer=no.lex;Pe.Tokenizer=Vd;Pe.Hooks=Bd;Pe.parse=Pe;var MB=Pe.options,NB=Pe.setOptions,OB=Pe.use,LB=Pe.walkTokens,DB=Pe.parseInline;var FB=ro.parse,zB=no.lex;var Kd=(e,t)=>{let n=[],r=new Oh,o=i=>{i.type==="code"&&i.lang===t&&n.push(i.text)};return r.use({walkTokens:o}),r.parse(e),n};var wE={cues:[],threads:{},pending:[]},bE=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var EE=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Gd=Rt("assistants/callToAction"),Hl=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>M(null,null,function*(){var c,u,f;let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,i=t.getState(),{platformVariables:s}=i.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(mn(A(E({skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=(c=a.payload.output[0])!=null?c:{response:"",sources:[]};return{threadId:n,question:e.input,evaluationId:a.payload.evaluationId,answer:{answer:(u=or(l.response,s!=null?s:{}))!=null?u:"",sources:(f=l.sources)!=null?f:[]}}})),nU=Rt("assistants/extractedTextSuggestions");function VL(e,t){var n,r;return Array.isArray(e.output)?e.output:typeof e.output=="string"?[{code:t,name:t,response:e.output}]:[A(E({code:t,name:t},e.output&&typeof e.output=="object"?e.output:{}),{response:(r=(n=e.output)==null?void 0:n.response)!=null?r:""})]}var mn=ge("assistants/evaluate",(e,t)=>M(null,null,function*(){var v,h,y,S,x;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:i={},threadId:s}=e,a=t.getState(),{platformVariables:l}=a.info,c=(h=(v=a.conversation.current)==null?void 0:v.externalId)!=null?h:null,u=(S=(y=e.externalConversationId)!=null?y:c)!=null?S:void 0,f;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");f=yield r.conversationQuery()}else Array.isArray(o)&&(f=o);if(e.includeMetadata&&a.conversation.current&&((x=e.externalConversationId)!=null?x:c)===c){let{metadata:C}=a.conversation.current;Object.assign(i,{metadata:C})}let d=yield n.evaluateAssistant(e.assistantCode,{input:i,transcript:f,externalConversationId:u,threadId:s});if(d.evaluationStatus!=="success")return t.rejectWithValue(`Assistant ${e.assistantCode} evaluation failed: ${d.evaluationStatus}`);let m=VL(d,e.assistantCode).map(T=>A(E({},T),{name:or(T.name,l),response:or(T.response,l)||""})),g=[];return m.forEach(T=>{if(!T.response)return;let C=Kd(T.response,"reply");C.length!==0&&g.push(...C.map(k=>({text:k,type:"text",source:"assistant",assistantCode:T.code,sourceLabel:T.name})))}),g.length>0&&t.dispatch(Ks(g)),A(E({},d),{output:m,externalConversationId:u,currentExternalIdAtRequest:c})}));function CE(e){return e!=null&&e.length?e.map(t=>t.response).filter(Boolean).join(`
70
- `):""}var TE=Re({name:"assistants",initialState:wE,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]},receiveChunk(e,t){let{code:n,name:r,payload:o,evaluationId:i}=t.payload,s=e.cues.findIndex(a=>a.code===n);s!==-1?e.cues[s].response+=o.text:e.cues.push({code:n,name:r,evaluationId:i,response:o.text})},userNotification(e,t){let n=e.cues.filter(l=>l.code!==t.payload.code),{code:r,name:o,evaluationId:i,payload:s}=t.payload,{callToAction:a}=s;e.cues=[...n,{code:r,name:o,evaluationId:i,response:s.message,editable:s.editableMessage,callToAction:a&&{label:a.displayName,event:a.onClickEvent,value:a.eventPayload}}]}},extraReducers:e=>{e.addCase(mn.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&te.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(mn.rejected,(t,n)=>{var o;te.warn((o=n.error)==null?void 0:o.message);let r=t.pending.indexOf(n.meta.arg.assistantCode);r!==-1&&t.pending.splice(r,1)}).addCase(mn.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),n.meta.arg.skipState)return;let{evaluationId:o,output:i,externalConversationId:s,currentExternalIdAtRequest:a}=n.payload;if(s&&a&&s!==a)return;let l=i.map(f=>f.code),c=t.cues.filter(f=>!l.includes(f.code)),u=i.map(f=>E(A(E({},f),{evaluationId:o}),s?{externalConversationId:s}:{}));t.cues=[...c,...u]}).addCase(Hl.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=ie(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(lt,()=>wE)}}),{removeCueByCode:qd,resetCues:rU,removeThreadById:kE,receiveChunk:RE,userNotification:PE}=TE.actions,IE=TE.reducer;var WL={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showStyleSuggestionList:!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,addToPersonalCollection:!1,inlineSuggestions:!1,autoSelectSuggestion:!1,suggestionsPlacement:"above",floatingMenu:!1,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!0,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},AE=Re({name:"settings",initialState:WL,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:Yd}=AE.actions,Ui=e=>t=>t.settings[e],X=e=>G(Ui(e)),_E=AE.reducer;function Ar(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 Xd=b(De()),OE=b(Z());var Lh=b(I()),Dh=e=>(0,Lh.jsx)("svg",A(E({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Lh.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})}));var Fh=b(I()),ME=e=>(0,Fh.jsx)("svg",A(E({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Fh.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})}));function Bo(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var zh={};ht(zh,{enUS:()=>$L,nlNL:()=>jL});var $L={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},jL={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var NE={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Uo=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,i=o||window.location.origin;return r&&!n?null:r&&n?`${i}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${i}${e}`};var oo=b(I()),KL=({assistantCode:e,assistantOutput:t,evaluationId:n,feedbackType:r,feedbackText:o})=>{let i=z("FeedbackThumbs",NE),s=X("enableFeedbackForm"),a=G(Pr),l=G(Uo(`/admin/feedback?conversationId=${a}&evaluationId=${n}&type=${r}&text=${o}&assistantCode=${e}&assistantOutput=${t}`)),c=se(zh),u=Ze(),[f,d]=(0,OE.useState)(null),p=v=>{u("Assistant response feedback",{assistantCode:e,assistantOutput:t,evaluationId:n,rating:v})},m=v=>{v.stopPropagation(),Bo(v.target,i.fadeup),d("up"),p("up")},g=v=>{v.stopPropagation(),Bo(v.target,i.fadedown),d("down"),p("down")};return(0,oo.jsxs)("div",{className:i.thumbs,children:[(0,oo.jsx)(pe.Button,{title:c("thumbsUp"),onClick:m,icon:(0,oo.jsx)(ME,{}),className:(0,Xd.default)(i.thumbsUp,f==="up"&&i.selected),disabled:!!f}),s&&l?(0,oo.jsx)(pe.Button,{as:"a",title:c("thumbsDown"),href:l,target:"_blank",rel:"noreferrer",onClick:g,icon:(0,oo.jsx)(Dh,{}),className:(0,Xd.default)(i.thumbsDown,f==="down"&&i.selected),disabled:!!f}):(0,oo.jsx)(pe.Button,{title:c("thumbsDown"),onClick:g,icon:(0,oo.jsx)(Dh,{}),className:(0,Xd.default)(i.thumbsDown,f==="down"&&i.selected),disabled:!!f})]})},Qd=KL;function LE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function GL(e){if(Array.isArray(e))return e}function qL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}function YL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
71
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XL(e,t){return GL(e)||qL(e,t)||QL(e,t)||YL()}function QL(e,t){if(e){if(typeof e=="string")return LE(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LE(e,t):void 0}}var XE=Object.entries,DE=Object.setPrototypeOf,ZL=Object.isFrozen,JL=Object.getPrototypeOf,e2=Object.getOwnPropertyDescriptor,It=Object.freeze,At=Object.seal,Js=Object.create,QE=typeof Reflect!="undefined"&&Reflect,$h=QE.apply,jh=QE.construct;It||(It=function(t){return t});At||(At=function(t){return t});$h||($h=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)});jh||(jh=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});var Qs=nt(Array.prototype.forEach),t2=nt(Array.prototype.lastIndexOf),FE=nt(Array.prototype.pop),Zs=nt(Array.prototype.push),n2=nt(Array.prototype.splice),Wo=Array.isArray,Vl=nt(String.prototype.toLowerCase),Hh=nt(String.prototype.toString),zE=nt(String.prototype.match),Bl=nt(String.prototype.replace),HE=nt(String.prototype.indexOf),r2=nt(String.prototype.trim),o2=nt(Number.prototype.toString),i2=nt(Boolean.prototype.toString),BE=typeof BigInt=="undefined"?null:nt(BigInt.prototype.toString),UE=typeof Symbol=="undefined"?null:nt(Symbol.prototype.toString),vt=nt(Object.prototype.hasOwnProperty),Ul=nt(Object.prototype.toString),yt=nt(RegExp.prototype.test),Vi=s2(TypeError);function nt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return $h(e,t,r)}}function s2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return jh(e,n)}}function be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vl;if(DE&&DE(e,null),!Wo(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(ZL(t)||(t[r]=i),o=i)}e[o]=!0}return e}function a2(e){for(let t=0;t<e.length;t++)vt(e,t)||(e[t]=null);return e}function Qt(e){let t=Js(null);for(let r of XE(e)){var n=XL(r,2);let o=n[0],i=n[1];vt(e,o)&&(Wo(i)?t[o]=a2(i):i&&typeof i=="object"&&i.constructor===Object?t[o]=Qt(i):t[o]=i)}return t}function l2(e){switch(typeof e){case"string":return e;case"number":return o2(e);case"boolean":return i2(e);case"bigint":return BE?BE(e):"0";case"symbol":return UE?UE(e):"Symbol()";case"undefined":return Ul(e);case"function":case"object":{if(e===null)return Ul(e);let t=e,n=_r(t,"toString");if(typeof n=="function"){let r=n(t);return typeof r=="string"?r:Ul(r)}return Ul(e)}default:return Ul(e)}}function _r(e,t){for(;e!==null;){let r=e2(e,t);if(r){if(r.get)return nt(r.get);if(typeof r.value=="function")return nt(r.value)}e=JL(e)}function n(){return null}return n}function c2(e){try{return yt(e,""),!0}catch(t){return!1}}var VE=It(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bh=It(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uh=It(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),u2=It(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Vh=It(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),d2=It(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),WE=It(["#text"]),$E=It(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Wh=It(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jE=It(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zd=It(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),f2=At(/{{[\w\W]*|^[\w\W]*}}/g),p2=At(/<%[\w\W]*|^[\w\W]*%>/g),m2=At(/\${[\w\W]*/g),g2=At(/^data-[\-\w.\u00B7-\uFFFF]+$/),h2=At(/^aria-[\-\w]+$/),KE=At(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),y2=At(/^(?:\w+script|data):/i),v2=At(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),S2=At(/^html$/i),x2=At(/^[a-z][.\w]*(-[.\w]+)+$/i),GE=At(/<[/\w!]/g),qE=At(/<[/\w]/g),w2=At(/<\/no(script|embed|frames)/i),b2=At(/\/>/i),Pn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},E2=function(){return typeof window=="undefined"?null:window},C2=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},YE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vo=function(t,n,r,o){return vt(t,n)&&Wo(t[n])?be(o.base?Qt(o.base):{},t[n],o.transform):r};function ZE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E2(),t=$=>ZE($);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==Pn.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,o=r.currentScript;e.DocumentFragment;let i=e.HTMLTemplateElement,s=e.Node,a=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,f=e.trustedTypes,d=a.prototype,p=_r(d,"cloneNode"),m=_r(d,"remove"),g=_r(d,"nextSibling"),v=_r(d,"childNodes"),h=_r(d,"parentNode"),y=_r(d,"shadowRoot"),S=_r(d,"attributes"),x=s&&s.prototype?_r(s.prototype,"nodeType"):null,T=s&&s.prototype?_r(s.prototype,"nodeName"):null;if(typeof i=="function"){let $=n.createElement("template");$.content&&$.content.ownerDocument&&(n=$.content.ownerDocument)}let C,k="",R,F=!1,O=0,U=function(){if(O>0)throw Vi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},J=function(w){U(),O++;try{return C.createHTML(w)}finally{O--}},Y=function(w){U(),O++;try{return C.createScriptURL(w)}finally{O--}},_=function(){return F||(R=C2(f,o),F=!0),R},V=n,B=V.implementation,W=V.createNodeIterator,N=V.createDocumentFragment,q=V.getElementsByTagName,j=r.importNode,K=YE();t.isSupported=typeof XE=="function"&&typeof h=="function"&&B&&B.createHTMLDocument!==void 0;let ue=f2,ne=p2,Qe=m2,Se=g2,tt=h2,pt=y2,Le=v2,Ne=x2,at=KE,ye=null,oe=be({},[...VE,...Bh,...Uh,...Vh,...WE]),re=null,me=be({},[...$E,...Wh,...jE,...Zd]),fe=Object.seal(Js(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,Te=null,mt=Object.seal(Js(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Kt=!0,Et=!0,xr=!1,Jn=!0,gt=!1,Ct=!0,wr=!1,Qm=!1,Zm=null,Jm=null,eg=!1,Ms=!1,Eu=!1,Cu=!1,ZS=!0,JS=!1,ex="user-content-",tg=!0,ng=!1,Ns={},br=null,rg=be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),tx=null,nx=be({},["audio","video","img","source","image","track"]),og=null,rx=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tu="http://www.w3.org/1998/Math/MathML",ku="http://www.w3.org/2000/svg",Er="http://www.w3.org/1999/xhtml",Os=Er,ig=!1,sg=null,v_=be({},[Tu,ku,Er],Hh),ox=It(["mi","mo","mn","ms","mtext"]),ag=be({},ox),ix=It(["annotation-xml"]),lg=be({},ix),S_=be({},["title","style","font","a","script"]),il=null,x_=["application/xhtml+xml","text/html"],w_="text/html",je=null,Ls=null,b_=n.createElement("form"),sx=function(w){return w instanceof RegExp||w instanceof Function},cg=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ls&&Ls===w)return;(!w||typeof w!="object")&&(w={}),w=Qt(w),il=x_.indexOf(w.PARSER_MEDIA_TYPE)===-1?w_:w.PARSER_MEDIA_TYPE,je=il==="application/xhtml+xml"?Hh:Vl,ye=Vo(w,"ALLOWED_TAGS",oe,{transform:je}),re=Vo(w,"ALLOWED_ATTR",me,{transform:je}),sg=Vo(w,"ALLOWED_NAMESPACES",v_,{transform:Hh}),og=Vo(w,"ADD_URI_SAFE_ATTR",rx,{transform:je,base:rx}),tx=Vo(w,"ADD_DATA_URI_TAGS",nx,{transform:je,base:nx}),br=Vo(w,"FORBID_CONTENTS",rg,{transform:je}),$e=Vo(w,"FORBID_TAGS",Qt({}),{transform:je}),Te=Vo(w,"FORBID_ATTR",Qt({}),{transform:je}),Ns=vt(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Qt(w.USE_PROFILES):w.USE_PROFILES:!1,Kt=w.ALLOW_ARIA_ATTR!==!1,Et=w.ALLOW_DATA_ATTR!==!1,xr=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Jn=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gt=w.SAFE_FOR_TEMPLATES||!1,Ct=w.SAFE_FOR_XML!==!1,wr=w.WHOLE_DOCUMENT||!1,Ms=w.RETURN_DOM||!1,Eu=w.RETURN_DOM_FRAGMENT||!1,Cu=w.RETURN_TRUSTED_TYPE||!1,eg=w.FORCE_BODY||!1,ZS=w.SANITIZE_DOM!==!1,JS=w.SANITIZE_NAMED_PROPS||!1,tg=w.KEEP_CONTENT!==!1,ng=w.IN_PLACE||!1,at=c2(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:KE,Os=typeof w.NAMESPACE=="string"?w.NAMESPACE:Er,ag=vt(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(w.MATHML_TEXT_INTEGRATION_POINTS):be({},ox),lg=vt(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Qt(w.HTML_INTEGRATION_POINTS):be({},ix);let P=vt(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Qt(w.CUSTOM_ELEMENT_HANDLING):Js(null);if(fe=Js(null),vt(P,"tagNameCheck")&&sx(P.tagNameCheck)&&(fe.tagNameCheck=P.tagNameCheck),vt(P,"attributeNameCheck")&&sx(P.attributeNameCheck)&&(fe.attributeNameCheck=P.attributeNameCheck),vt(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),At(fe),gt&&(Et=!1),Eu&&(Ms=!0),Ns&&(ye=be({},WE),re=Js(null),Ns.html===!0&&(be(ye,VE),be(re,$E)),Ns.svg===!0&&(be(ye,Bh),be(re,Wh),be(re,Zd)),Ns.svgFilters===!0&&(be(ye,Uh),be(re,Wh),be(re,Zd)),Ns.mathMl===!0&&(be(ye,Vh),be(re,jE),be(re,Zd))),mt.tagCheck=null,mt.attributeCheck=null,vt(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?mt.tagCheck=w.ADD_TAGS:Wo(w.ADD_TAGS)&&(ye===oe&&(ye=Qt(ye)),be(ye,w.ADD_TAGS,je))),vt(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?mt.attributeCheck=w.ADD_ATTR:Wo(w.ADD_ATTR)&&(re===me&&(re=Qt(re)),be(re,w.ADD_ATTR,je))),vt(w,"ADD_URI_SAFE_ATTR")&&Wo(w.ADD_URI_SAFE_ATTR)&&be(og,w.ADD_URI_SAFE_ATTR,je),vt(w,"FORBID_CONTENTS")&&Wo(w.FORBID_CONTENTS)&&(br===rg&&(br=Qt(br)),be(br,w.FORBID_CONTENTS,je)),vt(w,"ADD_FORBID_CONTENTS")&&Wo(w.ADD_FORBID_CONTENTS)&&(br===rg&&(br=Qt(br)),be(br,w.ADD_FORBID_CONTENTS,je)),tg&&(ye["#text"]=!0),wr&&be(ye,["html","head","body"]),ye.table&&(be(ye,["tbody"]),delete $e.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let L=C;C=w.TRUSTED_TYPES_POLICY;try{k=J("")}catch(ee){throw C=L,ee}}else w.TRUSTED_TYPES_POLICY===null?(C=void 0,k=""):(C===void 0&&(C=_()),C&&typeof k=="string"&&(k=J("")));It&&It(w),Ls=w},ax=be({},[...Bh,...Uh,...u2]),lx=be({},[...Vh,...d2]),E_=function(w,P,L){return P.namespaceURI===Er?w==="svg":P.namespaceURI===Tu?w==="svg"&&(L==="annotation-xml"||ag[L]):!!ax[w]},C_=function(w,P,L){return P.namespaceURI===Er?w==="math":P.namespaceURI===ku?w==="math"&&lg[L]:!!lx[w]},T_=function(w,P,L){return P.namespaceURI===ku&&!lg[L]||P.namespaceURI===Tu&&!ag[L]?!1:!lx[w]&&(S_[w]||!ax[w])},k_=function(w){let P=h(w);(!P||!P.tagName)&&(P={namespaceURI:Os,tagName:"template"});let L=Vl(w.tagName),ee=Vl(P.tagName);return sg[w.namespaceURI]?w.namespaceURI===ku?E_(L,P,ee):w.namespaceURI===Tu?C_(L,P,ee):w.namespaceURI===Er?T_(L,P,ee):!!(il==="application/xhtml+xml"&&sg[w.namespaceURI]):!1},Oo=function(w){Zs(t.removed,{element:w});try{h(w).removeChild(w)}catch(P){if(m(w),!h(w))throw Vi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ru=function(w){ug(w);let P=v(w);if(P){let ee=[];Qs(P,ae=>{Zs(ee,ae)}),Qs(ee,ae=>{try{m(ae)}catch(de){}})}let L=S(w);if(L)for(let ee=L.length-1;ee>=0;--ee){let ae=L[ee],de=ae&&ae.name;if(typeof de=="string")try{w.removeAttribute(de)}catch(Ye){}}},ki=function(w,P){try{Zs(t.removed,{attribute:P.getAttributeNode(w),from:P})}catch(L){Zs(t.removed,{attribute:null,from:P})}if(P.removeAttribute(w),w==="is")if(Ms||Eu)try{Oo(P)}catch(L){}else try{P.setAttribute(w,"")}catch(L){}},R_=function(w){let P=S(w);if(P)for(let L=P.length-1;L>=0;--L){let ee=P[L],ae=ee&&ee.name;if(!(typeof ae!="string"||re[je(ae)]))try{w.removeAttribute(ae)}catch(de){}}},ug=function(w){let P=[w];for(;P.length>0;){let L=P.pop();(x?x(L):L.nodeType)===Pn.element&&R_(L);let ae=v(L);if(ae)for(let de=ae.length-1;de>=0;--de)P.push(ae[de])}},P_=function(w){if(!Ct)return;let P=[w];for(;P.length>0;){let L=P.pop(),ee=x?x(L):L.nodeType;if(ee===Pn.processingInstruction||ee===Pn.comment&&yt(qE,L.data)){try{m(L)}catch(de){}continue}if(ee===Pn.element){let de=L,Ye=je(T?T(L):L.nodeName);try{de.hasAttribute&&de.hasAttribute("patchsrc")&&de.removeAttribute("patchsrc"),de.hasAttribute&&de.hasAttribute("for")&&Ye!=="label"&&Ye!=="output"&&de.removeAttribute("for")}catch(Dt){}}let ae=v(L);if(ae)for(let de=ae.length-1;de>=0;--de)P.push(ae[de])}},cx=function(w){let P=null,L=null;if(eg)w="<remove></remove>"+w;else{let de=zE(w,/^[\r\n\t ]+/);L=de&&de[0]}il==="application/xhtml+xml"&&Os===Er&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");let ee=C?J(w):w;if(Os===Er)try{P=new u().parseFromString(ee,il)}catch(de){}if(!P||!P.documentElement){P=B.createDocument(Os,"template",null);try{P.documentElement.innerHTML=ig?k:ee}catch(de){}}let ae=P.body||P.documentElement;return w&&L&&ae.insertBefore(n.createTextNode(L),ae.childNodes[0]||null),Os===Er?q.call(P,wr?"html":"body")[0]:wr?P.documentElement:ae},ux=function(w){return W.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Pu=function(w){return w=Bl(w,ue," "),w=Bl(w,ne," "),w=Bl(w,Qe," "),w},dg=function(w){var P;w.normalize();let L=W.call(w.ownerDocument||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),ee=L.nextNode();for(;ee;)ee.data=Pu(ee.data),ee=L.nextNode();let ae=(P=w.querySelectorAll)===null||P===void 0?void 0:P.call(w,"template");ae&&Qs(ae,de=>{Ds(de.content)&&dg(de.content)})},Iu=function(w){let P=T?T(w):null;return typeof P!="string"||je(P)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==S(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==x(w)||w.childNodes!==v(w)},Ds=function(w){if(!x||typeof w!="object"||w===null)return!1;try{return x(w)===Pn.documentFragment}catch(P){return!1}},sl=function(w){if(!x||typeof w!="object"||w===null)return!1;try{return typeof x(w)=="number"}catch(P){return!1}};function Cr($,w,P){$.length!==0&&Qs($,L=>{L.call(t,w,P,Ls)})}let I_=function(w,P){return!!(Ct&&w.hasChildNodes()&&!sl(w.firstElementChild)&&yt(GE,w.textContent)&&yt(GE,w.innerHTML)||Ct&&w.namespaceURI===Er&&P==="style"&&sl(w.firstElementChild)||w.nodeType===Pn.processingInstruction||Ct&&w.nodeType===Pn.comment&&yt(qE,w.data))},A_=function(w,P){if(!$e[P]&&px(P)&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,P)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(P)))return!1;if(tg&&!br[P]){let L=h(w),ee=v(w);if(ee&&L){let ae=ee.length;for(let de=ae-1;de>=0;--de){let Ye=ng?ee[de]:p(ee[de],!0);L.insertBefore(Ye,g(w))}}}return Oo(w),!0},dx=function(w,P){if(Cr(K.beforeSanitizeElements,w,null),w!==P&&h(w)===null)return!0;if(Iu(w))return Oo(w),!0;let L=je(T?T(w):w.nodeName);if(Cr(K.uponSanitizeElement,w,{tagName:L,allowedTags:ye}),w!==P&&h(w)===null)return!0;if(I_(w,L))return Oo(w),!0;if($e[L]||!(mt.tagCheck instanceof Function&&mt.tagCheck(L))&&!ye[L]){let ae=A_(w,L);return ae===!1&&Cr(K.afterSanitizeElements,w,null),ae}if((x?x(w):w.nodeType)===Pn.element&&!k_(w)||(L==="noscript"||L==="noembed"||L==="noframes")&&yt(w2,w.innerHTML))return Oo(w),!0;if(gt&&w.nodeType===Pn.text){let ae=Pu(w.textContent);w.textContent!==ae&&(Zs(t.removed,{element:w.cloneNode()}),w.textContent=ae)}return Cr(K.afterSanitizeElements,w,null),!1},fx=function(w,P,L){if(Te[P]||Ct&&P==="patchsrc"||Ct&&P==="for"&&w!=="label"&&w!=="output"||ZS&&(P==="id"||P==="name")&&(L in n||L in b_))return!1;let ee=re[P]||mt.attributeCheck instanceof Function&&mt.attributeCheck(P,w);if(!(Et&&yt(Se,P))){if(!(Kt&&yt(tt,P))){if(ee){if(!og[P]){if(!yt(at,Bl(L,Le,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&w!=="script"&&HE(L,"data:")===0&&tx[w])){if(!(xr&&!yt(pt,Bl(L,Le,"")))){if(L)return!1}}}}}else if(!(px(w)&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,w)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(w))&&(fe.attributeNameCheck instanceof RegExp&&yt(fe.attributeNameCheck,P)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(P,w))||P==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,L)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(L))))return!1}}return!0},__=be({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),px=function(w){return!__[Vl(w)]&&yt(Ne,w)},M_=function(w,P,L,ee){if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!L)switch(f.getAttributeType(w,P)){case"TrustedHTML":return J(ee);case"TrustedScriptURL":return Y(ee)}return ee},N_=function(w,P,L,ee){try{L?w.setAttributeNS(L,P,ee):w.setAttribute(P,ee),Iu(w)?Oo(w):FE(t.removed)}catch(ae){ki(P,w)}},mx=function(w){Cr(K.beforeSanitizeAttributes,w,null);let P=w.attributes;if(!P||Iu(w))return;let L={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0},ee=P.length,ae=je(w.nodeName);for(;ee--;){let de=P[ee],Ye=de.name,Dt=de.namespaceURI,er=de.value,cn=je(Ye),tr=er,Gt=Ye==="value"?tr:r2(tr);if(L.attrName=cn,L.attrValue=Gt,L.keepAttr=!0,L.forceKeepAttr=void 0,Cr(K.uponSanitizeAttribute,w,L),Gt=L.attrValue,JS&&(cn==="id"||cn==="name")&&HE(Gt,ex)!==0&&(ki(Ye,w),Gt=ex+Gt),Ct&&yt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){ki(Ye,w);continue}if(cn==="attributename"&&zE(Gt,"href")){ki(Ye,w);continue}if(!L.forceKeepAttr){if(!L.keepAttr){ki(Ye,w);continue}if(!Jn&&yt(b2,Gt)){ki(Ye,w);continue}if(gt&&(Gt=Pu(Gt)),!fx(ae,cn,Gt)){ki(Ye,w);continue}Gt=M_(ae,cn,Dt,Gt),Gt!==tr&&N_(w,Ye,Dt,Gt)}}Cr(K.afterSanitizeAttributes,w,null)},Au=function(w){let P=null,L=ux(w);for(Cr(K.beforeSanitizeShadowDOM,w,null);P=L.nextNode();)if(Cr(K.uponSanitizeShadowNode,P,null),dx(P,w),mx(P),Ds(P.content)&&Au(P.content),(x?x(P):P.nodeType)===Pn.element){let ae=y(P);Ds(ae)&&(fg(ae),Au(ae))}Cr(K.afterSanitizeShadowDOM,w,null)},fg=function(w){let P=[{node:w,shadow:null}];for(;P.length>0;){let L=P.pop();if(L.shadow){Au(L.shadow);continue}let ee=L.node,de=(x?x(ee):ee.nodeType)===Pn.element,Ye=v(ee);if(Ye)for(let Dt=Ye.length-1;Dt>=0;--Dt)P.push({node:Ye[Dt],shadow:null});if(de){let Dt=T?T(ee):null;if(typeof Dt=="string"&&je(Dt)==="template"){let er=ee.content;Ds(er)&&P.push({node:er,shadow:null})}}if(de){let Dt=y(ee);Ds(Dt)&&P.push({node:null,shadow:Dt},{node:Dt,shadow:null})}}};return t.sanitize=function($){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,L=null,ee=null,ae=null;if(ig=!$,ig&&($="<!-->"),typeof $!="string"&&!sl($)&&($=l2($),typeof $!="string"))throw Vi("dirty is not a string, aborting");if(!t.isSupported)return $;Qm?(ye=Zm,re=Jm):cg(w),(K.uponSanitizeElement.length>0||K.uponSanitizeAttribute.length>0)&&(ye=Qt(ye)),K.uponSanitizeAttribute.length>0&&(re=Qt(re)),t.removed=[];let de=ng&&typeof $!="string"&&sl($);if(de){P_($);let cn=T?T($):$.nodeName;if(typeof cn=="string"){let tr=je(cn);if(!ye[tr]||$e[tr])throw Ru($),Vi("root node is forbidden and cannot be sanitized in-place")}if(Iu($))throw Ru($),Vi("root node is clobbered and cannot be sanitized in-place");try{fg($)}catch(tr){throw Ru($),tr}}else if(sl($))P=cx("<!---->"),L=P.ownerDocument.importNode($,!0),L.nodeType===Pn.element&&L.nodeName==="BODY"||L.nodeName==="HTML"?P=L:P.appendChild(L),fg(L);else{if(!Ms&&!gt&&!wr&&$.indexOf("<")===-1)return C&&Cu?J($):$;if(P=cx($),!P)return Ms?null:Cu?k:""}P&&eg&&Oo(P.firstChild);let Ye=de?$:P,Dt=ux(Ye);try{for(;ee=Dt.nextNode();)dx(ee,Ye),mx(ee),Ds(ee.content)&&Au(ee.content)}catch(cn){throw de&&(Ru($),Qs(t.removed,tr=>{tr.element&&ug(tr.element)})),cn}if(de)return Qs(t.removed,cn=>{cn.element&&ug(cn.element)}),gt&&dg($),$;if(Ms){if(gt&&dg(P),Eu)for(ae=N.call(P.ownerDocument);P.firstChild;)ae.appendChild(P.firstChild);else ae=P;return(re.shadowroot||re.shadowrootmode)&&(ae=j.call(r,ae,!0)),ae}let er=wr?P.outerHTML:P.innerHTML;return wr&&ye["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&yt(S2,P.ownerDocument.doctype.name)&&(er="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
72
- `+er),gt&&(er=Pu(er)),C&&Cu?J(er):er},t.setConfig=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cg($),Qm=!0,Zm=ye,Jm=re},t.clearConfig=function(){Ls=null,Qm=!1,Zm=null,Jm=null,C=R,k=""},t.isValidAttribute=function($,w,P){Ls||cg({});let L=je($),ee=je(w);return fx(L,ee,P)},t.addHook=function($,w){typeof w=="function"&&vt(K,$)&&Zs(K[$],w)},t.removeHook=function($,w){if(vt(K,$)){if(w!==void 0){let P=t2(K[$],w);return P===-1?void 0:n2(K[$],P,1)[0]}return FE(K[$])}},t.removeHooks=function($){vt(K,$)&&(K[$]=[])},t.removeAllHooks=function(){K=YE()},t}var JE=ZE();var yo=b(Z());var s0=b(De()),Yn=b(Z());var Jd=b(Z()),T2=["bottom","height","left","right","top","width"],k2=(e={},t={})=>T2.some(n=>e[n]!==t[n]),io=new Map,eC,tC=()=>{let e=[],t=[];io.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();k2(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{io.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),eC=window.requestAnimationFrame(tC)};function R2(e,t){return{observe(){let n=io.size===0;if(io.has(e)){let r=io.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else io.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&tC()},unobserve(){let n=io.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||io.delete(e),io.size||cancelAnimationFrame(eC)}}}}function Kh(e){let[t,n]=(0,Jd.useState)(null);return(0,Jd.useLayoutEffect)(()=>{if(!e.current)return;let r=R2(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ia=b(Z()),bk=b(Oc());var xk=b(Z());function di(e){(0,xk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function os(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var wk={root:"dd-r-dgo"};var Ek=({children:e,parentNode:t})=>{let[n,r]=(0,Ia.useState)(null),o=(0,Ia.useContext)(cl);return(0,Ia.useLayoutEffect)(()=>{let i=document.createElement("div");return os(i),i.classList.add(wk.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,bk.createPortal)(e,n):null};var zr={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var xp=b(I()),wp=(e=!1)=>{let[t,n]=(0,Yn.useState)(e),r=(0,Yn.useCallback)(()=>n(!0),[]),o=(0,Yn.useCallback)(()=>n(!1),[]),i=(0,Yn.useCallback)(()=>n(a=>!a),[]),s=(0,Yn.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function a0(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 Aa=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Yn.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=a0,parentNode:a}=u,l=ie(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let f=Kh(t),d=Kh(n),p=(0,Yn.useMemo)(()=>s(f,d,0),[f,d]);return(0,xp.jsx)(Ek,{parentNode:a,children:(0,xp.jsx)("div",A(E({className:(0,s0.default)(zr.ref,{[zr.positionAbove]:r==="above",[zr.positionBelow]:r==="below",[zr.positionLeft]:r==="left",[zr.positionRight]:r==="right",[zr.alignStart]:o==="start",[zr.alignCenter]:o==="center",[zr.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,xp.jsx)("div",{className:(0,s0.default)(e,zr.root),children:i})}))})};var Ck={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var mr=b(I());function A3(e){return`<button type="button" data-copy-icon class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function l0(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function _3(e){return e.replace(/\r\n/g,`
73
- `)}var M3=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=z("Markdown",Ck),s=(0,yo.useRef)(null),[a,l]=(0,yo.useState)(null),c=(0,yo.useMemo)(()=>{let g=Pe.parse(_3(e));return JE.sanitize(g.toString()).replaceAll("</code>",`${A3(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var y;let v=g.target,h=!!((y=s.current)!=null&&y.querySelector("code"));if(["A","BUTTON"].includes(v.tagName)){l(null);return}a||h&&v.tagName!=="CODE"||!h&&v!==s.current||(v.addEventListener("mouseleave",()=>l(null),{once:!0}),l(v))},f=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Bo(g,i.fadeup),r==null||r(l0(a)))},d=g=>{let v=g.target,h=v instanceof HTMLElement?v:null;if(v instanceof Element?v.closest("a"):null){g.stopPropagation();return}h&&"copyIcon"in h.dataset&&(Bo(h,i.fadeup),r==null||r(l0(h.parentElement)))},p=()=>{!a||!o||(l(null),o(l0(a)))},m=g=>{if(g===null)return;let v=g.getBoundingClientRect();v.left<0?g.style.transform=`translateX(${-v.left+2}px)`:v.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-v.right-2}px)`)};return(0,mr.jsxs)(yo.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(Aa,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:i.options,ref:m,children:[r&&(a==null?void 0:a.tagName)==="CODE"&&(0,mr.jsx)("button",{type:"button",className:i.option,onClick:f,children:n}),o&&(0,mr.jsxs)(yo.Fragment,{children:[(0,mr.jsx)("div",{className:i.divider}),(0,mr.jsx)("button",{type:"button",className:i.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:i.arrow})]}),(0,mr.jsx)("div",{ref:s,"data-testid":"widget-markdown-content",className:i.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:d})]})},is=M3;var Rk=b(Z());var Tk={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var kk=b(I()),N3=({width:e})=>{let t=z("LoadingProgressBar",Tk);return(0,kk.jsx)("div",{className:t.loadingBar,style:{width:e}})},bp=N3;var vo=b(I()),Ep=({title:e})=>{let t=(0,Rk.useRef)(null);return Vu(t),(0,vo.jsx)(pe,{ref:t,children:(0,vo.jsx)(we,{children:(0,vo.jsxs)(we.Content,{children:[(0,vo.jsx)(we.Title,{children:e}),(0,vo.jsx)(bp,{width:"60%"}),(0,vo.jsx)(bp,{width:"90%"}),(0,vo.jsx)(bp,{width:"50%"})]})})})};var _a={};ht(_a,{enUS:()=>O3,nlNL:()=>L3});var O3={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},L3={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Cp={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var $r=b(Z());var D=b(Z(),1);function Tp(){return typeof window!="undefined"}function Br(e){return kp(e)?(e.nodeName||"").toLowerCase():"#document"}function $t(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(kp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kp(e){return Tp()?e instanceof Node||e instanceof $t(e).Node:!1}function Ue(e){return Tp()?e instanceof Element||e instanceof $t(e).Element:!1}function ot(e){return Tp()?e instanceof HTMLElement||e instanceof $t(e).HTMLElement:!1}function as(e){return!Tp()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $t(e).ShadowRoot}function Lc(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Pk(e){return/^(table|td|th)$/.test(Br(e))}function Dc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var D3=/transform|translate|scale|rotate|perspective|filter/,F3=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none",c0;function Rp(e){let t=Ue(e)?Dn(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!Ma()&&(ss(t.backdropFilter)||ss(t.filter))||D3.test(t.willChange||"")||F3.test(t.contain||"")}function Ik(e){let t=Hr(e);for(;ot(t)&&!Vr(t);){if(Rp(t))return t;if(Dc(t))return null;t=Hr(t)}return null}function Ma(){return c0==null&&(c0=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),c0}function Vr(e){return/^(html|body|#document)$/.test(Br(e))}function Dn(e){return $t(e).getComputedStyle(e)}function Fc(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if(Br(e)==="html")return e;let t=e.assignedSlot||e.parentNode||as(e)&&e.host||Ur(e);return as(t)?t.host:t}function Ak(e){let t=Hr(e);return Vr(t)?(e.ownerDocument||e).body:ot(t)&&Lc(t)?t:Ak(t)}function Ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=Ak(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=$t(o);if(i){let a=Pp(s);return t.concat(s,s.visualViewport||[],Lc(o)?o:[],a&&n?Ln(a):[])}else return t.concat(o,Ln(o,[],n))}function Pp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Da=b(Z(),1),Gk=b(Z(),1);var Na=Math.min,So=Math.max,Hc=Math.round,Bc=Math.floor,Wr=e=>({x:e,y:e}),z3={left:"right",right:"left",bottom:"top",top:"bottom"};function Nk(e,t,n){return So(e,Na(t,n))}function Uc(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function Vc(e){return e.split("-")[1]}function u0(e){return e==="x"?"y":"x"}function d0(e){return e==="y"?"height":"width"}function xo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function f0(e){return u0(xo(e))}function Ok(e,t,n){n===void 0&&(n=!1);let r=Vc(e),o=f0(e),i=d0(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=zc(s)),[s,zc(s)]}function Lk(e){let t=zc(e);return[Ip(e),t,Ip(t)]}function Ip(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var _k=["left","right"],Mk=["right","left"],H3=["top","bottom"],B3=["bottom","top"];function U3(e,t,n){switch(e){case"top":case"bottom":return n?t?Mk:_k:t?_k:Mk;case"left":case"right":return t?H3:B3;default:return[]}}function Dk(e,t,n,r){let o=Vc(e),i=U3(ls(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ip)))),i}function zc(e){let t=ls(e);return z3[t]+e.slice(t.length)}function V3(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function Fk(e){return typeof e!="number"?V3(e):{top:e,right:e,bottom:e,left:e}}function cs(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var W3=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ap=W3.join(","),Hk=typeof Element=="undefined",Oa=Hk?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_p=!Hk&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Mp=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Mp(t.parentNode));return s},$3=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Bk=function(t,n,r){if(Mp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ap));return n&&Oa.call(t,Ap)&&o.unshift(t),o=o.filter(r),o},Np=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Mp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=Np(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Oa.call(s,Ap);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Mp(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var p=Np(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},Uk=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Vk=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$3(t))&&!Uk(t)?0:t.tabIndex},j3=function(t,n){var r=Vk(t);return r<0&&n&&!Uk(t)?0:r},K3=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Wk=function(t){return t.tagName==="INPUT"},G3=function(t){return Wk(t)&&t.type==="hidden"},q3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Y3=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},X3=function(t){if(!t.name)return!0;var n=t.form||_p(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=Y3(o,t.form);return!i||i===t},Q3=function(t){return Wk(t)&&t.type==="radio"},Z3=function(t){return Q3(t)&&!X3(t)},J3=function(t){var n,r=t&&_p(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=_p(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},zk=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},e4=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}var s=getComputedStyle(t),a=s.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Oa.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Oa.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var f=t.parentElement,d=_p(t);if(f&&!f.shadowRoot&&o(f)===!0)return zk(t);t.assignedSlot?t=t.assignedSlot:!f&&d!==t.ownerDocument?t=d.host:t=f}t=u}if(J3(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zk(t);return!1},t4=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Oa.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},p0=function(t,n){return!(n.disabled||G3(n)||e4(n,t)||q3(n)||t4(n))},m0=function(t,n){return!(Z3(n)||Vk(n)<0||!p0(t,n))},n4=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$k=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=j3(a,s),c=s?$k(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(K3).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},La=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:m0.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:n4}):r=Bk(t,n.includeContainer,m0.bind(null,n)),$k(r)},jk=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:p0.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Bk(t,n.includeContainer,p0.bind(null,n)),r},g0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Oa.call(t,Ap)===!1?!1:m0(n,t)};function qk(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function y0(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Yk(){return/apple/i.test(navigator.vendor)}function h0(){let e=/android/i;return e.test(qk())||e.test(y0())}function r4(){return y0().includes("jsdom/")}var Kk="data-floating-ui-focusable",o4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function us(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function tn(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&as(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function wo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Op(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Xk(e){return e.matches("html,body")}function jt(e){return(e==null?void 0:e.ownerDocument)||document}function v0(e){return ot(e)&&e.matches(o4)}function S0(e){return e?e.getAttribute("role")==="combobox"&&v0(e):!1}function Lp(e){return e?e.hasAttribute(Kk)?e:e.querySelector("["+Kk+"]")||e:null}function ds(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ds(e,o.id,n)])}function x0(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){let i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Dp(e){e.preventDefault(),e.stopPropagation()}function Qk(e){return"nativeEvent"in e}function Zk(e){return e.mozInputSource===0&&e.isTrusted?!0:h0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Jk(e){return r4()?!1:!h0()&&e.width===0&&e.height===0||h0()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Fa(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var i4=typeof document!="undefined",s4=function(){},nn=i4?Gk.useLayoutEffect:s4,a4=E({},Da);function fi(e){let t=Da.useRef(e);return nn(()=>{t.current=e}),t}var l4=a4.useInsertionEffect,c4=l4||(e=>e());function rn(e){let t=Da.useRef(()=>{});return c4(()=>{t.current=e}),Da.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var za=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eR(e,t){let n=La(e,za()),r=n.length;if(r===0)return;let o=us(jt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function w0(e){return eR(jt(e).body,1)||e}function b0(e){return eR(jt(e).body,-1)||e}function Ha(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!tn(n,r)}function tR(e){La(e,za()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function E0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var wn=b(I(),1);var F0=b(Oc(),1);function nR(e,t,n){let{reference:r,floating:o}=e,i=xo(t),s=f0(t),a=d0(s),l=ls(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}let m=Vc(t);return m&&(p[s]+=d*(m==="end"?1:-1)*(n&&c?-1:1)),p}function rR(e,t){return M(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Uc(t,e),m=Fk(p),v=a[d?f==="floating"?"reference":"floating":f],h=cs(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(v))==null||n?v:v.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),x=(yield i.isElement==null?void 0:i.isElement(S))&&(yield i.getScale==null?void 0:i.getScale(S))||{x:1,y:1},T=cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:S,strategy:l}):y);return{top:(h.top-T.top+m.top)/x.y,bottom:(T.bottom-h.bottom+m.bottom)/x.y,left:(h.left-T.left+m.left)/x.x,right:(T.right-h.right+m.right)/x.x}})}var u4=50,oR=(e,t,n)=>M(null,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:A(E({},s),{detectOverflow:rR}),l=yield s.isRTL==null?void 0:s.isRTL(t),c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=nR(c,r,l),d=r,p=0,m={};for(let g=0;g<i.length;g++){let v=i[g];if(!v)continue;let{name:h,fn:y}=v,{x:S,y:x,data:T,reset:C}=yield y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=S!=null?S:u,f=x!=null?x:f,m[h]=E(E({},m[h]),T),C&&p<u4&&(p++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(c=C.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:f}=nR(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}});var iR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return M(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,V=Uc(e,n),{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=V,h=ie(V,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let y=ls(i),S=xo(l),x=ls(l)===l,T=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(x||!v?[zc(l)]:Lk(l)),k=g!=="none";!p&&k&&C.push(...Dk(l,v,g,T));let R=[l,...C],F=yield c.detectOverflow(n,h),O=[],U=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&O.push(F[y]),d){let B=Ok(i,a,T);O.push(F[B[0]],F[B[1]])}if(U=[...U,{placement:i,overflows:O}],!O.every(B=>B<=0)){var J,Y;let B=(((J=s.flip)==null?void 0:J.index)||0)+1,W=R[B];if(W&&(!(d==="alignment"?S!==xo(W):!1)||U.every(j=>xo(j.placement)===S?j.overflows[0]>0:!0)))return{data:{index:B,overflows:U},reset:{placement:W}};let N=(Y=U.filter(q=>q.overflows[0]<=0).sort((q,j)=>q.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!N)switch(m){case"bestFit":{var _;let q=(_=U.filter(j=>{if(k){let K=xo(j.placement);return K===S||K==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(K=>K>0).reduce((K,ue)=>K+ue,0)]).sort((j,K)=>j[1]-K[1])[0])==null?void 0:_[0];q&&(N=q);break}case"initialPlacement":N=l;break}if(i!==N)return{reset:{placement:N}}}return{}})}}};var d4=new Set(["left","top"]);function f4(e,t){return M(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=ls(n),a=Vc(n),l=xo(n)==="y",c=d4.has(s)?-1:1,u=i&&l?-1:1,f=Uc(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}})}var sR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return M(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,c=yield f4(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:A(E({},c),{placement:a})}})}}},aR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return M(this,null,function*(){let{x:r,y:o,placement:i,platform:s}=n,S=Uc(e,n),{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:T,y:C}=x;return{x:T,y:C}}}}=S,u=ie(S,["mainAxis","crossAxis","limiter"]),f={x:r,y:o},d=yield s.detectOverflow(n,u),p=xo(i),m=u0(p),g=f[m],v=f[p],h=(x,T)=>Nk(T+d[x==="y"?"top":"left"],T,T-d[x==="y"?"bottom":"right"]);a&&(g=h(m,g)),l&&(v=h(p,v));let y=c.fn(A(E({},n),{[m]:g,[p]:v}));return A(E({},y),{data:{x:y.x-r,y:y.y-o,enabled:{[m]:a,[p]:l}}})})}}};function uR(e){let t=Dn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ot(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Hc(n)!==i||Hc(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function T0(e){return Ue(e)?e:e.contextElement}function Ba(e){let t=T0(e);if(!ot(t))return Wr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=uR(t),s=(i?Hc(n.width):n.width)/r,a=(i?Hc(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var p4=Wr(0);function dR(e){let t=$t(e);return!Ma()||!t.visualViewport?p4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function m4(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===$t(e)}function fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=T0(e),s=Wr(1);t&&(r?Ue(r)&&(s=Ba(r)):s=Ba(e));let a=m4(i,n,r)?dR(i):Wr(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i&&r){let d=$t(i),p=Ue(r)?$t(r):r,m=d,g=Pp(m);for(;g&&p!==m;){let v=Ba(g),h=g.getBoundingClientRect(),y=Dn(g),S=h.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,x=h.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=S,c+=x,m=$t(g),g=Pp(m)}}return cs({width:u,height:f,x:l,y:c})}function Fp(e,t){let n=Fc(e).scrollLeft;return t?t.left+n:fs(Ur(e)).left+n}function fR(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function g4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=Ur(r),a=t?Dc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Wr(1),u=Wr(0),f=ot(r);if((f||!i)&&((Br(r)!=="body"||Lc(s))&&(l=Fc(r)),f)){let p=fs(r);c=Ba(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let d=s&&!f&&!i?fR(s,l):Wr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function h4(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function y4(e){let t=Fc(e),n=e.ownerDocument.body,r=So(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=So(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+Fp(e),s=-t.scrollTop;return Dn(n).direction==="rtl"&&(i+=So(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:s}}var v4=25;function S4(e,t,n){n===void 0&&(n="viewport");let r=n==="layoutViewport",o=$t(e),i=Ur(e),s=o.visualViewport,a=i.clientWidth,l=i.clientHeight,c=0,u=0;if(s){let d=!Ma()||t==="fixed";r?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(Fp(i)<=0){let d=i.ownerDocument,p=d.body,m=getComputedStyle(p),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(i.clientWidth-p.clientWidth-g),h=getComputedStyle(i).scrollbarGutter==="stable both-edges"?v/2:v;h<=v4&&(a-=h)}return{width:a,height:l,x:c,y:u}}function x4(e,t){let n=fs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ba(e),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function lR(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=S4(e,n,t);else if(t==="document")r=y4(Ur(e));else if(Ue(t))r=x4(t,n);else{let o=dR(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return cs(r)}function w4(e,t){let n=t.get(e);if(n)return n;let r=Ln(e,[],!1).filter(a=>Ue(a)&&Br(a)!=="body"),o=null,i=Dn(e).position==="fixed",s=i?Hr(e):e;for(;Ue(s)&&!Vr(s);){let a=Dn(s),l=Rp(s),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?r=r.filter(f=>f!==s):o=a,s=Hr(s)}return t.set(e,r),r}function b4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Dc(t)?[]:w4(t,this._c):[].concat(n),r],a=lR(t,s[0],o),l=a.top,c=a.right,u=a.bottom,f=a.left;for(let d=1;d<s.length;d++){let p=lR(t,s[d],o);l=So(p.top,l),c=Na(p.right,c),u=Na(p.bottom,u),f=So(p.left,f)}return{width:c-f,height:u-l,x:f,y:l}}function E4(e){let{width:t,height:n}=uR(e);return{width:t,height:n}}function C4(e,t,n){let r=ot(t),o=Ur(t),i=n==="fixed",s=fs(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Wr(0);if((r||!i)&&((Br(t)!=="body"||Lc(o))&&(a=Fc(t)),r)){let d=fs(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!r&&o&&(l.x=Fp(o));let c=o&&!r&&!i?fR(o,a):Wr(0),u=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:s.width,height:s.height}}function C0(e){return Dn(e).position==="static"}function cR(e,t){if(!ot(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function pR(e,t){let n=$t(e);if(Dc(e))return n;if(!ot(e)){let o=Hr(e);for(;o&&!Vr(o);){if(Ue(o)&&!C0(o))return o;o=Hr(o)}return n}let r=cR(e,t);for(;r&&Pk(r)&&C0(r);)r=cR(r,t);return r&&Vr(r)&&C0(r)&&!Rp(r)?n:r||Ik(e)||n}var T4=function(e){return M(this,null,function*(){let t=this.getOffsetParent||pR,n=this.getDimensions,r=yield n(e.floating);return{reference:C4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function k4(e){return Dn(e).direction==="rtl"}var k0={convertOffsetParentRelativeRectToViewportRelativeRect:g4,getDocumentElement:Ur,getClippingRect:b4,getOffsetParent:pR,getElementRects:T4,getClientRects:h4,getDimensions:E4,getScale:Ba,isElement:Ue,isRTL:k4};function mR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R4(e,t,n){let r=null,o,i=Ur(e);function s(){var u;clearTimeout(o),(u=r)==null||u.disconnect(),r=null}function a(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();let d=e.getBoundingClientRect(),{left:p,top:m,width:g,height:v}=d;if(u||t(),!g||!v)return;let h=Bc(m),y=Bc(i.clientWidth-(p+g)),S=Bc(i.clientHeight-(m+v)),x=Bc(p),C={rootMargin:-h+"px "+-y+"px "+-S+"px "+-x+"px",threshold:So(0,Na(1,f))||1},k=!0;function R(F){let O=F[0].intersectionRatio;if(!mR(d,e.getBoundingClientRect()))return a();if(O!==f){if(!k)return a();O?a(!1,O):o=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{r=new IntersectionObserver(R,A(E({},C),{root:i.ownerDocument}))}catch(F){r=new IntersectionObserver(R,C)}r.observe(e)}let l=$t(e),c=()=>a(n);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),s()}}function zp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=T0(e),u=o||i?[...c?Ln(c):[],...t?Ln(t):[]]:[];u.forEach(h=>{o&&h.addEventListener("scroll",n),i&&h.addEventListener("resize",n)});let f=c&&a?R4(c,n,i):null,d=-1,p=null;s&&(p=new ResizeObserver(h=>{let[y]=h;y&&y.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),c&&!l&&p.observe(c),t&&p.observe(t));let m,g=l?fs(e):null;l&&v();function v(){let h=fs(e);g&&!mR(g,h)&&n(),g=h,m=requestAnimationFrame(v)}return n(),()=>{var h;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f==null||f(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var gR=sR;var hR=aR,yR=iR;var Hp=(e,t,n)=>{let r=new Map,o=n!=null?n:{},i=A(E(E({},k0),o.platform),{_c:r});return oR(e,t,A(E({},o),{platform:i}))};var it=b(Z(),1),SR=b(Z(),1),xR=b(Oc(),1);var I4=typeof document!="undefined",A4=function(){},Bp=I4?SR.useLayoutEffect:A4;function Up(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Up(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Up(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function wR(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vR(e,t){let n=wR(e);return Math.round(t*n)/n}function R0(e){let t=it.useRef(e);return Bp(()=>{t.current=e}),t}function bR(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=it.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=it.useState(r);Up(d,r)||p(r);let[m,g]=it.useState(null),[v,h]=it.useState(null),y=it.useCallback(N=>{N!==C.current&&(C.current=N,g(N))},[]),S=it.useCallback(N=>{N!==k.current&&(k.current=N,h(N))},[]),x=i||m,T=s||v,C=it.useRef(null),k=it.useRef(null),R=it.useRef(u),F=l!=null,O=R0(l),U=R0(o),J=R0(c),Y=it.useCallback(()=>{if(!C.current||!k.current)return;let N={placement:t,strategy:n,middleware:d};U.current&&(N.platform=U.current),Hp(C.current,k.current,N).then(q=>{let j=A(E({},q),{isPositioned:J.current!==!1});_.current&&!Up(R.current,j)&&(R.current=j,xR.flushSync(()=>{f(j)}))})},[d,t,n,U,J]);Bp(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(N=>A(E({},N),{isPositioned:!1})))},[c]);let _=it.useRef(!1);Bp(()=>(_.current=!0,()=>{_.current=!1}),[]),Bp(()=>{if(x&&(C.current=x),T&&(k.current=T),x&&T){if(O.current)return O.current(x,T,Y);Y()}},[x,T,Y,O,F]);let V=it.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:S}),[y,S]),B=it.useMemo(()=>({reference:x,floating:T}),[x,T]),W=it.useMemo(()=>{let N={position:n,left:0,top:0};if(!B.floating)return N;let q=vR(B.floating,u.x),j=vR(B.floating,u.y);return a?E(A(E({},N),{transform:"translate("+q+"px, "+j+"px)"}),wR(B.floating)>=1.5&&{willChange:"transform"}):{position:n,left:q,top:j}},[n,a,B.floating,u.x,u.y]);return it.useMemo(()=>A(E({},u),{update:Y,refs:V,elements:B,floatingStyles:W}),[u,Y,V,B,W])}var Vp=(e,t)=>{let n=gR(e);return{name:n.name,fn:n.fn,options:[e,t]}},P0=(e,t)=>{let n=hR(e);return{name:n.name,fn:n.fn,options:[e,t]}};var I0=(e,t)=>{let n=yR(e);return{name:n.name,fn:n.fn,options:[e,t]}};function z0(e){let t=D.useRef(void 0),n=D.useCallback(r=>{let o=e.map(i=>{if(i!=null){if(typeof i=="function"){let s=i,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return i.current=r,()=>{i.current=null}}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return D.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var _4="data-floating-ui-focusable",A0="active",_0="selected",M4="ArrowLeft",N4="ArrowRight",O4="ArrowUp",L4="ArrowDown";var D4=[M4,N4],F4=[O4,L4],KV=[...D4,...F4];var z4=E({},D),ER=!1,H4=0,CR=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+H4++;function B4(){let[e,t]=D.useState(()=>ER?CR():void 0);return nn(()=>{e==null&&t(CR())},[]),D.useEffect(()=>{ER=!0},[]),e}var U4=z4.useId,H0=U4||B4;function V4(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var W4=D.createContext(null),$4=D.createContext(null),B0=()=>{var e;return((e=D.useContext(W4))==null?void 0:e.id)||null},Kp=()=>D.useContext($4);function Wa(e){return"data-floating-ui-"+e}function xn(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var TR=Wa("safe-polygon");function M0(e,t,n){if(n&&!Fa(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){let r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function N0(e){return typeof e=="function"?e():e}function zR(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,p=Kp(),m=B0(),g=fi(c),v=fi(l),h=fi(n),y=fi(f),S=D.useRef(),x=D.useRef(-1),T=D.useRef(),C=D.useRef(-1),k=D.useRef(!0),R=D.useRef(!1),F=D.useRef(()=>{}),O=D.useRef(!1),U=rn(()=>{var W;let N=(W=o.current.openEvent)==null?void 0:W.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"});D.useEffect(()=>{if(!a)return;function W(N){let{open:q}=N;q||(xn(x),xn(C),k.current=!0,O.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[a,i]),D.useEffect(()=>{if(!a||!g.current||!n)return;function W(q){U()&&r(!1,q,"hover")}let N=jt(s.floating).documentElement;return N.addEventListener("mouseleave",W),()=>{N.removeEventListener("mouseleave",W)}},[s.floating,n,r,a,g,U]);let J=D.useCallback(function(W,N,q){N===void 0&&(N=!0),q===void 0&&(q="hover");let j=M0(v.current,"close",S.current);j&&!T.current?(xn(x),x.current=window.setTimeout(()=>r(!1,W,q),j)):N&&(xn(x),r(!1,W,q))},[v,r]),Y=rn(()=>{F.current(),T.current=void 0}),_=rn(()=>{if(R.current){let W=jt(s.floating).body;W.style.pointerEvents="",W.removeAttribute(TR),R.current=!1}}),V=rn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);D.useEffect(()=>{if(!a)return;function W(ue){if(xn(x),k.current=!1,u&&!Fa(S.current)||N0(y.current)>0&&!M0(v.current,"open"))return;let ne=M0(v.current,"open",S.current);ne?x.current=window.setTimeout(()=>{h.current||r(!0,ue,"hover")},ne):n||r(!0,ue,"hover")}function N(ue){if(V()){_();return}F.current();let ne=jt(s.floating);if(xn(C),O.current=!1,g.current&&o.current.floatingContext){n||xn(x),T.current=g.current(A(E({},o.current.floatingContext),{tree:p,x:ue.clientX,y:ue.clientY,onClose(){_(),Y(),V()||J(ue,!0,"safe-polygon")}}));let Se=T.current;ne.addEventListener("mousemove",Se),F.current=()=>{ne.removeEventListener("mousemove",Se)};return}(S.current!=="touch"||!tn(s.floating,ue.relatedTarget))&&J(ue)}function q(ue){V()||o.current.floatingContext&&(g.current==null||g.current(A(E({},o.current.floatingContext),{tree:p,x:ue.clientX,y:ue.clientY,onClose(){_(),Y(),V()||J(ue)}}))(ue))}function j(){xn(x)}function K(ue){V()||J(ue,!1)}if(Ue(s.domReference)){let ue=s.domReference,ne=s.floating;return n&&ue.addEventListener("mouseleave",q),d&&ue.addEventListener("mousemove",W,{once:!0}),ue.addEventListener("mouseenter",W),ue.addEventListener("mouseleave",N),ne&&(ne.addEventListener("mouseleave",q),ne.addEventListener("mouseenter",j),ne.addEventListener("mouseleave",K)),()=>{n&&ue.removeEventListener("mouseleave",q),d&&ue.removeEventListener("mousemove",W),ue.removeEventListener("mouseenter",W),ue.removeEventListener("mouseleave",N),ne&&(ne.removeEventListener("mouseleave",q),ne.removeEventListener("mouseenter",j),ne.removeEventListener("mouseleave",K))}}},[s,a,e,u,d,J,Y,_,r,n,h,p,v,g,o,V,y]),nn(()=>{var W;if(a&&n&&(W=g.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&U()){R.current=!0;let q=s.floating;if(Ue(s.domReference)&&q){var N;let j=jt(s.floating).body;j.setAttribute(TR,"");let K=s.domReference,ue=p==null||(N=p.nodesRef.current.find(ne=>ne.id===m))==null||(N=N.context)==null?void 0:N.elements.floating;return ue&&(ue.style.pointerEvents=""),j.style.pointerEvents="none",K.style.pointerEvents="auto",q.style.pointerEvents="auto",()=>{j.style.pointerEvents="",K.style.pointerEvents="",q.style.pointerEvents=""}}}},[a,n,m,s,p,g,U]),nn(()=>{n||(S.current=void 0,O.current=!1,Y(),_())},[n,Y,_]),D.useEffect(()=>()=>{Y(),xn(x),xn(C),_()},[a,s.domReference,Y,_]);let B=D.useMemo(()=>{function W(N){S.current=N.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(N){let{nativeEvent:q}=N;function j(){!k.current&&!h.current&&r(!0,q,"hover")}u&&!Fa(S.current)||n||N0(y.current)===0||O.current&&gg(N.movementX,2)+gg(N.movementY,2)<2||(xn(C),S.current==="touch"?j():(O.current=!0,C.current=window.setTimeout(j,N0(y.current))))}}},[u,r,n,h,y]);return D.useMemo(()=>a?{reference:B}:{},[a,B])}var kR=0;function Ua(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kR);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():kR=requestAnimationFrame(i)}function O0(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&as(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function j4(e){return"composedPath"in e?e.composedPath()[0]:e.target}function K4(e){return(e==null?void 0:e.ownerDocument)||document}var Va={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function RR(e){return e==="inert"?Va.inert:e==="aria-hidden"?Va["aria-hidden"]:Va.none}var Wp=new WeakSet,$p={},L0=0,G4=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype;function HR(e){return e?as(e)?e.host:HR(e.parentNode):null}var q4=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=HR(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Y4(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=q4(t,e),a=new Set,l=new Set(s),c=[];$p[o]||($p[o]=new WeakMap);let u=$p[o];s.forEach(f),d(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||[].forEach.call(p.children,m=>{if(Br(m)!=="script")if(a.has(m))d(m);else{let g=i?m.getAttribute(i):null,v=g!==null&&g!=="false",h=RR(i),y=(h.get(m)||0)+1,S=(u.get(m)||0)+1;h.set(m,y),u.set(m,S),c.push(m),y===1&&v&&Wp.add(m),S===1&&m.setAttribute(o,""),!v&&i&&m.setAttribute(i,i==="inert"?"":"true")}})}return L0++,()=>{c.forEach(p=>{let m=RR(i),v=(m.get(p)||0)-1,h=(u.get(p)||0)-1;m.set(p,v),u.set(p,h),v||(!Wp.has(p)&&i&&p.removeAttribute(i),Wp.delete(p)),h||p.removeAttribute(o)}),L0--,L0||(Va.inert=new WeakMap,Va["aria-hidden"]=new WeakMap,Va.none=new WeakMap,Wp=new WeakSet,$p={})}}function PR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=K4(e[0]).body;return Y4(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}var U0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},jp=D.forwardRef(function(t,n){let[r,o]=D.useState();nn(()=>{Yk()&&o("button")},[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wa("focus-guard")]:"",style:U0};return(0,wn.jsx)("span",E(E({},t),i))}),X4={clipPath:"inset(50%)",position:"fixed",top:0,left:0},BR=D.createContext(null),IR=Wa("portal");function Q4(e){e===void 0&&(e={});let{id:t,root:n}=e,r=H0(),o=VR(),[i,s]=D.useState(null),a=D.useRef(null);return nn(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),nn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(IR,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!kp(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(IR,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function UR(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=Q4({id:n,root:r}),[s,a]=D.useState(null),l=D.useRef(null),c=D.useRef(null),u=D.useRef(null),f=D.useRef(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,m=!!s&&!s.modal&&s.open&&o&&!!(r||i);return D.useEffect(()=>{if(!i||!o||d)return;function g(v){i&&Ha(v)&&(v.type==="focusin"?E0:tR)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,d]),D.useEffect(()=>{i&&(p||E0(i))},[p,i]),(0,wn.jsxs)(BR.Provider,{value:D.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i]),children:[m&&i&&(0,wn.jsx)(jp,{"data-type":"outside",ref:l,onFocus:g=>{if(Ha(g,i)){var v;(v=u.current)==null||v.focus()}else{let h=s?s.domReference:null,y=b0(h);y==null||y.focus()}}}),m&&i&&(0,wn.jsx)("span",{"aria-owns":i.id,style:X4}),i&&F0.createPortal(t,i),m&&i&&(0,wn.jsx)(jp,{"data-type":"outside",ref:c,onFocus:g=>{if(Ha(g,i)){var v;(v=f.current)==null||v.focus()}else{let h=s?s.domReference:null,y=w0(h);y==null||y.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var VR=()=>D.useContext(BR);function AR(e){return D.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var _R=20,pi=[];function V0(){pi=pi.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Z4(e){V0(),e&&Br(e)!=="body"&&(pi.push(new WeakRef(e)),pi.length>_R&&(pi=pi.slice(-_R)))}function MR(){V0();let e=pi[pi.length-1];return e==null?void 0:e.deref()}function J4(e){let t=za();return g0(e,t)?e:La(e,t)[0]||e}function NR(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;let r=za(),i=jk(e,r).filter(a=>{let l=a.getAttribute("data-tabindex")||"";return g0(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}var eF=D.forwardRef(function(t,n){return(0,wn.jsx)("button",A(E({},t),{type:"button",ref:n,tabIndex:-1,style:U0}))});function WR(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:g,events:v,dataRef:h,elements:{domReference:y,floating:S}}=t,x=rn(()=>{var oe;return(oe=h.current.floatingContext)==null?void 0:oe.nodeId}),T=rn(p),C=typeof s=="number"&&s<0,k=S0(y)&&C,R=G4(),F=R?i:!0,O=!F||R&&d,U=fi(o),J=fi(s),Y=fi(a),_=Kp(),V=VR(),B=D.useRef(null),W=D.useRef(null),N=D.useRef(!1),q=D.useRef(!1),j=D.useRef(-1),K=D.useRef(-1),ue=V!=null,ne=Lp(S),Qe=rn(function(oe){return oe===void 0&&(oe=ne),oe?La(oe,za()):[]}),Se=rn(oe=>{let re=Qe(oe);return U.current.map(me=>y&&me==="reference"?y:ne&&me==="floating"?ne:re).filter(Boolean).flat()});D.useEffect(()=>{if(r||!c)return;function oe(me){if(me.key==="Tab"){tn(ne,us(jt(ne)))&&Qe().length===0&&!k&&Dp(me);let fe=Se(),$e=wo(me);U.current[0]==="reference"&&$e===y&&(Dp(me),me.shiftKey?Ua(fe[fe.length-1]):Ua(fe[1])),U.current[1]==="floating"&&$e===ne&&me.shiftKey&&(Dp(me),Ua(fe[0]))}}let re=jt(ne);return re.addEventListener("keydown",oe),()=>{re.removeEventListener("keydown",oe)}},[r,y,ne,c,U,k,Qe,Se]),D.useEffect(()=>{if(r||!S)return;function oe(re){let me=wo(re),$e=Qe().indexOf(me);$e!==-1&&(j.current=$e)}return S.addEventListener("focusin",oe),()=>{S.removeEventListener("focusin",oe)}},[r,S,Qe]),D.useEffect(()=>{if(r||!f)return;function oe(){q.current=!0,setTimeout(()=>{q.current=!1})}function re($e){let Te=$e.relatedTarget,mt=$e.currentTarget,Kt=wo($e);queueMicrotask(()=>{let Et=x(),xr=!(tn(y,Te)||tn(S,Te)||tn(Te,S)||tn(V==null?void 0:V.portalNode,Te)||Te!=null&&Te.hasAttribute(Wa("focus-guard"))||_&&(ds(_.nodesRef.current,Et).find(Jn=>{var gt,Ct;return tn((gt=Jn.context)==null?void 0:gt.elements.floating,Te)||tn((Ct=Jn.context)==null?void 0:Ct.elements.domReference,Te)})||x0(_.nodesRef.current,Et).find(Jn=>{var gt,Ct,wr;return[(gt=Jn.context)==null?void 0:gt.elements.floating,Lp((Ct=Jn.context)==null?void 0:Ct.elements.floating)].includes(Te)||((wr=Jn.context)==null?void 0:wr.elements.domReference)===Te})));if(mt===y&&ne&&NR(ne,U),l&&mt!==y&&!(Kt!=null&&Kt.isConnected)&&us(jt(ne))===jt(ne).body){ot(ne)&&ne.focus();let Jn=j.current,gt=Qe(),Ct=gt[Jn]||gt[gt.length-1]||ne;ot(Ct)&&Ct.focus()}if(h.current.insideReactTree){h.current.insideReactTree=!1;return}(k||!c)&&Te&&xr&&!q.current&&Te!==MR()&&(N.current=!0,g(!1,$e,"focus-out"))})}let me=!!(!_&&V);function fe(){xn(K),h.current.insideReactTree=!0,K.current=window.setTimeout(()=>{h.current.insideReactTree=!1})}if(S&&ot(y))return y.addEventListener("focusout",re),y.addEventListener("pointerdown",oe),S.addEventListener("focusout",re),me&&S.addEventListener("focusout",fe,!0),()=>{y.removeEventListener("focusout",re),y.removeEventListener("pointerdown",oe),S.removeEventListener("focusout",re),me&&S.removeEventListener("focusout",fe,!0)}},[r,y,S,ne,c,_,V,g,f,l,Qe,k,x,U,h]);let tt=D.useRef(null),pt=D.useRef(null),Le=AR([tt,V==null?void 0:V.beforeInsideRef]),Ne=AR([pt,V==null?void 0:V.afterInsideRef]);D.useEffect(()=>{var oe,re;if(r||!S)return;let me=Array.from((V==null||(oe=V.portalNode)==null?void 0:oe.querySelectorAll("["+Wa("portal")+"]"))||[]),$e=(re=(_?x0(_.nodesRef.current,x()):[]).find(Kt=>{var Et;return S0(((Et=Kt.context)==null?void 0:Et.elements.domReference)||null)}))==null||(re=re.context)==null?void 0:re.elements.domReference,Te=[S,$e,...me,...T(),B.current,W.current,tt.current,pt.current,V==null?void 0:V.beforeOutsideRef.current,V==null?void 0:V.afterOutsideRef.current,U.current.includes("reference")||k?y:null].filter(Kt=>Kt!=null),mt=c||k?PR(Te,!O,O):PR(Te);return()=>{mt()}},[r,y,S,c,U,V,k,F,O,_,x,T]),nn(()=>{if(r||!ot(ne))return;let oe=jt(ne),re=us(oe);queueMicrotask(()=>{let me=Se(ne),fe=J.current,$e=(typeof fe=="number"?me[fe]:fe.current)||ne,Te=tn(ne,re);!C&&!Te&&m&&Ua($e,{preventScroll:$e===ne})})},[r,m,ne,C,Se,J]),nn(()=>{if(r||!ne)return;let oe=jt(ne),re=us(oe);Z4(re);function me(Te){let{reason:mt,event:Kt,nested:Et}=Te;if(["hover","safe-polygon"].includes(mt)&&Kt.type==="mouseleave"&&(N.current=!0),mt==="outside-press")if(Et)N.current=!1;else if(Zk(Kt)||Jk(Kt))N.current=!1;else{let xr=!1;document.createElement("div").focus({get preventScroll(){return xr=!0,!1}}),xr?N.current=!1:N.current=!0}}v.on("openchange",me);let fe=oe.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,U0),ue&&y&&y.insertAdjacentElement("afterend",fe);function $e(){if(typeof Y.current=="boolean"){let Te=y||MR();return Te&&Te.isConnected?Te:fe}return Y.current.current||fe}return()=>{v.off("openchange",me);let Te=us(oe),mt=tn(S,Te)||_&&ds(_.nodesRef.current,x(),!1).some(Et=>{var xr;return tn((xr=Et.context)==null?void 0:xr.elements.floating,Te)}),Kt=$e();queueMicrotask(()=>{let Et=J4(Kt);Y.current&&!N.current&&ot(Et)&&(!(Et!==Te&&Te!==oe.body)||mt)&&Et.focus({preventScroll:!0}),fe.remove()})}},[r,S,ne,Y,h,v,_,ue,y,x]),D.useEffect(()=>(queueMicrotask(()=>{N.current=!1}),()=>{queueMicrotask(V0)}),[r]),nn(()=>{if(!r&&V)return V.setFocusManagerState({modal:c,closeOnFocusOut:f,open:m,onOpenChange:g,domReference:y}),()=>{V.setFocusManagerState(null)}},[r,V,c,m,g,f,y]),nn(()=>{r||ne&&NR(ne,U)},[r,ne,U]);function at(oe){return r||!u||!c?null:(0,wn.jsx)(eF,{ref:oe==="start"?B:W,onClick:re=>g(!1,re.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let ye=!r&&F&&(c?!k:!0)&&(ue||c);return(0,wn.jsxs)(wn.Fragment,{children:[ye&&(0,wn.jsx)(jp,{"data-type":"inside",ref:Le,onFocus:oe=>{if(c){let me=Se();Ua(o[0]==="reference"?me[0]:me[me.length-1])}else if(V!=null&&V.preserveTabOrder&&V.portalNode)if(N.current=!1,Ha(oe,V.portalNode)){let me=w0(y);me==null||me.focus()}else{var re;(re=V.beforeOutsideRef.current)==null||re.focus()}}}),!k&&at("start"),n,at("end"),ye&&(0,wn.jsx)(jp,{"data-type":"inside",ref:Ne,onFocus:oe=>{if(c)Ua(Se()[0]);else if(V!=null&&V.preserveTabOrder&&V.portalNode)if(f&&(N.current=!0),Ha(oe,V.portalNode)){let me=b0(y);me==null||me.focus()}else{var re;(re=V.afterOutsideRef.current)==null||re.focus()}}})]})}function OR(e){return ot(e.target)&&e.target.tagName==="BUTTON"}function tF(e){return ot(e.target)&&e.target.tagName==="A"}function LR(e){return v0(e)}function $R(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=D.useRef(),p=D.useRef(!1),m=D.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){let v=d.current;g.button===0&&a!=="click"&&(Fa(v,!0)&&c||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let v=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Fa(v,!0)&&c||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||OR(g))&&(g.key===" "&&!LR(i)&&(g.preventDefault(),p.current=!0),!tF(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||OR(g)||LR(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,f,l]);return D.useMemo(()=>s?{reference:m}:{},[s,m])}var nF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},DR=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function jR(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:m}=t,g=Kp(),v=rn(typeof l=="function"?l:()=>!1),h=typeof l=="function"?v:l,y=D.useRef(!1),{escapeKey:S,outsidePress:x}=DR(p),{escapeKey:T,outsidePress:C}=DR(m),k=D.useRef(!1),R=rn(_=>{var V;if(!n||!s||!a||_.key!=="Escape"||k.current)return;let B=(V=i.current.floatingContext)==null?void 0:V.nodeId,W=g?ds(g.nodesRef.current,B):[];if(!S&&(_.stopPropagation(),W.length>0)){let N=!0;if(W.forEach(q=>{var j;if((j=q.context)!=null&&j.open&&!q.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,Qk(_)?_.nativeEvent:_,"escape-key")}),F=rn(_=>{var V;let B=()=>{var W;R(_),(W=wo(_))==null||W.removeEventListener("keydown",B)};(V=wo(_))==null||V.addEventListener("keydown",B)}),O=rn(_=>{var V;let B=i.current.insideReactTree;i.current.insideReactTree=!1;let W=y.current;if(y.current=!1,c==="click"&&W||B||typeof h=="function"&&!h(_))return;let N=wo(_),q="["+Wa("inert")+"]",j=jt(o.floating).querySelectorAll(q),K=Ue(N)?N:null;for(;K&&!Vr(K);){let Se=Hr(K);if(Vr(Se)||!Ue(Se))break;K=Se}if(j.length&&Ue(N)&&!Xk(N)&&!tn(N,o.floating)&&Array.from(j).every(Se=>!tn(K,Se)))return;if(ot(N)&&Y){let Se=Vr(N),tt=Dn(N),pt=/auto|scroll/,Le=Se||pt.test(tt.overflowX),Ne=Se||pt.test(tt.overflowY),at=Le&&N.clientWidth>0&&N.scrollWidth>N.clientWidth,ye=Ne&&N.clientHeight>0&&N.scrollHeight>N.clientHeight,oe=tt.direction==="rtl",re=ye&&(oe?_.offsetX<=N.offsetWidth-N.clientWidth:_.offsetX>N.clientWidth),me=at&&_.offsetY>N.clientHeight;if(re||me)return}let ue=(V=i.current.floatingContext)==null?void 0:V.nodeId,ne=g&&ds(g.nodesRef.current,ue).some(Se=>{var tt;return Op(_,(tt=Se.context)==null?void 0:tt.elements.floating)});if(Op(_,o.floating)||Op(_,o.domReference)||ne)return;let Qe=g?ds(g.nodesRef.current,ue):[];if(Qe.length>0){let Se=!0;if(Qe.forEach(tt=>{var pt;if((pt=tt.context)!=null&&pt.open&&!tt.context.dataRef.current.__outsidePressBubbles){Se=!1;return}}),!Se)return}r(!1,_,"outside-press")}),U=rn(_=>{var V;let B=()=>{var W;O(_),(W=wo(_))==null||W.removeEventListener(c,B)};(V=wo(_))==null||V.addEventListener(c,B)});D.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=x;let _=-1;function V(j){r(!1,j,"ancestor-scroll")}function B(){window.clearTimeout(_),k.current=!0}function W(){_=window.setTimeout(()=>{k.current=!1},Ma()?5:0)}let N=jt(o.floating);a&&(N.addEventListener("keydown",T?F:R,T),N.addEventListener("compositionstart",B),N.addEventListener("compositionend",W)),h&&N.addEventListener(c,C?U:O,C);let q=[];return d&&(Ue(o.domReference)&&(q=Ln(o.domReference)),Ue(o.floating)&&(q=q.concat(Ln(o.floating))),!Ue(o.reference)&&o.reference&&o.reference.contextElement&&(q=q.concat(Ln(o.reference.contextElement)))),q=q.filter(j=>{var K;return j!==((K=N.defaultView)==null?void 0:K.visualViewport)}),q.forEach(j=>{j.addEventListener("scroll",V)}),()=>{a&&(N.removeEventListener("keydown",T?F:R,T),N.removeEventListener("compositionstart",B),N.removeEventListener("compositionend",W)),h&&N.removeEventListener(c,C?U:O,C),q.forEach(j=>{j.removeEventListener("scroll",V)}),window.clearTimeout(_)}},[i,o,a,h,c,n,r,d,s,S,x,R,T,F,O,C,U]),D.useEffect(()=>{i.current.insideReactTree=!1},[i,h,c]);let J=D.useMemo(()=>E({onKeyDown:R},u&&E({[nF[f]]:_=>{r(!1,_.nativeEvent,"reference-press")}},f!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}})),[R,r,u,f]),Y=D.useMemo(()=>{function _(V){V.button===0&&(y.current=!0)}return{onKeyDown:R,onMouseDown:_,onMouseUp:_,[rF[c]]:()=>{i.current.insideReactTree=!0}}},[R,c,i]);return D.useMemo(()=>s?{reference:J,floating:Y}:{},[s,J,Y])}function oF(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=H0(),i=D.useRef({}),[s]=D.useState(()=>V4()),a=B0()!=null,[l,c]=D.useState(r.reference),u=rn((p,m,g)=>{i.current.openEvent=p?m:void 0,s.emit("openchange",{open:p,event:m,reason:g,nested:a}),n==null||n(p,m,g)}),f=D.useMemo(()=>({setPositionReference:c}),[]),d=D.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return D.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[t,u,d,s,o,f])}function KR(e){var t,n;let k=e===void 0?{}:e,{elements:r}=k,o=ie(k,["elements"]),{nodeId:i}=o,s=oF(A(E({},o),{elements:{reference:(t=r==null?void 0:r.reference)!=null?t:null,floating:(n=r==null?void 0:r.floating)!=null?n:null}})),a=o.rootContext||s,l=a.elements,[c,u]=D.useState(null),[f,d]=D.useState(null),m=(l==null?void 0:l.domReference)||c,g=D.useRef(null),v=Kp();nn(()=>{m&&(g.current=m)},[m]);let h=bR(A(E({},o),{elements:E(E({},l),f&&{reference:f})})),y=D.useCallback(R=>{let F=Ue(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;d(F),h.refs.setReference(F)},[h.refs]),S=D.useCallback(R=>{(Ue(R)||R===null)&&(g.current=R,u(R)),(Ue(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!Ue(R))&&h.refs.setReference(R)},[h.refs]),x=D.useMemo(()=>A(E({},h.refs),{setReference:S,setPositionReference:y,domReference:g}),[h.refs,S,y]),T=D.useMemo(()=>A(E({},h.elements),{domReference:m}),[h.elements,m]),C=D.useMemo(()=>A(E(E({},h),a),{refs:x,elements:T,nodeId:i}),[h,x,T,i,a]);return nn(()=>{a.dataRef.current.floatingContext=C;let R=v==null?void 0:v.nodesRef.current.find(F=>F.id===i);R&&(R.context=C)}),D.useMemo(()=>A(E({},h),{context:C,refs:x,elements:T}),[h,x,T,C])}function D0(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[A0]:a,[_0]:l}=s;i=ie(s,[hg(A0),hg(_0)])}return E(E(E({},n==="floating"&&{tabIndex:-1,[_4]:""}),i),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,f]=c;if(!(o&&[A0,_0].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var d;(d=r.get(u))==null||d.push(f),a[u]=function(){for(var p,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return(p=r.get(u))==null?void 0:p.map(h=>h(...g)).find(h=>h!==void 0)}}}else a[u]=f}),a),{}))}function GR(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=D.useCallback(a=>D0(a,e,"reference"),t),i=D.useCallback(a=>D0(a,e,"floating"),n),s=D.useCallback(a=>D0(a,e,"item"),r);return D.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var iF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qR(e,t){var n,r;t===void 0&&(t={});let{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=H0(),u=((n=i.domReference)==null?void 0:n.id)||c,f=D.useMemo(()=>{var y;return((y=Lp(i.floating))==null?void 0:y.id)||s},[i.floating,s]),d=(r=iF.get(l))!=null?r:l,m=B0()!=null,g=D.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?f:void 0}:E(E(E(E(E({"aria-expanded":o?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":o?f:void 0},d==="listbox"&&{role:"combobox"}),d==="menu"&&{id:u}),d==="menu"&&m&&{role:"menuitem"}),l==="select"&&{"aria-autocomplete":"none"}),l==="combobox"&&{"aria-autocomplete":"list"}),[d,f,m,o,u,l]),v=D.useMemo(()=>{let y=E({id:f},d&&{role:d});return d==="tooltip"||l==="label"?y:E(E({},y),d==="menu"&&{"aria-labelledby":u})},[d,f,u,l]),h=D.useCallback(y=>{let{active:S,selected:x}=y,T=E({role:"option"},S&&{id:f+"-fui-option"});switch(l){case"select":case"combobox":return A(E({},T),{"aria-selected":x})}return{}},[f,l]);return D.useMemo(()=>a?{reference:g,floating:v,item:h}:{},[a,g,v,h])}function YR(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...YR(e,o.id,n)])}function FR(e,t){let[n,r]=e,o=!1,i=t.length;for(let s=0,a=i-1;s<i;a=s++){let[l,c]=t[s]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function sF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function XR(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1},i=!1,s=null,a=null,l=typeof performance!="undefined"?performance.now():0;function c(f,d){let p=performance.now(),m=p-l;if(s===null||a===null||m===0)return s=f,a=d,l=p,null;let g=f-s,v=d-a,y=Math.sqrt(g*g+v*v)/m;return s=f,a=d,l=p,y}let u=f=>{let{x:d,y:p,placement:m,elements:g,onClose:v,nodeId:h,tree:y}=f;return function(x){function T(){xn(o),v()}if(xn(o),!g.domReference||!g.floating||m==null||d==null||p==null)return;let{clientX:C,clientY:k}=x,R=[C,k],F=j4(x),O=x.type==="mouseleave",U=O0(g.floating,F),J=O0(g.domReference,F),Y=g.domReference.getBoundingClientRect(),_=g.floating.getBoundingClientRect(),V=m.split("-")[0],B=d>_.right-_.width/2,W=p>_.bottom-_.height/2,N=sF(R,Y),q=_.width>Y.width,j=_.height>Y.height,K=(q?Y:_).left,ue=(q?Y:_).right,ne=(j?Y:_).top,Qe=(j?Y:_).bottom;if(U&&(i=!0,!O))return;if(J&&(i=!1),J&&!O){i=!0;return}if(O&&Ue(x.relatedTarget)&&O0(g.floating,x.relatedTarget)||y&&YR(y.nodesRef.current,h).length)return;if(V==="top"&&p>=Y.bottom-1||V==="bottom"&&p<=Y.top+1||V==="left"&&d>=Y.right-1||V==="right"&&d<=Y.left+1)return T();let Se=[];switch(V){case"top":Se=[[K,Y.top+1],[K,_.bottom-1],[ue,_.bottom-1],[ue,Y.top+1]];break;case"bottom":Se=[[K,_.top+1],[K,Y.bottom-1],[ue,Y.bottom-1],[ue,_.top+1]];break;case"left":Se=[[_.right-1,Qe],[_.right-1,ne],[Y.left+1,ne],[Y.left+1,Qe]];break;case"right":Se=[[Y.right-1,Qe],[Y.right-1,ne],[_.left+1,ne],[_.left+1,Qe]];break}function tt(pt){let[Le,Ne]=pt;switch(V){case"top":{let at=[q?Le+t/2:B?Le+t*4:Le-t*4,Ne+t+1],ye=[q?Le-t/2:B?Le+t*4:Le-t*4,Ne+t+1],oe=[[_.left,B||q?_.bottom-t:_.top],[_.right,B?q?_.bottom-t:_.top:_.bottom-t]];return[at,ye,...oe]}case"bottom":{let at=[q?Le+t/2:B?Le+t*4:Le-t*4,Ne-t],ye=[q?Le-t/2:B?Le+t*4:Le-t*4,Ne-t],oe=[[_.left,B||q?_.top+t:_.bottom],[_.right,B?q?_.top+t:_.bottom:_.top+t]];return[at,ye,...oe]}case"left":{let at=[Le+t+1,j?Ne+t/2:W?Ne+t*4:Ne-t*4],ye=[Le+t+1,j?Ne-t/2:W?Ne+t*4:Ne-t*4];return[...[[W||j?_.right-t:_.left,_.top],[W?j?_.right-t:_.left:_.right-t,_.bottom]],at,ye]}case"right":{let at=[Le-t,j?Ne+t/2:W?Ne+t*4:Ne-t*4],ye=[Le-t,j?Ne-t/2:W?Ne+t*4:Ne-t*4],oe=[[W||j?_.left+t:_.right,_.top],[W?j?_.left+t:_.right:_.left+t,_.bottom]];return[at,ye,...oe]}}}if(!FR([C,k],Se)){if(i&&!N)return T();if(!O&&r){let pt=c(x.clientX,x.clientY);if(pt!==null&&pt<.1)return T()}FR([C,k],tt([d,p]))?!i&&r&&(o.current=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}var Gp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Xn=b(I());function aF({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=$r.useState(e),l=o!=null?o:s,c=i!=null?i:a,u=KR({placement:t,open:l,onOpenChange:c,whileElementsMounted:zp,middleware:[Vp(5),I0({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),P0({padding:10})]}),f=u.context,d=$R(f,{enabled:o==null}),p=jR(f),m=qR(f),g=zR(f,{enabled:r!=null?r:!1,handleClose:XR()}),v=GR([d,p,m,g]);return $r.useMemo(()=>A(E(E({open:l,setOpen:c},v),u),{modal:n}),[l,c,v,u,n])}var QR=$r.createContext(null),W0=()=>{let e=$r.useContext(QR);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},ps=r=>{var o=r,{children:e,modal:t=!1}=o,n=ie(o,["children","modal"]);let i=aF(E({modal:t},n));return(0,Xn.jsx)(QR.Provider,{value:i,children:e})};function lF(r){var o=r,{as:e,children:t}=o,n=ie(o,["as","children"]);let i=W0(),s=e||"button",a=t.ref,l=z0([i.refs.setReference,a]);return(0,Xn.jsx)(s,A(E({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var cF=$r.forwardRef(function(o,r){var i=o,{style:t}=i,n=ie(i,["style"]);let c=W0(),{context:s}=c,a=ie(c,["context"]),l=z0([a.refs.setFloating,r]);return s.open?(0,Xn.jsx)(UR,{children:(0,Xn.jsx)(WR,{context:s,modal:a.modal,disabled:n.disableFocusManager,children:(0,Xn.jsx)("div",A(E({ref:l,style:E(A(E({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function uF(o){var i=o,{as:e,children:t,onClick:n}=i,r=ie(i,["as","children","onClick"]);let{setOpen:s}=W0();return(0,Xn.jsx)(e||"button",A(E({type:"button",onClick:c=>{n(c),s(!1),c.stopPropagation()}},r),{children:t}))}function ZR({trigger:e,children:t,placement:n="top"}){return(0,Xn.jsxs)(ps,{tooltip:!0,placement:n,children:[(0,Xn.jsxs)(ps.Content,{className:Gp.tooltip,children:[t,(0,Xn.jsx)("div",{className:Gp.arrow})]}),(0,Xn.jsx)(ps.Trigger,{className:Gp.tooltipTrigger,children:e})]})}ps.Trigger=lF;ps.Content=cF;ps.Button=uF;var wt=ps;var eP=b(Z());var JR={error:"dd-CoAuB"};var $0={};ht($0,{enUS:()=>dF,nlNL:()=>fF});var dF={errorPrefix:[{type:0,value:"Error:"}]},fF={errorPrefix:[{type:0,value:"Foutmelding:"}]};var Wc=b(I()),tP=({message:e})=>{let t=(0,eP.useRef)(null),n=z("WidgetCardError",JR),r=se($0);return Vu(t),(0,Wc.jsx)(pe,{ref:t,children:(0,Wc.jsx)(we,{children:(0,Wc.jsxs)(we.Content,{className:n.error,children:[r("errorPrefix")," ",e]})})})};var ve=b(I()),pF=3,mF=({sources:e,onClick:t})=>{let n=se(_a),r=z("WidgetKnowledgeAssistant",Cp),[o,i]=(0,et.useState)(!1),s=o?e:e.slice(0,pF);return s.length===0?null:(0,ve.jsxs)("ul",{className:r.sources,children:[s.map(a=>(0,ve.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,ve.jsxs)(wt,{tooltip:!0,placement:"top-start",children:[(0,ve.jsx)(wt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,ve.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,ve.jsx)(wt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),s<e&&(0,ve.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>i(!0),children:n("showMore",{amount:e.length-s.length})})]})},gF=({title:e,description:t})=>(0,ve.jsx)(pe,{"data-testid":"knowledge-assist-empty-state",children:(0,ve.jsx)(we,{children:(0,ve.jsxs)(we.Content,{children:[(0,ve.jsx)(we.Title,{children:e}),(0,ve.jsx)(is,{content:t})]})})}),hF=({innerRef:e,item:t,hasKeyboardInput:n,onCopy:r,onUse:o,onSourceClick:i})=>{var l;let s=se(_a),a=(0,et.useContext)(qp);return(0,ve.jsxs)(pe,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,ve.jsx)(we,{children:(0,ve.jsxs)(we.Content,{children:[(0,ve.jsx)(we.Title,{children:t.question}),(0,ve.jsx)(is,{content:t.answer.answer,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:r,onUse:n?o:void 0}),(0,ve.jsx)(mF,{sources:(l=t.answer.sources)!=null?l:[],onClick:i})]})}),a.assistantCode&&(0,ve.jsxs)(pe.ButtonsContainer,{children:[(0,ve.jsx)("div",{}),(0,ve.jsx)(Qd,{evaluationId:t.evaluationId,feedbackType:"assistant",assistantCode:a.assistantCode,assistantOutput:t.answer.answer,feedbackText:t.answer.answer})]})]})},qp=(0,et.createContext)(null),Yp=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,et.useState)(null),[s,a]=(0,et.useState)(!1),[l,c]=(0,et.useState)(null),[u,f]=(0,et.useState)(!!n),[d,p]=(0,et.useState)(null),m=Ee(),g=Ze(),v=Ad(S=>{if(!e)throw new Error("No knowledge assistant was defined");return c(null),t({assistantCode:e,input:S,threadId:o,onNewThreadId(x){i(x)}})},{onSuccess(S){var x;g("Assistant response displayed",{evaluationId:S.evaluationId,assistantCode:e,assistantOutput:S.answer.answer,input:S.question,sources:(x=S.answer.sources)!=null?x:[]}),f(!1)},onError(S){var x;c((x=S.message)!=null?x:"Unknown error")}}),h=S=>M(null,null,function*(){a(!0),p(S),yield v.call(S),a(!1),p(null)}),y={isEnabled:!!e,assistantCode:e,isSubmitting:s,threadId:o,pendingInput:d,errorMessage:l,onSubmit:h,onReset(){o&&m(kE(o)),c(null),i(null),e&&g("Assistant thread reset",{threadId:o!=null?o:void 0,assistantCode:e})}};return(0,et.useEffect)(()=>{n&&y.isEnabled&&h(n)},[n]),(0,ve.jsx)(qp.Provider,{value:y,children:r})},Xp=()=>{let e=se(_a),t=z("WidgetKnowledgeAssistant",Cp),n=(0,et.useContext)(qp),r=(0,et.useRef)(null),[o,i]=(0,et.useState)(""),s=l=>{i(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),i(""))})};return n.isEnabled?(0,ve.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,ve.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:s}),(0,ve.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},Qp=({title:e,emptyState:t})=>{var m,g;let n=se(_a),r=Ze(),o=z("WidgetKnowledgeAssistant",Cp),i=(0,et.useRef)(null),s=(0,et.useContext)(qp),a=(g=G(EE((m=s.threadId)!=null?m:-1)))!=null?g:[],l=X("hasKeyboardInput"),c=pn(),u=(v,h)=>{Ar(v),s.assistantCode&&r("Assistant response copied",{assistantCode:s.assistantCode,assistantOutput:v,copiedText:v,evaluationId:h.evaluationId})},f=(v,h)=>{s.assistantCode&&r("Assistant source clicked",{evaluationId:h.evaluationId,assistantCode:s.assistantCode,source:v})},d=v=>{v.preventDefault(),s.onReset()},p=(v,h)=>{c.send(eo,{text:v,suggestion:{source:"assistant",sourceText:v}}),s.assistantCode&&r("Assistant response used",{assistantCode:s.assistantCode,evaluationId:h.evaluationId,assistantOutput:h.answer.answer,usedText:v})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t&&!s.errorMessage?null:(0,ve.jsxs)(et.Fragment,{children:[(0,ve.jsx)(Tr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,ve.jsxs)(Tt,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,ve.jsx)(gF,E({},t)),a.map((v,h)=>(0,ve.jsx)(hF,{innerRef:h===a.length-1?i:void 0,item:v,hasKeyboardInput:l,onCopy:y=>u(y,v),onUse:y=>p(y,v),onSourceClick:y=>f(y,v)},`${v.question}_${v.answer}_${h}`)),s.pendingInput&&(0,ve.jsx)(Ep,{title:s.pendingInput}),s.errorMessage&&(0,ve.jsx)(tP,{message:s.errorMessage})]})}),a.length>0&&(0,ve.jsx)("div",{className:o.resetContainer,children:(0,ve.jsx)(pe.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:d,children:n("resetLabel")})})]})};var No=b(oP());var sI=b(Z());var Jp=b(De()),gr=b(Z());var Zp=b(Z());var iP={root:"dd-tvkOF",content:"dd-eXA1D"};var K0=b(I()),yF=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,Zp.useRef)(null),c=z("Dialog",iP),u=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,Zp.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,K0.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":s,ref:l,onKeyDown:u,onMouseDown:f,children:(0,K0.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},$a=yF;var aP=b(De());var sP={root:"dd-ranhW"};var lP=b(I()),vF=r=>{var o=r,{className:e,value:t}=o,n=ie(o,["className","value"]);let i=z("TextInput",sP);return(0,lP.jsx)("input",E({className:(0,aP.default)(e,i.root),type:"text",value:t},n))},$c=vF;var G0={};ht(G0,{enUS:()=>SF,nlNL:()=>xF});var SF={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"}]},xF={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 cP={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var st=b(I());var wF=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},bF=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=se(G0),s=z("LoginTokenDialog",cP),a=G(lb),l=Ee(),c=X("productName"),[u,f]=(0,gr.useState)(e||""),[d,p]=(0,gr.useState)(0),[m,g]=(0,gr.useState)(""),v=(0,gr.useCallback)(x=>M(null,null,function*(){x.preventDefault(),l(db({email:u})),p(1)}),[n,u]),h=()=>{g(""),p(0)},y=(0,gr.useCallback)(x=>M(null,null,function*(){x.preventDefault();let T=wF(x.target.elements.token.value);if(!T){g(i("verifyCodeError",{login:S}));return}l(vl({token:T}))}),[n]),S=(0,gr.useMemo)(()=>x=>(0,st.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:h,children:x},"back-button"),[]);return(0,gr.useEffect)(()=>{a==="error"&&g(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,st.jsx)($a,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:c}),overlayAriaLabel:i("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,st.jsxs)("div",{className:s.root,children:[(0,st.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:c})}),d===0&&(0,st.jsxs)("form",{onSubmit:v,children:[(0,st.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,st.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:c})}),(0,st.jsx)($c,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:u,onChange:x=>f(x.target.value)}),(0,st.jsx)("div",{className:s.actions,children:(0,st.jsx)("button",{type:"submit",className:(0,Jp.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,st.jsxs)("form",{onSubmit:y,children:[(0,st.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,st.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,st.jsx)($c,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),m&&(0,st.jsx)("div",{className:s.errorMessage,children:m}),(0,st.jsxs)("div",{className:s.actions,children:[(0,st.jsx)("button",{type:"button",className:(0,Jp.default)(s.button),onClick:h,children:i("back")}),(0,st.jsx)("button",{type:"submit",className:(0,Jp.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},uP=bF;var fP=b(I()),EF=()=>{let e=G(cb),t=G(Gs),n=X("adminUrl"),r=pn(),o=()=>r.send(Ys,!1),i=()=>{r.send(Ys,!1),r.send(El)};return(0,fP.jsx)(uP,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},dP=EF;var oI=b(X0()),bn=b(Z());var UF={data:null,fetchState:"idle"},hP=e=>e.contentTypes.data,jc=ge("contentTypes/getContentTypes",(e,t)=>M(null,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),VF=Re({name:"contentTypes",initialState:UF,reducers:{},extraReducers:e=>{e.addCase(jc.pending,t=>{t.fetchState="loading"}).addCase(jc.rejected,t=>{t.fetchState="error"}).addCase(jc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),yP=VF.reducer;var WF={data:null,fetchState:"idle"},$F=[],mi=e=>e.profile.data,jF=e=>e.profile.data?e.profile.data.uiConfig.widget.types:$F,Gc=fn([jF],e=>e.filter(t=>t.isActive)),vP=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},SP=e=>t=>Gc(t).find(n=>n.type===e),xP=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,wP=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},Kc=ge("profile/getProfile",(e,t)=>M(null,null,function*(){var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),KF=Re({name:"profile",initialState:WF,reducers:{},extraReducers:e=>{e.addCase(Kc.pending,t=>{t.fetchState="loading"}).addCase(Kc.rejected,t=>{t.fetchState="error"}).addCase(Kc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),bP=KF.reducer;var To=b(Z());var EP=b(Z()),em=b(De());var Fn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var bo={};ht(bo,{enUS:()=>GF,nlNL:()=>qF});var GF={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},qF={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var gi=b(I()),YF=({src:e,title:t})=>{let n=z("CommandPalette",Fn),[r,o]=(0,EP.useState)("loading"),i=se(bo);return(0,gi.jsxs)("div",{className:n.image,children:[(0,gi.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,em.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,gi.jsx)("span",{className:(0,em.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,gi.jsx)("span",{className:(0,em.default)(n.imageSrc,n.imageSrcStatus),children:(0,gi.jsx)(zu,{})}),t&&(0,gi.jsx)("span",{className:n.imageTitle,children:t})]})},CP=YF;var TP=b(Z()),kP=b(De());var ms=b(I());function Q0({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=se(bo),s=z("CommandPalette",Fn);return TP.default.Children.count(e)===0?null:(0,ms.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,ms.jsxs)("div",{className:s.listHeader,children:[t&&(0,ms.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,ms.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,ms.jsx)("div",{className:(0,kP.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Jc=b(De());var tm=b(Z());function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ae=1,J0=2,eS=4,dt=8,nm=16,Yc=32,hr=64,Z0={a:{content:Ae|dt,self:!1,type:Ae|dt|Yc|hr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Ae|dt,void:!0},body:{content:Ae|J0|eS|dt|nm|Yc|hr},button:{content:dt,type:Ae|dt|Yc|hr},caption:{content:Ae,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Ae|Yc|hr},dd:{content:Ae,parent:["dl"]},dl:{children:["dt","dd"],type:Ae},dt:{content:Ae,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Ae,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Ae,void:!0},img:{void:!0},li:{content:Ae,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Ae},picture:{children:["source","img"],type:Ae|dt|nm},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:dt,parent:["ruby","rtc"]},rtc:{content:dt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:dt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Ae},tbody:{parent:["table"],children:["tr"]},td:{content:Ae,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Ae,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:Ae},video:{children:["track","source"]},wbr:{type:Ae|dt,void:!0}};function hs(e){return t=>{Z0[t]=E(E({},e),Z0[t])}}["address","main","div","figure","p","pre"].forEach(hs({content:Ae,type:Ae|hr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(hs({content:dt,type:Ae|dt|hr}));["p","pre"].forEach(hs({content:dt,type:Ae|hr}));["s","small","span","del","ins"].forEach(hs({content:dt,type:Ae|dt}));["article","aside","footer","header","nav","section","blockquote"].forEach(hs({content:Ae,type:Ae|J0|hr}));["h1","h2","h3","h4","h5","h6"].forEach(hs({content:dt,type:Ae|eS|hr}));["audio","canvas","iframe","img","video"].forEach(hs({type:Ae|dt|nm|hr}));var Qc=Object.freeze(Z0),tS=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],nS=Object.keys(Qc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,rS=2,gs=3,hi=4,om=5,im=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:gs,controls:hi,datetime:Oe,default:hi,disabled:hi,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:hi,media:Oe,muted:hi,poster:Oe,rel:Oe,role:Oe,rowspan:gs,scope:Oe,sizes:Oe,span:gs,start:gs,style:om,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),oS=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function rm(){return rm=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},rm.apply(this,arguments)}function sm({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?tm.default.createElement(i,rm({className:t},e)):tm.default.createElement(i,rm({className:t},e),n)}var Xc=class{attribute(t,n){return n}node(t,n){return n}};function RP(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?A(E({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var Eo=class{constructor(t,n,r){qc(this,"greedy",!1),qc(this,"options",void 0),qc(this,"propName",void 0),qc(this,"inverseName",void 0),qc(this,"factory",void 0),this.options=E({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?tm.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return RP(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ys=b(Z()),_P=b(IP());function Co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZF=/(url|image|image-set)\(/i,iS=class extends Xc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(ZF)&&delete n[r]}),n}},AP=1,JF=3,e5=/^<(!doctype|(html|head|body)(\s|>))/i,t5=/^(aria-|data-|\w+:)/iu,n5=/{{{(\w+)\/?}}}/;function r5(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var am=class{constructor(t,n={},r=[],o=[]){var i;Co(this,"allowed",void 0),Co(this,"banned",void 0),Co(this,"blocked",void 0),Co(this,"container",void 0),Co(this,"content",[]),Co(this,"props",void 0),Co(this,"matchers",void 0),Co(this,"filters",void 0),Co(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new iS],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:nS),this.banned=new Set(tS),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 c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let f="";for(;i&&(a=l.match(i));){let d=a,{index:p,length:m,match:g,valid:v,void:h}=d,y=ie(d,["index","length","match","valid","void"]),S=l.propName+String(s);p>0&&(f+=i.slice(0,p)),v?(f+=h?`{{{${S}/}}}`:`{{{${S}}}}${g}{{{/${S}}}}`,this.keyIndex+=1,s+=1,r[S]={children:g,matcher:l,props:A(E(E({},o),y),{key:this.keyIndex})}):f+=g,l.greedy?(i=f+i.slice(p+m),f=""):i=i.slice(p+(m||g.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
69
+ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ir(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Hi=new Oh;function Pe(e,t){return Hi.parse(e,t)}Pe.options=Pe.setOptions=function(e){return Hi.setOptions(e),Pe.defaults=Hi.defaults,dE(Pe.defaults),Pe};Pe.getDefaults=Th;Pe.defaults=Bi;Pe.use=function(...e){return Hi.use(...e),Pe.defaults=Hi.defaults,dE(Pe.defaults),Pe};Pe.walkTokens=function(e,t){return Hi.walkTokens(e,t)};Pe.parseInline=Hi.parseInline;Pe.Parser=ro;Pe.parser=ro.parse;Pe.Renderer=Wd;Pe.TextRenderer=Nh;Pe.Lexer=no;Pe.lexer=no.lex;Pe.Tokenizer=Vd;Pe.Hooks=Bd;Pe.parse=Pe;var NB=Pe.options,OB=Pe.setOptions,LB=Pe.use,DB=Pe.walkTokens,FB=Pe.parseInline;var zB=ro.parse,HB=no.lex;var Kd=(e,t)=>{let n=[],r=new Oh,o=i=>{i.type==="code"&&i.lang===t&&n.push(i.text)};return r.use({walkTokens:o}),r.parse(e),n};function Lh(e){return Array.isArray(e.attachments)&&e.attachments.length>0?e.attachments:Array.isArray(e.transcript)?e.transcript.flatMap(t=>{var n;return(n=t==null?void 0:t.attachments)!=null?n:[]}):[]}var bE={cues:[],threads:{},pending:[]},EE=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var CE=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Gd=Rt("assistants/callToAction"),Hl=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>M(null,null,function*(){var c,u,f;let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,i=t.getState(),{platformVariables:s}=i.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(mn(A(E({skipState:!0},e),{input:{},threadId:n,attachments:e.attachments})));if(a.error)throw new Error(a.error.message);let l=(c=a.payload.output[0])!=null?c:{response:"",sources:[]};return{threadId:n,question:e.input,evaluationId:a.payload.evaluationId,answer:{answer:(u=or(l.response,s!=null?s:{}))!=null?u:"",sources:(f=l.sources)!=null?f:[]}}})),rU=Rt("assistants/extractedTextSuggestions");function WL(e,t){var n,r;return Array.isArray(e.output)?e.output:typeof e.output=="string"?[{code:t,name:t,response:e.output}]:[A(E({code:t,name:t},e.output&&typeof e.output=="object"?e.output:{}),{response:(r=(n=e.output)==null?void 0:n.response)!=null?r:""})]}var mn=ge("assistants/evaluate",(e,t)=>M(null,null,function*(){var y,S,x,T,C;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:i={},threadId:s,attachments:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(S=(y=l.conversation.current)==null?void 0:y.externalId)!=null?S:null,f=(T=(x=e.externalConversationId)!=null?x:u)!=null?T:void 0,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");let k=yield r.conversationQuery();d=Array.isArray(k)?k:void 0}else Array.isArray(o)&&(d=o);if(e.includeMetadata&&l.conversation.current&&((C=e.externalConversationId)!=null?C:u)===u){let{metadata:R}=l.conversation.current;Object.assign(i,{metadata:R})}let p=Lh({attachments:a,transcript:d}),m=yield n.evaluateAssistant(e.assistantCode,E({input:i,transcript:d,externalConversationId:f,threadId:s},p.length>0?{attachments:p}:{}));if(m.evaluationStatus!=="success")return t.rejectWithValue(`Assistant ${e.assistantCode} evaluation failed: ${m.evaluationStatus}`);let v=WL(m,e.assistantCode).map(k=>A(E({},k),{name:or(k.name,c),response:or(k.response,c)||""})),h=[];return v.forEach(k=>{if(!k.response)return;let R=Kd(k.response,"reply");R.length!==0&&h.push(...R.map(O=>({text:O,type:"text",source:"assistant",assistantCode:k.code,sourceLabel:k.name})))}),h.length>0&&t.dispatch(Ks(h)),A(E({},m),{output:v,externalConversationId:f,currentExternalIdAtRequest:u})}));function TE(e){return e!=null&&e.length?e.map(t=>t.response).filter(Boolean).join(`
70
+ `):""}var kE=Re({name:"assistants",initialState:bE,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]},receiveChunk(e,t){let{code:n,name:r,payload:o,evaluationId:i}=t.payload,s=e.cues.findIndex(a=>a.code===n);s!==-1?e.cues[s].response+=o.text:e.cues.push({code:n,name:r,evaluationId:i,response:o.text})},userNotification(e,t){let n=e.cues.filter(l=>l.code!==t.payload.code),{code:r,name:o,evaluationId:i,payload:s}=t.payload,{callToAction:a}=s;e.cues=[...n,{code:r,name:o,evaluationId:i,response:s.message,editable:s.editableMessage,callToAction:a&&{label:a.displayName,event:a.onClickEvent,value:a.eventPayload}}]}},extraReducers:e=>{e.addCase(mn.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&te.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(mn.rejected,(t,n)=>{var o;te.warn((o=n.error)==null?void 0:o.message);let r=t.pending.indexOf(n.meta.arg.assistantCode);r!==-1&&t.pending.splice(r,1)}).addCase(mn.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),n.meta.arg.skipState)return;let{evaluationId:o,output:i,externalConversationId:s,currentExternalIdAtRequest:a}=n.payload;if(s&&a&&s!==a)return;let l=i.map(f=>f.code),c=t.cues.filter(f=>!l.includes(f.code)),u=i.map(f=>E(A(E({},f),{evaluationId:o}),s?{externalConversationId:s}:{}));t.cues=[...c,...u]}).addCase(Hl.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=ie(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(lt,()=>bE)}}),{removeCueByCode:qd,resetCues:oU,removeThreadById:RE,receiveChunk:PE,userNotification:IE}=kE.actions,AE=kE.reducer;var $L={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showStyleSuggestionList:!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,addToPersonalCollection:!1,inlineSuggestions:!1,autoSelectSuggestion:!1,suggestionsPlacement:"above",floatingMenu:!1,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!0,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},_E=Re({name:"settings",initialState:$L,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:Yd}=_E.actions,Ui=e=>t=>t.settings[e],X=e=>G(Ui(e)),ME=_E.reducer;function Ar(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 Xd=b(De()),LE=b(Z());var Dh=b(I()),Fh=e=>(0,Dh.jsx)("svg",A(E({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Dh.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})}));var zh=b(I()),NE=e=>(0,zh.jsx)("svg",A(E({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,zh.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})}));function Bo(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Hh={};ht(Hh,{enUS:()=>jL,nlNL:()=>KL});var jL={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},KL={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var OE={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Uo=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,i=o||window.location.origin;return r&&!n?null:r&&n?`${i}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${i}${e}`};var oo=b(I()),GL=({assistantCode:e,assistantOutput:t,evaluationId:n,feedbackType:r,feedbackText:o})=>{let i=z("FeedbackThumbs",OE),s=X("enableFeedbackForm"),a=G(Pr),l=G(Uo(`/admin/feedback?conversationId=${a}&evaluationId=${n}&type=${r}&text=${o}&assistantCode=${e}&assistantOutput=${t}`)),c=se(Hh),u=Ze(),[f,d]=(0,LE.useState)(null),p=v=>{u("Assistant response feedback",{assistantCode:e,assistantOutput:t,evaluationId:n,rating:v})},m=v=>{v.stopPropagation(),Bo(v.target,i.fadeup),d("up"),p("up")},g=v=>{v.stopPropagation(),Bo(v.target,i.fadedown),d("down"),p("down")};return(0,oo.jsxs)("div",{className:i.thumbs,children:[(0,oo.jsx)(pe.Button,{title:c("thumbsUp"),onClick:m,icon:(0,oo.jsx)(NE,{}),className:(0,Xd.default)(i.thumbsUp,f==="up"&&i.selected),disabled:!!f}),s&&l?(0,oo.jsx)(pe.Button,{as:"a",title:c("thumbsDown"),href:l,target:"_blank",rel:"noreferrer",onClick:g,icon:(0,oo.jsx)(Fh,{}),className:(0,Xd.default)(i.thumbsDown,f==="down"&&i.selected),disabled:!!f}):(0,oo.jsx)(pe.Button,{title:c("thumbsDown"),onClick:g,icon:(0,oo.jsx)(Fh,{}),className:(0,Xd.default)(i.thumbsDown,f==="down"&&i.selected),disabled:!!f})]})},Qd=GL;function DE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qL(e){if(Array.isArray(e))return e}function YL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}function XL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
71
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QL(e,t){return qL(e)||YL(e,t)||ZL(e,t)||XL()}function ZL(e,t){if(e){if(typeof e=="string")return DE(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DE(e,t):void 0}}var QE=Object.entries,FE=Object.setPrototypeOf,JL=Object.isFrozen,e2=Object.getPrototypeOf,t2=Object.getOwnPropertyDescriptor,It=Object.freeze,At=Object.seal,Js=Object.create,ZE=typeof Reflect!="undefined"&&Reflect,jh=ZE.apply,Kh=ZE.construct;It||(It=function(t){return t});At||(At=function(t){return t});jh||(jh=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)});Kh||(Kh=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});var Qs=nt(Array.prototype.forEach),n2=nt(Array.prototype.lastIndexOf),zE=nt(Array.prototype.pop),Zs=nt(Array.prototype.push),r2=nt(Array.prototype.splice),Wo=Array.isArray,Vl=nt(String.prototype.toLowerCase),Bh=nt(String.prototype.toString),HE=nt(String.prototype.match),Bl=nt(String.prototype.replace),BE=nt(String.prototype.indexOf),o2=nt(String.prototype.trim),i2=nt(Number.prototype.toString),s2=nt(Boolean.prototype.toString),UE=typeof BigInt=="undefined"?null:nt(BigInt.prototype.toString),VE=typeof Symbol=="undefined"?null:nt(Symbol.prototype.toString),vt=nt(Object.prototype.hasOwnProperty),Ul=nt(Object.prototype.toString),yt=nt(RegExp.prototype.test),Vi=a2(TypeError);function nt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return jh(e,t,r)}}function a2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kh(e,n)}}function Ee(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vl;if(FE&&FE(e,null),!Wo(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(JL(t)||(t[r]=i),o=i)}e[o]=!0}return e}function l2(e){for(let t=0;t<e.length;t++)vt(e,t)||(e[t]=null);return e}function Zt(e){let t=Js(null);for(let r of QE(e)){var n=QL(r,2);let o=n[0],i=n[1];vt(e,o)&&(Wo(i)?t[o]=l2(i):i&&typeof i=="object"&&i.constructor===Object?t[o]=Zt(i):t[o]=i)}return t}function c2(e){switch(typeof e){case"string":return e;case"number":return i2(e);case"boolean":return s2(e);case"bigint":return UE?UE(e):"0";case"symbol":return VE?VE(e):"Symbol()";case"undefined":return Ul(e);case"function":case"object":{if(e===null)return Ul(e);let t=e,n=_r(t,"toString");if(typeof n=="function"){let r=n(t);return typeof r=="string"?r:Ul(r)}return Ul(e)}default:return Ul(e)}}function _r(e,t){for(;e!==null;){let r=t2(e,t);if(r){if(r.get)return nt(r.get);if(typeof r.value=="function")return nt(r.value)}e=e2(e)}function n(){return null}return n}function u2(e){try{return yt(e,""),!0}catch(t){return!1}}var WE=It(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Uh=It(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vh=It(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),d2=It(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wh=It(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),f2=It(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$E=It(["#text"]),jE=It(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),$h=It(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),KE=It(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zd=It(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),p2=At(/{{[\w\W]*|^[\w\W]*}}/g),m2=At(/<%[\w\W]*|^[\w\W]*%>/g),g2=At(/\${[\w\W]*/g),h2=At(/^data-[\-\w.\u00B7-\uFFFF]+$/),y2=At(/^aria-[\-\w]+$/),GE=At(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v2=At(/^(?:\w+script|data):/i),S2=At(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),x2=At(/^html$/i),w2=At(/^[a-z][.\w]*(-[.\w]+)+$/i),qE=At(/<[/\w!]/g),YE=At(/<[/\w]/g),b2=At(/<\/no(script|embed|frames)/i),E2=At(/\/>/i),Pn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},C2=function(){return typeof window=="undefined"?null:window},T2=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},XE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vo=function(t,n,r,o){return vt(t,n)&&Wo(t[n])?Ee(o.base?Zt(o.base):{},t[n],o.transform):r};function JE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C2(),t=$=>JE($);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==Pn.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,o=r.currentScript;e.DocumentFragment;let i=e.HTMLTemplateElement,s=e.Node,a=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,f=e.trustedTypes,d=a.prototype,p=_r(d,"cloneNode"),m=_r(d,"remove"),g=_r(d,"nextSibling"),v=_r(d,"childNodes"),h=_r(d,"parentNode"),y=_r(d,"shadowRoot"),S=_r(d,"attributes"),x=s&&s.prototype?_r(s.prototype,"nodeType"):null,T=s&&s.prototype?_r(s.prototype,"nodeName"):null;if(typeof i=="function"){let $=n.createElement("template");$.content&&$.content.ownerDocument&&(n=$.content.ownerDocument)}let C,k="",R,O=!1,L=0,U=function(){if(L>0)throw Vi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},J=function(w){U(),L++;try{return C.createHTML(w)}finally{L--}},Y=function(w){U(),L++;try{return C.createScriptURL(w)}finally{L--}},_=function(){return O||(R=T2(f,o),O=!0),R},V=n,B=V.implementation,W=V.createNodeIterator,N=V.createDocumentFragment,q=V.getElementsByTagName,j=r.importNode,K=XE();t.isSupported=typeof QE=="function"&&typeof h=="function"&&B&&B.createHTMLDocument!==void 0;let ue=p2,ne=m2,Qe=g2,Se=h2,tt=y2,pt=v2,Le=S2,Ne=w2,at=GE,ye=null,oe=Ee({},[...WE,...Uh,...Vh,...Wh,...$E]),re=null,me=Ee({},[...jE,...$h,...KE,...Zd]),fe=Object.seal(Js(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,Te=null,mt=Object.seal(Js(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Gt=!0,Et=!0,xr=!1,Jn=!0,gt=!1,Ct=!0,wr=!1,Qm=!1,Zm=null,Jm=null,eg=!1,Ms=!1,Eu=!1,Cu=!1,JS=!0,ex=!1,tx="user-content-",tg=!0,ng=!1,Ns={},br=null,rg=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),nx=null,rx=Ee({},["audio","video","img","source","image","track"]),og=null,ox=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tu="http://www.w3.org/1998/Math/MathML",ku="http://www.w3.org/2000/svg",Er="http://www.w3.org/1999/xhtml",Os=Er,ig=!1,sg=null,S_=Ee({},[Tu,ku,Er],Bh),ix=It(["mi","mo","mn","ms","mtext"]),ag=Ee({},ix),sx=It(["annotation-xml"]),lg=Ee({},sx),x_=Ee({},["title","style","font","a","script"]),il=null,w_=["application/xhtml+xml","text/html"],b_="text/html",je=null,Ls=null,E_=n.createElement("form"),ax=function(w){return w instanceof RegExp||w instanceof Function},cg=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ls&&Ls===w)return;(!w||typeof w!="object")&&(w={}),w=Zt(w),il=w_.indexOf(w.PARSER_MEDIA_TYPE)===-1?b_:w.PARSER_MEDIA_TYPE,je=il==="application/xhtml+xml"?Bh:Vl,ye=Vo(w,"ALLOWED_TAGS",oe,{transform:je}),re=Vo(w,"ALLOWED_ATTR",me,{transform:je}),sg=Vo(w,"ALLOWED_NAMESPACES",S_,{transform:Bh}),og=Vo(w,"ADD_URI_SAFE_ATTR",ox,{transform:je,base:ox}),nx=Vo(w,"ADD_DATA_URI_TAGS",rx,{transform:je,base:rx}),br=Vo(w,"FORBID_CONTENTS",rg,{transform:je}),$e=Vo(w,"FORBID_TAGS",Zt({}),{transform:je}),Te=Vo(w,"FORBID_ATTR",Zt({}),{transform:je}),Ns=vt(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Zt(w.USE_PROFILES):w.USE_PROFILES:!1,Gt=w.ALLOW_ARIA_ATTR!==!1,Et=w.ALLOW_DATA_ATTR!==!1,xr=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Jn=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gt=w.SAFE_FOR_TEMPLATES||!1,Ct=w.SAFE_FOR_XML!==!1,wr=w.WHOLE_DOCUMENT||!1,Ms=w.RETURN_DOM||!1,Eu=w.RETURN_DOM_FRAGMENT||!1,Cu=w.RETURN_TRUSTED_TYPE||!1,eg=w.FORCE_BODY||!1,JS=w.SANITIZE_DOM!==!1,ex=w.SANITIZE_NAMED_PROPS||!1,tg=w.KEEP_CONTENT!==!1,ng=w.IN_PLACE||!1,at=u2(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:GE,Os=typeof w.NAMESPACE=="string"?w.NAMESPACE:Er,ag=vt(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Zt(w.MATHML_TEXT_INTEGRATION_POINTS):Ee({},ix),lg=vt(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Zt(w.HTML_INTEGRATION_POINTS):Ee({},sx);let P=vt(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Zt(w.CUSTOM_ELEMENT_HANDLING):Js(null);if(fe=Js(null),vt(P,"tagNameCheck")&&ax(P.tagNameCheck)&&(fe.tagNameCheck=P.tagNameCheck),vt(P,"attributeNameCheck")&&ax(P.attributeNameCheck)&&(fe.attributeNameCheck=P.attributeNameCheck),vt(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),At(fe),gt&&(Et=!1),Eu&&(Ms=!0),Ns&&(ye=Ee({},$E),re=Js(null),Ns.html===!0&&(Ee(ye,WE),Ee(re,jE)),Ns.svg===!0&&(Ee(ye,Uh),Ee(re,$h),Ee(re,Zd)),Ns.svgFilters===!0&&(Ee(ye,Vh),Ee(re,$h),Ee(re,Zd)),Ns.mathMl===!0&&(Ee(ye,Wh),Ee(re,KE),Ee(re,Zd))),mt.tagCheck=null,mt.attributeCheck=null,vt(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?mt.tagCheck=w.ADD_TAGS:Wo(w.ADD_TAGS)&&(ye===oe&&(ye=Zt(ye)),Ee(ye,w.ADD_TAGS,je))),vt(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?mt.attributeCheck=w.ADD_ATTR:Wo(w.ADD_ATTR)&&(re===me&&(re=Zt(re)),Ee(re,w.ADD_ATTR,je))),vt(w,"ADD_URI_SAFE_ATTR")&&Wo(w.ADD_URI_SAFE_ATTR)&&Ee(og,w.ADD_URI_SAFE_ATTR,je),vt(w,"FORBID_CONTENTS")&&Wo(w.FORBID_CONTENTS)&&(br===rg&&(br=Zt(br)),Ee(br,w.FORBID_CONTENTS,je)),vt(w,"ADD_FORBID_CONTENTS")&&Wo(w.ADD_FORBID_CONTENTS)&&(br===rg&&(br=Zt(br)),Ee(br,w.ADD_FORBID_CONTENTS,je)),tg&&(ye["#text"]=!0),wr&&Ee(ye,["html","head","body"]),ye.table&&(Ee(ye,["tbody"]),delete $e.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let D=C;C=w.TRUSTED_TYPES_POLICY;try{k=J("")}catch(ee){throw C=D,ee}}else w.TRUSTED_TYPES_POLICY===null?(C=void 0,k=""):(C===void 0&&(C=_()),C&&typeof k=="string"&&(k=J("")));It&&It(w),Ls=w},lx=Ee({},[...Uh,...Vh,...d2]),cx=Ee({},[...Wh,...f2]),C_=function(w,P,D){return P.namespaceURI===Er?w==="svg":P.namespaceURI===Tu?w==="svg"&&(D==="annotation-xml"||ag[D]):!!lx[w]},T_=function(w,P,D){return P.namespaceURI===Er?w==="math":P.namespaceURI===ku?w==="math"&&lg[D]:!!cx[w]},k_=function(w,P,D){return P.namespaceURI===ku&&!lg[D]||P.namespaceURI===Tu&&!ag[D]?!1:!cx[w]&&(x_[w]||!lx[w])},R_=function(w){let P=h(w);(!P||!P.tagName)&&(P={namespaceURI:Os,tagName:"template"});let D=Vl(w.tagName),ee=Vl(P.tagName);return sg[w.namespaceURI]?w.namespaceURI===ku?C_(D,P,ee):w.namespaceURI===Tu?T_(D,P,ee):w.namespaceURI===Er?k_(D,P,ee):!!(il==="application/xhtml+xml"&&sg[w.namespaceURI]):!1},Oo=function(w){Zs(t.removed,{element:w});try{h(w).removeChild(w)}catch(P){if(m(w),!h(w))throw Vi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ru=function(w){ug(w);let P=v(w);if(P){let ee=[];Qs(P,ae=>{Zs(ee,ae)}),Qs(ee,ae=>{try{m(ae)}catch(de){}})}let D=S(w);if(D)for(let ee=D.length-1;ee>=0;--ee){let ae=D[ee],de=ae&&ae.name;if(typeof de=="string")try{w.removeAttribute(de)}catch(Ye){}}},ki=function(w,P){try{Zs(t.removed,{attribute:P.getAttributeNode(w),from:P})}catch(D){Zs(t.removed,{attribute:null,from:P})}if(P.removeAttribute(w),w==="is")if(Ms||Eu)try{Oo(P)}catch(D){}else try{P.setAttribute(w,"")}catch(D){}},P_=function(w){let P=S(w);if(P)for(let D=P.length-1;D>=0;--D){let ee=P[D],ae=ee&&ee.name;if(!(typeof ae!="string"||re[je(ae)]))try{w.removeAttribute(ae)}catch(de){}}},ug=function(w){let P=[w];for(;P.length>0;){let D=P.pop();(x?x(D):D.nodeType)===Pn.element&&P_(D);let ae=v(D);if(ae)for(let de=ae.length-1;de>=0;--de)P.push(ae[de])}},I_=function(w){if(!Ct)return;let P=[w];for(;P.length>0;){let D=P.pop(),ee=x?x(D):D.nodeType;if(ee===Pn.processingInstruction||ee===Pn.comment&&yt(YE,D.data)){try{m(D)}catch(de){}continue}if(ee===Pn.element){let de=D,Ye=je(T?T(D):D.nodeName);try{de.hasAttribute&&de.hasAttribute("patchsrc")&&de.removeAttribute("patchsrc"),de.hasAttribute&&de.hasAttribute("for")&&Ye!=="label"&&Ye!=="output"&&de.removeAttribute("for")}catch(Dt){}}let ae=v(D);if(ae)for(let de=ae.length-1;de>=0;--de)P.push(ae[de])}},ux=function(w){let P=null,D=null;if(eg)w="<remove></remove>"+w;else{let de=HE(w,/^[\r\n\t ]+/);D=de&&de[0]}il==="application/xhtml+xml"&&Os===Er&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");let ee=C?J(w):w;if(Os===Er)try{P=new u().parseFromString(ee,il)}catch(de){}if(!P||!P.documentElement){P=B.createDocument(Os,"template",null);try{P.documentElement.innerHTML=ig?k:ee}catch(de){}}let ae=P.body||P.documentElement;return w&&D&&ae.insertBefore(n.createTextNode(D),ae.childNodes[0]||null),Os===Er?q.call(P,wr?"html":"body")[0]:wr?P.documentElement:ae},dx=function(w){return W.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Pu=function(w){return w=Bl(w,ue," "),w=Bl(w,ne," "),w=Bl(w,Qe," "),w},dg=function(w){var P;w.normalize();let D=W.call(w.ownerDocument||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),ee=D.nextNode();for(;ee;)ee.data=Pu(ee.data),ee=D.nextNode();let ae=(P=w.querySelectorAll)===null||P===void 0?void 0:P.call(w,"template");ae&&Qs(ae,de=>{Ds(de.content)&&dg(de.content)})},Iu=function(w){let P=T?T(w):null;return typeof P!="string"||je(P)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==S(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==x(w)||w.childNodes!==v(w)},Ds=function(w){if(!x||typeof w!="object"||w===null)return!1;try{return x(w)===Pn.documentFragment}catch(P){return!1}},sl=function(w){if(!x||typeof w!="object"||w===null)return!1;try{return typeof x(w)=="number"}catch(P){return!1}};function Cr($,w,P){$.length!==0&&Qs($,D=>{D.call(t,w,P,Ls)})}let A_=function(w,P){return!!(Ct&&w.hasChildNodes()&&!sl(w.firstElementChild)&&yt(qE,w.textContent)&&yt(qE,w.innerHTML)||Ct&&w.namespaceURI===Er&&P==="style"&&sl(w.firstElementChild)||w.nodeType===Pn.processingInstruction||Ct&&w.nodeType===Pn.comment&&yt(YE,w.data))},__=function(w,P){if(!$e[P]&&mx(P)&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,P)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(P)))return!1;if(tg&&!br[P]){let D=h(w),ee=v(w);if(ee&&D){let ae=ee.length;for(let de=ae-1;de>=0;--de){let Ye=ng?ee[de]:p(ee[de],!0);D.insertBefore(Ye,g(w))}}}return Oo(w),!0},fx=function(w,P){if(Cr(K.beforeSanitizeElements,w,null),w!==P&&h(w)===null)return!0;if(Iu(w))return Oo(w),!0;let D=je(T?T(w):w.nodeName);if(Cr(K.uponSanitizeElement,w,{tagName:D,allowedTags:ye}),w!==P&&h(w)===null)return!0;if(A_(w,D))return Oo(w),!0;if($e[D]||!(mt.tagCheck instanceof Function&&mt.tagCheck(D))&&!ye[D]){let ae=__(w,D);return ae===!1&&Cr(K.afterSanitizeElements,w,null),ae}if((x?x(w):w.nodeType)===Pn.element&&!R_(w)||(D==="noscript"||D==="noembed"||D==="noframes")&&yt(b2,w.innerHTML))return Oo(w),!0;if(gt&&w.nodeType===Pn.text){let ae=Pu(w.textContent);w.textContent!==ae&&(Zs(t.removed,{element:w.cloneNode()}),w.textContent=ae)}return Cr(K.afterSanitizeElements,w,null),!1},px=function(w,P,D){if(Te[P]||Ct&&P==="patchsrc"||Ct&&P==="for"&&w!=="label"&&w!=="output"||JS&&(P==="id"||P==="name")&&(D in n||D in E_))return!1;let ee=re[P]||mt.attributeCheck instanceof Function&&mt.attributeCheck(P,w);if(!(Et&&yt(Se,P))){if(!(Gt&&yt(tt,P))){if(ee){if(!og[P]){if(!yt(at,Bl(D,Le,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&w!=="script"&&BE(D,"data:")===0&&nx[w])){if(!(xr&&!yt(pt,Bl(D,Le,"")))){if(D)return!1}}}}}else if(!(mx(w)&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,w)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(w))&&(fe.attributeNameCheck instanceof RegExp&&yt(fe.attributeNameCheck,P)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(P,w))||P==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&yt(fe.tagNameCheck,D)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(D))))return!1}}return!0},M_=Ee({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mx=function(w){return!M_[Vl(w)]&&yt(Ne,w)},N_=function(w,P,D,ee){if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!D)switch(f.getAttributeType(w,P)){case"TrustedHTML":return J(ee);case"TrustedScriptURL":return Y(ee)}return ee},O_=function(w,P,D,ee){try{D?w.setAttributeNS(D,P,ee):w.setAttribute(P,ee),Iu(w)?Oo(w):zE(t.removed)}catch(ae){ki(P,w)}},gx=function(w){Cr(K.beforeSanitizeAttributes,w,null);let P=w.attributes;if(!P||Iu(w))return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0},ee=P.length,ae=je(w.nodeName);for(;ee--;){let de=P[ee],Ye=de.name,Dt=de.namespaceURI,er=de.value,cn=je(Ye),tr=er,qt=Ye==="value"?tr:o2(tr);if(D.attrName=cn,D.attrValue=qt,D.keepAttr=!0,D.forceKeepAttr=void 0,Cr(K.uponSanitizeAttribute,w,D),qt=D.attrValue,ex&&(cn==="id"||cn==="name")&&BE(qt,tx)!==0&&(ki(Ye,w),qt=tx+qt),Ct&&yt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,qt)){ki(Ye,w);continue}if(cn==="attributename"&&HE(qt,"href")){ki(Ye,w);continue}if(!D.forceKeepAttr){if(!D.keepAttr){ki(Ye,w);continue}if(!Jn&&yt(E2,qt)){ki(Ye,w);continue}if(gt&&(qt=Pu(qt)),!px(ae,cn,qt)){ki(Ye,w);continue}qt=N_(ae,cn,Dt,qt),qt!==tr&&O_(w,Ye,Dt,qt)}}Cr(K.afterSanitizeAttributes,w,null)},Au=function(w){let P=null,D=dx(w);for(Cr(K.beforeSanitizeShadowDOM,w,null);P=D.nextNode();)if(Cr(K.uponSanitizeShadowNode,P,null),fx(P,w),gx(P),Ds(P.content)&&Au(P.content),(x?x(P):P.nodeType)===Pn.element){let ae=y(P);Ds(ae)&&(fg(ae),Au(ae))}Cr(K.afterSanitizeShadowDOM,w,null)},fg=function(w){let P=[{node:w,shadow:null}];for(;P.length>0;){let D=P.pop();if(D.shadow){Au(D.shadow);continue}let ee=D.node,de=(x?x(ee):ee.nodeType)===Pn.element,Ye=v(ee);if(Ye)for(let Dt=Ye.length-1;Dt>=0;--Dt)P.push({node:Ye[Dt],shadow:null});if(de){let Dt=T?T(ee):null;if(typeof Dt=="string"&&je(Dt)==="template"){let er=ee.content;Ds(er)&&P.push({node:er,shadow:null})}}if(de){let Dt=y(ee);Ds(Dt)&&P.push({node:null,shadow:Dt},{node:Dt,shadow:null})}}};return t.sanitize=function($){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,D=null,ee=null,ae=null;if(ig=!$,ig&&($="<!-->"),typeof $!="string"&&!sl($)&&($=c2($),typeof $!="string"))throw Vi("dirty is not a string, aborting");if(!t.isSupported)return $;Qm?(ye=Zm,re=Jm):cg(w),(K.uponSanitizeElement.length>0||K.uponSanitizeAttribute.length>0)&&(ye=Zt(ye)),K.uponSanitizeAttribute.length>0&&(re=Zt(re)),t.removed=[];let de=ng&&typeof $!="string"&&sl($);if(de){I_($);let cn=T?T($):$.nodeName;if(typeof cn=="string"){let tr=je(cn);if(!ye[tr]||$e[tr])throw Ru($),Vi("root node is forbidden and cannot be sanitized in-place")}if(Iu($))throw Ru($),Vi("root node is clobbered and cannot be sanitized in-place");try{fg($)}catch(tr){throw Ru($),tr}}else if(sl($))P=ux("<!---->"),D=P.ownerDocument.importNode($,!0),D.nodeType===Pn.element&&D.nodeName==="BODY"||D.nodeName==="HTML"?P=D:P.appendChild(D),fg(D);else{if(!Ms&&!gt&&!wr&&$.indexOf("<")===-1)return C&&Cu?J($):$;if(P=ux($),!P)return Ms?null:Cu?k:""}P&&eg&&Oo(P.firstChild);let Ye=de?$:P,Dt=dx(Ye);try{for(;ee=Dt.nextNode();)fx(ee,Ye),gx(ee),Ds(ee.content)&&Au(ee.content)}catch(cn){throw de&&(Ru($),Qs(t.removed,tr=>{tr.element&&ug(tr.element)})),cn}if(de)return Qs(t.removed,cn=>{cn.element&&ug(cn.element)}),gt&&dg($),$;if(Ms){if(gt&&dg(P),Eu)for(ae=N.call(P.ownerDocument);P.firstChild;)ae.appendChild(P.firstChild);else ae=P;return(re.shadowroot||re.shadowrootmode)&&(ae=j.call(r,ae,!0)),ae}let er=wr?P.outerHTML:P.innerHTML;return wr&&ye["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&yt(x2,P.ownerDocument.doctype.name)&&(er="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
72
+ `+er),gt&&(er=Pu(er)),C&&Cu?J(er):er},t.setConfig=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cg($),Qm=!0,Zm=ye,Jm=re},t.clearConfig=function(){Ls=null,Qm=!1,Zm=null,Jm=null,C=R,k=""},t.isValidAttribute=function($,w,P){Ls||cg({});let D=je($),ee=je(w);return px(D,ee,P)},t.addHook=function($,w){typeof w=="function"&&vt(K,$)&&Zs(K[$],w)},t.removeHook=function($,w){if(vt(K,$)){if(w!==void 0){let P=n2(K[$],w);return P===-1?void 0:r2(K[$],P,1)[0]}return zE(K[$])}},t.removeHooks=function($){vt(K,$)&&(K[$]=[])},t.removeAllHooks=function(){K=XE()},t}var eC=JE();var yo=b(Z());var a0=b(De()),Yn=b(Z());var Jd=b(Z()),k2=["bottom","height","left","right","top","width"],R2=(e={},t={})=>k2.some(n=>e[n]!==t[n]),io=new Map,tC,nC=()=>{let e=[],t=[];io.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();R2(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{io.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),tC=window.requestAnimationFrame(nC)};function P2(e,t){return{observe(){let n=io.size===0;if(io.has(e)){let r=io.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else io.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&nC()},unobserve(){let n=io.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||io.delete(e),io.size||cancelAnimationFrame(tC)}}}}function Gh(e){let[t,n]=(0,Jd.useState)(null);return(0,Jd.useLayoutEffect)(()=>{if(!e.current)return;let r=P2(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ia=b(Z()),Ek=b(Oc());var wk=b(Z());function di(e){(0,wk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function os(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var bk={root:"dd-r-dgo"};var Ck=({children:e,parentNode:t})=>{let[n,r]=(0,Ia.useState)(null),o=(0,Ia.useContext)(cl);return(0,Ia.useLayoutEffect)(()=>{let i=document.createElement("div");return os(i),i.classList.add(bk.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,Ek.createPortal)(e,n):null};var zr={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var xp=b(I()),wp=(e=!1)=>{let[t,n]=(0,Yn.useState)(e),r=(0,Yn.useCallback)(()=>n(!0),[]),o=(0,Yn.useCallback)(()=>n(!1),[]),i=(0,Yn.useCallback)(()=>n(a=>!a),[]),s=(0,Yn.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function l0(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 Aa=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Yn.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=l0,parentNode:a}=u,l=ie(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let f=Gh(t),d=Gh(n),p=(0,Yn.useMemo)(()=>s(f,d,0),[f,d]);return(0,xp.jsx)(Ck,{parentNode:a,children:(0,xp.jsx)("div",A(E({className:(0,a0.default)(zr.ref,{[zr.positionAbove]:r==="above",[zr.positionBelow]:r==="below",[zr.positionLeft]:r==="left",[zr.positionRight]:r==="right",[zr.alignStart]:o==="start",[zr.alignCenter]:o==="center",[zr.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,xp.jsx)("div",{className:(0,a0.default)(e,zr.root),children:i})}))})};var Tk={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var mr=b(I());function _3(e){return`<button type="button" data-copy-icon class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function c0(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function M3(e){return e.replace(/\r\n/g,`
73
+ `)}var N3=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=z("Markdown",Tk),s=(0,yo.useRef)(null),[a,l]=(0,yo.useState)(null),c=(0,yo.useMemo)(()=>{let g=Pe.parse(M3(e));return eC.sanitize(g.toString()).replaceAll("</code>",`${_3(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var y;let v=g.target,h=!!((y=s.current)!=null&&y.querySelector("code"));if(["A","BUTTON"].includes(v.tagName)){l(null);return}a||h&&v.tagName!=="CODE"||!h&&v!==s.current||(v.addEventListener("mouseleave",()=>l(null),{once:!0}),l(v))},f=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Bo(g,i.fadeup),r==null||r(c0(a)))},d=g=>{let v=g.target,h=v instanceof HTMLElement?v:null;if(v instanceof Element?v.closest("a"):null){g.stopPropagation();return}h&&"copyIcon"in h.dataset&&(Bo(h,i.fadeup),r==null||r(c0(h.parentElement)))},p=()=>{!a||!o||(l(null),o(c0(a)))},m=g=>{if(g===null)return;let v=g.getBoundingClientRect();v.left<0?g.style.transform=`translateX(${-v.left+2}px)`:v.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-v.right-2}px)`)};return(0,mr.jsxs)(yo.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(Aa,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:i.options,ref:m,children:[r&&(a==null?void 0:a.tagName)==="CODE"&&(0,mr.jsx)("button",{type:"button",className:i.option,onClick:f,children:n}),o&&(0,mr.jsxs)(yo.Fragment,{children:[(0,mr.jsx)("div",{className:i.divider}),(0,mr.jsx)("button",{type:"button",className:i.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:i.arrow})]}),(0,mr.jsx)("div",{ref:s,"data-testid":"widget-markdown-content",className:i.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:d})]})},is=N3;var Pk=b(Z());var kk={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var Rk=b(I()),O3=({width:e})=>{let t=z("LoadingProgressBar",kk);return(0,Rk.jsx)("div",{className:t.loadingBar,style:{width:e}})},bp=O3;var vo=b(I()),Ep=({title:e})=>{let t=(0,Pk.useRef)(null);return Vu(t),(0,vo.jsx)(pe,{ref:t,children:(0,vo.jsx)(be,{children:(0,vo.jsxs)(be.Content,{children:[(0,vo.jsx)(be.Title,{children:e}),(0,vo.jsx)(bp,{width:"60%"}),(0,vo.jsx)(bp,{width:"90%"}),(0,vo.jsx)(bp,{width:"50%"})]})})})};var _a={};ht(_a,{enUS:()=>L3,nlNL:()=>D3});var L3={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},D3={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Cp={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var $r=b(Z());var F=b(Z(),1);function Tp(){return typeof window!="undefined"}function Br(e){return kp(e)?(e.nodeName||"").toLowerCase():"#document"}function $t(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(kp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kp(e){return Tp()?e instanceof Node||e instanceof $t(e).Node:!1}function Ue(e){return Tp()?e instanceof Element||e instanceof $t(e).Element:!1}function ot(e){return Tp()?e instanceof HTMLElement||e instanceof $t(e).HTMLElement:!1}function as(e){return!Tp()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $t(e).ShadowRoot}function Lc(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Ik(e){return/^(table|td|th)$/.test(Br(e))}function Dc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var F3=/transform|translate|scale|rotate|perspective|filter/,z3=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none",u0;function Rp(e){let t=Ue(e)?Dn(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!Ma()&&(ss(t.backdropFilter)||ss(t.filter))||F3.test(t.willChange||"")||z3.test(t.contain||"")}function Ak(e){let t=Hr(e);for(;ot(t)&&!Vr(t);){if(Rp(t))return t;if(Dc(t))return null;t=Hr(t)}return null}function Ma(){return u0==null&&(u0=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),u0}function Vr(e){return/^(html|body|#document)$/.test(Br(e))}function Dn(e){return $t(e).getComputedStyle(e)}function Fc(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if(Br(e)==="html")return e;let t=e.assignedSlot||e.parentNode||as(e)&&e.host||Ur(e);return as(t)?t.host:t}function _k(e){let t=Hr(e);return Vr(t)?(e.ownerDocument||e).body:ot(t)&&Lc(t)?t:_k(t)}function Ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=_k(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=$t(o);if(i){let a=Pp(s);return t.concat(s,s.visualViewport||[],Lc(o)?o:[],a&&n?Ln(a):[])}else return t.concat(o,Ln(o,[],n))}function Pp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Da=b(Z(),1),qk=b(Z(),1);var Na=Math.min,So=Math.max,Hc=Math.round,Bc=Math.floor,Wr=e=>({x:e,y:e}),H3={left:"right",right:"left",bottom:"top",top:"bottom"};function Ok(e,t,n){return So(e,Na(t,n))}function Uc(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function Vc(e){return e.split("-")[1]}function d0(e){return e==="x"?"y":"x"}function f0(e){return e==="y"?"height":"width"}function xo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function p0(e){return d0(xo(e))}function Lk(e,t,n){n===void 0&&(n=!1);let r=Vc(e),o=p0(e),i=f0(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=zc(s)),[s,zc(s)]}function Dk(e){let t=zc(e);return[Ip(e),t,Ip(t)]}function Ip(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Mk=["left","right"],Nk=["right","left"],B3=["top","bottom"],U3=["bottom","top"];function V3(e,t,n){switch(e){case"top":case"bottom":return n?t?Nk:Mk:t?Mk:Nk;case"left":case"right":return t?B3:U3;default:return[]}}function Fk(e,t,n,r){let o=Vc(e),i=V3(ls(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ip)))),i}function zc(e){let t=ls(e);return H3[t]+e.slice(t.length)}function W3(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function zk(e){return typeof e!="number"?W3(e):{top:e,right:e,bottom:e,left:e}}function cs(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var $3=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ap=$3.join(","),Bk=typeof Element=="undefined",Oa=Bk?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_p=!Bk&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Mp=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Mp(t.parentNode));return s},j3=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Uk=function(t,n,r){if(Mp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ap));return n&&Oa.call(t,Ap)&&o.unshift(t),o=o.filter(r),o},Np=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Mp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=Np(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Oa.call(s,Ap);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Mp(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var p=Np(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},Vk=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wk=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||j3(t))&&!Vk(t)?0:t.tabIndex},K3=function(t,n){var r=Wk(t);return r<0&&n&&!Vk(t)?0:r},G3=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},$k=function(t){return t.tagName==="INPUT"},q3=function(t){return $k(t)&&t.type==="hidden"},Y3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},X3=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Q3=function(t){if(!t.name)return!0;var n=t.form||_p(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=X3(o,t.form);return!i||i===t},Z3=function(t){return $k(t)&&t.type==="radio"},J3=function(t){return Z3(t)&&!Q3(t)},e4=function(t){var n,r=t&&_p(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=_p(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Hk=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},t4=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}var s=getComputedStyle(t),a=s.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Oa.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Oa.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var f=t.parentElement,d=_p(t);if(f&&!f.shadowRoot&&o(f)===!0)return Hk(t);t.assignedSlot?t=t.assignedSlot:!f&&d!==t.ownerDocument?t=d.host:t=f}t=u}if(e4(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Hk(t);return!1},n4=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Oa.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},m0=function(t,n){return!(n.disabled||q3(n)||t4(n,t)||Y3(n)||n4(n))},g0=function(t,n){return!(J3(n)||Wk(n)<0||!m0(t,n))},r4=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},jk=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=K3(a,s),c=s?jk(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(G3).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},La=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:g0.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:r4}):r=Uk(t,n.includeContainer,g0.bind(null,n)),jk(r)},Kk=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:m0.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Uk(t,n.includeContainer,m0.bind(null,n)),r},h0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Oa.call(t,Ap)===!1?!1:g0(n,t)};function Yk(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function v0(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Xk(){return/apple/i.test(navigator.vendor)}function y0(){let e=/android/i;return e.test(Yk())||e.test(v0())}function o4(){return v0().includes("jsdom/")}var Gk="data-floating-ui-focusable",i4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function us(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function nn(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&as(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function wo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Op(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Qk(e){return e.matches("html,body")}function jt(e){return(e==null?void 0:e.ownerDocument)||document}function S0(e){return ot(e)&&e.matches(i4)}function x0(e){return e?e.getAttribute("role")==="combobox"&&S0(e):!1}function Lp(e){return e?e.hasAttribute(Gk)?e:e.querySelector("["+Gk+"]")||e:null}function ds(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ds(e,o.id,n)])}function w0(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){let i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Dp(e){e.preventDefault(),e.stopPropagation()}function Zk(e){return"nativeEvent"in e}function Jk(e){return e.mozInputSource===0&&e.isTrusted?!0:y0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function eR(e){return o4()?!1:!y0()&&e.width===0&&e.height===0||y0()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Fa(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var s4=typeof document!="undefined",a4=function(){},rn=s4?qk.useLayoutEffect:a4,l4=E({},Da);function fi(e){let t=Da.useRef(e);return rn(()=>{t.current=e}),t}var c4=l4.useInsertionEffect,u4=c4||(e=>e());function on(e){let t=Da.useRef(()=>{});return u4(()=>{t.current=e}),Da.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var za=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tR(e,t){let n=La(e,za()),r=n.length;if(r===0)return;let o=us(jt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function b0(e){return tR(jt(e).body,1)||e}function E0(e){return tR(jt(e).body,-1)||e}function Ha(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!nn(n,r)}function nR(e){La(e,za()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function C0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var wn=b(I(),1);var z0=b(Oc(),1);function rR(e,t,n){let{reference:r,floating:o}=e,i=xo(t),s=p0(t),a=f0(s),l=ls(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}let m=Vc(t);return m&&(p[s]+=d*(m==="end"?1:-1)*(n&&c?-1:1)),p}function oR(e,t){return M(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Uc(t,e),m=zk(p),v=a[d?f==="floating"?"reference":"floating":f],h=cs(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(v))==null||n?v:v.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),x=(yield i.isElement==null?void 0:i.isElement(S))&&(yield i.getScale==null?void 0:i.getScale(S))||{x:1,y:1},T=cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:S,strategy:l}):y);return{top:(h.top-T.top+m.top)/x.y,bottom:(T.bottom-h.bottom+m.bottom)/x.y,left:(h.left-T.left+m.left)/x.x,right:(T.right-h.right+m.right)/x.x}})}var d4=50,iR=(e,t,n)=>M(null,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:A(E({},s),{detectOverflow:oR}),l=yield s.isRTL==null?void 0:s.isRTL(t),c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rR(c,r,l),d=r,p=0,m={};for(let g=0;g<i.length;g++){let v=i[g];if(!v)continue;let{name:h,fn:y}=v,{x:S,y:x,data:T,reset:C}=yield y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=S!=null?S:u,f=x!=null?x:f,m[h]=E(E({},m[h]),T),C&&p<d4&&(p++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(c=C.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:f}=rR(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}});var sR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return M(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,V=Uc(e,n),{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=V,h=ie(V,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let y=ls(i),S=xo(l),x=ls(l)===l,T=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(x||!v?[zc(l)]:Dk(l)),k=g!=="none";!p&&k&&C.push(...Fk(l,v,g,T));let R=[l,...C],O=yield c.detectOverflow(n,h),L=[],U=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&L.push(O[y]),d){let B=Lk(i,a,T);L.push(O[B[0]],O[B[1]])}if(U=[...U,{placement:i,overflows:L}],!L.every(B=>B<=0)){var J,Y;let B=(((J=s.flip)==null?void 0:J.index)||0)+1,W=R[B];if(W&&(!(d==="alignment"?S!==xo(W):!1)||U.every(j=>xo(j.placement)===S?j.overflows[0]>0:!0)))return{data:{index:B,overflows:U},reset:{placement:W}};let N=(Y=U.filter(q=>q.overflows[0]<=0).sort((q,j)=>q.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!N)switch(m){case"bestFit":{var _;let q=(_=U.filter(j=>{if(k){let K=xo(j.placement);return K===S||K==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(K=>K>0).reduce((K,ue)=>K+ue,0)]).sort((j,K)=>j[1]-K[1])[0])==null?void 0:_[0];q&&(N=q);break}case"initialPlacement":N=l;break}if(i!==N)return{reset:{placement:N}}}return{}})}}};var f4=new Set(["left","top"]);function p4(e,t){return M(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=ls(n),a=Vc(n),l=xo(n)==="y",c=f4.has(s)?-1:1,u=i&&l?-1:1,f=Uc(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}})}var aR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return M(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,c=yield p4(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:A(E({},c),{placement:a})}})}}},lR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return M(this,null,function*(){let{x:r,y:o,placement:i,platform:s}=n,S=Uc(e,n),{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:T,y:C}=x;return{x:T,y:C}}}}=S,u=ie(S,["mainAxis","crossAxis","limiter"]),f={x:r,y:o},d=yield s.detectOverflow(n,u),p=xo(i),m=d0(p),g=f[m],v=f[p],h=(x,T)=>Ok(T+d[x==="y"?"top":"left"],T,T-d[x==="y"?"bottom":"right"]);a&&(g=h(m,g)),l&&(v=h(p,v));let y=c.fn(A(E({},n),{[m]:g,[p]:v}));return A(E({},y),{data:{x:y.x-r,y:y.y-o,enabled:{[m]:a,[p]:l}}})})}}};function dR(e){let t=Dn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ot(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Hc(n)!==i||Hc(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function k0(e){return Ue(e)?e:e.contextElement}function Ba(e){let t=k0(e);if(!ot(t))return Wr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=dR(t),s=(i?Hc(n.width):n.width)/r,a=(i?Hc(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var m4=Wr(0);function fR(e){let t=$t(e);return!Ma()||!t.visualViewport?m4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g4(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===$t(e)}function fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=k0(e),s=Wr(1);t&&(r?Ue(r)&&(s=Ba(r)):s=Ba(e));let a=g4(i,n,r)?fR(i):Wr(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i&&r){let d=$t(i),p=Ue(r)?$t(r):r,m=d,g=Pp(m);for(;g&&p!==m;){let v=Ba(g),h=g.getBoundingClientRect(),y=Dn(g),S=h.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,x=h.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=S,c+=x,m=$t(g),g=Pp(m)}}return cs({width:u,height:f,x:l,y:c})}function Fp(e,t){let n=Fc(e).scrollLeft;return t?t.left+n:fs(Ur(e)).left+n}function pR(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fp(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function h4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=Ur(r),a=t?Dc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Wr(1),u=Wr(0),f=ot(r);if((f||!i)&&((Br(r)!=="body"||Lc(s))&&(l=Fc(r)),f)){let p=fs(r);c=Ba(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let d=s&&!f&&!i?pR(s,l):Wr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function y4(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function v4(e){let t=Fc(e),n=e.ownerDocument.body,r=So(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=So(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+Fp(e),s=-t.scrollTop;return Dn(n).direction==="rtl"&&(i+=So(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:s}}var S4=25;function x4(e,t,n){n===void 0&&(n="viewport");let r=n==="layoutViewport",o=$t(e),i=Ur(e),s=o.visualViewport,a=i.clientWidth,l=i.clientHeight,c=0,u=0;if(s){let d=!Ma()||t==="fixed";r?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(Fp(i)<=0){let d=i.ownerDocument,p=d.body,m=getComputedStyle(p),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(i.clientWidth-p.clientWidth-g),h=getComputedStyle(i).scrollbarGutter==="stable both-edges"?v/2:v;h<=S4&&(a-=h)}return{width:a,height:l,x:c,y:u}}function w4(e,t){let n=fs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ba(e),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function cR(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=x4(e,n,t);else if(t==="document")r=v4(Ur(e));else if(Ue(t))r=w4(t,n);else{let o=fR(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return cs(r)}function b4(e,t){let n=t.get(e);if(n)return n;let r=Ln(e,[],!1).filter(a=>Ue(a)&&Br(a)!=="body"),o=null,i=Dn(e).position==="fixed",s=i?Hr(e):e;for(;Ue(s)&&!Vr(s);){let a=Dn(s),l=Rp(s),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?r=r.filter(f=>f!==s):o=a,s=Hr(s)}return t.set(e,r),r}function E4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Dc(t)?[]:b4(t,this._c):[].concat(n),r],a=cR(t,s[0],o),l=a.top,c=a.right,u=a.bottom,f=a.left;for(let d=1;d<s.length;d++){let p=cR(t,s[d],o);l=So(p.top,l),c=Na(p.right,c),u=Na(p.bottom,u),f=So(p.left,f)}return{width:c-f,height:u-l,x:f,y:l}}function C4(e){let{width:t,height:n}=dR(e);return{width:t,height:n}}function T4(e,t,n){let r=ot(t),o=Ur(t),i=n==="fixed",s=fs(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Wr(0);if((r||!i)&&((Br(t)!=="body"||Lc(o))&&(a=Fc(t)),r)){let d=fs(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!r&&o&&(l.x=Fp(o));let c=o&&!r&&!i?pR(o,a):Wr(0),u=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:s.width,height:s.height}}function T0(e){return Dn(e).position==="static"}function uR(e,t){if(!ot(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function mR(e,t){let n=$t(e);if(Dc(e))return n;if(!ot(e)){let o=Hr(e);for(;o&&!Vr(o);){if(Ue(o)&&!T0(o))return o;o=Hr(o)}return n}let r=uR(e,t);for(;r&&Ik(r)&&T0(r);)r=uR(r,t);return r&&Vr(r)&&T0(r)&&!Rp(r)?n:r||Ak(e)||n}var k4=function(e){return M(this,null,function*(){let t=this.getOffsetParent||mR,n=this.getDimensions,r=yield n(e.floating);return{reference:T4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function R4(e){return Dn(e).direction==="rtl"}var R0={convertOffsetParentRelativeRectToViewportRelativeRect:h4,getDocumentElement:Ur,getClippingRect:E4,getOffsetParent:mR,getElementRects:k4,getClientRects:y4,getDimensions:C4,getScale:Ba,isElement:Ue,isRTL:R4};function gR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function P4(e,t,n){let r=null,o,i=Ur(e);function s(){var u;clearTimeout(o),(u=r)==null||u.disconnect(),r=null}function a(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();let d=e.getBoundingClientRect(),{left:p,top:m,width:g,height:v}=d;if(u||t(),!g||!v)return;let h=Bc(m),y=Bc(i.clientWidth-(p+g)),S=Bc(i.clientHeight-(m+v)),x=Bc(p),C={rootMargin:-h+"px "+-y+"px "+-S+"px "+-x+"px",threshold:So(0,Na(1,f))||1},k=!0;function R(O){let L=O[0].intersectionRatio;if(!gR(d,e.getBoundingClientRect()))return a();if(L!==f){if(!k)return a();L?a(!1,L):o=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{r=new IntersectionObserver(R,A(E({},C),{root:i.ownerDocument}))}catch(O){r=new IntersectionObserver(R,C)}r.observe(e)}let l=$t(e),c=()=>a(n);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),s()}}function zp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=k0(e),u=o||i?[...c?Ln(c):[],...t?Ln(t):[]]:[];u.forEach(h=>{o&&h.addEventListener("scroll",n),i&&h.addEventListener("resize",n)});let f=c&&a?P4(c,n,i):null,d=-1,p=null;s&&(p=new ResizeObserver(h=>{let[y]=h;y&&y.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),c&&!l&&p.observe(c),t&&p.observe(t));let m,g=l?fs(e):null;l&&v();function v(){let h=fs(e);g&&!gR(g,h)&&n(),g=h,m=requestAnimationFrame(v)}return n(),()=>{var h;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f==null||f(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var hR=aR;var yR=lR,vR=sR;var Hp=(e,t,n)=>{let r=new Map,o=n!=null?n:{},i=A(E(E({},R0),o.platform),{_c:r});return iR(e,t,A(E({},o),{platform:i}))};var it=b(Z(),1),xR=b(Z(),1),wR=b(Oc(),1);var A4=typeof document!="undefined",_4=function(){},Bp=A4?xR.useLayoutEffect:_4;function Up(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Up(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Up(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bR(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function SR(e,t){let n=bR(e);return Math.round(t*n)/n}function P0(e){let t=it.useRef(e);return Bp(()=>{t.current=e}),t}function ER(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=it.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=it.useState(r);Up(d,r)||p(r);let[m,g]=it.useState(null),[v,h]=it.useState(null),y=it.useCallback(N=>{N!==C.current&&(C.current=N,g(N))},[]),S=it.useCallback(N=>{N!==k.current&&(k.current=N,h(N))},[]),x=i||m,T=s||v,C=it.useRef(null),k=it.useRef(null),R=it.useRef(u),O=l!=null,L=P0(l),U=P0(o),J=P0(c),Y=it.useCallback(()=>{if(!C.current||!k.current)return;let N={placement:t,strategy:n,middleware:d};U.current&&(N.platform=U.current),Hp(C.current,k.current,N).then(q=>{let j=A(E({},q),{isPositioned:J.current!==!1});_.current&&!Up(R.current,j)&&(R.current=j,wR.flushSync(()=>{f(j)}))})},[d,t,n,U,J]);Bp(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(N=>A(E({},N),{isPositioned:!1})))},[c]);let _=it.useRef(!1);Bp(()=>(_.current=!0,()=>{_.current=!1}),[]),Bp(()=>{if(x&&(C.current=x),T&&(k.current=T),x&&T){if(L.current)return L.current(x,T,Y);Y()}},[x,T,Y,L,O]);let V=it.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:S}),[y,S]),B=it.useMemo(()=>({reference:x,floating:T}),[x,T]),W=it.useMemo(()=>{let N={position:n,left:0,top:0};if(!B.floating)return N;let q=SR(B.floating,u.x),j=SR(B.floating,u.y);return a?E(A(E({},N),{transform:"translate("+q+"px, "+j+"px)"}),bR(B.floating)>=1.5&&{willChange:"transform"}):{position:n,left:q,top:j}},[n,a,B.floating,u.x,u.y]);return it.useMemo(()=>A(E({},u),{update:Y,refs:V,elements:B,floatingStyles:W}),[u,Y,V,B,W])}var Vp=(e,t)=>{let n=hR(e);return{name:n.name,fn:n.fn,options:[e,t]}},I0=(e,t)=>{let n=yR(e);return{name:n.name,fn:n.fn,options:[e,t]}};var A0=(e,t)=>{let n=vR(e);return{name:n.name,fn:n.fn,options:[e,t]}};function H0(e){let t=F.useRef(void 0),n=F.useCallback(r=>{let o=e.map(i=>{if(i!=null){if(typeof i=="function"){let s=i,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return i.current=r,()=>{i.current=null}}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return F.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var M4="data-floating-ui-focusable",_0="active",M0="selected",N4="ArrowLeft",O4="ArrowRight",L4="ArrowUp",D4="ArrowDown";var F4=[N4,O4],z4=[L4,D4],GV=[...F4,...z4];var H4=E({},F),CR=!1,B4=0,TR=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+B4++;function U4(){let[e,t]=F.useState(()=>CR?TR():void 0);return rn(()=>{e==null&&t(TR())},[]),F.useEffect(()=>{CR=!0},[]),e}var V4=H4.useId,B0=V4||U4;function W4(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var $4=F.createContext(null),j4=F.createContext(null),U0=()=>{var e;return((e=F.useContext($4))==null?void 0:e.id)||null},Kp=()=>F.useContext(j4);function Wa(e){return"data-floating-ui-"+e}function xn(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var kR=Wa("safe-polygon");function N0(e,t,n){if(n&&!Fa(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){let r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function O0(e){return typeof e=="function"?e():e}function HR(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,p=Kp(),m=U0(),g=fi(c),v=fi(l),h=fi(n),y=fi(f),S=F.useRef(),x=F.useRef(-1),T=F.useRef(),C=F.useRef(-1),k=F.useRef(!0),R=F.useRef(!1),O=F.useRef(()=>{}),L=F.useRef(!1),U=on(()=>{var W;let N=(W=o.current.openEvent)==null?void 0:W.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"});F.useEffect(()=>{if(!a)return;function W(N){let{open:q}=N;q||(xn(x),xn(C),k.current=!0,L.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[a,i]),F.useEffect(()=>{if(!a||!g.current||!n)return;function W(q){U()&&r(!1,q,"hover")}let N=jt(s.floating).documentElement;return N.addEventListener("mouseleave",W),()=>{N.removeEventListener("mouseleave",W)}},[s.floating,n,r,a,g,U]);let J=F.useCallback(function(W,N,q){N===void 0&&(N=!0),q===void 0&&(q="hover");let j=N0(v.current,"close",S.current);j&&!T.current?(xn(x),x.current=window.setTimeout(()=>r(!1,W,q),j)):N&&(xn(x),r(!1,W,q))},[v,r]),Y=on(()=>{O.current(),T.current=void 0}),_=on(()=>{if(R.current){let W=jt(s.floating).body;W.style.pointerEvents="",W.removeAttribute(kR),R.current=!1}}),V=on(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);F.useEffect(()=>{if(!a)return;function W(ue){if(xn(x),k.current=!1,u&&!Fa(S.current)||O0(y.current)>0&&!N0(v.current,"open"))return;let ne=N0(v.current,"open",S.current);ne?x.current=window.setTimeout(()=>{h.current||r(!0,ue,"hover")},ne):n||r(!0,ue,"hover")}function N(ue){if(V()){_();return}O.current();let ne=jt(s.floating);if(xn(C),L.current=!1,g.current&&o.current.floatingContext){n||xn(x),T.current=g.current(A(E({},o.current.floatingContext),{tree:p,x:ue.clientX,y:ue.clientY,onClose(){_(),Y(),V()||J(ue,!0,"safe-polygon")}}));let Se=T.current;ne.addEventListener("mousemove",Se),O.current=()=>{ne.removeEventListener("mousemove",Se)};return}(S.current!=="touch"||!nn(s.floating,ue.relatedTarget))&&J(ue)}function q(ue){V()||o.current.floatingContext&&(g.current==null||g.current(A(E({},o.current.floatingContext),{tree:p,x:ue.clientX,y:ue.clientY,onClose(){_(),Y(),V()||J(ue)}}))(ue))}function j(){xn(x)}function K(ue){V()||J(ue,!1)}if(Ue(s.domReference)){let ue=s.domReference,ne=s.floating;return n&&ue.addEventListener("mouseleave",q),d&&ue.addEventListener("mousemove",W,{once:!0}),ue.addEventListener("mouseenter",W),ue.addEventListener("mouseleave",N),ne&&(ne.addEventListener("mouseleave",q),ne.addEventListener("mouseenter",j),ne.addEventListener("mouseleave",K)),()=>{n&&ue.removeEventListener("mouseleave",q),d&&ue.removeEventListener("mousemove",W),ue.removeEventListener("mouseenter",W),ue.removeEventListener("mouseleave",N),ne&&(ne.removeEventListener("mouseleave",q),ne.removeEventListener("mouseenter",j),ne.removeEventListener("mouseleave",K))}}},[s,a,e,u,d,J,Y,_,r,n,h,p,v,g,o,V,y]),rn(()=>{var W;if(a&&n&&(W=g.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&U()){R.current=!0;let q=s.floating;if(Ue(s.domReference)&&q){var N;let j=jt(s.floating).body;j.setAttribute(kR,"");let K=s.domReference,ue=p==null||(N=p.nodesRef.current.find(ne=>ne.id===m))==null||(N=N.context)==null?void 0:N.elements.floating;return ue&&(ue.style.pointerEvents=""),j.style.pointerEvents="none",K.style.pointerEvents="auto",q.style.pointerEvents="auto",()=>{j.style.pointerEvents="",K.style.pointerEvents="",q.style.pointerEvents=""}}}},[a,n,m,s,p,g,U]),rn(()=>{n||(S.current=void 0,L.current=!1,Y(),_())},[n,Y,_]),F.useEffect(()=>()=>{Y(),xn(x),xn(C),_()},[a,s.domReference,Y,_]);let B=F.useMemo(()=>{function W(N){S.current=N.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(N){let{nativeEvent:q}=N;function j(){!k.current&&!h.current&&r(!0,q,"hover")}u&&!Fa(S.current)||n||O0(y.current)===0||L.current&&gg(N.movementX,2)+gg(N.movementY,2)<2||(xn(C),S.current==="touch"?j():(L.current=!0,C.current=window.setTimeout(j,O0(y.current))))}}},[u,r,n,h,y]);return F.useMemo(()=>a?{reference:B}:{},[a,B])}var RR=0;function Ua(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(RR);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():RR=requestAnimationFrame(i)}function L0(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&as(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function K4(e){return"composedPath"in e?e.composedPath()[0]:e.target}function G4(e){return(e==null?void 0:e.ownerDocument)||document}var Va={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function PR(e){return e==="inert"?Va.inert:e==="aria-hidden"?Va["aria-hidden"]:Va.none}var Wp=new WeakSet,$p={},D0=0,q4=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype;function BR(e){return e?as(e)?e.host:BR(e.parentNode):null}var Y4=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=BR(n);return e.contains(r)?r:null}).filter(n=>n!=null);function X4(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=Y4(t,e),a=new Set,l=new Set(s),c=[];$p[o]||($p[o]=new WeakMap);let u=$p[o];s.forEach(f),d(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||[].forEach.call(p.children,m=>{if(Br(m)!=="script")if(a.has(m))d(m);else{let g=i?m.getAttribute(i):null,v=g!==null&&g!=="false",h=PR(i),y=(h.get(m)||0)+1,S=(u.get(m)||0)+1;h.set(m,y),u.set(m,S),c.push(m),y===1&&v&&Wp.add(m),S===1&&m.setAttribute(o,""),!v&&i&&m.setAttribute(i,i==="inert"?"":"true")}})}return D0++,()=>{c.forEach(p=>{let m=PR(i),v=(m.get(p)||0)-1,h=(u.get(p)||0)-1;m.set(p,v),u.set(p,h),v||(!Wp.has(p)&&i&&p.removeAttribute(i),Wp.delete(p)),h||p.removeAttribute(o)}),D0--,D0||(Va.inert=new WeakMap,Va["aria-hidden"]=new WeakMap,Va.none=new WeakMap,Wp=new WeakSet,$p={})}}function IR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=G4(e[0]).body;return X4(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}var V0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},jp=F.forwardRef(function(t,n){let[r,o]=F.useState();rn(()=>{Xk()&&o("button")},[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wa("focus-guard")]:"",style:V0};return(0,wn.jsx)("span",E(E({},t),i))}),Q4={clipPath:"inset(50%)",position:"fixed",top:0,left:0},UR=F.createContext(null),AR=Wa("portal");function Z4(e){e===void 0&&(e={});let{id:t,root:n}=e,r=B0(),o=WR(),[i,s]=F.useState(null),a=F.useRef(null);return rn(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),rn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(AR,""),l.appendChild(c),a.current=c,s(c)},[t,r]),rn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!kp(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(AR,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function VR(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=Z4({id:n,root:r}),[s,a]=F.useState(null),l=F.useRef(null),c=F.useRef(null),u=F.useRef(null),f=F.useRef(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,m=!!s&&!s.modal&&s.open&&o&&!!(r||i);return F.useEffect(()=>{if(!i||!o||d)return;function g(v){i&&Ha(v)&&(v.type==="focusin"?C0:nR)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,d]),F.useEffect(()=>{i&&(p||C0(i))},[p,i]),(0,wn.jsxs)(UR.Provider,{value:F.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i]),children:[m&&i&&(0,wn.jsx)(jp,{"data-type":"outside",ref:l,onFocus:g=>{if(Ha(g,i)){var v;(v=u.current)==null||v.focus()}else{let h=s?s.domReference:null,y=E0(h);y==null||y.focus()}}}),m&&i&&(0,wn.jsx)("span",{"aria-owns":i.id,style:Q4}),i&&z0.createPortal(t,i),m&&i&&(0,wn.jsx)(jp,{"data-type":"outside",ref:c,onFocus:g=>{if(Ha(g,i)){var v;(v=f.current)==null||v.focus()}else{let h=s?s.domReference:null,y=b0(h);y==null||y.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var WR=()=>F.useContext(UR);function _R(e){return F.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var MR=20,pi=[];function W0(){pi=pi.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function J4(e){W0(),e&&Br(e)!=="body"&&(pi.push(new WeakRef(e)),pi.length>MR&&(pi=pi.slice(-MR)))}function NR(){W0();let e=pi[pi.length-1];return e==null?void 0:e.deref()}function eF(e){let t=za();return h0(e,t)?e:La(e,t)[0]||e}function OR(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;let r=za(),i=Kk(e,r).filter(a=>{let l=a.getAttribute("data-tabindex")||"";return h0(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}var tF=F.forwardRef(function(t,n){return(0,wn.jsx)("button",A(E({},t),{type:"button",ref:n,tabIndex:-1,style:V0}))});function $R(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:g,events:v,dataRef:h,elements:{domReference:y,floating:S}}=t,x=on(()=>{var oe;return(oe=h.current.floatingContext)==null?void 0:oe.nodeId}),T=on(p),C=typeof s=="number"&&s<0,k=x0(y)&&C,R=q4(),O=R?i:!0,L=!O||R&&d,U=fi(o),J=fi(s),Y=fi(a),_=Kp(),V=WR(),B=F.useRef(null),W=F.useRef(null),N=F.useRef(!1),q=F.useRef(!1),j=F.useRef(-1),K=F.useRef(-1),ue=V!=null,ne=Lp(S),Qe=on(function(oe){return oe===void 0&&(oe=ne),oe?La(oe,za()):[]}),Se=on(oe=>{let re=Qe(oe);return U.current.map(me=>y&&me==="reference"?y:ne&&me==="floating"?ne:re).filter(Boolean).flat()});F.useEffect(()=>{if(r||!c)return;function oe(me){if(me.key==="Tab"){nn(ne,us(jt(ne)))&&Qe().length===0&&!k&&Dp(me);let fe=Se(),$e=wo(me);U.current[0]==="reference"&&$e===y&&(Dp(me),me.shiftKey?Ua(fe[fe.length-1]):Ua(fe[1])),U.current[1]==="floating"&&$e===ne&&me.shiftKey&&(Dp(me),Ua(fe[0]))}}let re=jt(ne);return re.addEventListener("keydown",oe),()=>{re.removeEventListener("keydown",oe)}},[r,y,ne,c,U,k,Qe,Se]),F.useEffect(()=>{if(r||!S)return;function oe(re){let me=wo(re),$e=Qe().indexOf(me);$e!==-1&&(j.current=$e)}return S.addEventListener("focusin",oe),()=>{S.removeEventListener("focusin",oe)}},[r,S,Qe]),F.useEffect(()=>{if(r||!f)return;function oe(){q.current=!0,setTimeout(()=>{q.current=!1})}function re($e){let Te=$e.relatedTarget,mt=$e.currentTarget,Gt=wo($e);queueMicrotask(()=>{let Et=x(),xr=!(nn(y,Te)||nn(S,Te)||nn(Te,S)||nn(V==null?void 0:V.portalNode,Te)||Te!=null&&Te.hasAttribute(Wa("focus-guard"))||_&&(ds(_.nodesRef.current,Et).find(Jn=>{var gt,Ct;return nn((gt=Jn.context)==null?void 0:gt.elements.floating,Te)||nn((Ct=Jn.context)==null?void 0:Ct.elements.domReference,Te)})||w0(_.nodesRef.current,Et).find(Jn=>{var gt,Ct,wr;return[(gt=Jn.context)==null?void 0:gt.elements.floating,Lp((Ct=Jn.context)==null?void 0:Ct.elements.floating)].includes(Te)||((wr=Jn.context)==null?void 0:wr.elements.domReference)===Te})));if(mt===y&&ne&&OR(ne,U),l&&mt!==y&&!(Gt!=null&&Gt.isConnected)&&us(jt(ne))===jt(ne).body){ot(ne)&&ne.focus();let Jn=j.current,gt=Qe(),Ct=gt[Jn]||gt[gt.length-1]||ne;ot(Ct)&&Ct.focus()}if(h.current.insideReactTree){h.current.insideReactTree=!1;return}(k||!c)&&Te&&xr&&!q.current&&Te!==NR()&&(N.current=!0,g(!1,$e,"focus-out"))})}let me=!!(!_&&V);function fe(){xn(K),h.current.insideReactTree=!0,K.current=window.setTimeout(()=>{h.current.insideReactTree=!1})}if(S&&ot(y))return y.addEventListener("focusout",re),y.addEventListener("pointerdown",oe),S.addEventListener("focusout",re),me&&S.addEventListener("focusout",fe,!0),()=>{y.removeEventListener("focusout",re),y.removeEventListener("pointerdown",oe),S.removeEventListener("focusout",re),me&&S.removeEventListener("focusout",fe,!0)}},[r,y,S,ne,c,_,V,g,f,l,Qe,k,x,U,h]);let tt=F.useRef(null),pt=F.useRef(null),Le=_R([tt,V==null?void 0:V.beforeInsideRef]),Ne=_R([pt,V==null?void 0:V.afterInsideRef]);F.useEffect(()=>{var oe,re;if(r||!S)return;let me=Array.from((V==null||(oe=V.portalNode)==null?void 0:oe.querySelectorAll("["+Wa("portal")+"]"))||[]),$e=(re=(_?w0(_.nodesRef.current,x()):[]).find(Gt=>{var Et;return x0(((Et=Gt.context)==null?void 0:Et.elements.domReference)||null)}))==null||(re=re.context)==null?void 0:re.elements.domReference,Te=[S,$e,...me,...T(),B.current,W.current,tt.current,pt.current,V==null?void 0:V.beforeOutsideRef.current,V==null?void 0:V.afterOutsideRef.current,U.current.includes("reference")||k?y:null].filter(Gt=>Gt!=null),mt=c||k?IR(Te,!L,L):IR(Te);return()=>{mt()}},[r,y,S,c,U,V,k,O,L,_,x,T]),rn(()=>{if(r||!ot(ne))return;let oe=jt(ne),re=us(oe);queueMicrotask(()=>{let me=Se(ne),fe=J.current,$e=(typeof fe=="number"?me[fe]:fe.current)||ne,Te=nn(ne,re);!C&&!Te&&m&&Ua($e,{preventScroll:$e===ne})})},[r,m,ne,C,Se,J]),rn(()=>{if(r||!ne)return;let oe=jt(ne),re=us(oe);J4(re);function me(Te){let{reason:mt,event:Gt,nested:Et}=Te;if(["hover","safe-polygon"].includes(mt)&&Gt.type==="mouseleave"&&(N.current=!0),mt==="outside-press")if(Et)N.current=!1;else if(Jk(Gt)||eR(Gt))N.current=!1;else{let xr=!1;document.createElement("div").focus({get preventScroll(){return xr=!0,!1}}),xr?N.current=!1:N.current=!0}}v.on("openchange",me);let fe=oe.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,V0),ue&&y&&y.insertAdjacentElement("afterend",fe);function $e(){if(typeof Y.current=="boolean"){let Te=y||NR();return Te&&Te.isConnected?Te:fe}return Y.current.current||fe}return()=>{v.off("openchange",me);let Te=us(oe),mt=nn(S,Te)||_&&ds(_.nodesRef.current,x(),!1).some(Et=>{var xr;return nn((xr=Et.context)==null?void 0:xr.elements.floating,Te)}),Gt=$e();queueMicrotask(()=>{let Et=eF(Gt);Y.current&&!N.current&&ot(Et)&&(!(Et!==Te&&Te!==oe.body)||mt)&&Et.focus({preventScroll:!0}),fe.remove()})}},[r,S,ne,Y,h,v,_,ue,y,x]),F.useEffect(()=>(queueMicrotask(()=>{N.current=!1}),()=>{queueMicrotask(W0)}),[r]),rn(()=>{if(!r&&V)return V.setFocusManagerState({modal:c,closeOnFocusOut:f,open:m,onOpenChange:g,domReference:y}),()=>{V.setFocusManagerState(null)}},[r,V,c,m,g,f,y]),rn(()=>{r||ne&&OR(ne,U)},[r,ne,U]);function at(oe){return r||!u||!c?null:(0,wn.jsx)(tF,{ref:oe==="start"?B:W,onClick:re=>g(!1,re.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let ye=!r&&O&&(c?!k:!0)&&(ue||c);return(0,wn.jsxs)(wn.Fragment,{children:[ye&&(0,wn.jsx)(jp,{"data-type":"inside",ref:Le,onFocus:oe=>{if(c){let me=Se();Ua(o[0]==="reference"?me[0]:me[me.length-1])}else if(V!=null&&V.preserveTabOrder&&V.portalNode)if(N.current=!1,Ha(oe,V.portalNode)){let me=b0(y);me==null||me.focus()}else{var re;(re=V.beforeOutsideRef.current)==null||re.focus()}}}),!k&&at("start"),n,at("end"),ye&&(0,wn.jsx)(jp,{"data-type":"inside",ref:Ne,onFocus:oe=>{if(c)Ua(Se()[0]);else if(V!=null&&V.preserveTabOrder&&V.portalNode)if(f&&(N.current=!0),Ha(oe,V.portalNode)){let me=E0(y);me==null||me.focus()}else{var re;(re=V.afterOutsideRef.current)==null||re.focus()}}})]})}function LR(e){return ot(e.target)&&e.target.tagName==="BUTTON"}function nF(e){return ot(e.target)&&e.target.tagName==="A"}function DR(e){return S0(e)}function jR(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=F.useRef(),p=F.useRef(!1),m=F.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){let v=d.current;g.button===0&&a!=="click"&&(Fa(v,!0)&&c||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let v=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Fa(v,!0)&&c||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||LR(g))&&(g.key===" "&&!DR(i)&&(g.preventDefault(),p.current=!0),!nF(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||LR(g)||DR(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,f,l]);return F.useMemo(()=>s?{reference:m}:{},[s,m])}var rF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},oF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},FR=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function KR(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:m}=t,g=Kp(),v=on(typeof l=="function"?l:()=>!1),h=typeof l=="function"?v:l,y=F.useRef(!1),{escapeKey:S,outsidePress:x}=FR(p),{escapeKey:T,outsidePress:C}=FR(m),k=F.useRef(!1),R=on(_=>{var V;if(!n||!s||!a||_.key!=="Escape"||k.current)return;let B=(V=i.current.floatingContext)==null?void 0:V.nodeId,W=g?ds(g.nodesRef.current,B):[];if(!S&&(_.stopPropagation(),W.length>0)){let N=!0;if(W.forEach(q=>{var j;if((j=q.context)!=null&&j.open&&!q.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,Zk(_)?_.nativeEvent:_,"escape-key")}),O=on(_=>{var V;let B=()=>{var W;R(_),(W=wo(_))==null||W.removeEventListener("keydown",B)};(V=wo(_))==null||V.addEventListener("keydown",B)}),L=on(_=>{var V;let B=i.current.insideReactTree;i.current.insideReactTree=!1;let W=y.current;if(y.current=!1,c==="click"&&W||B||typeof h=="function"&&!h(_))return;let N=wo(_),q="["+Wa("inert")+"]",j=jt(o.floating).querySelectorAll(q),K=Ue(N)?N:null;for(;K&&!Vr(K);){let Se=Hr(K);if(Vr(Se)||!Ue(Se))break;K=Se}if(j.length&&Ue(N)&&!Qk(N)&&!nn(N,o.floating)&&Array.from(j).every(Se=>!nn(K,Se)))return;if(ot(N)&&Y){let Se=Vr(N),tt=Dn(N),pt=/auto|scroll/,Le=Se||pt.test(tt.overflowX),Ne=Se||pt.test(tt.overflowY),at=Le&&N.clientWidth>0&&N.scrollWidth>N.clientWidth,ye=Ne&&N.clientHeight>0&&N.scrollHeight>N.clientHeight,oe=tt.direction==="rtl",re=ye&&(oe?_.offsetX<=N.offsetWidth-N.clientWidth:_.offsetX>N.clientWidth),me=at&&_.offsetY>N.clientHeight;if(re||me)return}let ue=(V=i.current.floatingContext)==null?void 0:V.nodeId,ne=g&&ds(g.nodesRef.current,ue).some(Se=>{var tt;return Op(_,(tt=Se.context)==null?void 0:tt.elements.floating)});if(Op(_,o.floating)||Op(_,o.domReference)||ne)return;let Qe=g?ds(g.nodesRef.current,ue):[];if(Qe.length>0){let Se=!0;if(Qe.forEach(tt=>{var pt;if((pt=tt.context)!=null&&pt.open&&!tt.context.dataRef.current.__outsidePressBubbles){Se=!1;return}}),!Se)return}r(!1,_,"outside-press")}),U=on(_=>{var V;let B=()=>{var W;L(_),(W=wo(_))==null||W.removeEventListener(c,B)};(V=wo(_))==null||V.addEventListener(c,B)});F.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=x;let _=-1;function V(j){r(!1,j,"ancestor-scroll")}function B(){window.clearTimeout(_),k.current=!0}function W(){_=window.setTimeout(()=>{k.current=!1},Ma()?5:0)}let N=jt(o.floating);a&&(N.addEventListener("keydown",T?O:R,T),N.addEventListener("compositionstart",B),N.addEventListener("compositionend",W)),h&&N.addEventListener(c,C?U:L,C);let q=[];return d&&(Ue(o.domReference)&&(q=Ln(o.domReference)),Ue(o.floating)&&(q=q.concat(Ln(o.floating))),!Ue(o.reference)&&o.reference&&o.reference.contextElement&&(q=q.concat(Ln(o.reference.contextElement)))),q=q.filter(j=>{var K;return j!==((K=N.defaultView)==null?void 0:K.visualViewport)}),q.forEach(j=>{j.addEventListener("scroll",V)}),()=>{a&&(N.removeEventListener("keydown",T?O:R,T),N.removeEventListener("compositionstart",B),N.removeEventListener("compositionend",W)),h&&N.removeEventListener(c,C?U:L,C),q.forEach(j=>{j.removeEventListener("scroll",V)}),window.clearTimeout(_)}},[i,o,a,h,c,n,r,d,s,S,x,R,T,O,L,C,U]),F.useEffect(()=>{i.current.insideReactTree=!1},[i,h,c]);let J=F.useMemo(()=>E({onKeyDown:R},u&&E({[rF[f]]:_=>{r(!1,_.nativeEvent,"reference-press")}},f!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}})),[R,r,u,f]),Y=F.useMemo(()=>{function _(V){V.button===0&&(y.current=!0)}return{onKeyDown:R,onMouseDown:_,onMouseUp:_,[oF[c]]:()=>{i.current.insideReactTree=!0}}},[R,c,i]);return F.useMemo(()=>s?{reference:J,floating:Y}:{},[s,J,Y])}function iF(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=B0(),i=F.useRef({}),[s]=F.useState(()=>W4()),a=U0()!=null,[l,c]=F.useState(r.reference),u=on((p,m,g)=>{i.current.openEvent=p?m:void 0,s.emit("openchange",{open:p,event:m,reason:g,nested:a}),n==null||n(p,m,g)}),f=F.useMemo(()=>({setPositionReference:c}),[]),d=F.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[t,u,d,s,o,f])}function GR(e){var t,n;let k=e===void 0?{}:e,{elements:r}=k,o=ie(k,["elements"]),{nodeId:i}=o,s=iF(A(E({},o),{elements:{reference:(t=r==null?void 0:r.reference)!=null?t:null,floating:(n=r==null?void 0:r.floating)!=null?n:null}})),a=o.rootContext||s,l=a.elements,[c,u]=F.useState(null),[f,d]=F.useState(null),m=(l==null?void 0:l.domReference)||c,g=F.useRef(null),v=Kp();rn(()=>{m&&(g.current=m)},[m]);let h=ER(A(E({},o),{elements:E(E({},l),f&&{reference:f})})),y=F.useCallback(R=>{let O=Ue(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;d(O),h.refs.setReference(O)},[h.refs]),S=F.useCallback(R=>{(Ue(R)||R===null)&&(g.current=R,u(R)),(Ue(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!Ue(R))&&h.refs.setReference(R)},[h.refs]),x=F.useMemo(()=>A(E({},h.refs),{setReference:S,setPositionReference:y,domReference:g}),[h.refs,S,y]),T=F.useMemo(()=>A(E({},h.elements),{domReference:m}),[h.elements,m]),C=F.useMemo(()=>A(E(E({},h),a),{refs:x,elements:T,nodeId:i}),[h,x,T,i,a]);return rn(()=>{a.dataRef.current.floatingContext=C;let R=v==null?void 0:v.nodesRef.current.find(O=>O.id===i);R&&(R.context=C)}),F.useMemo(()=>A(E({},h),{context:C,refs:x,elements:T}),[h,x,T,C])}function F0(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[_0]:a,[M0]:l}=s;i=ie(s,[hg(_0),hg(M0)])}return E(E(E({},n==="floating"&&{tabIndex:-1,[M4]:""}),i),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,f]=c;if(!(o&&[_0,M0].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var d;(d=r.get(u))==null||d.push(f),a[u]=function(){for(var p,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return(p=r.get(u))==null?void 0:p.map(h=>h(...g)).find(h=>h!==void 0)}}}else a[u]=f}),a),{}))}function qR(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=F.useCallback(a=>F0(a,e,"reference"),t),i=F.useCallback(a=>F0(a,e,"floating"),n),s=F.useCallback(a=>F0(a,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var sF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function YR(e,t){var n,r;t===void 0&&(t={});let{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=B0(),u=((n=i.domReference)==null?void 0:n.id)||c,f=F.useMemo(()=>{var y;return((y=Lp(i.floating))==null?void 0:y.id)||s},[i.floating,s]),d=(r=sF.get(l))!=null?r:l,m=U0()!=null,g=F.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?f:void 0}:E(E(E(E(E({"aria-expanded":o?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":o?f:void 0},d==="listbox"&&{role:"combobox"}),d==="menu"&&{id:u}),d==="menu"&&m&&{role:"menuitem"}),l==="select"&&{"aria-autocomplete":"none"}),l==="combobox"&&{"aria-autocomplete":"list"}),[d,f,m,o,u,l]),v=F.useMemo(()=>{let y=E({id:f},d&&{role:d});return d==="tooltip"||l==="label"?y:E(E({},y),d==="menu"&&{"aria-labelledby":u})},[d,f,u,l]),h=F.useCallback(y=>{let{active:S,selected:x}=y,T=E({role:"option"},S&&{id:f+"-fui-option"});switch(l){case"select":case"combobox":return A(E({},T),{"aria-selected":x})}return{}},[f,l]);return F.useMemo(()=>a?{reference:g,floating:v,item:h}:{},[a,g,v,h])}function XR(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...XR(e,o.id,n)])}function zR(e,t){let[n,r]=e,o=!1,i=t.length;for(let s=0,a=i-1;s<i;a=s++){let[l,c]=t[s]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function aF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function QR(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1},i=!1,s=null,a=null,l=typeof performance!="undefined"?performance.now():0;function c(f,d){let p=performance.now(),m=p-l;if(s===null||a===null||m===0)return s=f,a=d,l=p,null;let g=f-s,v=d-a,y=Math.sqrt(g*g+v*v)/m;return s=f,a=d,l=p,y}let u=f=>{let{x:d,y:p,placement:m,elements:g,onClose:v,nodeId:h,tree:y}=f;return function(x){function T(){xn(o),v()}if(xn(o),!g.domReference||!g.floating||m==null||d==null||p==null)return;let{clientX:C,clientY:k}=x,R=[C,k],O=K4(x),L=x.type==="mouseleave",U=L0(g.floating,O),J=L0(g.domReference,O),Y=g.domReference.getBoundingClientRect(),_=g.floating.getBoundingClientRect(),V=m.split("-")[0],B=d>_.right-_.width/2,W=p>_.bottom-_.height/2,N=aF(R,Y),q=_.width>Y.width,j=_.height>Y.height,K=(q?Y:_).left,ue=(q?Y:_).right,ne=(j?Y:_).top,Qe=(j?Y:_).bottom;if(U&&(i=!0,!L))return;if(J&&(i=!1),J&&!L){i=!0;return}if(L&&Ue(x.relatedTarget)&&L0(g.floating,x.relatedTarget)||y&&XR(y.nodesRef.current,h).length)return;if(V==="top"&&p>=Y.bottom-1||V==="bottom"&&p<=Y.top+1||V==="left"&&d>=Y.right-1||V==="right"&&d<=Y.left+1)return T();let Se=[];switch(V){case"top":Se=[[K,Y.top+1],[K,_.bottom-1],[ue,_.bottom-1],[ue,Y.top+1]];break;case"bottom":Se=[[K,_.top+1],[K,Y.bottom-1],[ue,Y.bottom-1],[ue,_.top+1]];break;case"left":Se=[[_.right-1,Qe],[_.right-1,ne],[Y.left+1,ne],[Y.left+1,Qe]];break;case"right":Se=[[Y.right-1,Qe],[Y.right-1,ne],[_.left+1,ne],[_.left+1,Qe]];break}function tt(pt){let[Le,Ne]=pt;switch(V){case"top":{let at=[q?Le+t/2:B?Le+t*4:Le-t*4,Ne+t+1],ye=[q?Le-t/2:B?Le+t*4:Le-t*4,Ne+t+1],oe=[[_.left,B||q?_.bottom-t:_.top],[_.right,B?q?_.bottom-t:_.top:_.bottom-t]];return[at,ye,...oe]}case"bottom":{let at=[q?Le+t/2:B?Le+t*4:Le-t*4,Ne-t],ye=[q?Le-t/2:B?Le+t*4:Le-t*4,Ne-t],oe=[[_.left,B||q?_.top+t:_.bottom],[_.right,B?q?_.top+t:_.bottom:_.top+t]];return[at,ye,...oe]}case"left":{let at=[Le+t+1,j?Ne+t/2:W?Ne+t*4:Ne-t*4],ye=[Le+t+1,j?Ne-t/2:W?Ne+t*4:Ne-t*4];return[...[[W||j?_.right-t:_.left,_.top],[W?j?_.right-t:_.left:_.right-t,_.bottom]],at,ye]}case"right":{let at=[Le-t,j?Ne+t/2:W?Ne+t*4:Ne-t*4],ye=[Le-t,j?Ne-t/2:W?Ne+t*4:Ne-t*4],oe=[[W||j?_.left+t:_.right,_.top],[W?j?_.left+t:_.right:_.left+t,_.bottom]];return[at,ye,...oe]}}}if(!zR([C,k],Se)){if(i&&!N)return T();if(!L&&r){let pt=c(x.clientX,x.clientY);if(pt!==null&&pt<.1)return T()}zR([C,k],tt([d,p]))?!i&&r&&(o.current=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}var Gp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Xn=b(I());function lF({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=$r.useState(e),l=o!=null?o:s,c=i!=null?i:a,u=GR({placement:t,open:l,onOpenChange:c,whileElementsMounted:zp,middleware:[Vp(5),A0({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),I0({padding:10})]}),f=u.context,d=jR(f,{enabled:o==null}),p=KR(f),m=YR(f),g=HR(f,{enabled:r!=null?r:!1,handleClose:QR()}),v=qR([d,p,m,g]);return $r.useMemo(()=>A(E(E({open:l,setOpen:c},v),u),{modal:n}),[l,c,v,u,n])}var ZR=$r.createContext(null),$0=()=>{let e=$r.useContext(ZR);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},ps=r=>{var o=r,{children:e,modal:t=!1}=o,n=ie(o,["children","modal"]);let i=lF(E({modal:t},n));return(0,Xn.jsx)(ZR.Provider,{value:i,children:e})};function cF(r){var o=r,{as:e,children:t}=o,n=ie(o,["as","children"]);let i=$0(),s=e||"button",a=t.ref,l=H0([i.refs.setReference,a]);return(0,Xn.jsx)(s,A(E({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var uF=$r.forwardRef(function(o,r){var i=o,{style:t}=i,n=ie(i,["style"]);let c=$0(),{context:s}=c,a=ie(c,["context"]),l=H0([a.refs.setFloating,r]);return s.open?(0,Xn.jsx)(VR,{children:(0,Xn.jsx)($R,{context:s,modal:a.modal,disabled:n.disableFocusManager,children:(0,Xn.jsx)("div",A(E({ref:l,style:E(A(E({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function dF(o){var i=o,{as:e,children:t,onClick:n}=i,r=ie(i,["as","children","onClick"]);let{setOpen:s}=$0();return(0,Xn.jsx)(e||"button",A(E({type:"button",onClick:c=>{n(c),s(!1),c.stopPropagation()}},r),{children:t}))}function JR({trigger:e,children:t,placement:n="top"}){return(0,Xn.jsxs)(ps,{tooltip:!0,placement:n,children:[(0,Xn.jsxs)(ps.Content,{className:Gp.tooltip,children:[t,(0,Xn.jsx)("div",{className:Gp.arrow})]}),(0,Xn.jsx)(ps.Trigger,{className:Gp.tooltipTrigger,children:e})]})}ps.Trigger=cF;ps.Content=uF;ps.Button=dF;var wt=ps;var tP=b(Z());var eP={error:"dd-CoAuB"};var j0={};ht(j0,{enUS:()=>fF,nlNL:()=>pF});var fF={errorPrefix:[{type:0,value:"Error:"}]},pF={errorPrefix:[{type:0,value:"Foutmelding:"}]};var Wc=b(I()),nP=({message:e})=>{let t=(0,tP.useRef)(null),n=z("WidgetCardError",eP),r=se(j0);return Vu(t),(0,Wc.jsx)(pe,{ref:t,children:(0,Wc.jsx)(be,{children:(0,Wc.jsxs)(be.Content,{className:n.error,children:[r("errorPrefix")," ",e]})})})};var ve=b(I()),mF=3,gF=({sources:e,onClick:t})=>{let n=se(_a),r=z("WidgetKnowledgeAssistant",Cp),[o,i]=(0,et.useState)(!1),s=o?e:e.slice(0,mF);return s.length===0?null:(0,ve.jsxs)("ul",{className:r.sources,children:[s.map(a=>(0,ve.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,ve.jsxs)(wt,{tooltip:!0,placement:"top-start",children:[(0,ve.jsx)(wt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,ve.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,ve.jsx)(wt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),s<e&&(0,ve.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>i(!0),children:n("showMore",{amount:e.length-s.length})})]})},hF=({title:e,description:t})=>(0,ve.jsx)(pe,{"data-testid":"knowledge-assist-empty-state",children:(0,ve.jsx)(be,{children:(0,ve.jsxs)(be.Content,{children:[(0,ve.jsx)(be.Title,{children:e}),(0,ve.jsx)(is,{content:t})]})})}),yF=({innerRef:e,item:t,hasKeyboardInput:n,onCopy:r,onUse:o,onSourceClick:i})=>{var l;let s=se(_a),a=(0,et.useContext)(qp);return(0,ve.jsxs)(pe,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,ve.jsx)(be,{children:(0,ve.jsxs)(be.Content,{children:[(0,ve.jsx)(be.Title,{children:t.question}),(0,ve.jsx)(is,{content:t.answer.answer,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:r,onUse:n?o:void 0}),(0,ve.jsx)(gF,{sources:(l=t.answer.sources)!=null?l:[],onClick:i})]})}),a.assistantCode&&(0,ve.jsxs)(pe.ButtonsContainer,{children:[(0,ve.jsx)("div",{}),(0,ve.jsx)(Qd,{evaluationId:t.evaluationId,feedbackType:"assistant",assistantCode:a.assistantCode,assistantOutput:t.answer.answer,feedbackText:t.answer.answer})]})]})},qp=(0,et.createContext)(null),Yp=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,et.useState)(null),[s,a]=(0,et.useState)(!1),[l,c]=(0,et.useState)(null),[u,f]=(0,et.useState)(!!n),[d,p]=(0,et.useState)(null),m=we(),g=Ze(),v=Ad(S=>{if(!e)throw new Error("No knowledge assistant was defined");return c(null),t({assistantCode:e,input:S,threadId:o,onNewThreadId(x){i(x)}})},{onSuccess(S){var x;g("Assistant response displayed",{evaluationId:S.evaluationId,assistantCode:e,assistantOutput:S.answer.answer,input:S.question,sources:(x=S.answer.sources)!=null?x:[]}),f(!1)},onError(S){var x;c((x=S.message)!=null?x:"Unknown error")}}),h=S=>M(null,null,function*(){a(!0),p(S),yield v.call(S),a(!1),p(null)}),y={isEnabled:!!e,assistantCode:e,isSubmitting:s,threadId:o,pendingInput:d,errorMessage:l,onSubmit:h,onReset(){o&&m(RE(o)),c(null),i(null),e&&g("Assistant thread reset",{threadId:o!=null?o:void 0,assistantCode:e})}};return(0,et.useEffect)(()=>{n&&y.isEnabled&&h(n)},[n]),(0,ve.jsx)(qp.Provider,{value:y,children:r})},Xp=()=>{let e=se(_a),t=z("WidgetKnowledgeAssistant",Cp),n=(0,et.useContext)(qp),r=(0,et.useRef)(null),[o,i]=(0,et.useState)(""),s=l=>{i(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),i(""))})};return n.isEnabled?(0,ve.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,ve.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:s}),(0,ve.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},Qp=({title:e,emptyState:t})=>{var m,g;let n=se(_a),r=Ze(),o=z("WidgetKnowledgeAssistant",Cp),i=(0,et.useRef)(null),s=(0,et.useContext)(qp),a=(g=G(CE((m=s.threadId)!=null?m:-1)))!=null?g:[],l=X("hasKeyboardInput"),c=pn(),u=(v,h)=>{Ar(v),s.assistantCode&&r("Assistant response copied",{assistantCode:s.assistantCode,assistantOutput:v,copiedText:v,evaluationId:h.evaluationId})},f=(v,h)=>{s.assistantCode&&r("Assistant source clicked",{evaluationId:h.evaluationId,assistantCode:s.assistantCode,source:v})},d=v=>{v.preventDefault(),s.onReset()},p=(v,h)=>{c.send(eo,{text:v,suggestion:{source:"assistant",sourceText:v}}),s.assistantCode&&r("Assistant response used",{assistantCode:s.assistantCode,evaluationId:h.evaluationId,assistantOutput:h.answer.answer,usedText:v})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t&&!s.errorMessage?null:(0,ve.jsxs)(et.Fragment,{children:[(0,ve.jsx)(Tr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,ve.jsxs)(Tt,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,ve.jsx)(hF,E({},t)),a.map((v,h)=>(0,ve.jsx)(yF,{innerRef:h===a.length-1?i:void 0,item:v,hasKeyboardInput:l,onCopy:y=>u(y,v),onUse:y=>p(y,v),onSourceClick:y=>f(y,v)},`${v.question}_${v.answer}_${h}`)),s.pendingInput&&(0,ve.jsx)(Ep,{title:s.pendingInput}),s.errorMessage&&(0,ve.jsx)(nP,{message:s.errorMessage})]})}),a.length>0&&(0,ve.jsx)("div",{className:o.resetContainer,children:(0,ve.jsx)(pe.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:d,children:n("resetLabel")})})]})};var No=b(iP());var aI=b(Z());var Jp=b(De()),gr=b(Z());var Zp=b(Z());var sP={root:"dd-tvkOF",content:"dd-eXA1D"};var G0=b(I()),vF=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,Zp.useRef)(null),c=z("Dialog",sP),u=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,Zp.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,G0.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":s,ref:l,onKeyDown:u,onMouseDown:f,children:(0,G0.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},$a=vF;var lP=b(De());var aP={root:"dd-ranhW"};var cP=b(I()),SF=r=>{var o=r,{className:e,value:t}=o,n=ie(o,["className","value"]);let i=z("TextInput",aP);return(0,cP.jsx)("input",E({className:(0,lP.default)(e,i.root),type:"text",value:t},n))},$c=SF;var q0={};ht(q0,{enUS:()=>xF,nlNL:()=>wF});var xF={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"}]},wF={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 uP={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var st=b(I());var bF=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},EF=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=se(q0),s=z("LoginTokenDialog",uP),a=G(cb),l=we(),c=X("productName"),[u,f]=(0,gr.useState)(e||""),[d,p]=(0,gr.useState)(0),[m,g]=(0,gr.useState)(""),v=(0,gr.useCallback)(x=>M(null,null,function*(){x.preventDefault(),l(fb({email:u})),p(1)}),[n,u]),h=()=>{g(""),p(0)},y=(0,gr.useCallback)(x=>M(null,null,function*(){x.preventDefault();let T=bF(x.target.elements.token.value);if(!T){g(i("verifyCodeError",{login:S}));return}l(vl({token:T}))}),[n]),S=(0,gr.useMemo)(()=>x=>(0,st.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:h,children:x},"back-button"),[]);return(0,gr.useEffect)(()=>{a==="error"&&g(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,st.jsx)($a,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:c}),overlayAriaLabel:i("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,st.jsxs)("div",{className:s.root,children:[(0,st.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:c})}),d===0&&(0,st.jsxs)("form",{onSubmit:v,children:[(0,st.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,st.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:c})}),(0,st.jsx)($c,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:u,onChange:x=>f(x.target.value)}),(0,st.jsx)("div",{className:s.actions,children:(0,st.jsx)("button",{type:"submit",className:(0,Jp.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,st.jsxs)("form",{onSubmit:y,children:[(0,st.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,st.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,st.jsx)($c,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),m&&(0,st.jsx)("div",{className:s.errorMessage,children:m}),(0,st.jsxs)("div",{className:s.actions,children:[(0,st.jsx)("button",{type:"button",className:(0,Jp.default)(s.button),onClick:h,children:i("back")}),(0,st.jsx)("button",{type:"submit",className:(0,Jp.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},dP=EF;var pP=b(I()),CF=()=>{let e=G(ub),t=G(Gs),n=X("adminUrl"),r=pn(),o=()=>r.send(Ys,!1),i=()=>{r.send(Ys,!1),r.send(El)};return(0,pP.jsx)(dP,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},fP=CF;var iI=b(Q0()),bn=b(Z());var VF={data:null,fetchState:"idle"},yP=e=>e.contentTypes.data,jc=ge("contentTypes/getContentTypes",(e,t)=>M(null,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),WF=Re({name:"contentTypes",initialState:VF,reducers:{},extraReducers:e=>{e.addCase(jc.pending,t=>{t.fetchState="loading"}).addCase(jc.rejected,t=>{t.fetchState="error"}).addCase(jc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),vP=WF.reducer;var $F={data:null,fetchState:"idle"},jF=[],mi=e=>e.profile.data,KF=e=>e.profile.data?e.profile.data.uiConfig.widget.types:jF,Gc=fn([KF],e=>e.filter(t=>t.isActive)),SP=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},xP=e=>t=>Gc(t).find(n=>n.type===e),wP=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,bP=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},Kc=ge("profile/getProfile",(e,t)=>M(null,null,function*(){var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),GF=Re({name:"profile",initialState:$F,reducers:{},extraReducers:e=>{e.addCase(Kc.pending,t=>{t.fetchState="loading"}).addCase(Kc.rejected,t=>{t.fetchState="error"}).addCase(Kc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),EP=GF.reducer;var To=b(Z());var CP=b(Z()),em=b(De());var Fn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var bo={};ht(bo,{enUS:()=>qF,nlNL:()=>YF});var qF={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},YF={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var gi=b(I()),XF=({src:e,title:t})=>{let n=z("CommandPalette",Fn),[r,o]=(0,CP.useState)("loading"),i=se(bo);return(0,gi.jsxs)("div",{className:n.image,children:[(0,gi.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,em.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,gi.jsx)("span",{className:(0,em.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,gi.jsx)("span",{className:(0,em.default)(n.imageSrc,n.imageSrcStatus),children:(0,gi.jsx)(zu,{})}),t&&(0,gi.jsx)("span",{className:n.imageTitle,children:t})]})},TP=XF;var kP=b(Z()),RP=b(De());var ms=b(I());function Z0({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=se(bo),s=z("CommandPalette",Fn);return kP.default.Children.count(e)===0?null:(0,ms.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,ms.jsxs)("div",{className:s.listHeader,children:[t&&(0,ms.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,ms.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,ms.jsx)("div",{className:(0,RP.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Jc=b(De());var tm=b(Z());function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ae=1,eS=2,tS=4,dt=8,nm=16,Yc=32,hr=64,J0={a:{content:Ae|dt,self:!1,type:Ae|dt|Yc|hr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Ae|dt,void:!0},body:{content:Ae|eS|tS|dt|nm|Yc|hr},button:{content:dt,type:Ae|dt|Yc|hr},caption:{content:Ae,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Ae|Yc|hr},dd:{content:Ae,parent:["dl"]},dl:{children:["dt","dd"],type:Ae},dt:{content:Ae,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Ae,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Ae,void:!0},img:{void:!0},li:{content:Ae,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Ae},picture:{children:["source","img"],type:Ae|dt|nm},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:dt,parent:["ruby","rtc"]},rtc:{content:dt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:dt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Ae},tbody:{parent:["table"],children:["tr"]},td:{content:Ae,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Ae,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:Ae},video:{children:["track","source"]},wbr:{type:Ae|dt,void:!0}};function hs(e){return t=>{J0[t]=E(E({},e),J0[t])}}["address","main","div","figure","p","pre"].forEach(hs({content:Ae,type:Ae|hr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(hs({content:dt,type:Ae|dt|hr}));["p","pre"].forEach(hs({content:dt,type:Ae|hr}));["s","small","span","del","ins"].forEach(hs({content:dt,type:Ae|dt}));["article","aside","footer","header","nav","section","blockquote"].forEach(hs({content:Ae,type:Ae|eS|hr}));["h1","h2","h3","h4","h5","h6"].forEach(hs({content:dt,type:Ae|tS|hr}));["audio","canvas","iframe","img","video"].forEach(hs({type:Ae|dt|nm|hr}));var Qc=Object.freeze(J0),nS=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],rS=Object.keys(Qc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,oS=2,gs=3,hi=4,om=5,im=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:gs,controls:hi,datetime:Oe,default:hi,disabled:hi,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:hi,media:Oe,muted:hi,poster:Oe,rel:Oe,role:Oe,rowspan:gs,scope:Oe,sizes:Oe,span:gs,start:gs,style:om,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),iS=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function rm(){return rm=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},rm.apply(this,arguments)}function sm({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?tm.default.createElement(i,rm({className:t},e)):tm.default.createElement(i,rm({className:t},e),n)}var Xc=class{attribute(t,n){return n}node(t,n){return n}};function PP(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?A(E({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var Eo=class{constructor(t,n,r){qc(this,"greedy",!1),qc(this,"options",void 0),qc(this,"propName",void 0),qc(this,"inverseName",void 0),qc(this,"factory",void 0),this.options=E({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?tm.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return PP(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ys=b(Z()),MP=b(AP());function Co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JF=/(url|image|image-set)\(/i,sS=class extends Xc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(JF)&&delete n[r]}),n}},_P=1,e5=3,t5=/^<(!doctype|(html|head|body)(\s|>))/i,n5=/^(aria-|data-|\w+:)/iu,r5=/{{{(\w+)\/?}}}/;function o5(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var am=class{constructor(t,n={},r=[],o=[]){var i;Co(this,"allowed",void 0),Co(this,"banned",void 0),Co(this,"blocked",void 0),Co(this,"container",void 0),Co(this,"content",[]),Co(this,"props",void 0),Co(this,"matchers",void 0),Co(this,"filters",void 0),Co(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new sS],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:rS),this.banned=new Set(nS),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 c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let f="";for(;i&&(a=l.match(i));){let d=a,{index:p,length:m,match:g,valid:v,void:h}=d,y=ie(d,["index","length","match","valid","void"]),S=l.propName+String(s);p>0&&(f+=i.slice(0,p)),v?(f+=h?`{{{${S}/}}}`:`{{{${S}}}}${g}{{{/${S}}}}`,this.keyIndex+=1,s+=1,r[S]={children:g,matcher:l,props:A(E(E({},o),y),{key:this.keyIndex})}):f+=g,l.greedy?(i=f+i.slice(p+m),f=""):i=i.slice(p+(m||g.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
74
74
  `);return o=o.replace(/\n{3,}/g,`
75
75
 
76
76
 
77
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||r5)();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(e5)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,_P.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==AP||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),c=im[l]||im[s];if(!this.isSafe(t)||!l.match(t5)&&(!n&&(!c||c===rS)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===hi?u=!0:c===gs?u=Number.parseFloat(String(u)):c!==om&&(u=String(u)),r[oS[l]||l]=this.applyAttributeFilters(l,u),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 Qc[t]?A(E(E({},n),Qc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&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=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===AP){let d=u.nodeName.toLowerCase(),p=this.getTagConfig(d);c&&(l.push(c),c="");let m=this.applyNodeFilters(d,u);if(!m)return;let g;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let v=this.keyIndex;g=this.parseNode(m,p);let h=s(m,g,p);if(h===null)return;if(typeof h!="undefined"){l.push(ys.default.cloneElement(h,{key:v}));return}this.keyIndex=v-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,p))){var f;this.keyIndex+=1;let v=this.extractAttributes(m),h={tagName:d};v&&(h.attributes=v),p.void&&(h.selfClose=p.void),l.push(ys.default.createElement(sm,A(E({},h),{key:this.keyIndex}),(f=g)!==null&&f!==void 0?f:this.parseNode(m,p)))}else l=[...l,...this.parseNode(m,p.tagName?p:n)]}else if(u.nodeType===JF){let d=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(d)?l=[...l,...d]:c+=d}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(n5);){let[s,a]=i,l=i.index,c=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:f,props:d}=n[a],p;if(c)p=s.length,r.push(f.createElement(u,d));else{let m=o.match(new RegExp(`{{{/${a}}}}`));p=m.index+m[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,m.index),n),d))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function o5(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",f=u==="fragment"?!0:c,d;if(a)d=a;else{let p=new am(i!=null?i:"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?ys.default.createElement(ys.default.Fragment,null,d):ys.default.createElement(sm,{attributes:n,className:r,tagName:u},d)}function yi(e){let T=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:f="span",noWrap:d=!1}=T,p=ie(T,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),m=i?[]:l,g=o?[]:a,v=u?[u]:[],h=c?[c]:[];m.forEach(C=>{C.onBeforeParse&&v.push(C.onBeforeParse.bind(C)),C.onAfterParse&&h.push(C.onAfterParse.bind(C))});let y=v.reduce((C,k)=>k(C,e),r!=null?r:""),S=new am(y,p,m,g),x=h.reduce((C,k)=>k(C,e),S.parse());return ys.default.createElement(o5,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var vi=b(Z());var i5=/[.*+?^${}()|[\]\\]/g,s5=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function a5(e){return e.replace(i5,"\\$&")}function l5(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function c5(e){return e.search(s5)}function MP(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${a5(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function NP(e){return e.replace($u,'<mark data-type="placeholder">$1</mark>')}function ja(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function u5(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 sS(e,t,n={}){if(t){let r=l5(t.toLowerCase(),e.toLowerCase()),o=ja(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=c5(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let s=t.split(ew).length>3||t.length>30?u5(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ja(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var d5=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Zc(e){return d5.test(e)}function aS(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var lm=b(Z()),DP=b(I()),OP=lm.default.createContext(void 0);function Ka(){let e=lm.default.useContext(OP);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var LP=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=lm.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,DP.jsx)(OP.Provider,{value:s,children:e})};var on=b(I()),f5=3,p5=90,FP=({children:e})=>{let t=z("CommandPalette",Fn);return(0,on.jsx)("div",{className:t.listItemActions,children:e})};function lS(p){var m=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:i,onSourceClick:s,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:f=f5}=m,d=ie(m,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var O;let g=se(bo),[v,h]=(0,vi.useState)(!1),{selected:y,onChangeOpen:S}=Ka(),[x,T]=(0,vi.useState)(!1),C=z("CommandPalette",Fn);function k(U){o(U),e&&S(!1)}let R=(0,vi.useMemo)(()=>typeof a!="string"?a:Zc(a)?aS(a).trim():a,[a]),F=(0,vi.useMemo)(()=>typeof n!="string"?n:Zc(n)?aS(n).trim():n,[n]);return(0,vi.useEffect)(()=>{T(y===c)},[y]),(0,on.jsxs)("div",{className:(0,Jc.default)(C.listItem,c===y&&C.listItemSelected),children:[(0,on.jsxs)(wt,{placement:"right-start",tooltip:!0,onOpenChange:T,open:x,children:[(0,on.jsx)(wt.Trigger,A(E({className:C.listItemAction,"aria-disabled":(O=d.disabled)!=null?O:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},d),{children:(0,on.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,on.jsx)("p",{className:(0,Jc.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,R&&typeof R=="string"?(0,on.jsx)(yi,{tagName:"p",allowList:[],content:R,className:(0,Jc.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),F&&F.length>p5&&(0,on.jsx)(wt.Content,{className:C.listItemTooltip,disableFocusManager:!0,children:(0,on.jsx)(yi,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p","br"],tagName:"div",content:F.replace(/\n/g,"<br />")})})]}),c===y&&i,l&&l.length>0&&(0,on.jsxs)("div",{className:C.sources,children:[(0,on.jsx)("span",{className:C.sourcesTitle,children:g("sources")}),l.slice(0,v?l.length:f).map(U=>(0,on.jsx)("a",{className:C.source,href:U.url,target:"_blank",title:U.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(U),children:U.name},U.url)),!v&&l.length>f&&(0,on.jsx)("button",{className:(0,Jc.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>h(!0),children:g("showMore",{amount:l.length-f})})]})]})}var eu=b(I()),zP=()=>(0,eu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,eu.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,eu.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 vs=b(I());function cS({children:e,title:t,id:n,onDismiss:r}){let o=se(bo),i=z("CommandPalette",Fn),{page:s}=Ka();return s!==n?null:(0,vs.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,vs.jsxs)("div",{className:i.pageNav,children:[(0,vs.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,vs.jsx)(zP,{}),o("back")]}),t&&(0,vs.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var HP=b(Z());var tu=b(I()),Ga=()=>(0,tu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,tu.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,tu.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 yr=b(I());function m5({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=z("CommandPalette",Fn);return(0,yr.jsxs)("div",{className:l.search,children:[(0,yr.jsx)("div",{className:l.searchIcon,children:(0,yr.jsx)(Ga,{})}),(0,yr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,yr.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,yr.jsx)("div",{className:l.selectWrapper,children:(0,yr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:s||r,children:[r&&(0,yr.jsx)("option",{children:r}),o.map(c=>(0,yr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var BP=(0,HP.forwardRef)(m5);var uS=b(De());var cm=b(I()),g5=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=ie(i,["onClick","shortKeys","children"]);let s=z("CommandPalette",Fn);return(0,cm.jsxs)("button",A(E({type:"button"},r),{onClick:e,className:(0,uS.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,cm.jsx)("span",{className:(0,uS.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},UP=g5;var nu=b(I()),h5="[data-command-palette-item]";function Ss({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:c,children:u,isOpen:f,search:d,updateDeps:p=[]}){let[m,g]=(0,To.useState)(),v=(0,To.useRef)(null),h=()=>{o&&o(n),s(void 0),i(""),a(!1)},y=()=>{var U;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(U=v.current)==null||U.focus();return}if(d.length>0){i("");return}a(!1)},S=()=>{let U=x();U.length!==0&&g(U[0].dataset.itemId)},x=()=>Array.from(document.querySelectorAll(h5)||[]),T=U=>document.querySelector(`[data-item-id=${U}]`),C=U=>{let J=T(U);J&&g(J.dataset.itemId)},k=U=>{let J=T(U);J&&J.scrollIntoView({behavior:"smooth"})},R=()=>{if(!m)return;let U=x(),J=T(m);if(!J)return;let Y=U.indexOf(J),_=U[Y+1];_!=null&&_.dataset.itemId?C(_.dataset.itemId):S()},F=()=>{if(!m)return;let U=x(),J=T(m);if(!J)return;let Y=U.indexOf(J),_=U[Y-1];_!=null&&_.dataset.itemId?C(_.dataset.itemId):C(U[U.length-1].dataset.itemId)},O=(0,To.useCallback)(U=>{switch(U.key){case"ArrowDown":{U.preventDefault(),R();break}case"ArrowUp":{U.preventDefault(),F();break}case"Enter":{if(m){let J=T(m);J==null||J.click()}break}}},[m]);return(0,To.useEffect)(()=>{S()},[d,r,l,f,...p]),(0,To.useEffect)(()=>{m&&k(m)},[m]),(0,nu.jsx)($a,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:y,onClose:h,onKeyDown:O,children:(0,nu.jsxs)(LP,{selected:m,setSelected:g,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,nu.jsx)(BP,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:c,typePlaceholder:t}),u]})})}Ss.Page=cS;Ss.List=Q0;Ss.Image=CP;Ss.ListItem=lS;Ss.ListItemActions=FP;Ss.Button=UP;var bt=Ss;var VP=b(Z());function WP(e,t){(0,VP.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 ru=b(Z());var $P={data:null,fetchState:"idle"},y5=e=>{var t;return(t=e.entities.data)!=null?t:null},um=fn([y5,Gs,Ob],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:i,agentNickname:s}=t!=null?t:{};return i&&i!==o&&r.push(i),s&&s!==o&&r.push(s),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),vr=ge("entities/getEntities",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=yield o();return i.length===0?Promise.resolve([]):n.getEntities(i)})),v5=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),S5=Re({name:"entities",initialState:$P,reducers:{},extraReducers:e=>{e.addCase(vr.pending,t=>{t.fetchState="loading"}).addCase(vr.rejected,t=>{t.fetchState="error"}).addCase(vr.fulfilled,(t,n)=>{t.fetchState="done",t.data=v5(t.data?[...t.data,...n.payload]:n.payload)}).addCase(lt,()=>$P)}}),jP=S5.reducer;var dS={};ht(dS,{enUS:()=>x5,nlNL:()=>w5});var x5={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},w5={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var KP={root:"dd-TYTKs",empty:"dd-AU7uT"};var qa=b(I()),b5=({onCopy:e})=>{let t=(0,ru.useRef)(null),n=z("EntitiesList",KP),r=G(um),{setSelected:o}=Ka(),i=se(dS),s=Ee();return(0,ru.useEffect)(()=>{s(vr())},[]),(0,ru.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,qa.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,qa.jsx)(bt.List,{children:r.map((a,l)=>(0,qa.jsx)(bt.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,qa.jsx)("p",{className:n.empty,children:i("noResults")})]})},GP=b5;var fS=b(I()),dm=e=>(0,fS.jsx)("svg",A(E({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,fS.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})}));var ou={};ht(ou,{enUS:()=>E5,nlNL:()=>C5});var E5={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},C5={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var fm={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var xs=b(I()),T5=({suggestion:e,source:t,context:n})=>{let r=se(ou),o=G(Pr),i=Ze(),s=X("enableSuggestionFeedback"),a=`${e.text}`,l=G(Uo(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{i("suggestion feedback",{text:e.text,source:t,context:n})};return!s||!l?null:(0,xs.jsxs)(wt,{placement:"top-end",children:[(0,xs.jsx)(wt.Trigger,{className:fm.trigger,children:(0,xs.jsx)(dm,{"data-testid":"feedback-dropdown-trigger"})}),(0,xs.jsx)(wt.Content,{className:fm.content,children:(0,xs.jsx)(wt.Button,{className:fm.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},pm=T5;var iu={};ht(iu,{enUS:()=>k5,nlNL:()=>R5});var k5={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL 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"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},R5={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:"URL 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"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var nI=b(Z());var P5=["{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}"],I5=new RegExp(P5.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function qP(e,t){let n=e.split(I5),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 c=r;if(l){let f=a.charAt(0),d=0;do c=f?t.indexOf(f,c+1):-1,d+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&d>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function YP(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var QP={suggestions:[],fetchState:"idle"},XP={default:QP},ZP=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},mm=e=>e.textSuggestions,JP=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},gm=Rt("textSuggestions/refresh"),Sr=ge("textSuggestions/recommendations",(e,t)=>M(null,null,function*(){var u,f,d;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=Ni(r),l=(u=r.conversation.current)==null?void 0:u.id;if(!l)throw new Error("No current conversation to fetch text suggestions");if(!((f=r.profile.data)!=null&&f.recommendationEngine))return[];let c=[];if(e==="sticky-messages"){let p=(d=r.profile.data)==null?void 0:d.code;if(!p)throw new Error("No current profile to fetch pinned messages");c=yield n.getPinnedMessages(p)}else c=yield n.getTextSuggestions(l,bl(r),e);if(o&&(c=c.map(p=>E(A(E({},p),{text:or(p.text,o)}),p.title?{title:or(p.title,o)}:{}))),e==="default"){let p=s?c.filter(JP(a)):c;t.dispatch(Ho(p.slice(0,i)))}return c})),su=ge("textSuggestions/autocompletions",(e,t)=>M(null,null,function*(){var u,f;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:i}=r.info,{textSuggestionsCount:s,deanonymize:a,inlineSuggestions:l}=r.settings;if(!((f=r.profile.data)!=null&&f.recommendationEngine))return[];if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,A(E({},bl(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(JP(e))),i&&(c=c.map(d=>A(E({},d),{text:or(d.text,i)}))),a&&(c=c.map(d=>A(E({},d),{text:d.source!=="trie-with-typos"?qP(d.text,e):d.text}))),c=YP(c,s),t.dispatch(Ho(c)),c})),eI=Re({name:"textSuggestions",initialState:XP,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}}}}},extraReducers:e=>{e.addCase(Sr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||QP;return A(E({},t),{[r]:A(E({},o),{fetchState:"loading"})})}).addCase(Sr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Sr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(su.pending,t=>{t.default.fetchState="loading"}).addCase(su.rejected,t=>{t.default.fetchState="error"}).addCase(su.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(lt,()=>XP)}}),{setTextSuggestions:JK}=eI.actions,tI=eI.reducer;var ws=b(I()),A5=({types:e,commands:t,onClick:n})=>{let r=Ee(),o=se(iu),i=G(mm);return(0,nI.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(Sr(s))})},[]),(0,ws.jsxs)("div",{children:[t.length>0&&(0,ws.jsx)(bt.List,{heading:o("commands"),children:t.map((s,a)=>(0,ws.jsx)(bt.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:s.onClick,children:s.label},s.label))}),e.map(({type:s,title:a})=>{var l;return(0,ws.jsx)(bt.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((c,u)=>(0,ws.jsx)(bt.ListItem,{id:`${s}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},s)})]})},rI=A5;var sn=b(I()),M5=200,N5=5,O5=4,pS=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?O5:N5),L5=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),D5=()=>{var Y,_,V;let e=Ee(),t=pn(),n=se(iu),[r,o]=(0,bn.useState)(!1),[i,s]=(0,bn.useState)(""),a=G($b),l=G(mi),[c,u]=(0,bn.useState)(),f=G(Pt),d=X("showSearch"),p=X("enableSuggestionFeedback"),m=X("showEntitiesCommand"),g=X("showImageSearch"),v=X("searchTriggerKey"),h=G(hP),y=G(ch),S=G(jb),x=G(Wb),T=((V=(_=(Y=l==null?void 0:l.uiConfig)==null?void 0:Y.search)==null?void 0:_.initialTypes)==null?void 0:V.filter(({isActive:B})=>B))||[],C=Ze(),k=(0,bn.useMemo)(()=>{let B=j=>pS(y.filter(K=>K.type===j.toUpperCase()),j,c),W=(h==null?void 0:h.map(j=>({value:j.code.toUpperCase(),label:`${j.name}s`,list:B(j.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(W.push({value:"PERSONAL",label:n("personalSuggestions"),list:B("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:B("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:B("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),g&&W.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:B("IMAGE"),listOrientation:"horizontal"}),T.length===0)return W;let N=T.map(j=>W.find(K=>K.value.toLowerCase()===j.type)).filter(j=>!!j),q=W.filter(j=>!N.find(K=>K.value===j.value));return[...N,...q]},[h,T,g,c]),R=[{label:n("entitiesClipboard"),onClick:()=>e(qs("entities")),shouldShow:m&&L5(n("entitiesClipboard"),i)}].filter(B=>B.shouldShow).filter(()=>!c),F=(0,bn.useCallback)((0,oI.default)((B,W)=>{e(Fi({query:B,type:W,tags:["search-overlay"],size:c?50:20}))},M5),[c]),O=(0,bn.useCallback)((B,W)=>{W.type==="IMAGE"?t.send(dh,{suggestion:W}):t.send(eo,{text:B,suggestion:W}),e(ir(!1))},[e]),U=B=>{Ar(B.text),C("entity copied",{entity:B,type:"copy"}),e(ir(!1))};function J(B){return W=>{r?window.confirm(n("warning"))&&(B(W),o(!1)):B(W)}}return(0,bn.useEffect)(()=>{i?F(i,c):e(kd())},[i,c]),(0,bn.useEffect)(()=>{f&&e(jc())},[f]),WP(v,()=>{e(ir(!0)),C("open search",{via:"ctrl+k"})}),!d||!l?null:(0,sn.jsxs)(bt,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:J(B=>e(ir(B))),onChangeType:B=>u(B),onChangePage:J(B=>e(qs(B))),selectedType:c,search:i,page:a,isOpen:x,types:k,updateDeps:[y],children:[(0,sn.jsxs)(bt.Page,{id:"search",children:[i.length===0&&(0,sn.jsx)(rI,{types:T,commands:R,onClick:O}),i.length>0&&(0,sn.jsxs)(bn.Fragment,{children:[R.length>0&&(0,sn.jsx)(bt.List,{heading:n("commands"),children:R.map((B,W)=>(0,sn.jsx)(bt.ListItem,{closeOnSelect:!1,onClick:B.onClick,id:`commands-${W}`,children:B.label},B.label))}),k.map(({value:B,label:W,list:N,lineClamp:q,listOrientation:j})=>(0,sn.jsx)(bt.List,{heading:W,orientation:j==="horizontal"?"horizontal":"vertical",onShowAll:()=>u(B),hasMore:!c&&S[B.toLowerCase()]>pS(N,B,c).length,children:pS(N,B,c).map(K=>(0,sn.jsx)(bt.ListItem,{id:`${B}-${K.id}`,closeOnSelect:!1,lineClamp:q,onClick:()=>O(K.text,K),description:B!=="IMAGE"?K.title&&K.text:void 0,tooltip:K.text,extra:p&&(0,sn.jsx)(bt.ListItemActions,{children:(0,sn.jsx)(pm,{context:i,source:"search",suggestion:K})}),children:B==="IMAGE"?(0,sn.jsx)(bt.Image,{title:K.title||K.text,src:K.image}):K.title||K.text},`${K.id}-${K.text}`))},B))]})]}),(0,sn.jsx)(bt.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:J(()=>{e(qs("search"))}),children:(0,sn.jsx)(GP,{onCopy:U})})]})},iI=D5;var au=b(I()),F5=()=>{let e=X("showSearch"),t=X("isEmbedded");return(0,au.jsxs)(sI.Fragment,{children:[e&&(0,au.jsx)(iI,{}),t&&(0,au.jsx)(dP,{})]})},aI=F5;var dI=b(De());var hm=b(I()),lI=({className:e})=>(0,hm.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,hm.jsx)("g",{children:(0,hm.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
77
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||o5)();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(t5)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,MP.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==_P||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),c=im[l]||im[s];if(!this.isSafe(t)||!l.match(n5)&&(!n&&(!c||c===oS)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===hi?u=!0:c===gs?u=Number.parseFloat(String(u)):c!==om&&(u=String(u)),r[iS[l]||l]=this.applyAttributeFilters(l,u),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 Qc[t]?A(E(E({},n),Qc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&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=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===_P){let d=u.nodeName.toLowerCase(),p=this.getTagConfig(d);c&&(l.push(c),c="");let m=this.applyNodeFilters(d,u);if(!m)return;let g;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let v=this.keyIndex;g=this.parseNode(m,p);let h=s(m,g,p);if(h===null)return;if(typeof h!="undefined"){l.push(ys.default.cloneElement(h,{key:v}));return}this.keyIndex=v-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,p))){var f;this.keyIndex+=1;let v=this.extractAttributes(m),h={tagName:d};v&&(h.attributes=v),p.void&&(h.selfClose=p.void),l.push(ys.default.createElement(sm,A(E({},h),{key:this.keyIndex}),(f=g)!==null&&f!==void 0?f:this.parseNode(m,p)))}else l=[...l,...this.parseNode(m,p.tagName?p:n)]}else if(u.nodeType===e5){let d=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(d)?l=[...l,...d]:c+=d}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(r5);){let[s,a]=i,l=i.index,c=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:f,props:d}=n[a],p;if(c)p=s.length,r.push(f.createElement(u,d));else{let m=o.match(new RegExp(`{{{/${a}}}}`));p=m.index+m[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,m.index),n),d))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function i5(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",f=u==="fragment"?!0:c,d;if(a)d=a;else{let p=new am(i!=null?i:"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?ys.default.createElement(ys.default.Fragment,null,d):ys.default.createElement(sm,{attributes:n,className:r,tagName:u},d)}function yi(e){let T=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:f="span",noWrap:d=!1}=T,p=ie(T,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),m=i?[]:l,g=o?[]:a,v=u?[u]:[],h=c?[c]:[];m.forEach(C=>{C.onBeforeParse&&v.push(C.onBeforeParse.bind(C)),C.onAfterParse&&h.push(C.onAfterParse.bind(C))});let y=v.reduce((C,k)=>k(C,e),r!=null?r:""),S=new am(y,p,m,g),x=h.reduce((C,k)=>k(C,e),S.parse());return ys.default.createElement(i5,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var vi=b(Z());var s5=/[.*+?^${}()|[\]\\]/g,a5=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function l5(e){return e.replace(s5,"\\$&")}function c5(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function u5(e){return e.search(a5)}function NP(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${l5(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function OP(e){return e.replace($u,'<mark data-type="placeholder">$1</mark>')}function ja(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function d5(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 aS(e,t,n={}){if(t){let r=c5(t.toLowerCase(),e.toLowerCase()),o=ja(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=u5(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let s=t.split(tw).length>3||t.length>30?d5(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ja(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var f5=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Zc(e){return f5.test(e)}function lS(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var lm=b(Z()),FP=b(I()),LP=lm.default.createContext(void 0);function Ka(){let e=lm.default.useContext(LP);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var DP=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=lm.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,FP.jsx)(LP.Provider,{value:s,children:e})};var sn=b(I()),p5=3,m5=90,zP=({children:e})=>{let t=z("CommandPalette",Fn);return(0,sn.jsx)("div",{className:t.listItemActions,children:e})};function cS(p){var m=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:i,onSourceClick:s,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:f=p5}=m,d=ie(m,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var L;let g=se(bo),[v,h]=(0,vi.useState)(!1),{selected:y,onChangeOpen:S}=Ka(),[x,T]=(0,vi.useState)(!1),C=z("CommandPalette",Fn);function k(U){o(U),e&&S(!1)}let R=(0,vi.useMemo)(()=>typeof a!="string"?a:Zc(a)?lS(a).trim():a,[a]),O=(0,vi.useMemo)(()=>typeof n!="string"?n:Zc(n)?lS(n).trim():n,[n]);return(0,vi.useEffect)(()=>{T(y===c)},[y]),(0,sn.jsxs)("div",{className:(0,Jc.default)(C.listItem,c===y&&C.listItemSelected),children:[(0,sn.jsxs)(wt,{placement:"right-start",tooltip:!0,onOpenChange:T,open:x,children:[(0,sn.jsx)(wt.Trigger,A(E({className:C.listItemAction,"aria-disabled":(L=d.disabled)!=null?L:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},d),{children:(0,sn.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,sn.jsx)("p",{className:(0,Jc.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,R&&typeof R=="string"?(0,sn.jsx)(yi,{tagName:"p",allowList:[],content:R,className:(0,Jc.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),O&&O.length>m5&&(0,sn.jsx)(wt.Content,{className:C.listItemTooltip,disableFocusManager:!0,children:(0,sn.jsx)(yi,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p","br"],tagName:"div",content:O.replace(/\n/g,"<br />")})})]}),c===y&&i,l&&l.length>0&&(0,sn.jsxs)("div",{className:C.sources,children:[(0,sn.jsx)("span",{className:C.sourcesTitle,children:g("sources")}),l.slice(0,v?l.length:f).map(U=>(0,sn.jsx)("a",{className:C.source,href:U.url,target:"_blank",title:U.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(U),children:U.name},U.url)),!v&&l.length>f&&(0,sn.jsx)("button",{className:(0,Jc.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>h(!0),children:g("showMore",{amount:l.length-f})})]})]})}var eu=b(I()),HP=()=>(0,eu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,eu.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,eu.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 vs=b(I());function uS({children:e,title:t,id:n,onDismiss:r}){let o=se(bo),i=z("CommandPalette",Fn),{page:s}=Ka();return s!==n?null:(0,vs.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,vs.jsxs)("div",{className:i.pageNav,children:[(0,vs.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,vs.jsx)(HP,{}),o("back")]}),t&&(0,vs.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var BP=b(Z());var tu=b(I()),Ga=()=>(0,tu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,tu.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,tu.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 yr=b(I());function g5({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=z("CommandPalette",Fn);return(0,yr.jsxs)("div",{className:l.search,children:[(0,yr.jsx)("div",{className:l.searchIcon,children:(0,yr.jsx)(Ga,{})}),(0,yr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,yr.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,yr.jsx)("div",{className:l.selectWrapper,children:(0,yr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:s||r,children:[r&&(0,yr.jsx)("option",{children:r}),o.map(c=>(0,yr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var UP=(0,BP.forwardRef)(g5);var dS=b(De());var cm=b(I()),h5=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=ie(i,["onClick","shortKeys","children"]);let s=z("CommandPalette",Fn);return(0,cm.jsxs)("button",A(E({type:"button"},r),{onClick:e,className:(0,dS.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,cm.jsx)("span",{className:(0,dS.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},VP=h5;var nu=b(I()),y5="[data-command-palette-item]";function Ss({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:c,children:u,isOpen:f,search:d,updateDeps:p=[]}){let[m,g]=(0,To.useState)(),v=(0,To.useRef)(null),h=()=>{o&&o(n),s(void 0),i(""),a(!1)},y=()=>{var U;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(U=v.current)==null||U.focus();return}if(d.length>0){i("");return}a(!1)},S=()=>{let U=x();U.length!==0&&g(U[0].dataset.itemId)},x=()=>Array.from(document.querySelectorAll(y5)||[]),T=U=>document.querySelector(`[data-item-id=${U}]`),C=U=>{let J=T(U);J&&g(J.dataset.itemId)},k=U=>{let J=T(U);J&&J.scrollIntoView({behavior:"smooth"})},R=()=>{if(!m)return;let U=x(),J=T(m);if(!J)return;let Y=U.indexOf(J),_=U[Y+1];_!=null&&_.dataset.itemId?C(_.dataset.itemId):S()},O=()=>{if(!m)return;let U=x(),J=T(m);if(!J)return;let Y=U.indexOf(J),_=U[Y-1];_!=null&&_.dataset.itemId?C(_.dataset.itemId):C(U[U.length-1].dataset.itemId)},L=(0,To.useCallback)(U=>{switch(U.key){case"ArrowDown":{U.preventDefault(),R();break}case"ArrowUp":{U.preventDefault(),O();break}case"Enter":{if(m){let J=T(m);J==null||J.click()}break}}},[m]);return(0,To.useEffect)(()=>{S()},[d,r,l,f,...p]),(0,To.useEffect)(()=>{m&&k(m)},[m]),(0,nu.jsx)($a,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:y,onClose:h,onKeyDown:L,children:(0,nu.jsxs)(DP,{selected:m,setSelected:g,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,nu.jsx)(UP,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:c,typePlaceholder:t}),u]})})}Ss.Page=uS;Ss.List=Z0;Ss.Image=TP;Ss.ListItem=cS;Ss.ListItemActions=zP;Ss.Button=VP;var bt=Ss;var WP=b(Z());function $P(e,t){(0,WP.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 ru=b(Z());var jP={data:null,fetchState:"idle"},v5=e=>{var t;return(t=e.entities.data)!=null?t:null},um=fn([v5,Gs,Lb],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:i,agentNickname:s}=t!=null?t:{};return i&&i!==o&&r.push(i),s&&s!==o&&r.push(s),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),vr=ge("entities/getEntities",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=yield o();return i.length===0?Promise.resolve([]):n.getEntities(i)})),S5=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),x5=Re({name:"entities",initialState:jP,reducers:{},extraReducers:e=>{e.addCase(vr.pending,t=>{t.fetchState="loading"}).addCase(vr.rejected,t=>{t.fetchState="error"}).addCase(vr.fulfilled,(t,n)=>{t.fetchState="done",t.data=S5(t.data?[...t.data,...n.payload]:n.payload)}).addCase(lt,()=>jP)}}),KP=x5.reducer;var fS={};ht(fS,{enUS:()=>w5,nlNL:()=>b5});var w5={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},b5={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var GP={root:"dd-TYTKs",empty:"dd-AU7uT"};var qa=b(I()),E5=({onCopy:e})=>{let t=(0,ru.useRef)(null),n=z("EntitiesList",GP),r=G(um),{setSelected:o}=Ka(),i=se(fS),s=we();return(0,ru.useEffect)(()=>{s(vr())},[]),(0,ru.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,qa.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,qa.jsx)(bt.List,{children:r.map((a,l)=>(0,qa.jsx)(bt.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,qa.jsx)("p",{className:n.empty,children:i("noResults")})]})},qP=E5;var pS=b(I()),dm=e=>(0,pS.jsx)("svg",A(E({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,pS.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})}));var ou={};ht(ou,{enUS:()=>C5,nlNL:()=>T5});var C5={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},T5={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var fm={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var xs=b(I()),k5=({suggestion:e,source:t,context:n})=>{let r=se(ou),o=G(Pr),i=Ze(),s=X("enableSuggestionFeedback"),a=`${e.text}`,l=G(Uo(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{i("suggestion feedback",{text:e.text,source:t,context:n})};return!s||!l?null:(0,xs.jsxs)(wt,{placement:"top-end",children:[(0,xs.jsx)(wt.Trigger,{className:fm.trigger,children:(0,xs.jsx)(dm,{"data-testid":"feedback-dropdown-trigger"})}),(0,xs.jsx)(wt.Content,{className:fm.content,children:(0,xs.jsx)(wt.Button,{className:fm.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},pm=k5;var iu={};ht(iu,{enUS:()=>R5,nlNL:()=>P5});var R5={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL 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"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},P5={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:"URL 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"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var rI=b(Z());var I5=["{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}"],A5=new RegExp(I5.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function YP(e,t){let n=e.split(A5),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 c=r;if(l){let f=a.charAt(0),d=0;do c=f?t.indexOf(f,c+1):-1,d+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&d>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function XP(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var ZP={suggestions:[],fetchState:"idle"},QP={default:ZP},JP=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},mm=e=>e.textSuggestions,eI=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},gm=Rt("textSuggestions/refresh"),Sr=ge("textSuggestions/recommendations",(e,t)=>M(null,null,function*(){var u,f,d;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=Ni(r),l=(u=r.conversation.current)==null?void 0:u.id;if(!l)throw new Error("No current conversation to fetch text suggestions");if(!((f=r.profile.data)!=null&&f.recommendationEngine))return[];let c=[];if(e==="sticky-messages"){let p=(d=r.profile.data)==null?void 0:d.code;if(!p)throw new Error("No current profile to fetch pinned messages");c=yield n.getPinnedMessages(p)}else c=yield n.getTextSuggestions(l,bl(r),e);if(o&&(c=c.map(p=>E(A(E({},p),{text:or(p.text,o)}),p.title?{title:or(p.title,o)}:{}))),e==="default"){let p=s?c.filter(eI(a)):c;t.dispatch(Ho(p.slice(0,i)))}return c})),su=ge("textSuggestions/autocompletions",(e,t)=>M(null,null,function*(){var u,f;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:i}=r.info,{textSuggestionsCount:s,deanonymize:a,inlineSuggestions:l}=r.settings;if(!((f=r.profile.data)!=null&&f.recommendationEngine))return[];if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,A(E({},bl(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(eI(e))),i&&(c=c.map(d=>A(E({},d),{text:or(d.text,i)}))),a&&(c=c.map(d=>A(E({},d),{text:d.source!=="trie-with-typos"?YP(d.text,e):d.text}))),c=XP(c,s),t.dispatch(Ho(c)),c})),tI=Re({name:"textSuggestions",initialState:QP,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}}}}},extraReducers:e=>{e.addCase(Sr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||ZP;return A(E({},t),{[r]:A(E({},o),{fetchState:"loading"})})}).addCase(Sr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Sr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(su.pending,t=>{t.default.fetchState="loading"}).addCase(su.rejected,t=>{t.default.fetchState="error"}).addCase(su.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(lt,()=>QP)}}),{setTextSuggestions:eG}=tI.actions,nI=tI.reducer;var ws=b(I()),_5=({types:e,commands:t,onClick:n})=>{let r=we(),o=se(iu),i=G(mm);return(0,rI.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(Sr(s))})},[]),(0,ws.jsxs)("div",{children:[t.length>0&&(0,ws.jsx)(bt.List,{heading:o("commands"),children:t.map((s,a)=>(0,ws.jsx)(bt.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:s.onClick,children:s.label},s.label))}),e.map(({type:s,title:a})=>{var l;return(0,ws.jsx)(bt.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((c,u)=>(0,ws.jsx)(bt.ListItem,{id:`${s}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},s)})]})},oI=_5;var an=b(I()),N5=200,O5=5,L5=4,mS=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?L5:O5),D5=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),F5=()=>{var Y,_,V;let e=we(),t=pn(),n=se(iu),[r,o]=(0,bn.useState)(!1),[i,s]=(0,bn.useState)(""),a=G(jb),l=G(mi),[c,u]=(0,bn.useState)(),f=G(Pt),d=X("showSearch"),p=X("enableSuggestionFeedback"),m=X("showEntitiesCommand"),g=X("showImageSearch"),v=X("searchTriggerKey"),h=G(yP),y=G(ch),S=G(Kb),x=G($b),T=((V=(_=(Y=l==null?void 0:l.uiConfig)==null?void 0:Y.search)==null?void 0:_.initialTypes)==null?void 0:V.filter(({isActive:B})=>B))||[],C=Ze(),k=(0,bn.useMemo)(()=>{let B=j=>mS(y.filter(K=>K.type===j.toUpperCase()),j,c),W=(h==null?void 0:h.map(j=>({value:j.code.toUpperCase(),label:`${j.name}s`,list:B(j.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(W.push({value:"PERSONAL",label:n("personalSuggestions"),list:B("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:B("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:B("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),g&&W.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:B("IMAGE"),listOrientation:"horizontal"}),T.length===0)return W;let N=T.map(j=>W.find(K=>K.value.toLowerCase()===j.type)).filter(j=>!!j),q=W.filter(j=>!N.find(K=>K.value===j.value));return[...N,...q]},[h,T,g,c]),R=[{label:n("entitiesClipboard"),onClick:()=>e(qs("entities")),shouldShow:m&&D5(n("entitiesClipboard"),i)}].filter(B=>B.shouldShow).filter(()=>!c),O=(0,bn.useCallback)((0,iI.default)((B,W)=>{e(Fi({query:B,type:W,tags:["search-overlay"],size:c?50:20}))},N5),[c]),L=(0,bn.useCallback)((B,W)=>{W.type==="IMAGE"?t.send(dh,{suggestion:W}):t.send(eo,{text:B,suggestion:W}),e(ir(!1))},[e]),U=B=>{Ar(B.text),C("entity copied",{entity:B,type:"copy"}),e(ir(!1))};function J(B){return W=>{r?window.confirm(n("warning"))&&(B(W),o(!1)):B(W)}}return(0,bn.useEffect)(()=>{i?O(i,c):e(kd())},[i,c]),(0,bn.useEffect)(()=>{f&&e(jc())},[f]),$P(v,()=>{e(ir(!0)),C("open search",{via:"ctrl+k"})}),!d||!l?null:(0,an.jsxs)(bt,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:J(B=>e(ir(B))),onChangeType:B=>u(B),onChangePage:J(B=>e(qs(B))),selectedType:c,search:i,page:a,isOpen:x,types:k,updateDeps:[y],children:[(0,an.jsxs)(bt.Page,{id:"search",children:[i.length===0&&(0,an.jsx)(oI,{types:T,commands:R,onClick:L}),i.length>0&&(0,an.jsxs)(bn.Fragment,{children:[R.length>0&&(0,an.jsx)(bt.List,{heading:n("commands"),children:R.map((B,W)=>(0,an.jsx)(bt.ListItem,{closeOnSelect:!1,onClick:B.onClick,id:`commands-${W}`,children:B.label},B.label))}),k.map(({value:B,label:W,list:N,lineClamp:q,listOrientation:j})=>(0,an.jsx)(bt.List,{heading:W,orientation:j==="horizontal"?"horizontal":"vertical",onShowAll:()=>u(B),hasMore:!c&&S[B.toLowerCase()]>mS(N,B,c).length,children:mS(N,B,c).map(K=>(0,an.jsx)(bt.ListItem,{id:`${B}-${K.id}`,closeOnSelect:!1,lineClamp:q,onClick:()=>L(K.text,K),description:B!=="IMAGE"?K.title&&K.text:void 0,tooltip:K.text,extra:p&&(0,an.jsx)(bt.ListItemActions,{children:(0,an.jsx)(pm,{context:i,source:"search",suggestion:K})}),children:B==="IMAGE"?(0,an.jsx)(bt.Image,{title:K.title||K.text,src:K.image}):K.title||K.text},`${K.id}-${K.text}`))},B))]})]}),(0,an.jsx)(bt.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:J(()=>{e(qs("search"))}),children:(0,an.jsx)(qP,{onCopy:U})})]})},sI=F5;var au=b(I()),z5=()=>{let e=X("showSearch"),t=X("isEmbedded");return(0,au.jsxs)(aI.Fragment,{children:[e&&(0,au.jsx)(sI,{}),t&&(0,au.jsx)(fP,{})]})},lI=z5;var fI=b(De());var hm=b(I()),cI=({className:e})=>(0,hm.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,hm.jsx)("g",{children:(0,hm.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
78
78
  c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
79
79
  c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
80
80
  c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
81
- c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var mS=b(I()),z5={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},cI=({className:e,color:t})=>(0,mS.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,mS.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:z5[t||"pink"]})});var uI={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var gS={};ht(gS,{enUS:()=>H5,nlNL:()=>B5});var H5={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},B5={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var bs=b(I()),fI=({onLogIn:e})=>{let t=se(gS),n=X("floatingMenu"),r=X("productName"),o=Ee(),i=G(Pt),s=z("FloatingMenu",uI);if(i===null||n===!1)return null;let a=()=>{i===!0?o(ir(!0)):e()};return(0,bs.jsxs)("button",{type:"button",className:(0,dI.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,bs.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,bs.jsxs)("div",{className:s.icon,children:[(0,bs.jsx)(cI,{className:s.logo,color:"pink"}),i===!1&&(0,bs.jsx)(lI,{className:s.lock})]})]})};var Cm=b(Z());function jr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input;return i.end<e.input.suggestionTextStart||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 U5={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},ym=({ui:e})=>e.overlayCollapsed,pI=Re({name:"ui",initialState:U5,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(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:lu,setInputFocus:vm,setOverlayCollapsed:Si,setOpenOverlayWhenTyping:mI,setOverlayCollapsedUserOverwrite:gI}=pI.actions,hI=pI.reducer;var yI={styleRow:"dd-prYfH",styleSuggestion:"dd-JTmXy"};var cu=b(I()),V5=({match:e,selected:t,styles:n})=>(0,cu.jsx)(pe,{as:"button",selected:t,className:n.styleRow,"data-testid":"style-suggestion-item",title:e.suggestion,children:(0,cu.jsx)("span",{className:n.styleSuggestion,children:e.suggestion})}),W5=({matches:e,selectedIndex:t})=>{let n=z("StyleSuggestionList",yI);return(0,cu.jsx)(Tt,{children:e.map((r,o)=>(0,cu.jsx)(V5,{match:r,selected:t===o,styles:n},`${r.keyword}-${o}`))})},Sm=W5;var EI=b(Z());var xi=b(Z());var vI=b(Z());function SI(e,t,n){(0,vI.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var xI={root:"dd-1MBCO",actions:"dd--x4cy",closeIconContainer:"dd-1z5NR",closeIcon:"dd-8qMF-",badge:"dd-4Fpkz",formattedText:"dd-EzvTB",assistantContainer:"dd-j6o8F",formattedTextTruncated:"dd-fv169",assistantBadge:"dd-VD57E"};var uu=b(I()),wI=({title:e})=>(0,uu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18px",height:"18px",viewBox:"0 0 24 24","aria-labelledby":"closeTitle",children:[(0,uu.jsx)("title",{id:"closeTitle",children:e}),(0,uu.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]});var hS={};ht(hS,{enUS:()=>$5,nlNL:()=>j5});var $5={assistant:[{type:0,value:"Assistant"}],close:[{type:0,value:"Close"}]},j5={assistant:[{type:0,value:"Assistent"}],close:[{type:0,value:"Sluiten"}]};var zn=b(I()),G5=["search","personal-collection-search","search-autocomplete"];function q5(e,t,n,r={}){var i;let o="";return G5.includes(t)?o=MP(sS(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=sS(e,n,r),r.placeholders===!0&&(o=NP(o)),o}var Y5=()=>{},X5=({selected:e,suggestion:t})=>{let n=se(hS),r=X("inlineSuggestions"),o=G(Ni),[i,s]=(0,xi.useState)(!1),a=X("enableSuggestionFeedback"),l=G(v=>v.input.text),c=Ee(),u=z("TextSuggestion",xI),f=(0,xi.useRef)(null),d=t.source==="assistant",p=a&&!d;(0,xi.useEffect)(()=>{let v=setTimeout(()=>{c(Eb({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(v)}},[t]),SI(f,"click",()=>{c(kn({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let m=()=>{c(Li({source:t.source,text:t.text,assistantCode:t.assistantCode}))},g=(0,xi.useMemo)(()=>q5(t.text,t.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:t.searchKeywords}),[r,t.text,t.source,o,t.searchKeywords]);return t.source==="gpt"&&!r?null:(0,zn.jsxs)("div",{className:u.root,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,zn.jsx)(pe,{ref:f,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:Y5,children:t.source==="assistant"?(0,zn.jsxs)("div",{className:u.assistantContainer,children:[(0,zn.jsx)(yi,{containerTagName:"div",tagName:"span",className:u.formattedTextTruncated,content:g}),(0,zn.jsx)("span",{className:u.assistantBadge,children:n("assistant")})]}):(0,zn.jsx)(yi,{containerTagName:"div",tagName:"span",className:u.formattedText,content:g})}),p&&i&&(0,zn.jsx)("div",{className:u.actions,children:(0,zn.jsx)(pm,{source:"overlay",context:l,suggestion:t})}),d&&i&&(0,zn.jsx)("div",{className:u.closeIconContainer,children:(0,zn.jsx)("button",{type:"button",className:u.closeIcon,onClick:m,title:n("close"),children:(0,zn.jsx)(wI,{title:n("close")})})})]})},bI=X5;var CI=b(I()),Q5=({suggestions:e,selectedIndex:t,reverse:n})=>(0,EI.useMemo)(()=>{let o=e.map((i,s)=>(0,CI.jsx)(bI,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),xm=Q5;var TI={root:"dd-PfvRI",paper:"dd-HYlyY"};var wm={list:{keywordMatches:[]},fetchState:"idle"},bm=e=>e.styleSuggestions.list,Es=ge("styleSuggestions/getAll",(n,r)=>M(null,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,i=t.getState(),{showStyleSuggestions:s}=i.settings,a=(l=i.conversation.current)==null?void 0:l.profileCode;if(!s)return wm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),kI=Re({name:"styleSuggestions",initialState:wm,reducers:{commitStyleSuggestion(e,t){let{keyword:n,suggestion:r}=t.payload;e.list.keywordMatches=e.list.keywordMatches.filter(o=>o.keyword.toLowerCase()!==n.toLowerCase()||o.suggestion!==r)}},extraReducers:e=>{e.addCase(Es.pending,t=>{t.fetchState="loading"}).addCase(Es.rejected,t=>{t.fetchState="error"}).addCase(Es.fulfilled,(t,n)=>{t.fetchState="done",zo(t.list,n.payload)||(t.list=n.payload)}).addCase(Di,t=>{t.list=wm.list}).addCase(lt,()=>wm)}}),{commitStyleSuggestion:RI}=kI.actions,PI=kI.reducer;var Em=e=>{let t=new Set;return e.filter(({keyword:n,suggestion:r})=>{let o=JSON.stringify([n.toLowerCase(),r]);return t.has(o)?!1:(t.add(o),!0)})};var Cs=b(I()),Z5=()=>{var v;let e=(0,Cm.useRef)(null),t=z("InlineSuggestionsOverlay",TI),n=G(jr),r=Ee(),o=G(Pt),i=G($s),s=G(ym),a=X("showTextSuggestions"),l=G(Oi),c=G(xl),u=X("showStyleSuggestions"),f=X("showStyleSuggestionList"),d=G(bm),p=u&&f?Em((v=d.keywordMatches)!=null?v:[]):[],m=p.length>0,g=a&&l.length>0;return di(()=>{setTimeout(()=>{r(Si({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Cm.useEffect)(()=>{let h=e.current;if(!h||!h.parentElement)return;h.parentElement.style.left="0px";let y=h.getBoundingClientRect();h.parentElement.style.left=`${Math.min(window.innerWidth-4-y.right,0)}px`}),s||o!==!0||i===!1||!n&&!m||!g&&!m?null:(0,Cs.jsx)("div",{className:t.root,"data-variant":"inline",children:(0,Cs.jsxs)("div",{ref:e,className:t.paper,children:[m&&(0,Cs.jsx)(Sm,{matches:p,selectedIndex:-1}),g&&(0,Cs.jsx)(Tt,{children:(0,Cs.jsx)(xm,{suggestions:l,selectedIndex:c})})]})})},II=Z5;var wi=b(Z());var AI={root:"dd-7zvcP",dialogContent:"dd-4C0lK",continueButton:"dd-YUPQW",buttonContinueWrapper:"dd-IKpYs",nicknameInput:"dd-rxhGp",titleWrapper:"dd-nw3nD",title:"dd-5iof5",closeButtonWrapper:"dd-UUAzA",closeButton:"dd-7rjP5",buttonsWrapper:"dd-5e9Xb",errorMessage:"dd--5VgX",errorLink:"dd-u461n"};var yS={};ht(yS,{enUS:()=>J5,nlNL:()=>e6});var J5={title:[{type:0,value:"Enter your nickname"}],close:[{type:0,value:"Close"}],nicknameDialogTitle:[{type:0,value:"Please enter the name you'd like customers to see during chat conversations. This nickname will be used across your Deepdesk environment."}],nicknameDialogInputPlaceholder:[{type:0,value:"Enter your nickname"}],nicknameDialogContinueButton:[{type:0,value:"Continue"}],nicknameDialogError:[{type:0,value:"Nickname cannot be empty or spaces only"}],nicknameDialogEmojiError:[{type:0,value:"You cannot use emojis in this field."}],nicknameDialogSaveError:[{type:0,value:"We couldn't save your details just now. Please try again, or update it at "},{type:1,value:"account"},{type:0,value:".deepdesk.com/admin/user-settings"}],nicknameDialogSaveErrorWithoutLink:[{type:0,value:"We couldn\u2019t save your details just now. Please try again later, or update them in My Deepdesk \u2192 Settings."}]},e6={title:[{type:0,value:"Voer je bijnaam in"}],close:[{type:0,value:"Sluiten"}],nicknameDialogTitle:[{type:0,value:"Voer de naam in die je wilt dat klanten zien tijdens chatgesprekken. Deze bijnaam wordt gebruikt in je Deepdesk-omgeving."}],nicknameDialogInputPlaceholder:[{type:0,value:"Voer je bijnaam in"}],nicknameDialogContinueButton:[{type:0,value:"Doorgaan"}],nicknameDialogError:[{type:0,value:"Bijnaam mag niet leeg of alleen spaties zijn"}],nicknameDialogEmojiError:[{type:0,value:"Je kunt geen emoji's gebruiken in dit veld."}],nicknameDialogSaveError:[{type:0,value:"We konden je gegevens nu niet opslaan. Probeer het opnieuw of werk het bij op "},{type:1,value:"account"},{type:0,value:".deepdesk.com/admin/user-settings"}],nicknameDialogSaveErrorWithoutLink:[{type:0,value:"We konden je gegevens nu niet opslaan. Probeer het opnieuw later, of werk ze bij in My Deepdesk \u2192 Instellingen."}]};var ft=b(I()),_I=({onClose:e,onSave:t,id:n,error:r})=>{let[o,i]=(0,wi.useState)(""),[s,a]=(0,wi.useState)(!1),[l,c]=(0,wi.useState)(!1),u=z("Nickname",AI),f=wi.default.useRef(null),d=G(h=>h.info.showNicknameDialog),p=se(yS),m=X("adminUrl");(0,wi.useEffect)(()=>{r&&a(!0)},[r]);let g=()=>{if(!f.current)return;o.trim()?f.current.setCustomValidity(""):f.current.setCustomValidity(p("nicknameDialogError")),f.current.reportValidity()},v=h=>{h.preventDefault();let y=o.trim(),S=h.currentTarget.querySelector("#nickname-input");if(!y){S.setCustomValidity(p("nicknameDialogError")),S.reportValidity();return}S.setCustomValidity(""),t(y)};return(0,ft.jsxs)($a,{isOpen:d,"datatest-id":n,onClose:e||(()=>{}),onBack:e||(()=>{}),children:[(0,ft.jsx)("div",{className:u.titleWrapper,children:(0,ft.jsx)("h1",{className:u.title,children:p("title")})}),(0,ft.jsxs)("form",{className:u.dialogContent,onSubmit:v,children:[(0,ft.jsx)("p",{children:p("nicknameDialogTitle")}),s&&r&&(0,ft.jsx)("div",{className:u.errorMessage,children:m?(()=>{let h=p("nicknameDialogSaveError",{account:m}),y=`${m}.deepdesk.com/admin/user-settings`,S=h.indexOf(y);if(S!==-1){let x=h.substring(0,S),T=h.substring(S+y.length);return(0,ft.jsxs)(ft.Fragment,{children:[x,(0,ft.jsx)("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:u.errorLink,children:y}),T]})}return h})():p("nicknameDialogSaveErrorWithoutLink")}),(0,ft.jsx)("input",{required:!0,minLength:1,maxLength:20,"data-testid":"nickname-input",id:"nickname-input",className:u.nicknameInput,type:"text",placeholder:p("nicknameDialogInputPlaceholder"),value:o,onChange:h=>{c(new RegExp("\\p{Extended_Pictographic}","u").test(h.target.value)),i(h.target.value)},onBlur:g,ref:f}),l&&(0,ft.jsx)("div",{className:u.errorMessage,role:"alert",children:p("nicknameDialogEmojiError")}),(0,ft.jsxs)("div",{className:u.buttonsWrapper,children:[r?(0,ft.jsx)("div",{className:u.closeButtonWrapper,children:(0,ft.jsx)("button",{type:"button",className:u.closeButton,onClick:()=>e==null?void 0:e(),children:p("close")})}):null,(0,ft.jsx)("div",{className:u.buttonContinueWrapper,children:(0,ft.jsx)("button",{type:"submit",className:u.continueButton,disabled:!o.trim()||new RegExp("\\p{Extended_Pictographic}","u").test(o),children:p("nicknameDialogContinueButton")})})]})]})]})};var du=b(I()),t6=({children:e})=>{let n=X("locale").replace("-","");return(0,du.jsx)(xh.Provider,{value:n,children:e})},n6=({store:e,customStyles:t={},children:n})=>(0,du.jsx)(vw,{store:e,children:(0,du.jsx)(t6,{children:(0,du.jsx)(cl.Provider,{value:t,children:n})})}),ko=n6;var km=b(De()),Ya=b(Z());var MI=b(Z());function NI(e,t){let[n,r]=(0,MI.useState)(()=>{if(typeof window=="undefined")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return te.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){te.error(s)}}]}var OI=()=>/Mac/i.test(navigator.platform);var DI=b(De()),Ro=b(Z());var vS={};ht(vS,{enUS:()=>r6,nlNL:()=>o6});var r6={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"}]}]},o6={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 LI={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var bi=b(I()),SS=(e,t,n)=>r=>(0,bi.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),i6=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=se(vS),s=pn(),a=z("Login",LI),l=X("productName"),c=(0,Ro.useCallback)(v=>{v.preventDefault(),r&&r(Number.parseInt(v.target.value,10))},[]),u=(0,Ro.useCallback)(v=>{v.preventDefault(),s.send(Ys,!0)},[t]),f=(0,Ro.useMemo)(()=>v=>(0,bi.jsx)("a",{onClick:y=>{y.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:v},"login"),[t]),d=(0,Ro.useCallback)(v=>(0,bi.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:v},"prompt"),[u]),{min:p,hour:m,day:g}=(0,Ro.useMemo)(()=>({min:SS(a,600,c),hour:SS(a,3600,c),day:SS(a,3600*12,c)}),[]);return(0,bi.jsxs)("div",{className:(0,DI.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,bi.jsxs)(Ro.Fragment,{children:[(0,bi.jsx)("br",{}),i("snooze",{min:p,hour:m,day:g})]})]})},Tm=i6;var FI={root:"dd-DoQhb",text:"dd-Jwnev"};var fu=b(I()),s6=({title:e})=>{let t=z("SearchTrigger",FI),n=Ee(),r=Ze();return(0,fu.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(ir(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,fu.jsx)(Ga,{}),(0,fu.jsx)("span",{className:t.text,children:e})]})},zI=s6;var xS={};ht(xS,{enUS:()=>a6,nlNL:()=>l6});var a6={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"}],dismiss:[{type:0,value:"Dismiss"}],dismissError:[{type:0,value:"Dismiss error"}]},l6={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"}],dismiss:[{type:0,value:"Sluiten"}],dismissError:[{type:0,value:"Foutmelding sluiten"}]};var HI={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2",loginError:"dd-KCXeb",loginErrorMessage:"dd-Bv-BG",loginErrorDismiss:"dd-iSCjU"};var Me=b(I()),c6=({onLogIn:e})=>{var W;let t=z("SuggestionsOverlay",HI),n=se(xS),r=G(jr),o=G(bb),i=Ee(),s=(0,Ya.useRef)(null),a=X("searchTriggerKey"),l=X("productName"),c=G(ym),u=G(Pt),f=G(ub),d=G($s),[p,m]=(0,Ya.useState)(null),g=X("showSearch"),v=X("showTextSuggestions"),h=X("adminUrl"),y=X("isEmbedded"),S=X("suggestionsPlacement"),[x,T]=NI("dd-snooze-until-ms",0),C=c||x>Date.now(),k=G(Oi),R=G(xl),F=X("showStyleSuggestions"),O=X("showStyleSuggestionList"),U=G(bm),J=F&&O?Em((W=U.keywordMatches)!=null?W:[]):[],Y=J.length>0,_=k.filter(N=>N.source!=="gpt").length,V=()=>{C&&T(0),i(gI(!C))},B=N=>{let q=Date.now()+N*1e3;T(q),te.info(`Snooze until: ${new Date(q)}`),i(Si({collapse:!0}))};return(0,Ya.useEffect)(()=>{_===0&&m(null)},[k,_]),di(()=>{i(Si({collapse:!0,skipWhenInputFocus:!0}))}),u===null||d===!1?null:u===!1?(0,Me.jsxs)("div",{ref:s,className:(0,km.default)(t.root,{[t.isCollapsed]:C}),children:[!C&&(0,Me.jsxs)("div",{className:t.triggers,children:[(0,Me.jsx)("div",{style:{flex:1}}),(0,Me.jsx)("div",{className:t.triggersRight,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("collapse"),onClick:V,isCollapsed:!1})})]}),(0,Me.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("open",{productName:l}),onClick:V,isCollapsed:!0})}),(0,Me.jsxs)("div",{className:t.collapsible,children:[f&&(0,Me.jsxs)("div",{className:t.loginError,children:[(0,Me.jsx)("span",{className:t.loginErrorMessage,children:f}),(0,Me.jsx)("button",{type:"button",className:t.loginErrorDismiss,onClick:()=>i(hd()),"aria-label":n("dismissError"),children:n("dismiss")})]}),(0,Me.jsx)(Tm,{loginUrl:h,isEmbedded:y,onLogIn:e,onSnooze:B})]})]}):!o||!r&&!Y?null:(0,Me.jsxs)("div",{ref:s,className:(0,km.default)(t.root,{[t.isCollapsed]:C}),children:[!C&&(0,Me.jsxs)("div",{className:t.triggers,children:[(0,Me.jsx)("div",{style:{flex:1},children:g&&(0,Me.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(n(OI()?"searchHintMac":"searchHintWindows",{searchTriggerKey:a.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,Me.jsx)(zI,{title:n("search")})})}),(0,Me.jsxs)("div",{className:t.triggersRight,onFocus:()=>{},children:[(0,Me.jsx)("div",{className:(0,km.default)(!p&&t.hintsHidden,t.hints),children:p}),(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("collapse"),onClick:V,isCollapsed:!1})]})]}),(0,Me.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("open",{productName:l}),onClick:V,isCollapsed:!0})}),(Y||_>0&&v)&&(0,Me.jsxs)("div",{className:t.collapsible,onFocus:()=>{},children:[Y&&(0,Me.jsx)(Sm,{matches:J,selectedIndex:-1}),_>0&&v&&(0,Me.jsx)(Tt,{children:(0,Me.jsx)(xm,{suggestions:k,selectedIndex:R,reverse:S==="above"})})]})]})},BI=c6;var Hm=b(De());var Ao=b(Z());var Xa=b(Z());function Rm(e){return e.contentEditable==="true"}function u6(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 UI(e){let{selectionStart:t,selectionEnd:n}=Rm(e)?u6(e):e;return[t,n]}function VI(e){let[,t]=(0,Xa.useState)(),n=(0,Xa.useRef)(null);return n.current=UI(e),(0,Xa.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=UI(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 WI(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match($u);if(!s||s.length===0)return;let a=0;s.find(l=>{let c=r.indexOf(l,a);return o>c&&i<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var $I=b(Z()),d6=["div","span","mark","strong","b","i","u","em"];function wS(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(d6.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,$I.cloneElement)(r,{children:wS(s,t,n+1)})]}return[...e,...t]}function Ts(e){return e.tagName.toLowerCase()==="textarea"}var jI={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var YI=b(De());var Om=b(Z());var Qa=b(Z());function KI(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Pm(e){let t=(0,Qa.useRef)(null),[n,r]=(0,Qa.useState)(!1);return(0,Qa.useEffect)(()=>{var u;let o=!1,i=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[s,a]=KI((f,d)=>{let p=t.current;if(!p)return;let m=f/i,g=d/i,v=p.getBoundingClientRect(),h=m>v.x&&m<v.x+v.width&&g>v.y&&g<v.y+v.height;h&&!o?(o=!0,r(!0)):!h&&o&&(o=!1,r(!1))},({clientX:f,clientY:d})=>[f,d]),[l,c]=KI(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function Im(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Am(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function GI(e){return e!=null}var qI=b(De()),_m=b(Z());var Po={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var bS=b(I()),Mm=(0,_m.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=ie(i,["className","children"]);let s=(0,_m.useRef)(null),a=z("TabCompletion",Po);return(0,bS.jsx)("div",A(E({ref:Am([s,r]),className:(0,qI.default)(e,a.popoverContentContainer)},n),{children:(0,bS.jsx)("div",{className:a.popoverContent,children:t})}))});var Ei=b(I()),f6=e=>t=>{let n=a0(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},p6=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=z("TabCompletion",Po),s=wp(),a=(0,Om.useMemo)(()=>f6(e.getBoundingClientRect()),[e]),[l,c]=Pm(e);return(0,Om.useEffect)(()=>{c?s.open():s.close()},[c]),(0,Ei.jsxs)("span",{children:[(0,Ei.jsx)("mark",{ref:Am([l,s.triggerRef]),className:(0,YI.default)(i.matchKeyword,{[i.hover]:c}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Ei.jsx)(Aa,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Ei.jsx)(Mm,{style:n,children:(0,Ei.jsx)("div",{className:i.hintText,children:o})})})]})},Nm=class extends Eo{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>A(E({},o),{keywordRegex:new RegExp(`\\b${Im(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(i=>{if(this.usedKeywordMatches.has(i))return null;let s=n.match(i.keywordRegex);if(!s)return null;let a=n.charAt(s.index-1),l=n.charAt(s.index+i.keyword.length);return a==="{"&&l==="}"?null:{index:s.index,length:s[0].length,match:s[0],matchString:s[0],suggestion:i.suggestion,preparedKeywordMatch:i,valid:!0}}).filter(GI);if(r.length===0)return null;let o=r.reduce((i,s)=>s.index<i.index?s:i);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,Ei.jsx)(p6,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var XI=b(De());var ES=b(I()),m6=({inputElement:e,children:t})=>{let n=z("TabCompletion",Po),[r,o]=Pm(e);return(0,ES.jsx)("mark",{ref:r,className:(0,XI.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Lm=class extends Eo{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,ES.jsx)(m6,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Fm=b(De());var an=b(Z());var CS=b(I()),QI=()=>(0,CS.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,CS.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 Kr=b(Z());var JI=b(X0());var ZI={root:"dd-ky-Bv",content:"dd-kV5e1"};function Dm(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(i){return null}}function TS(e){return e.replace("https://www.","").replace("https://","")}var Qn=b(I()),g6=3,h6=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),y6=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=g6})=>{let i=z("LinkSearch",ZI),[s,a]=(0,Kr.useState)(""),l=Ee(),c=G(ZP("url")),u=G(Kb("URL")),f=(0,Kr.useMemo)(()=>u.map(h6),[u]),[d,p]=(0,Kr.useState)(f.length-1),m=X("fallbackImage"),g=S=>{let x=S.target;a(x.value)},v=(S,x)=>{S.stopPropagation(),S.preventDefault(),window.open(x,"_blank")},h=S=>{var C;let x=d-1<0?f.length-1:d-1,T=d+1===f.length?0:d+1;S.code==="Escape"&&(a(""),t()),S.code==="ArrowUp"&&p(x),S.code==="ArrowDown"&&p(T),S.code==="Enter"&&e(((C=f[d])==null?void 0:C.text)||s)},y=(0,Kr.useCallback)((0,JI.default)(S=>{l(Fi({query:S,type:"URL",tags:["link-search"]}))},300),[]);return(0,Kr.useEffect)(()=>{s&&y(s)},[s]),(0,Kr.useEffect)(()=>()=>{l(kd())},[]),(0,Qn.jsxs)("div",{className:i.root,children:[(0,Qn.jsx)(Tt,{withDivider:!0,children:(s?f:c).slice(0,o).map((S,x)=>(0,Qn.jsx)(pe,{selected:d===x,onClick:()=>e(S.text),"data-testid":"linksearch-suggestion",children:(0,Qn.jsxs)(we,{children:[(0,Qn.jsx)(we.Image,{src:Dm(S,"small",m||void 0),title:S.title||S.text}),(0,Qn.jsxs)(we.Content,{className:i.content,cropText:!0,children:[(0,Qn.jsx)(we.Title,{children:S.title||TS(S.text)}),S.title&&TS(S.text)]}),(0,Qn.jsx)(pe.Actions,{children:(0,Qn.jsx)(pe.ActionButton,{label:r,onClick:T=>v(T,S.text)})})]})},S.text))}),(0,Qn.jsx)($c,{value:s,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:h})]})},eA=y6;var kS={};ht(kS,{enUS:()=>v6,nlNL:()=>S6});var v6={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}],addToPersonalCollection:[{type:0,value:"Add to Personal Collection"}]},S6={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}],addToPersonalCollection:[{type:0,value:"Toevoegen aan Personal Collection"}]};var Ot=b(I()),x6=(0,an.forwardRef)((e,t)=>{let n=z("TabCompletion",Po);return(0,Ot.jsx)("mark",{ref:t,className:(0,Fm.default)(n.matchSelection)},"selection-start")}),w6=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=se(kS),s=z("TabCompletion",Po),a=X("addToPersonalCollection"),l=G(Uo("/admin/personal-collection/new")),c=(0,an.useRef)(null),u=(0,an.useRef)(null),[f,d]=(0,an.useState)(null),p=Ee(),m=wp(document.activeElement===r),[g]=(0,an.useState)(()=>document.createRange());m.triggerRef.current=g,(0,an.useEffect)(()=>()=>g.detach(),[]),(0,an.useEffect)(()=>{let h=e.current,y=c.current;!h||!y||(g.setStart(h,0),g.setEnd(y,0))},[e.current,c.current]),di(()=>{m.close()});let v=(0,an.useCallback)(h=>{let y=g.toString(),S=/^http(s?):\/\//.test(h)?h:`https://${h}`,x=`[${y}](${S})`;p(kn({text:x,suggestion:{text:x,source:"search-url",type:"url"},eventMetrics:{inputType:"mouse"},replace:"selection"}))},[]);return(0,Ot.jsxs)("span",{children:[(0,Ot.jsx)("mark",{ref:c,className:(0,Fm.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":m.opened?"true":"false",children:o}),m.opened&&(0,Ot.jsx)(Aa,{className:s.popoverRoot,triggerRef:m.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ot.jsxs)(Mm,{style:n,ref:u,children:[(0,Ot.jsxs)("div",{className:(0,Fm.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:f!==null}),children:[(0,Ot.jsxs)("button",{type:"button",tabIndex:f===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>d("insertLink"),children:[(0,Ot.jsx)(QI,{}),(0,Ot.jsx)("span",{children:"\xA0"}),(0,Ot.jsx)("span",{children:i("insertLink")})]}),a&&l&&(0,Ot.jsx)("button",{type:"button",tabIndex:f===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>{let h=g.toString(),y=`${l}?text=${encodeURIComponent(h)}`;window.open(y,"_blank")},children:(0,Ot.jsx)("span",{children:i("addToPersonalCollection")})})]}),f==="insertLink"&&(0,Ot.jsx)(eA,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{d(null),m.close()}})]})})]},"selection-end")},zm=class extends Eo{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,an.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let i=this.foundIndex===0?r:o,s=i>=this.charCount&&i<=this.charCount+n.length?{index:i-this.charCount,length:0,match:"",valid:!0}:null;s&&this.foundIndex++;let a=this.foundIndex===1;return s&&a?this.charCount+=i-this.charCount:this.charCount+=n.length,s?E({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,Ot.jsx)(x6,{ref:this.startRef}):(0,Ot.jsx)(w6,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var Io=b(I()),b6=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let c=z("TabCompletion",jI),u=X("insertLink"),f=X("addToPersonalCollection"),d=X("showMidSentenceSuggestions"),p=X("inlineSuggestions"),m=VI(a),g=(0,Ao.useRef)(null),v=G(Pt);(0,Ao.useEffect)(()=>{Ts(a)&&m&&WI(a,m)},[m]);let h=(0,Ao.useCallback)(x=>{if(!o||!n)return x;let T=[(0,Io.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,Io.jsx)("span",{"data-testid":"tab-completion",className:(0,Hm.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&T.push((0,Io.jsx)("span",{className:(0,Hm.default)(c.hint,c.resetIndent),children:(0,Io.jsx)(Uu,{keyCode:"tab"},"tabHint")},"tabHint")),wS(x,T)},[o,n,r]),y=(0,Ao.useMemo)(()=>{let x=[];return(u||f)&&x.push(new zm("selection")),x.push(new Lm("placeholders")),i&&x.push(new Nm("keywords")),x},[p,u,f,i]),S=(0,Ao.useMemo)(()=>{let x=window.getComputedStyle(a);return{"--dd-color":x.color,"--dd-font-size":x.fontSize,"--dd-font-family":x.fontFamily,"--dd-font-variant":x.fontVariant}},[]);return!e||!v?null:(0,Io.jsxs)("div",{ref:x=>{x!=null&&x.parentElement&&(g.current=x==null?void 0:x.parentElement)},className:c.root,style:S,children:[(0,Io.jsx)(yi,{tagName:"span",containerTagName:"div",className:(0,Hm.default)(c.container,c.agentText),disableLineBreaks:Ts(a),content:t||"\u200B",onAfterParse:h,matchers:y,selection:m,keywordMatches:s,inputElement:a,inputStyle:S,boundaryRef:g,inlineSuggestionsOnlyAtEnd:!d}),(0,Io.jsx)("br",{})]},"tab-completion")},E6=e=>{var h,y,S;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=js({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",c=(h=t.html)!=null?h:ja(t.text),u=t.text.slice(t.suggestionTextStart,t.selection.end),f=a.indexOf(u)===0?a.slice(u.length):"",{showTabHint:d}=n,{isSupported:p}=i,{showTabCompletion:m,visible:g,showStyleSuggestions:v}=r;return{showTabHint:d,showStyleSuggestions:v,showTabCompletion:m&&jr(e),content:c,tabText:f,source:l,keywordMatches:(S=(y=o.list)==null?void 0:y.keywordMatches)!=null?S:[],enabled:g&&p!==!1}},tA=yw(E6)(b6);var Ci=b(Z());var C6={token:null,interval:null},RS=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),PS=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(RS()),setInterval(()=>r(RS()),n)}),nA=Re({name:"passwordlessToken",initialState:C6,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(RS.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(PS.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:rA}=nA.actions,oA=nA.reducer;function T6(e){return"buttonText"in e&&"eventName"in e}function iA(e){if(e)return T6(e)?{label:e.buttonText,event:e.eventName,value:e.payload}:e}function k6(e){return e==null?void 0:e.map(t=>iA(t))}function R6(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var sA=fn([bE,yd],(e,t)=>(t?e.filter(o=>!o.externalConversationId||o.externalConversationId===t):e).map(o=>{let i=iA(o.callToAction),s=k6(o.callToActions);return A(E(E(E({text:o.response,title:o.name},i?{callToAction:i}:{}),s!=null&&s.length?{callToActions:s}:{}),o.message!==void 0?{message:o.message}:{}),{editable:o.editable,isLoading:o.isLoading,evaluationId:o.evaluationId,rule:{id:R6(o.code),label:o.code,name:o.name,description:o.name}})}));var Bm=b(Z()),AS=b(De());var IS=b(I()),Za=()=>(0,IS.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,IS.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 aA={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Gr=b(I()),P6=({entities:e})=>{let t=z("EntitiesWidgetList",aA),[n,r]=(0,Bm.useState)(void 0),o=Ze(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ar(a.text),o("entity copied",{entity:a,type:"copy"}))};return(0,Bm.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Gr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Gr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Gr.jsx)("span",{className:t.entityText,children:a.text}),(0,Gr.jsxs)("span",{className:t.iconWrapper,children:[(0,Gr.jsx)("span",{className:(0,AS.default)(t.icon),children:(0,Gr.jsx)(Za,{})}),(0,Gr.jsx)("span",{className:(0,AS.default)(t.icon,n===l&&t.iconClicked),children:(0,Gr.jsx)(Za,{})})]})]},a.text))})},lA=P6;var _S=b(I()),cA=()=>(0,_S.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_S.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 hA=b(Z());var uA={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var dA={root:"dd-nazq3",rotation:"dd-3EHTv"};var pA=b(I()),I6=({size:e=12})=>{let t=z("LoadingSpinner",dA);return(0,pA.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},fA=I6;var MS=b(I()),mA=()=>(0,MS.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,MS.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 pu=b(I()),gA=e=>(0,pu.jsxs)("svg",A(E({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,pu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,pu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var NS={};ht(NS,{enUS:()=>A6,nlNL:()=>_6});var A6={error:[{type:0,value:"Something went wrong"}]},_6={error:[{type:0,value:"Er ging iets fout"}]};var Hn=b(I()),M6=3e3,N6=({assistantOptions:e})=>{let t=z("OnDemandAssistants",uA),n=se(NS),r=(0,hA.useRef)(),o=Ad(mn),i=G(vP),s=Ze(),a=i.filter(u=>u.isPinned),l=i.filter(u=>!u.isPinned),c=u=>M(null,null,function*(){clearTimeout(r.current),s("trigger on demand assistant",{assistantCode:u}),yield o.call(A(E({},e),{assistantCode:u})),r.current=setTimeout(()=>o.reset(),M6)});return i.length===0?null:(0,Hn.jsxs)("div",{className:t.root,children:[a.map(({assistant:u,assistantName:f,displayName:d})=>(0,Hn.jsx)("button",{type:"button",className:t.button,disabled:o.state==="loading",onClick:()=>c(u),children:d||f},u)),l.length>0&&(0,Hn.jsxs)(wt,{placement:"top-end",children:[(0,Hn.jsx)(wt.Trigger,{className:t.trigger,disabled:o.state==="loading",children:(0,Hn.jsx)(dm,{"data-testid":"trigger"})}),(0,Hn.jsx)(wt.Content,{className:t.nav,"data-testid":"popover",children:l.map(({assistant:u,assistantName:f,displayName:d})=>(0,Hn.jsx)(wt.Button,{className:t.item,disabled:o.state==="loading",onClick:()=>c(u),children:d||f},u))})]}),o.state==="loading"&&(0,Hn.jsx)(fA,{}),o.state==="done"&&(0,Hn.jsx)(gA,{"data-testid":"trigger-done"}),o.state==="error"&&(0,Hn.jsx)(ZR,{trigger:(0,Hn.jsx)(mA,{}),children:n("error")})]})},yA=N6;var mu={};ht(mu,{enUS:()=>O6,nlNL:()=>L6});var O6={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},L6={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var ks=b(Z());var OS={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",ctaMessage:"dd-ge8nB",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Lt=b(I()),D6=500,F6=100,z6=({content:e,onChange:t,onCopy:n})=>{let r=(0,ks.useRef)(null),o=z("WidgetCue",OS);return(0,ks.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,F6),D6);i.style.setProperty("height",`${s}px`)},[e]),(0,Lt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},H6=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let i=z("WidgetCue",OS),s=se(mu),a=Ze(),l=X("hasKeyboardInput"),[c,u]=(0,ks.useState)(e.text),f=v=>{let h=v?A(E({},e),{callToAction:v}):e;t&&t(c,h),n(e)},d=(v,h)=>{r&&r(v,e),h&&Bo(h,i.fadeup)},p=v=>{o&&o(v,e)},m=v=>{v.preventDefault(),v.stopPropagation(),n(e)};return(0,ks.useEffect)(()=>{a("Assistant response displayed",{evaluationId:e.evaluationId,assistantCode:e.rule.label,assistantOutput:e.text})},[]),(0,Lt.jsxs)(pe,{"data-testid":"cue",children:[(0,Lt.jsx)(we,{children:(0,Lt.jsxs)(we.Content,{children:[e.title&&(0,Lt.jsx)(we.Title,{className:i.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?s(e.rule.label):e.title}),e.message&&(0,Lt.jsx)("p",{className:i.ctaMessage,children:e.message}),e.editable?(0,Lt.jsx)(z6,{content:c,onCopy:()=>{let v=document.getSelection();v&&d(v.toString())},onChange:v=>{var h;return u((h=v.target.value)!=null?h:"")}}):(0,Lt.jsx)(is,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:d,onUse:l?p:void 0})]})}),(0,Lt.jsxs)(pe.ButtonsContainer,{children:[(0,Lt.jsxs)("div",{className:i.actions,children:[(0,Lt.jsx)(pe.Button,{onClick:v=>{var h;return d((h=Kd(c,"reply")[0])!=null?h:c,v.target)},variant:"primary",children:s("copyCue")}),e.callToAction&&(0,Lt.jsx)(pe.Button,{onClick:()=>f(),variant:"primary",children:e.callToAction.label}),(g=e.callToActions)==null?void 0:g.map((v,h)=>(0,Lt.jsx)(pe.Button,{onClick:()=>f(v),variant:"primary",children:v.label},`${v.event}-${v.label}-${h}`)),(0,Lt.jsx)(pe.Button,{onClick:m,variant:"secondary",children:s("removeCue")})]}),(0,Lt.jsx)(Qd,{evaluationId:e.evaluationId,assistantCode:e.rule.label,assistantOutput:e.text,feedbackText:e.text,feedbackType:"assistant"})]})]})},vA=H6;var Ja=b(I()),B6=({cues:e})=>{let t=Ee(),n=pn(),r=se(mu),o=Ze(),i=c=>{t(qd({code:c.rule.label})),o("Assistant response closed",{evaluationId:c.evaluationId,assistantCode:c.rule.label,assistantOutput:c.text})},s=(c,u)=>{Ar(c),o("Assistant response copied",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,copiedText:c})},a=(c,u)=>{var f;u.callToAction&&(t(Gd(u)),o("Assistant call to action",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,eventName:u.callToAction.event,value:(f=u.callToAction.value)!=null?f:c}))},l=(c,u)=>{var f;n.send(eo,{text:c,suggestion:{source:"assistant",assistantCode:(f=u.rule)==null?void 0:f.label,sourceText:c}}),o("Assistant response used",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,usedText:c})};return(0,Ja.jsx)(Ja.Fragment,{children:e.map(c=>c.isLoading?(0,Ja.jsx)(Ep,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Ja.jsx)(vA,{cue:c,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},c.evaluationId))})},SA=B6;var Um=b(Z());var xA={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var En=b(I());function U6(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var wA=({data:e,schema:t})=>{let n=z("WidgetCustomData",xA),r=o=>{Ar(o)};return(0,Um.useEffect)(()=>{te.info("Custom data",e,t)},[e]),(0,En.jsx)("dl",{className:n.root,children:t.map(o=>{let i=U6(e,o.path);return(0,En.jsxs)(Um.Fragment,{children:[(0,En.jsx)("dt",{className:n.label,children:o.label}),(0,En.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,En.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,En.jsx)("span",{className:n.isFalse,children:o.falseValue}):o.type==="array"&&Array.isArray(i)&&i.length>0?(0,En.jsxs)("button",{type:"button",onClick:()=>r(i.join(", ")),className:n.copyButton,children:[(0,En.jsx)("span",{className:n.copyButtonText,children:i.join(", ")}),(0,En.jsx)(Za,{})]}):typeof i=="string"||typeof i=="number"?(0,En.jsxs)("button",{type:"button",onClick:()=>r(`${i}`),className:n.copyButton,children:[(0,En.jsx)("span",{className:n.copyButtonText,children:i}),(0,En.jsx)(Za,{})]}):"-"})]},o.label)})})};var EA=b(Z());var V6=/(https?:\/\/[^\s]+)/,bA=e=>e.split(" ").find(t=>V6.test(t));var Zn=b(I()),W6=({suggestion:e,lines:t,onUse:n})=>{var f;let r=e.text||e.url||e.message,o=bA(r),i=se(ou),s=X("showImages"),a=X("fallbackImage"),l=X("hasKeyboardInput"),c=d=>{d.preventDefault(),d.stopPropagation(),l&&n(r)},u=(0,EA.useCallback)(d=>{window.open(o,"_blank"),d.stopPropagation(),d.preventDefault()},[o]);return(0,Zn.jsxs)(pe,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,Zn.jsxs)(we,{children:[s&&e.image&&(0,Zn.jsx)(we.Image,{src:Dm(e,"small",a||void 0),title:e.title}),(0,Zn.jsxs)(we.Content,{children:[e.title&&(0,Zn.jsx)(we.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((f=e.searchKeywords)==null?void 0:f.length)>0&&(0,Zn.jsx)(pe.Labels,{labels:e.searchKeywords}),(0,Zn.jsx)(we.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Zn.jsxs)(pe.Actions,{children:[o&&(0,Zn.jsx)(pe.ActionButton,{onClick:u,label:i("visitUrl")}),l&&(0,Zn.jsx)(pe.ActionButton,{primary:!0,onClick:c,label:i("useSuggestion")})]})]})},CA=W6;var gu=b(I()),$6=({lines:e,suggestions:t})=>{let n=pn(),r=(o,i)=>{n.send(eo,{text:o,suggestion:A(E({},i),{source:i.source,sourceText:i.text})})};return(0,gu.jsx)(gu.Fragment,{children:t.map(o=>(0,gu.jsx)(CA,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},TA=$6;var hu={};ht(hu,{enUS:()=>j6,nlNL:()=>K6});var j6={waiting:[{type:0,value:"Loading\u2026"}],waitingForConversation:[{type:0,value:"Waiting for conversation\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}],close:[{type:0,value:"Close"}]},K6={waiting:[{type:0,value:"Laden\u2026"}],waitingForConversation:[{type:0,value:"Wachten op gesprek\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}],close:[{type:0,value:"Sluiten"}]};var el={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var ce=b(I()),kA=(e,t)=>{let n=G(Pt);(0,Ci.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},G6=({onLogIn:e})=>{let t=z("Widget",el),n=X("isEmbedded"),r=X("adminUrl");return(0,ce.jsx)("div",{className:t.loginText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)(Tm,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},LS=({text:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.stateText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)("p",{children:e})})},"notification")},q6=()=>{let e=se(hu),t=Ee(),n=z("Widget",el),r=X("showSearch"),o=X("isEmbedded"),i=G(Uo("/admin/")),s=pn(),a=X("productName"),l=Ze();return kA(()=>{if(o)return t(PS()),()=>{t(rA())}},[t,o]),!r&&!i?null:(0,ce.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ce.jsx)(pe.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ce.jsx)(Ga,{}),onClick:()=>{s.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),i&&(0,ce.jsx)(pe.Button,{as:"a",target:"_blank",icon:(0,ce.jsx)(cA,{}),href:i,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:a}),className:n.shortcut,rel:"noreferrer",onClick:()=>{l("open my deepdesk",{via:"widget-shortcut"})},children:e("linkStudioLogin",{productName:a})})]})},Y6=({title:e,content:t})=>{let n=se(hu),[r,o]=(0,Ci.useState)(!0);return r?(0,ce.jsx)(Tr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsxs)(pe,{children:[(0,ce.jsx)(we,{children:(0,ce.jsx)(we.Content,{children:(0,ce.jsx)(is,{content:t})})}),(0,ce.jsx)(pe.ButtonsContainer,{children:(0,ce.jsx)(pe.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},X6=()=>{let e=Ee(),t=G(Gc),n=G(xP),r=G(sA),o=G(Lb),i=G(um),s=G(mm),a=G(mi),l=G(Pr);return(0,Ci.useEffect)(()=>{o&&!n&&te.warn("Custom data provided, but no schema.")},[o,n]),kA(()=>{t.forEach(({type:c})=>{c==="entities"?e(vr()):ju.includes(c)||e(Sr(c))})},[e,l,a]),(0,Ci.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&te.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ce.jsx)(Ci.Fragment,{children:t.map(({type:c,title:u,amount:f,lines:d,schema:p,property:m})=>{var g,v;switch(c){case"entities":return i&&i.length>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(lA,{entities:i})},c);case"cues":return r&&r.length>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(SA,{cues:r})})},c);case"custom-data-banner":return o&&m&&o[m]&&(0,ce.jsx)(Y6,{title:u,content:String(o[m])},c);case"custom-data":return o&&p&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(wA,{data:o,schema:p})})},c);default:return((v=(g=s[c])==null?void 0:g.suggestions)==null?void 0:v.length)>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(TA,{lines:d,contentType:c,suggestions:s[c].suggestions.slice(0,f)||[]})})},c)}})})},DS=({children:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.footer,children:e})},FS=({children:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},Q6=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript"}})=>{let r=se(hu),o=G($s),i=G(Pt),s=G(yd),a=G(mi),l=G(SP("knowledge-assist")),c=G(wP);return o===!1?(0,ce.jsx)(LS,{text:r("notSupported")}):i===!1?(0,ce.jsx)(G6,{onLogIn:e}):i===null?(0,ce.jsx)(LS,{text:r("waiting")}):!s||!a?(0,ce.jsx)(LS,{text:r("waitingForConversation")}):(0,ce.jsx)(FS,{children:(0,ce.jsxs)(Yp,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:void 0,evaluateKnowledgeAssistFn:Hl,children:[(0,ce.jsxs)(Hs,{children:[(0,ce.jsx)(q6,{}),(0,ce.jsx)(X6,{}),l&&(0,ce.jsx)(Qp,{title:l.title,emptyState:t.emptyState})]}),(0,ce.jsxs)(DS,{children:[l&&(0,ce.jsx)(Xp,{}),(0,ce.jsx)(yA,{assistantOptions:n})]})]})})},RA=Q6;function tl(e){let t=new Range;return t.selectNodeContents(e),t}function PA(e,t,n){try{return Ti(e,t,n),!0}catch(r){return!1}}function Vm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Wm(e){return"tagName"in e&&e.tagName==="BR"}var yu=/[\u200B-\u200D\uFEFF]/g;function Ti(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,c){let u=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return c;for(let d=0;d<=l.length;d++)if(f.test(l[d])||u++,u===c)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(yu,""),f=o+u.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let m=s(c,t-o);m===0&&!p?r.setStartBefore(l):r.setStart(l,m)}p&&(r.setEnd(l,s(c,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(Wm(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!i);u++);let c=l.lastChild;Vm(l)&&c&&!Vm(c)&&!Wm(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function vu(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,c=0;function u(f){let d=f===e,p=f===n,m=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let g=f.textContent;p&&(a=c+g.substring(0,r).replace(yu,"").length),m&&(l=c+g.substring(0,i).replace(yu,"").length),c+=g.replace(yu,"").length;break}case Node.ELEMENT_NODE:{if(Wm(f)&&f.nextSibling){c++;break}!d&&Vm(f)&&f.previousSibling&&c++;for(let g=0;g<f.childNodes.length;g++){let v=p&&g===r,h=m&&g===i;if(v&&(a=c),h&&(l=c),l!==void 0||((!v||!s)&&u(f.childNodes[g]),m&&g===i-1&&(l=c),l!==void 0))break}m&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function Su(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a=0,l="";function c(u){let f=u===e,d=u===n,p=u===o;switch(d&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let m=d?r:0,g=p?i:void 0;l+=u.textContent.replace(yu,"").substring(m,g);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&Wm(u)&&u.nextSibling){l+=`
81
+ c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var gS=b(I()),H5={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},uI=({className:e,color:t})=>(0,gS.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,gS.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:H5[t||"pink"]})});var dI={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var hS={};ht(hS,{enUS:()=>B5,nlNL:()=>U5});var B5={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},U5={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var bs=b(I()),pI=({onLogIn:e})=>{let t=se(hS),n=X("floatingMenu"),r=X("productName"),o=we(),i=G(Pt),s=z("FloatingMenu",dI);if(i===null||n===!1)return null;let a=()=>{i===!0?o(ir(!0)):e()};return(0,bs.jsxs)("button",{type:"button",className:(0,fI.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,bs.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,bs.jsxs)("div",{className:s.icon,children:[(0,bs.jsx)(uI,{className:s.logo,color:"pink"}),i===!1&&(0,bs.jsx)(cI,{className:s.lock})]})]})};var Cm=b(Z());function jr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input;return i.end<e.input.suggestionTextStart||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 V5={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},ym=({ui:e})=>e.overlayCollapsed,mI=Re({name:"ui",initialState:V5,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(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:lu,setInputFocus:vm,setOverlayCollapsed:Si,setOpenOverlayWhenTyping:gI,setOverlayCollapsedUserOverwrite:hI}=mI.actions,yI=mI.reducer;var vI={styleRow:"dd-prYfH",styleSuggestion:"dd-JTmXy"};var cu=b(I()),W5=({match:e,selected:t,styles:n})=>(0,cu.jsx)(pe,{as:"button",selected:t,className:n.styleRow,"data-testid":"style-suggestion-item",title:e.suggestion,children:(0,cu.jsx)("span",{className:n.styleSuggestion,children:e.suggestion})}),$5=({matches:e,selectedIndex:t})=>{let n=z("StyleSuggestionList",vI);return(0,cu.jsx)(Tt,{children:e.map((r,o)=>(0,cu.jsx)(W5,{match:r,selected:t===o,styles:n},`${r.keyword}-${o}`))})},Sm=$5;var CI=b(Z());var xi=b(Z());var SI=b(Z());function xI(e,t,n){(0,SI.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var wI={root:"dd-1MBCO",actions:"dd--x4cy",closeIconContainer:"dd-1z5NR",closeIcon:"dd-8qMF-",badge:"dd-4Fpkz",formattedText:"dd-EzvTB",assistantContainer:"dd-j6o8F",formattedTextTruncated:"dd-fv169",assistantBadge:"dd-VD57E"};var uu=b(I()),bI=({title:e})=>(0,uu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18px",height:"18px",viewBox:"0 0 24 24","aria-labelledby":"closeTitle",children:[(0,uu.jsx)("title",{id:"closeTitle",children:e}),(0,uu.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]});var yS={};ht(yS,{enUS:()=>j5,nlNL:()=>K5});var j5={assistant:[{type:0,value:"Assistant"}],close:[{type:0,value:"Close"}]},K5={assistant:[{type:0,value:"Assistent"}],close:[{type:0,value:"Sluiten"}]};var zn=b(I()),q5=["search","personal-collection-search","search-autocomplete"];function Y5(e,t,n,r={}){var i;let o="";return q5.includes(t)?o=NP(aS(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=aS(e,n,r),r.placeholders===!0&&(o=OP(o)),o}var X5=()=>{},Q5=({selected:e,suggestion:t})=>{let n=se(yS),r=X("inlineSuggestions"),o=G(Ni),[i,s]=(0,xi.useState)(!1),a=X("enableSuggestionFeedback"),l=G(v=>v.input.text),c=we(),u=z("TextSuggestion",wI),f=(0,xi.useRef)(null),d=t.source==="assistant",p=a&&!d;(0,xi.useEffect)(()=>{let v=setTimeout(()=>{c(Cb({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(v)}},[t]),xI(f,"click",()=>{c(kn({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let m=()=>{c(Li({source:t.source,text:t.text,assistantCode:t.assistantCode}))},g=(0,xi.useMemo)(()=>Y5(t.text,t.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:t.searchKeywords}),[r,t.text,t.source,o,t.searchKeywords]);return t.source==="gpt"&&!r?null:(0,zn.jsxs)("div",{className:u.root,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,zn.jsx)(pe,{ref:f,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:X5,children:t.source==="assistant"?(0,zn.jsxs)("div",{className:u.assistantContainer,children:[(0,zn.jsx)(yi,{containerTagName:"div",tagName:"span",className:u.formattedTextTruncated,content:g}),(0,zn.jsx)("span",{className:u.assistantBadge,children:n("assistant")})]}):(0,zn.jsx)(yi,{containerTagName:"div",tagName:"span",className:u.formattedText,content:g})}),p&&i&&(0,zn.jsx)("div",{className:u.actions,children:(0,zn.jsx)(pm,{source:"overlay",context:l,suggestion:t})}),d&&i&&(0,zn.jsx)("div",{className:u.closeIconContainer,children:(0,zn.jsx)("button",{type:"button",className:u.closeIcon,onClick:m,title:n("close"),children:(0,zn.jsx)(bI,{title:n("close")})})})]})},EI=Q5;var TI=b(I()),Z5=({suggestions:e,selectedIndex:t,reverse:n})=>(0,CI.useMemo)(()=>{let o=e.map((i,s)=>(0,TI.jsx)(EI,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),xm=Z5;var kI={root:"dd-PfvRI",paper:"dd-HYlyY"};var wm={list:{keywordMatches:[]},fetchState:"idle"},bm=e=>e.styleSuggestions.list,Es=ge("styleSuggestions/getAll",(n,r)=>M(null,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,i=t.getState(),{showStyleSuggestions:s}=i.settings,a=(l=i.conversation.current)==null?void 0:l.profileCode;if(!s)return wm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),RI=Re({name:"styleSuggestions",initialState:wm,reducers:{commitStyleSuggestion(e,t){let{keyword:n,suggestion:r}=t.payload;e.list.keywordMatches=e.list.keywordMatches.filter(o=>o.keyword.toLowerCase()!==n.toLowerCase()||o.suggestion!==r)}},extraReducers:e=>{e.addCase(Es.pending,t=>{t.fetchState="loading"}).addCase(Es.rejected,t=>{t.fetchState="error"}).addCase(Es.fulfilled,(t,n)=>{t.fetchState="done",zo(t.list,n.payload)||(t.list=n.payload)}).addCase(Di,t=>{t.list=wm.list}).addCase(lt,()=>wm)}}),{commitStyleSuggestion:PI}=RI.actions,II=RI.reducer;var Em=e=>{let t=new Set;return e.filter(({keyword:n,suggestion:r})=>{let o=JSON.stringify([n.toLowerCase(),r]);return t.has(o)?!1:(t.add(o),!0)})};var Cs=b(I()),J5=()=>{var v;let e=(0,Cm.useRef)(null),t=z("InlineSuggestionsOverlay",kI),n=G(jr),r=we(),o=G(Pt),i=G($s),s=G(ym),a=X("showTextSuggestions"),l=G(Oi),c=G(xl),u=X("showStyleSuggestions"),f=X("showStyleSuggestionList"),d=G(bm),p=u&&f?Em((v=d.keywordMatches)!=null?v:[]):[],m=p.length>0,g=a&&l.length>0;return di(()=>{setTimeout(()=>{r(Si({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Cm.useEffect)(()=>{let h=e.current;if(!h||!h.parentElement)return;h.parentElement.style.left="0px";let y=h.getBoundingClientRect();h.parentElement.style.left=`${Math.min(window.innerWidth-4-y.right,0)}px`}),s||o!==!0||i===!1||!n&&!m||!g&&!m?null:(0,Cs.jsx)("div",{className:t.root,"data-variant":"inline",children:(0,Cs.jsxs)("div",{ref:e,className:t.paper,children:[m&&(0,Cs.jsx)(Sm,{matches:p,selectedIndex:-1}),g&&(0,Cs.jsx)(Tt,{children:(0,Cs.jsx)(xm,{suggestions:l,selectedIndex:c})})]})})},AI=J5;var wi=b(Z());var _I={root:"dd-7zvcP",dialogContent:"dd-4C0lK",continueButton:"dd-YUPQW",buttonContinueWrapper:"dd-IKpYs",nicknameInput:"dd-rxhGp",titleWrapper:"dd-nw3nD",title:"dd-5iof5",closeButtonWrapper:"dd-UUAzA",closeButton:"dd-7rjP5",buttonsWrapper:"dd-5e9Xb",errorMessage:"dd--5VgX",errorLink:"dd-u461n"};var vS={};ht(vS,{enUS:()=>e6,nlNL:()=>t6});var e6={title:[{type:0,value:"Enter your nickname"}],close:[{type:0,value:"Close"}],nicknameDialogTitle:[{type:0,value:"Please enter the name you'd like customers to see during chat conversations. This nickname will be used across your Deepdesk environment."}],nicknameDialogInputPlaceholder:[{type:0,value:"Enter your nickname"}],nicknameDialogContinueButton:[{type:0,value:"Continue"}],nicknameDialogError:[{type:0,value:"Nickname cannot be empty or spaces only"}],nicknameDialogEmojiError:[{type:0,value:"You cannot use emojis in this field."}],nicknameDialogSaveError:[{type:0,value:"We couldn't save your details just now. Please try again, or update it at "},{type:1,value:"account"},{type:0,value:".deepdesk.com/admin/user-settings"}],nicknameDialogSaveErrorWithoutLink:[{type:0,value:"We couldn\u2019t save your details just now. Please try again later, or update them in My Deepdesk \u2192 Settings."}]},t6={title:[{type:0,value:"Voer je bijnaam in"}],close:[{type:0,value:"Sluiten"}],nicknameDialogTitle:[{type:0,value:"Voer de naam in die je wilt dat klanten zien tijdens chatgesprekken. Deze bijnaam wordt gebruikt in je Deepdesk-omgeving."}],nicknameDialogInputPlaceholder:[{type:0,value:"Voer je bijnaam in"}],nicknameDialogContinueButton:[{type:0,value:"Doorgaan"}],nicknameDialogError:[{type:0,value:"Bijnaam mag niet leeg of alleen spaties zijn"}],nicknameDialogEmojiError:[{type:0,value:"Je kunt geen emoji's gebruiken in dit veld."}],nicknameDialogSaveError:[{type:0,value:"We konden je gegevens nu niet opslaan. Probeer het opnieuw of werk het bij op "},{type:1,value:"account"},{type:0,value:".deepdesk.com/admin/user-settings"}],nicknameDialogSaveErrorWithoutLink:[{type:0,value:"We konden je gegevens nu niet opslaan. Probeer het opnieuw later, of werk ze bij in My Deepdesk \u2192 Instellingen."}]};var ft=b(I()),MI=({onClose:e,onSave:t,id:n,error:r})=>{let[o,i]=(0,wi.useState)(""),[s,a]=(0,wi.useState)(!1),[l,c]=(0,wi.useState)(!1),u=z("Nickname",_I),f=wi.default.useRef(null),d=G(h=>h.info.showNicknameDialog),p=se(vS),m=X("adminUrl");(0,wi.useEffect)(()=>{r&&a(!0)},[r]);let g=()=>{if(!f.current)return;o.trim()?f.current.setCustomValidity(""):f.current.setCustomValidity(p("nicknameDialogError")),f.current.reportValidity()},v=h=>{h.preventDefault();let y=o.trim(),S=h.currentTarget.querySelector("#nickname-input");if(!y){S.setCustomValidity(p("nicknameDialogError")),S.reportValidity();return}S.setCustomValidity(""),t(y)};return(0,ft.jsxs)($a,{isOpen:d,"datatest-id":n,onClose:e||(()=>{}),onBack:e||(()=>{}),children:[(0,ft.jsx)("div",{className:u.titleWrapper,children:(0,ft.jsx)("h1",{className:u.title,children:p("title")})}),(0,ft.jsxs)("form",{className:u.dialogContent,onSubmit:v,children:[(0,ft.jsx)("p",{children:p("nicknameDialogTitle")}),s&&r&&(0,ft.jsx)("div",{className:u.errorMessage,children:m?(()=>{let h=p("nicknameDialogSaveError",{account:m}),y=`${m}.deepdesk.com/admin/user-settings`,S=h.indexOf(y);if(S!==-1){let x=h.substring(0,S),T=h.substring(S+y.length);return(0,ft.jsxs)(ft.Fragment,{children:[x,(0,ft.jsx)("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:u.errorLink,children:y}),T]})}return h})():p("nicknameDialogSaveErrorWithoutLink")}),(0,ft.jsx)("input",{required:!0,minLength:1,maxLength:20,"data-testid":"nickname-input",id:"nickname-input",className:u.nicknameInput,type:"text",placeholder:p("nicknameDialogInputPlaceholder"),value:o,onChange:h=>{c(new RegExp("\\p{Extended_Pictographic}","u").test(h.target.value)),i(h.target.value)},onBlur:g,ref:f}),l&&(0,ft.jsx)("div",{className:u.errorMessage,role:"alert",children:p("nicknameDialogEmojiError")}),(0,ft.jsxs)("div",{className:u.buttonsWrapper,children:[r?(0,ft.jsx)("div",{className:u.closeButtonWrapper,children:(0,ft.jsx)("button",{type:"button",className:u.closeButton,onClick:()=>e==null?void 0:e(),children:p("close")})}):null,(0,ft.jsx)("div",{className:u.buttonContinueWrapper,children:(0,ft.jsx)("button",{type:"submit",className:u.continueButton,disabled:!o.trim()||new RegExp("\\p{Extended_Pictographic}","u").test(o),children:p("nicknameDialogContinueButton")})})]})]})]})};var du=b(I()),n6=({children:e})=>{let n=X("locale").replace("-","");return(0,du.jsx)(xh.Provider,{value:n,children:e})},r6=({store:e,customStyles:t={},children:n})=>(0,du.jsx)(Sw,{store:e,children:(0,du.jsx)(n6,{children:(0,du.jsx)(cl.Provider,{value:t,children:n})})}),ko=r6;var km=b(De()),Ya=b(Z());var NI=b(Z());function OI(e,t){let[n,r]=(0,NI.useState)(()=>{if(typeof window=="undefined")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return te.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){te.error(s)}}]}var LI=()=>/Mac/i.test(navigator.platform);var FI=b(De()),Ro=b(Z());var SS={};ht(SS,{enUS:()=>o6,nlNL:()=>i6});var o6={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"}]}]},i6={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 DI={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var bi=b(I()),xS=(e,t,n)=>r=>(0,bi.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),s6=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=se(SS),s=pn(),a=z("Login",DI),l=X("productName"),c=(0,Ro.useCallback)(v=>{v.preventDefault(),r&&r(Number.parseInt(v.target.value,10))},[]),u=(0,Ro.useCallback)(v=>{v.preventDefault(),s.send(Ys,!0)},[t]),f=(0,Ro.useMemo)(()=>v=>(0,bi.jsx)("a",{onClick:y=>{y.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:v},"login"),[t]),d=(0,Ro.useCallback)(v=>(0,bi.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:v},"prompt"),[u]),{min:p,hour:m,day:g}=(0,Ro.useMemo)(()=>({min:xS(a,600,c),hour:xS(a,3600,c),day:xS(a,3600*12,c)}),[]);return(0,bi.jsxs)("div",{className:(0,FI.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,bi.jsxs)(Ro.Fragment,{children:[(0,bi.jsx)("br",{}),i("snooze",{min:p,hour:m,day:g})]})]})},Tm=s6;var zI={root:"dd-DoQhb",text:"dd-Jwnev"};var fu=b(I()),a6=({title:e})=>{let t=z("SearchTrigger",zI),n=we(),r=Ze();return(0,fu.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(ir(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,fu.jsx)(Ga,{}),(0,fu.jsx)("span",{className:t.text,children:e})]})},HI=a6;var wS={};ht(wS,{enUS:()=>l6,nlNL:()=>c6});var l6={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"}],dismiss:[{type:0,value:"Dismiss"}],dismissError:[{type:0,value:"Dismiss error"}]},c6={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"}],dismiss:[{type:0,value:"Sluiten"}],dismissError:[{type:0,value:"Foutmelding sluiten"}]};var BI={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2",loginError:"dd-KCXeb",loginErrorMessage:"dd-Bv-BG",loginErrorDismiss:"dd-iSCjU"};var Me=b(I()),u6=({onLogIn:e})=>{var W;let t=z("SuggestionsOverlay",BI),n=se(wS),r=G(jr),o=G(Eb),i=we(),s=(0,Ya.useRef)(null),a=X("searchTriggerKey"),l=X("productName"),c=G(ym),u=G(Pt),f=G(db),d=G($s),[p,m]=(0,Ya.useState)(null),g=X("showSearch"),v=X("showTextSuggestions"),h=X("adminUrl"),y=X("isEmbedded"),S=X("suggestionsPlacement"),[x,T]=OI("dd-snooze-until-ms",0),C=c||x>Date.now(),k=G(Oi),R=G(xl),O=X("showStyleSuggestions"),L=X("showStyleSuggestionList"),U=G(bm),J=O&&L?Em((W=U.keywordMatches)!=null?W:[]):[],Y=J.length>0,_=k.filter(N=>N.source!=="gpt").length,V=()=>{C&&T(0),i(hI(!C))},B=N=>{let q=Date.now()+N*1e3;T(q),te.info(`Snooze until: ${new Date(q)}`),i(Si({collapse:!0}))};return(0,Ya.useEffect)(()=>{_===0&&m(null)},[k,_]),di(()=>{i(Si({collapse:!0,skipWhenInputFocus:!0}))}),u===null||d===!1?null:u===!1?(0,Me.jsxs)("div",{ref:s,className:(0,km.default)(t.root,{[t.isCollapsed]:C}),children:[!C&&(0,Me.jsxs)("div",{className:t.triggers,children:[(0,Me.jsx)("div",{style:{flex:1}}),(0,Me.jsx)("div",{className:t.triggersRight,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("collapse"),onClick:V,isCollapsed:!1})})]}),(0,Me.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("open",{productName:l}),onClick:V,isCollapsed:!0})}),(0,Me.jsxs)("div",{className:t.collapsible,children:[f&&(0,Me.jsxs)("div",{className:t.loginError,children:[(0,Me.jsx)("span",{className:t.loginErrorMessage,children:f}),(0,Me.jsx)("button",{type:"button",className:t.loginErrorDismiss,onClick:()=>i(hd()),"aria-label":n("dismissError"),children:n("dismiss")})]}),(0,Me.jsx)(Tm,{loginUrl:h,isEmbedded:y,onLogIn:e,onSnooze:B})]})]}):!o||!r&&!Y?null:(0,Me.jsxs)("div",{ref:s,className:(0,km.default)(t.root,{[t.isCollapsed]:C}),children:[!C&&(0,Me.jsxs)("div",{className:t.triggers,children:[(0,Me.jsx)("div",{style:{flex:1},children:g&&(0,Me.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(n(LI()?"searchHintMac":"searchHintWindows",{searchTriggerKey:a.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,Me.jsx)(HI,{title:n("search")})})}),(0,Me.jsxs)("div",{className:t.triggersRight,onFocus:()=>{},children:[(0,Me.jsx)("div",{className:(0,km.default)(!p&&t.hintsHidden,t.hints),children:p}),(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("collapse"),onClick:V,isCollapsed:!1})]})]}),(0,Me.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Me.jsx)(Ii,{className:t.toggleButton,title:n("open",{productName:l}),onClick:V,isCollapsed:!0})}),(Y||_>0&&v)&&(0,Me.jsxs)("div",{className:t.collapsible,onFocus:()=>{},children:[Y&&(0,Me.jsx)(Sm,{matches:J,selectedIndex:-1}),_>0&&v&&(0,Me.jsx)(Tt,{children:(0,Me.jsx)(xm,{suggestions:k,selectedIndex:R,reverse:S==="above"})})]})]})},UI=u6;var Hm=b(De());var Ao=b(Z());var Xa=b(Z());function Rm(e){return e.contentEditable==="true"}function d6(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 VI(e){let{selectionStart:t,selectionEnd:n}=Rm(e)?d6(e):e;return[t,n]}function WI(e){let[,t]=(0,Xa.useState)(),n=(0,Xa.useRef)(null);return n.current=VI(e),(0,Xa.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=VI(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 $I(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match($u);if(!s||s.length===0)return;let a=0;s.find(l=>{let c=r.indexOf(l,a);return o>c&&i<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var jI=b(Z()),f6=["div","span","mark","strong","b","i","u","em"];function bS(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(f6.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,jI.cloneElement)(r,{children:bS(s,t,n+1)})]}return[...e,...t]}function Ts(e){return e.tagName.toLowerCase()==="textarea"}var KI={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var XI=b(De());var Om=b(Z());var Qa=b(Z());function GI(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Pm(e){let t=(0,Qa.useRef)(null),[n,r]=(0,Qa.useState)(!1);return(0,Qa.useEffect)(()=>{var u;let o=!1,i=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[s,a]=GI((f,d)=>{let p=t.current;if(!p)return;let m=f/i,g=d/i,v=p.getBoundingClientRect(),h=m>v.x&&m<v.x+v.width&&g>v.y&&g<v.y+v.height;h&&!o?(o=!0,r(!0)):!h&&o&&(o=!1,r(!1))},({clientX:f,clientY:d})=>[f,d]),[l,c]=GI(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function Im(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Am(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function qI(e){return e!=null}var YI=b(De()),_m=b(Z());var Po={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var ES=b(I()),Mm=(0,_m.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=ie(i,["className","children"]);let s=(0,_m.useRef)(null),a=z("TabCompletion",Po);return(0,ES.jsx)("div",A(E({ref:Am([s,r]),className:(0,YI.default)(e,a.popoverContentContainer)},n),{children:(0,ES.jsx)("div",{className:a.popoverContent,children:t})}))});var Ei=b(I()),p6=e=>t=>{let n=l0(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},m6=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=z("TabCompletion",Po),s=wp(),a=(0,Om.useMemo)(()=>p6(e.getBoundingClientRect()),[e]),[l,c]=Pm(e);return(0,Om.useEffect)(()=>{c?s.open():s.close()},[c]),(0,Ei.jsxs)("span",{children:[(0,Ei.jsx)("mark",{ref:Am([l,s.triggerRef]),className:(0,XI.default)(i.matchKeyword,{[i.hover]:c}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Ei.jsx)(Aa,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Ei.jsx)(Mm,{style:n,children:(0,Ei.jsx)("div",{className:i.hintText,children:o})})})]})},Nm=class extends Eo{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>A(E({},o),{keywordRegex:new RegExp(`\\b${Im(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(i=>{if(this.usedKeywordMatches.has(i))return null;let s=n.match(i.keywordRegex);if(!s)return null;let a=n.charAt(s.index-1),l=n.charAt(s.index+i.keyword.length);return a==="{"&&l==="}"?null:{index:s.index,length:s[0].length,match:s[0],matchString:s[0],suggestion:i.suggestion,preparedKeywordMatch:i,valid:!0}}).filter(qI);if(r.length===0)return null;let o=r.reduce((i,s)=>s.index<i.index?s:i);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,Ei.jsx)(m6,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var QI=b(De());var CS=b(I()),g6=({inputElement:e,children:t})=>{let n=z("TabCompletion",Po),[r,o]=Pm(e);return(0,CS.jsx)("mark",{ref:r,className:(0,QI.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Lm=class extends Eo{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,CS.jsx)(g6,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Fm=b(De());var ln=b(Z());var TS=b(I()),ZI=()=>(0,TS.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,TS.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 Kr=b(Z());var eA=b(Q0());var JI={root:"dd-ky-Bv",content:"dd-kV5e1"};function Dm(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(i){return null}}function kS(e){return e.replace("https://www.","").replace("https://","")}var Qn=b(I()),h6=3,y6=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),v6=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=h6})=>{let i=z("LinkSearch",JI),[s,a]=(0,Kr.useState)(""),l=we(),c=G(JP("url")),u=G(Gb("URL")),f=(0,Kr.useMemo)(()=>u.map(y6),[u]),[d,p]=(0,Kr.useState)(f.length-1),m=X("fallbackImage"),g=S=>{let x=S.target;a(x.value)},v=(S,x)=>{S.stopPropagation(),S.preventDefault(),window.open(x,"_blank")},h=S=>{var C;let x=d-1<0?f.length-1:d-1,T=d+1===f.length?0:d+1;S.code==="Escape"&&(a(""),t()),S.code==="ArrowUp"&&p(x),S.code==="ArrowDown"&&p(T),S.code==="Enter"&&e(((C=f[d])==null?void 0:C.text)||s)},y=(0,Kr.useCallback)((0,eA.default)(S=>{l(Fi({query:S,type:"URL",tags:["link-search"]}))},300),[]);return(0,Kr.useEffect)(()=>{s&&y(s)},[s]),(0,Kr.useEffect)(()=>()=>{l(kd())},[]),(0,Qn.jsxs)("div",{className:i.root,children:[(0,Qn.jsx)(Tt,{withDivider:!0,children:(s?f:c).slice(0,o).map((S,x)=>(0,Qn.jsx)(pe,{selected:d===x,onClick:()=>e(S.text),"data-testid":"linksearch-suggestion",children:(0,Qn.jsxs)(be,{children:[(0,Qn.jsx)(be.Image,{src:Dm(S,"small",m||void 0),title:S.title||S.text}),(0,Qn.jsxs)(be.Content,{className:i.content,cropText:!0,children:[(0,Qn.jsx)(be.Title,{children:S.title||kS(S.text)}),S.title&&kS(S.text)]}),(0,Qn.jsx)(pe.Actions,{children:(0,Qn.jsx)(pe.ActionButton,{label:r,onClick:T=>v(T,S.text)})})]})},S.text))}),(0,Qn.jsx)($c,{value:s,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:h})]})},tA=v6;var RS={};ht(RS,{enUS:()=>S6,nlNL:()=>x6});var S6={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}],addToPersonalCollection:[{type:0,value:"Add to Personal Collection"}]},x6={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}],addToPersonalCollection:[{type:0,value:"Toevoegen aan Personal Collection"}]};var Ot=b(I()),w6=(0,ln.forwardRef)((e,t)=>{let n=z("TabCompletion",Po);return(0,Ot.jsx)("mark",{ref:t,className:(0,Fm.default)(n.matchSelection)},"selection-start")}),b6=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=se(RS),s=z("TabCompletion",Po),a=X("addToPersonalCollection"),l=G(Uo("/admin/personal-collection/new")),c=(0,ln.useRef)(null),u=(0,ln.useRef)(null),[f,d]=(0,ln.useState)(null),p=we(),m=wp(document.activeElement===r),[g]=(0,ln.useState)(()=>document.createRange());m.triggerRef.current=g,(0,ln.useEffect)(()=>()=>g.detach(),[]),(0,ln.useEffect)(()=>{let h=e.current,y=c.current;!h||!y||(g.setStart(h,0),g.setEnd(y,0))},[e.current,c.current]),di(()=>{m.close()});let v=(0,ln.useCallback)(h=>{let y=g.toString(),S=/^http(s?):\/\//.test(h)?h:`https://${h}`,x=`[${y}](${S})`;p(kn({text:x,suggestion:{text:x,source:"search-url",type:"url"},eventMetrics:{inputType:"mouse"},replace:"selection"}))},[]);return(0,Ot.jsxs)("span",{children:[(0,Ot.jsx)("mark",{ref:c,className:(0,Fm.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":m.opened?"true":"false",children:o}),m.opened&&(0,Ot.jsx)(Aa,{className:s.popoverRoot,triggerRef:m.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ot.jsxs)(Mm,{style:n,ref:u,children:[(0,Ot.jsxs)("div",{className:(0,Fm.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:f!==null}),children:[(0,Ot.jsxs)("button",{type:"button",tabIndex:f===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>d("insertLink"),children:[(0,Ot.jsx)(ZI,{}),(0,Ot.jsx)("span",{children:"\xA0"}),(0,Ot.jsx)("span",{children:i("insertLink")})]}),a&&l&&(0,Ot.jsx)("button",{type:"button",tabIndex:f===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>{let h=g.toString(),y=`${l}?text=${encodeURIComponent(h)}`;window.open(y,"_blank")},children:(0,Ot.jsx)("span",{children:i("addToPersonalCollection")})})]}),f==="insertLink"&&(0,Ot.jsx)(tA,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{d(null),m.close()}})]})})]},"selection-end")},zm=class extends Eo{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,ln.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let i=this.foundIndex===0?r:o,s=i>=this.charCount&&i<=this.charCount+n.length?{index:i-this.charCount,length:0,match:"",valid:!0}:null;s&&this.foundIndex++;let a=this.foundIndex===1;return s&&a?this.charCount+=i-this.charCount:this.charCount+=n.length,s?E({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,Ot.jsx)(w6,{ref:this.startRef}):(0,Ot.jsx)(b6,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var Io=b(I()),E6=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let c=z("TabCompletion",KI),u=X("insertLink"),f=X("addToPersonalCollection"),d=X("showMidSentenceSuggestions"),p=X("inlineSuggestions"),m=WI(a),g=(0,Ao.useRef)(null),v=G(Pt);(0,Ao.useEffect)(()=>{Ts(a)&&m&&$I(a,m)},[m]);let h=(0,Ao.useCallback)(x=>{if(!o||!n)return x;let T=[(0,Io.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,Io.jsx)("span",{"data-testid":"tab-completion",className:(0,Hm.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&T.push((0,Io.jsx)("span",{className:(0,Hm.default)(c.hint,c.resetIndent),children:(0,Io.jsx)(Uu,{keyCode:"tab"},"tabHint")},"tabHint")),bS(x,T)},[o,n,r]),y=(0,Ao.useMemo)(()=>{let x=[];return(u||f)&&x.push(new zm("selection")),x.push(new Lm("placeholders")),i&&x.push(new Nm("keywords")),x},[p,u,f,i]),S=(0,Ao.useMemo)(()=>{let x=window.getComputedStyle(a);return{"--dd-color":x.color,"--dd-font-size":x.fontSize,"--dd-font-family":x.fontFamily,"--dd-font-variant":x.fontVariant}},[]);return!e||!v?null:(0,Io.jsxs)("div",{ref:x=>{x!=null&&x.parentElement&&(g.current=x==null?void 0:x.parentElement)},className:c.root,style:S,children:[(0,Io.jsx)(yi,{tagName:"span",containerTagName:"div",className:(0,Hm.default)(c.container,c.agentText),disableLineBreaks:Ts(a),content:t||"\u200B",onAfterParse:h,matchers:y,selection:m,keywordMatches:s,inputElement:a,inputStyle:S,boundaryRef:g,inlineSuggestionsOnlyAtEnd:!d}),(0,Io.jsx)("br",{})]},"tab-completion")},C6=e=>{var h,y,S;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=js({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",c=(h=t.html)!=null?h:ja(t.text),u=t.text.slice(t.suggestionTextStart,t.selection.end),f=a.indexOf(u)===0?a.slice(u.length):"",{showTabHint:d}=n,{isSupported:p}=i,{showTabCompletion:m,visible:g,showStyleSuggestions:v}=r;return{showTabHint:d,showStyleSuggestions:v,showTabCompletion:m&&jr(e),content:c,tabText:f,source:l,keywordMatches:(S=(y=o.list)==null?void 0:y.keywordMatches)!=null?S:[],enabled:g&&p!==!1}},nA=vw(C6)(E6);var Ci=b(Z());var T6={token:null,interval:null},PS=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>M(null,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),IS=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(PS()),setInterval(()=>r(PS()),n)}),rA=Re({name:"passwordlessToken",initialState:T6,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(PS.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(IS.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:oA}=rA.actions,iA=rA.reducer;function k6(e){return"buttonText"in e&&"eventName"in e}function sA(e){if(e)return k6(e)?{label:e.buttonText,event:e.eventName,value:e.payload}:e}function R6(e){return e==null?void 0:e.map(t=>sA(t))}function P6(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var aA=fn([EE,yd],(e,t)=>(t?e.filter(o=>!o.externalConversationId||o.externalConversationId===t):e).map(o=>{let i=sA(o.callToAction),s=R6(o.callToActions);return A(E(E(E({text:o.response,title:o.name},i?{callToAction:i}:{}),s!=null&&s.length?{callToActions:s}:{}),o.message!==void 0?{message:o.message}:{}),{editable:o.editable,isLoading:o.isLoading,evaluationId:o.evaluationId,rule:{id:P6(o.code),label:o.code,name:o.name,description:o.name}})}));var Bm=b(Z()),_S=b(De());var AS=b(I()),Za=()=>(0,AS.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,AS.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 lA={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Gr=b(I()),I6=({entities:e})=>{let t=z("EntitiesWidgetList",lA),[n,r]=(0,Bm.useState)(void 0),o=Ze(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ar(a.text),o("entity copied",{entity:a,type:"copy"}))};return(0,Bm.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Gr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Gr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Gr.jsx)("span",{className:t.entityText,children:a.text}),(0,Gr.jsxs)("span",{className:t.iconWrapper,children:[(0,Gr.jsx)("span",{className:(0,_S.default)(t.icon),children:(0,Gr.jsx)(Za,{})}),(0,Gr.jsx)("span",{className:(0,_S.default)(t.icon,n===l&&t.iconClicked),children:(0,Gr.jsx)(Za,{})})]})]},a.text))})},cA=I6;var MS=b(I()),uA=()=>(0,MS.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,MS.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 yA=b(Z());var dA={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var fA={root:"dd-nazq3",rotation:"dd-3EHTv"};var mA=b(I()),A6=({size:e=12})=>{let t=z("LoadingSpinner",fA);return(0,mA.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},pA=A6;var NS=b(I()),gA=()=>(0,NS.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,NS.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 pu=b(I()),hA=e=>(0,pu.jsxs)("svg",A(E({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,pu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,pu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var OS={};ht(OS,{enUS:()=>_6,nlNL:()=>M6});var _6={error:[{type:0,value:"Something went wrong"}]},M6={error:[{type:0,value:"Er ging iets fout"}]};var Hn=b(I()),N6=3e3,O6=({assistantOptions:e})=>{let t=z("OnDemandAssistants",dA),n=se(OS),r=(0,yA.useRef)(),o=we(),i=Ad(mn),s=G(SP),a=Ze(),l=s.filter(d=>d.isPinned),c=s.filter(d=>!d.isPinned),u=()=>M(null,null,function*(){return e.attachments&&e.attachments.length>0?e.attachments:o(((d,p,m)=>M(null,null,function*(){let g;if(e.transcript==="in-memory-transcript"){let v=m.dynamicThunkObject.conversationQuery;if(v){let h=yield v();g=Array.isArray(h)?h:void 0}}else Array.isArray(e.transcript)&&(g=e.transcript);return Lh({transcript:g})})))}),f=d=>M(null,null,function*(){clearTimeout(r.current);let p=yield u();a("trigger on demand assistant",{assistantCode:d}),yield i.call(E(A(E({},e),{assistantCode:d}),p.length>0?{attachments:p}:{})),r.current=setTimeout(()=>i.reset(),N6)});return s.length===0?null:(0,Hn.jsxs)("div",{className:t.root,children:[l.map(({assistant:d,assistantName:p,displayName:m})=>(0,Hn.jsx)("button",{type:"button",className:t.button,disabled:i.state==="loading",onClick:()=>f(d),children:m||p},d)),c.length>0&&(0,Hn.jsxs)(wt,{placement:"top-end",children:[(0,Hn.jsx)(wt.Trigger,{className:t.trigger,disabled:i.state==="loading",children:(0,Hn.jsx)(dm,{"data-testid":"trigger"})}),(0,Hn.jsx)(wt.Content,{className:t.nav,"data-testid":"popover",children:c.map(({assistant:d,assistantName:p,displayName:m})=>(0,Hn.jsx)(wt.Button,{className:t.item,disabled:i.state==="loading",onClick:()=>f(d),children:m||p},d))})]}),i.state==="loading"&&(0,Hn.jsx)(pA,{}),i.state==="done"&&(0,Hn.jsx)(hA,{"data-testid":"trigger-done"}),i.state==="error"&&(0,Hn.jsx)(JR,{trigger:(0,Hn.jsx)(gA,{}),children:n("error")})]})},vA=O6;var mu={};ht(mu,{enUS:()=>L6,nlNL:()=>D6});var L6={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},D6={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var ks=b(Z());var LS={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",ctaMessage:"dd-ge8nB",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Lt=b(I()),F6=500,z6=100,H6=({content:e,onChange:t,onCopy:n})=>{let r=(0,ks.useRef)(null),o=z("WidgetCue",LS);return(0,ks.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,z6),F6);i.style.setProperty("height",`${s}px`)},[e]),(0,Lt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},B6=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let i=z("WidgetCue",LS),s=se(mu),a=Ze(),l=X("hasKeyboardInput"),[c,u]=(0,ks.useState)(e.text),f=v=>{let h=v?A(E({},e),{callToAction:v}):e;t&&t(c,h),n(e)},d=(v,h)=>{r&&r(v,e),h&&Bo(h,i.fadeup)},p=v=>{o&&o(v,e)},m=v=>{v.preventDefault(),v.stopPropagation(),n(e)};return(0,ks.useEffect)(()=>{a("Assistant response displayed",{evaluationId:e.evaluationId,assistantCode:e.rule.label,assistantOutput:e.text})},[]),(0,Lt.jsxs)(pe,{"data-testid":"cue",children:[(0,Lt.jsx)(be,{children:(0,Lt.jsxs)(be.Content,{children:[e.title&&(0,Lt.jsx)(be.Title,{className:i.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?s(e.rule.label):e.title}),e.message&&(0,Lt.jsx)("p",{className:i.ctaMessage,children:e.message}),e.editable?(0,Lt.jsx)(H6,{content:c,onCopy:()=>{let v=document.getSelection();v&&d(v.toString())},onChange:v=>{var h;return u((h=v.target.value)!=null?h:"")}}):(0,Lt.jsx)(is,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:d,onUse:l?p:void 0})]})}),(0,Lt.jsxs)(pe.ButtonsContainer,{children:[(0,Lt.jsxs)("div",{className:i.actions,children:[(0,Lt.jsx)(pe.Button,{onClick:v=>{var h;return d((h=Kd(c,"reply")[0])!=null?h:c,v.target)},variant:"primary",children:s("copyCue")}),e.callToAction&&(0,Lt.jsx)(pe.Button,{onClick:()=>f(),variant:"primary",children:e.callToAction.label}),(g=e.callToActions)==null?void 0:g.map((v,h)=>(0,Lt.jsx)(pe.Button,{onClick:()=>f(v),variant:"primary",children:v.label},`${v.event}-${v.label}-${h}`)),(0,Lt.jsx)(pe.Button,{onClick:m,variant:"secondary",children:s("removeCue")})]}),(0,Lt.jsx)(Qd,{evaluationId:e.evaluationId,assistantCode:e.rule.label,assistantOutput:e.text,feedbackText:e.text,feedbackType:"assistant"})]})]})},SA=B6;var Ja=b(I()),U6=({cues:e})=>{let t=we(),n=pn(),r=se(mu),o=Ze(),i=c=>{t(qd({code:c.rule.label})),o("Assistant response closed",{evaluationId:c.evaluationId,assistantCode:c.rule.label,assistantOutput:c.text})},s=(c,u)=>{Ar(c),o("Assistant response copied",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,copiedText:c})},a=(c,u)=>{var f;u.callToAction&&(t(Gd(u)),o("Assistant call to action",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,eventName:u.callToAction.event,value:(f=u.callToAction.value)!=null?f:c}))},l=(c,u)=>{var f;n.send(eo,{text:c,suggestion:{source:"assistant",assistantCode:(f=u.rule)==null?void 0:f.label,sourceText:c}}),o("Assistant response used",{evaluationId:u.evaluationId,assistantCode:u.rule.label,assistantOutput:u.text,usedText:c})};return(0,Ja.jsx)(Ja.Fragment,{children:e.map(c=>c.isLoading?(0,Ja.jsx)(Ep,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Ja.jsx)(SA,{cue:c,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},c.evaluationId))})},xA=U6;var Um=b(Z());var wA={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var En=b(I());function V6(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var bA=({data:e,schema:t})=>{let n=z("WidgetCustomData",wA),r=o=>{Ar(o)};return(0,Um.useEffect)(()=>{te.info("Custom data",e,t)},[e]),(0,En.jsx)("dl",{className:n.root,children:t.map(o=>{let i=V6(e,o.path);return(0,En.jsxs)(Um.Fragment,{children:[(0,En.jsx)("dt",{className:n.label,children:o.label}),(0,En.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,En.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,En.jsx)("span",{className:n.isFalse,children:o.falseValue}):o.type==="array"&&Array.isArray(i)&&i.length>0?(0,En.jsxs)("button",{type:"button",onClick:()=>r(i.join(", ")),className:n.copyButton,children:[(0,En.jsx)("span",{className:n.copyButtonText,children:i.join(", ")}),(0,En.jsx)(Za,{})]}):typeof i=="string"||typeof i=="number"?(0,En.jsxs)("button",{type:"button",onClick:()=>r(`${i}`),className:n.copyButton,children:[(0,En.jsx)("span",{className:n.copyButtonText,children:i}),(0,En.jsx)(Za,{})]}):"-"})]},o.label)})})};var CA=b(Z());var W6=/(https?:\/\/[^\s]+)/,EA=e=>e.split(" ").find(t=>W6.test(t));var Zn=b(I()),$6=({suggestion:e,lines:t,onUse:n})=>{var f;let r=e.text||e.url||e.message,o=EA(r),i=se(ou),s=X("showImages"),a=X("fallbackImage"),l=X("hasKeyboardInput"),c=d=>{d.preventDefault(),d.stopPropagation(),l&&n(r)},u=(0,CA.useCallback)(d=>{window.open(o,"_blank"),d.stopPropagation(),d.preventDefault()},[o]);return(0,Zn.jsxs)(pe,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,Zn.jsxs)(be,{children:[s&&e.image&&(0,Zn.jsx)(be.Image,{src:Dm(e,"small",a||void 0),title:e.title}),(0,Zn.jsxs)(be.Content,{children:[e.title&&(0,Zn.jsx)(be.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((f=e.searchKeywords)==null?void 0:f.length)>0&&(0,Zn.jsx)(pe.Labels,{labels:e.searchKeywords}),(0,Zn.jsx)(be.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Zn.jsxs)(pe.Actions,{children:[o&&(0,Zn.jsx)(pe.ActionButton,{onClick:u,label:i("visitUrl")}),l&&(0,Zn.jsx)(pe.ActionButton,{primary:!0,onClick:c,label:i("useSuggestion")})]})]})},TA=$6;var gu=b(I()),j6=({lines:e,suggestions:t})=>{let n=pn(),r=(o,i)=>{n.send(eo,{text:o,suggestion:A(E({},i),{source:i.source,sourceText:i.text})})};return(0,gu.jsx)(gu.Fragment,{children:t.map(o=>(0,gu.jsx)(TA,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},kA=j6;var hu={};ht(hu,{enUS:()=>K6,nlNL:()=>G6});var K6={waiting:[{type:0,value:"Loading\u2026"}],waitingForConversation:[{type:0,value:"Waiting for conversation\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}],close:[{type:0,value:"Close"}]},G6={waiting:[{type:0,value:"Laden\u2026"}],waitingForConversation:[{type:0,value:"Wachten op gesprek\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}],close:[{type:0,value:"Sluiten"}]};var el={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var ce=b(I()),RA=(e,t)=>{let n=G(Pt);(0,Ci.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},q6=({onLogIn:e})=>{let t=z("Widget",el),n=X("isEmbedded"),r=X("adminUrl");return(0,ce.jsx)("div",{className:t.loginText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)(Tm,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},DS=({text:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.stateText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)("p",{children:e})})},"notification")},Y6=()=>{let e=se(hu),t=we(),n=z("Widget",el),r=X("showSearch"),o=X("isEmbedded"),i=G(Uo("/admin/")),s=pn(),a=X("productName"),l=Ze();return RA(()=>{if(o)return t(IS()),()=>{t(oA())}},[t,o]),!r&&!i?null:(0,ce.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ce.jsx)(pe.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ce.jsx)(Ga,{}),onClick:()=>{s.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),i&&(0,ce.jsx)(pe.Button,{as:"a",target:"_blank",icon:(0,ce.jsx)(uA,{}),href:i,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:a}),className:n.shortcut,rel:"noreferrer",onClick:()=>{l("open my deepdesk",{via:"widget-shortcut"})},children:e("linkStudioLogin",{productName:a})})]})},X6=({title:e,content:t})=>{let n=se(hu),[r,o]=(0,Ci.useState)(!0);return r?(0,ce.jsx)(Tr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsxs)(pe,{children:[(0,ce.jsx)(be,{children:(0,ce.jsx)(be.Content,{children:(0,ce.jsx)(is,{content:t})})}),(0,ce.jsx)(pe.ButtonsContainer,{children:(0,ce.jsx)(pe.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},Q6=()=>{let e=we(),t=G(Gc),n=G(wP),r=G(aA),o=G(Db),i=G(um),s=G(mm),a=G(mi),l=G(Pr);return(0,Ci.useEffect)(()=>{o&&!n&&te.warn("Custom data provided, but no schema.")},[o,n]),RA(()=>{t.forEach(({type:c})=>{c==="entities"?e(vr()):ju.includes(c)||e(Sr(c))})},[e,l,a]),(0,Ci.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&te.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ce.jsx)(Ci.Fragment,{children:t.map(({type:c,title:u,amount:f,lines:d,schema:p,property:m})=>{var g,v;switch(c){case"entities":return i&&i.length>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(cA,{entities:i})},c);case"cues":return r&&r.length>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(xA,{cues:r})})},c);case"custom-data-banner":return o&&m&&o[m]&&(0,ce.jsx)(X6,{title:u,content:String(o[m])},c);case"custom-data":return o&&p&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(bA,{data:o,schema:p})})},c);default:return((v=(g=s[c])==null?void 0:g.suggestions)==null?void 0:v.length)>0&&(0,ce.jsx)(Tr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Tt,{withDivider:!0,children:(0,ce.jsx)(kA,{lines:d,contentType:c,suggestions:s[c].suggestions.slice(0,f)||[]})})},c)}})})},FS=({children:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.footer,children:e})},zS=({children:e})=>{let t=z("Widget",el);return(0,ce.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},Z6=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript"}})=>{let r=se(hu),o=G($s),i=G(Pt),s=G(yd),a=G(mi),l=G(xP("knowledge-assist")),c=G(bP);return o===!1?(0,ce.jsx)(DS,{text:r("notSupported")}):i===!1?(0,ce.jsx)(q6,{onLogIn:e}):i===null?(0,ce.jsx)(DS,{text:r("waiting")}):!s||!a?(0,ce.jsx)(DS,{text:r("waitingForConversation")}):(0,ce.jsx)(zS,{children:(0,ce.jsxs)(Yp,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:void 0,evaluateKnowledgeAssistFn:Hl,children:[(0,ce.jsxs)(Hs,{children:[(0,ce.jsx)(Y6,{}),(0,ce.jsx)(Q6,{}),l&&(0,ce.jsx)(Qp,{title:l.title,emptyState:t.emptyState})]}),(0,ce.jsxs)(FS,{children:[l&&(0,ce.jsx)(Xp,{}),(0,ce.jsx)(vA,{assistantOptions:n})]})]})})},PA=Z6;function tl(e){let t=new Range;return t.selectNodeContents(e),t}function IA(e,t,n){try{return Ti(e,t,n),!0}catch(r){return!1}}function Vm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Wm(e){return"tagName"in e&&e.tagName==="BR"}var yu=/[\u200B-\u200D\uFEFF]/g;function Ti(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,c){let u=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return c;for(let d=0;d<=l.length;d++)if(f.test(l[d])||u++,u===c)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(yu,""),f=o+u.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let m=s(c,t-o);m===0&&!p?r.setStartBefore(l):r.setStart(l,m)}p&&(r.setEnd(l,s(c,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(Wm(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!i);u++);let c=l.lastChild;Vm(l)&&c&&!Vm(c)&&!Wm(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function vu(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,c=0;function u(f){let d=f===e,p=f===n,m=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let g=f.textContent;p&&(a=c+g.substring(0,r).replace(yu,"").length),m&&(l=c+g.substring(0,i).replace(yu,"").length),c+=g.replace(yu,"").length;break}case Node.ELEMENT_NODE:{if(Wm(f)&&f.nextSibling){c++;break}!d&&Vm(f)&&f.previousSibling&&c++;for(let g=0;g<f.childNodes.length;g++){let v=p&&g===r,h=m&&g===i;if(v&&(a=c),h&&(l=c),l!==void 0||((!v||!s)&&u(f.childNodes[g]),m&&g===i-1&&(l=c),l!==void 0))break}m&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function Su(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a=0,l="";function c(u){let f=u===e,d=u===n,p=u===o;switch(d&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let m=d?r:0,g=p?i:void 0;l+=u.textContent.replace(yu,"").substring(m,g);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&Wm(u)&&u.nextSibling){l+=`
82
82
  `;break}!f&&!s&&a===1&&Vm(u)&&u.previousSibling&&(l+=`
83
- `);let m=d?r:0,g=p?Math.min(i,u.childNodes.length):u.childNodes.length;for(let v=m;v<g&&(c(u.childNodes[v]),a!==2);v++);break}default:break}p&&(a=2)}return c(e),l}var IA=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(IA||{}),_o=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedSuggestionTextStart=0;this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedSuggestionTextStart=this.getSuggestionTextStart(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}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)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.getSuggestionTextStart(),i=this.cachedCaretPosition===null;if(!this.isActive)return;t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit");let s=t!==this.cachedText,a=n!==null&&n!==this.cachedHTML,l=o!==this.cachedSuggestionTextStart;if((s||a||l)&&(s?(this.cachedText=t,this.cachedHTML=n):a&&(this.cachedHTML=n),this.cachedSuggestionTextStart=o,i=!0,this.emit("change",{plainText:t,rawHTML:n,suggestionTextStart:o})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,i=!0,this.emit("selection",r)),!i)return;let c=this.getCaretPosition();zo(c,this.cachedCaretPosition)||(this.cachedCaretPosition=c,this.emit("caretposition",c))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(IA).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}getSuggestionTextStart(){return 0}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))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function AA(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Rs=class extends _o{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),Su(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o=r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let i=this.element.ownerDocument.createRange();return i.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),i.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!i||!this.element.contains(i.startContainer)||!this.element.contains(i.endContainer)?null:i}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!AA(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!AA(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return vu(this.element,n);let r=this.lastKnownSelection;if(r&&PA(this.element,r.start,r.end))return r;let o=tl(this.element);return o.collapse(!1),vu(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return Su(this.element,Ti(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(i=>{var s,a;i.length===2&&i[0].addedNodes.length===1&&((s=i[0].addedNodes[0])==null?void 0:s.textContent)==="\u2060"&&((a=i[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var Z6=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function _A(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,i=window.getComputedStyle(e),s=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",Z6.forEach(u=>{o[u]=i[u]}),n?e.scrollHeight>Number.parseInt(i.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),s.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(i.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(i.borderLeftWidth)};return s.removeChild(r),c}var Ps=class extends _o{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return _A(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function MA(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function J6(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var zS=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},HS=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=MA(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},BS=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),te.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new HS(t,this.deepdeskUrl,{debug:!0}):new zS(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=J6(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(te.info("Received broadcast event",this.externalId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;te.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage(A(E({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},NA=BS;function ez(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function Ve(e){return Array.isArray(e)?e.map(Ve):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>A(E({},t),{[ez(n)]:Ve(e[n])}),{}):e}function tz(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ln(e){return Array.isArray(e)?e.map(ln):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>A(E({},t),{[tz(n)]:ln(e[n])}),{}):e}var nl=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var US=e=>new Promise(t=>{setTimeout(t,e)});var Is=class extends nl{constructor(){super(...arguments);this.name="ClientError"}},WS=class extends nl{constructor(){super(...arguments);this.name="ServerError"}},VS=new Map;function nz(e){return M(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(te.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var As=class{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.refreshingToken=null;this.lastFailedRefreshAt=null;this.failedRefreshCooldown=1e4;var r;this.fetch=(r=n.fetch)!=null?r:window.fetch.bind(window)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",C=n,{useCache:c=!1,abortLatest:u=!1,attempts:f=1,retryDelay:d=500,refreshTokenOn401:p=!0,retryOnError:m=k=>k instanceof TypeError,retryOnResponse:g=k=>k.status>=500,version:v=null}=C,h=ie(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(VS.has(s)){r(VS.get(s));return}}let y=A(E({credentials:"include"},h),{headers:E({Accept:"application/json","Content-Type":"application/json"},h.headers)});!l&&this.csrfToken&&(y.headers=A(E({},y.headers),{"X-CSRFToken":this.csrfToken})),typeof v=="string"&&(y.headers=A(E({},y.headers),{"X-Deepdesk-API-Version":v}));let S=f,x=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&u&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let T=()=>M(this,null,function*(){return S--,a(s,y).then(k=>M(this,null,function*(){return g(k)&&!i.isAborted&&S>0?(yield US(d),T()):k.status===401&&p===!0&&x===!1?(x=!0,yield this.refreshToken(),T()):k})).catch(k=>M(this,null,function*(){if(m(k)&&!i.isAborted&&S>0)return yield US(d),T();throw k}))});T().then(k=>M(this,null,function*(){let R=yield nz(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new WS("Server Error",R));return}if(k.status===401){o(new Is("Unauthorized",R));return}if(k.status===403){o(new Is("Forbidden",R));return}if(k.status===404){o(new Is("Not Found",R));return}if(k.status>=400){o(new Is("Bad Request",R));return}c&&VS.set(s,R),r(R)})).catch(k=>{o(k)})})}validateToken(){return M(this,null,function*(){let t,n,r;try{({has_valid_access_token:t,is_logged_in:n,has_valid_refresh_token:r}=yield this.get("/apis/admin/session/validate/",{refreshTokenOn401:!1}))}catch(o){return!1}if(!t){if(!r)return!1;try{yield this.refreshToken();let{is_logged_in:o}=yield this.get("/apis/admin/session/validate/",{refreshTokenOn401:!1});return o}catch(o){return!1}}return n})}refreshToken(){let t=Date.now();return this.lastFailedRefreshAt&&t-this.lastFailedRefreshAt<this.failedRefreshCooldown?Promise.reject(new Is("Unauthorized","Failed to refresh token")):this.refreshingToken?this.refreshingToken:(this.refreshingToken=this.get("/apis/admin/session/refresh/",{refreshTokenOn401:!1}).catch(n=>{throw(n==null?void 0:n.message)==="Unauthorized"&&(this.lastFailedRefreshAt=Date.now()),n}).finally(()=>{this.refreshingToken=null}),this.refreshingToken)}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,E({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,E({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,E({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,E({method:"DELETE"},n))}};var OA;(t=>{let e;(a=>(a.SUCCESS="success",a.FAILURE="failure",a.CONDITIONS_NOT_MET="conditions_not_met",a.MAX_RECURSION_LEVEL="max_recursion_level",a.NO_ACCESS_TO_ASSISTANT="no_access_to_assistant"))(e=t.EvaluationStatus||(t.EvaluationStatus={}))})(OA||(OA={}));function $S(e){return A(E({},Ve(e)),{metadata:e.metadata})}var _s=class _s{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new As(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>M(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return M(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(_s.exchangeTokenPromise||(_s.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),_s.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return M(this,null,function*(){var r;yield this.preflight(),te.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",A(E({chat_start_time:new Date().toISOString()},ln(t)),{metadata:(r=t.metadata)!=null?r:{}}));return $S(n)})}getMe(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return Ve(t)})}postIdentity(t){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",ln(t))})}patchMe(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",ln(t));return Ve(n)})}getProfile(t){return M(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return Ve(n)})}getKnowledgeAssistant(t){return M(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return Ve(n)})}getContentTypes(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return Ve(t)})}getAccount(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return Ve(t)})}getPlatformConfig(t){return M(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return Ve(r)})}checkUserExists(t){return M(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return M(this,arguments,function*(t,n={}){yield this.preflight(),te.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:i=1e3}=n,s=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return te.info(`Successfully retrieved conversation ${s.id} for session ${t}`),$S(s)})}isConversationSupported(r){return M(this,arguments,function*(t,n={}){te.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:i=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return M(this,null,function*(){var i;yield this.preflight();let r=ln(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return $S(o)})}postMessages(t,n){return M(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>A(E({},ln(r)),{metadata:r.metadata})))})}sendEvent(t,n){return M(this,null,function*(){yield this.preflight();let a=n,{data:r}=a,o=ie(a,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((l,[c,u])=>A(E({},l),{[c]:u}),{}),s=["platform","agentId","agentName","agentEmail","conversationId"].reduce((l,c)=>(o[c]&&(l[c]=o[c]),l),{});return this.client.post("/api/v2/events",ln(A(E(E({},i),s),{data:r,name:t})),{version:"v2"})})}getEntities(t){return M(this,null,function*(){return yield this.preflight(),yield this.client.post("/api/v2/entities",{messages:t.filter(r=>r.text)})})}getTemporaryExchangeToken(){return M(this,null,function*(){return(yield this.client.get("/apis/admin/session/exchange-token/")).jwt})}exchangeTokenForAccessCookie(t){return M(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw te.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",ln(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return M(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,ln(n),{abortLatest:!0})).map(s=>A(E({},Ve(s)),{text:s.text||s.url||s.message,source:r,type:r})).filter((s,a,l)=>a===l.findIndex(c=>c.text===s.text))})}isLoggedIn(){return M(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return M(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,ln(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))})}getPinnedMessages(t){return M(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return Ve(n).map(r=>A(E({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return M(this,null,function*(){let n=yield this.client.post("/api/v2/style-suggestions",ln(t),{abortLatest:!0,version:"v2"});return Ve(n)})}search(t){return M(this,null,function*(){let n=yield this.client.post(`/api/v2/profiles/${t.profile}/search`,ln(t));return Ve(n)})}loginWithPassword(t,n){return M(this,null,function*(){yield this.preflight();let r=yield this.client.post("/apis/admin/session/login/",{username:t,password:n},{refreshTokenOn401:!1});return Ve(r)})}logout(){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/logout/",{},{refreshTokenOn401:!1})})}requestLoginByEmail(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return Ve(n)})}requestPasswordlessToken(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return Ve(t.token)})}getCsrfToken(){return M(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return M(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return Ve(n)})}evaluateAssistant(t,n){return M(this,null,function*(){var s;yield this.preflight();let r=new URLSearchParams;n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let o=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,i=yield this.client.post(o,{input:(s=n==null?void 0:n.input)!=null?s:{},conversation:n==null?void 0:n.transcript});return Ve(i)})}createAssistantThread(t){return M(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return Ve(r)})}postMessageToAssistantThread(t){return M(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,i=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return Ve(i)})}translateMessages(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/v2/translate",ln(t));return Ve(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(tw);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&te.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};_s.exchangeTokenPromise=null;var Mo=_s;var $m=class{constructor(t){this.options=t;this.socket=null;this.maxReconnectAttempts=5;this.reconnectInterval=25e3;this.cleanupCallbacks=[];var n,r;this.socket,this.eventListeners=new Map,this.url=t.url,this.maxReconnectAttempts=(n=t.maxReconnectAttempts)!=null?n:this.maxReconnectAttempts,this.reconnectInterval=(r=t.reconnectInterval)!=null?r:this.reconnectInterval,this.shouldReconnect=t.shouldReconnect}connect(){let t=()=>this.cleanup();window.addEventListener("beforeunload",t),this.cleanupCallbacks.push(()=>window.removeEventListener("beforeunload",t)),this.reconnect()}setupListeners(){this.socket&&(this.socket.onmessage=t=>{var n;try{let r=Ve(JSON.parse(t.data));r.event&&this.eventListeners.has(r.event)&&((n=this.eventListeners.get(r.event))==null||n.forEach(o=>o(r.data)))}catch(r){console.error("Error parsing WebSocket message:",r)}},this.socket.onclose=t=>{console.log("WebSocket connection closed:",t),setTimeout(()=>{this.reconnect()},this.reconnectInterval)},this.socket.onerror=t=>{console.error("WebSocket error:",t)})}reconnect(){var t,n;if(this.maxReconnectAttempts<=0){console.error("Max reconnect attempts reached, closing WebSocket connection."),(t=this.socket)==null||t.close();return}if(!this.shouldReconnect()){console.error("Should not reconnect, closing WebSocket connection."),(n=this.socket)==null||n.close();return}this.socket&&(this.socket.onmessage=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.close()),this.socket=new WebSocket(this.url),this.setupListeners(),this.maxReconnectAttempts--}send(t,n){if(!this.socket){console.error("WebSocket connection is not open.");return}this.socket.send(JSON.stringify({event:t,data:n}))}on(t,n){this.eventListeners.has(t)||this.eventListeners.set(t,[]);let r=this.eventListeners.get(t);r&&!r.includes(n)&&r.push(n)}close(){var t;(t=this.socket)==null||t.close()}cleanup(){this.close(),this.cleanupCallbacks.forEach(t=>t()),this.cleanupCallbacks=[]}};var LA={startTime:null,stopTime:null},DA=e=>e.handlingTime,FA=Re({name:"handlingTime",initialState:LA,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(lt,()=>LA)}}),{handlingTimeStart:zA,handlingTimeStop:jm,handlingTimeReset:HA}=FA.actions,BA=FA.reducer;var UA=(e={})=>{let t=E({onAuthError:Ws(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var VA=(e={})=>{let t,n=!0,r=E({getStyleSuggestions:Es,debounce:500},e);return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:d}=c.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function rz(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end&&e.suggestionTextStart===t.suggestionTextStart}var WA=(e={})=>{let t=E({getTextSuggestions:Sr,getAutocompleteSuggestions:su,debounce:200,check:jr},e),n;return r=>o=>i=>{var g;let{input:s}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,f=(g=l.conversation.current)==null?void 0:g.id,d=i.type===gm.toString();if(!f||!c&&!u)return a;let{input:p}=l;return rz(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let v=Ni(l);v===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(v))},d?0:t.debounce)),a}};var $A=Es.fulfilled.toString();function oz(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 jA=e=>t=>n=>r=>{var c;if(r.type!==$A){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;if(o===s)return;let l=oz(o,s);r.type===$A&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var iz=Yu({assistants:IE,auth:mb,conversation:xb,contentTypes:yP,passwordlessToken:oA,entities:jP,handlingTime:BA,info:Vb,input:Mb,settings:_E,profile:bP,search:qb,styleSuggestions:PI,ui:hI,textSuggestions:tI});function KA(e){return tb({reducer:iz,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(UA()).concat(WA({debounce:200})).concat(VA({debounce:500})).concat(jA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,i)=>o.concat(i),n)},preloadedState:e.preloadedState})}function GA(e,t,n){if(t==="")return null;let r=new RegExp(`\\b${Im(t)}\\b`,"gi"),o,i=null;for(;(o=r.exec(e))!==null&&!(o.index>n);)i={start:o.index,end:o.index+o[0].length};return i}var sz=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},az=e=>t=>n=>r=>{var l,c,u,f,d,p;let o=t.getState(),i=Ui("inlineSuggestions")(o),s=Ui("autoSelectSuggestion")(o)||i;switch(r.type){case Ws.toString():{!r.payload&&e.emit("logout",void 0);break}case gd.fulfilled.toString():{e.emit("logout",void 0);break}case vr.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(l=o.conversation.current)==null?void 0:l.id,data:{entities:r.payload}});break;case Di.toString():e.logSendMessage(r.payload);break;case Gd.toString():e.emit("call-to-action",{cue:r.payload});break;case mn.fulfilled.toString():if(!r.isBroadcasted){let{externalConversationId:m,currentExternalIdAtRequest:g}=(c=r.payload)!=null?c:{};(!m||!g||m===g)&&e.broadcast(uh,r,!1)}break;case mn.rejected.toString():break;default:break}let a=n(r);switch(r.type){case Di.toString():e.handleAfterSendMessage(r.payload);break;case lu.toString():e.onUpdateShowTabHint(r.payload);break;case jm.toString():e.logHandlingTime();break;case Ks.toString():e.broadcast(Pd,r);break;case Li.toString():e.broadcast(Pd,r);break;case qd.toString():t.dispatch(Li({source:"assistant",assistantCode:r.payload.code}));break;case"analytics/logEvent/fulfilled":{let m=o.assistants.cues.find(g=>g.code===r.meta.arg.data.assistantCode);e.emit("event",A(E({},r.meta.arg),{cue:m}));break}case kn.toString():{let{start:m,end:g}=o.input.selection;e.emit("select-suggestion",A(E({type:sz(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:m,end:g}:{start:0,end:g}})),i&&t.dispatch(Ho([]));break}case RI.toString():{let{keyword:m,suggestion:g,eventMetrics:v}=r.payload,{text:h,selection:y}=o.input,S=GA(h,m,(u=y==null?void 0:y.end)!=null?u:h.length);if(!S)break;e.emit("select-suggestion",{text:g,type:"style",replace:S,suggestion:{text:g,source:"style"},eventMetrics:v});break}case wd.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(f=o.conversation.current)==null?void 0:f.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Ho.toString():{s&&r.payload.length>0&&t.dispatch(bd(0));break}case mn.fulfilled.toString():{let{evaluationId:m,output:g,externalConversationId:v}=r.payload,h=r.meta.arg.assistantCode;if(e.emit("event",{name:"Assistant evaluation completed",data:{evaluationId:m,assistantCode:h,assistantOutput:CE(g),externalConversationId:v,evaluationStatus:"success"}}),!r.meta.arg.skipState){let y=t.getState().assistants.cues;e.emit("cues",y)}break}case mn.rejected.toString():{let m=r.meta.arg.assistantCode,g=(p=r.meta.arg.externalConversationId)!=null?p:(d=t.getState().conversation.current)==null?void 0:d.externalId;e.emit("event",{name:"Assistant evaluation completed",data:{evaluationId:"",assistantCode:m,assistantOutput:"",externalConversationId:g,evaluationStatus:"failed"}});break}default:break}return a},qA=az;function jS(e){return e.toISOString().replace("T"," ").replace("Z","")}var lz=(e,t)=>t.version,YA=fn([Gs,Pr,DA,lz],(e,t,n,r)=>{if(!t)return te.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:i}=n;return!o||!i?(te.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:jS(o),timeStop:jS(i)}});function XA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:i}}=e.input,s=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:s,numPastes:r,suggestions:i}}var xu=class extends Error{};function cz(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}var Km=class{constructor(){this.queues={}}push(t,n){let r=()=>{let i=this.queues[t][1];i?(this.queues[t]=[i.promise,null],i.resolve()):delete this.queues[t]};if(!this.queues[t]){let i=n().finally(r);return this.queues[t]=[i,null],i}this.queues[t][1]&&this.queues[t][1].reject(new xu("Queued async function is outdated"));let o=cz();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};function KS(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return KS(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?KS(o,t):null}function GS(e,t){return KS(e,t)}var uz={accepted:"onConversationAcceptedAssistants","new-message":"onConversationNewMessageAssistants",ended:"onConversationEndedAssistants"},QA=(e,t)=>{var o,i,s;if(!((s=(i=(o=e.uiConfig)==null?void 0:o.widget)==null?void 0:i.types.find(a=>a.type==="cues"))==null?void 0:s.isActive))return te.warn("Triggered a conversation assistant, but cues are not configured in widget."),[];let r=e[uz[t]];return r&&r.length>0?r.map(a=>a.code):(te.warn(`No assistant set in profile for conversation event "${t}"`),[])};function ZA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function dz(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Gm(e){return dz(e)&&(Ts(e)||Rm(e))}var e_,qr=new Map,fz=["bottom","height","left","right","top","width"],JA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:fz.some(n=>e[n]!==t[n]);function t_(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...t_(t)]:[]}function n_(e,t){return!e||!t?null:A(E({},e),{top:e.top+t.top,left:e.left+t.left})}var qm=!1,r_=()=>{qm=!0;let e=[];if(qr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),qr.delete(n);return}let r=n.getBoundingClientRect();JA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(n_,t.rect):t.rect;JA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),qr.size===0){qm=!1;return}e_=window.requestAnimationFrame(r_)};function qS(e,t){let n=t_(e),r=[],o=n.map((i,s)=>qS(i,a=>{r[s]=a;let l=qr.get(e);if(!l)return;let c=r.reduce(n_,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),qr.has(e)){let s=qr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else qr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!qm&&r_()},unobserve(){o.forEach(s=>s.unobserve());let i=qr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||qr.delete(e),qr.size||(cancelAnimationFrame(e_),qm=!1)}}}}var o_,Yr=new Map,i_=()=>{Yr.forEach((e,t)=>{if(!t.isConnected){Yr.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)))}),Yr.size!==0&&(o_=window.requestAnimationFrame(i_))};function s_(e,t){return{observe(){let n=Yr.size===0;Yr.has(e)?Yr.get(e).callbacks.push(t):Yr.set(e,{visible:void 0,callbacks:[t]}),n&&i_()},unobserve(){let n=Yr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Yr.delete(e),Yr.size||cancelAnimationFrame(o_)}}}}var YS=["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 XS(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function rl(e){return Number.parseFloat(e)}function Ym(e){return Math.round(e*1e6)}function a_(e){return e/1e6}function QS(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=rl(e.width),i=rl(e.borderLeftWidth),s=rl(e.borderRightWidth),a=rl(e.paddingRight),l=a_(Ym(o)-Ym(i)-Ym(s)),c=a_(Ym(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function wu(e,t={}){var u,f;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",os(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};XS(r,n,YS),QS(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=s_(e,()=>{XS(r,n,YS),QS(r,e,n),i(),setTimeout(i,0)}),a,l=!0,c=qS(e,d=>{if(d===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),d.height===0&&d.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(XS(r,n,YS),QS(r,e,n),i(),t.placement==="below"&&n.classList.add("below"),n.style.top=`${d.top}px`,n.style.left=`${d.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),m=window.getComputedStyle(t.closestScrollElement),g=rl(m.borderTopWidth),v=rl(m.borderBottomWidth),h=p.top+g-d.top,y=d.top+d.height+-(p.top+p.height-v);n.style.clipPath=`inset(${h}px 0px ${y}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(f=e.parentElement)==null||f.appendChild(n),c.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),c.unobserve(),s.unobserve(),n.remove()}]}function pz(e){return e.offsetParent!==null}function l_(e){if(!pz(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 Xm(e,t,n=100){let r=l_(e);t({isVisible:r});let o=setInterval(()=>{let i=l_(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var c_=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){te.warn("[Deepdesk] SessionStorage is blocked by browser")}}});var ke=b(I());var u_=c_("showTabHint",!0),ol=class ol{constructor({deepdeskUrl:t,version:n=ol.version||"unknown",locale:r="en-US",token:o,fetch:i,productName:s,createCustomChannel:a,websocketClient:l=$m}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.disposeHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.belowSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.nicknameDialogUnsubscribe=null;this.nicknameDialogFailed=!1;this.dynamicThunkObject={};this.queues=new Km;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let c=t.replace(/\/api$/,"");this.deepdeskApi=new Mo(c,{token:o,fetch:i}),this.version=n,this.instanceId=ol.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[qA({broadcast:(m,g,v)=>{this.broadcastEvents.send(m,g,v)},emit:(m,g)=>this.emit(m,g),handleAfterSendMessage:m=>this.handleAfterSendMessage(m),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:m=>this.logSendMessage(m),onUpdateShowTabHint:m=>u_.update(m),sendEvent:(m,g)=>this.deepdeskApi.sendEvent(m,g)})]};this.store=KA(u),this.broadcastEvents=new NA({debug:!0,deepdeskUrl:c,eventMap:Yb(this.store),createCustomChannel:a}),this.disposeHandlers.push(()=>{this.broadcastEvents.cleanup()}),this.ws=new l({url:`${c}/api/v2/me/realtime`.replace("https","wss"),reconnectInterval:25e3,shouldReconnect:()=>M(this,null,function*(){var m;return(m=Pt(this.state))!=null?m:!1})}),this.whenLoggedIn(()=>this.ws.connect()),this.store.dispatch(lu(u_.value())),this.store.dispatch(Yd({locale:r,adminUrl:c,productName:s}));let f=[],d=m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(PE(m))};this.hasConversation()?g():f.push(g)};this.ws.on("assistants::direct_response",d),this.ws.on("assistants::user_notification",d),this.ws.on("assistants::response_chunk",m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(RE(m))};this.hasConversation()?g():f.push(g)}),this.ws.on("assistants::suggest_as_reply",m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(Ks([{text:m.payload.message,type:"text",source:"assistant",assistantCode:m.code,sourceLabel:m.name}]))};this.hasConversation()?g():f.push(g)});let p=this.whenConversationLoaded(()=>{var m;this.broadcastEvents.setExternalId((m=this.state.conversation.current)==null?void 0:m.externalId),f.forEach(g=>g()),f.length=0});this.disposeHandlers.push(()=>{this.ws.cleanup(),f.length=0,p()})}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=Oi(this.state)[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(te.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(te.warn("Profile has not been loaded (yet)"),!0):(te.warn("No conversation loaded (yet)"),!0)}whenLoggedIn(t){if(Pt(this.state))t();else{let n=this.subscribe(Pt,r=>{r&&t()});this.disposeHandlers.push(()=>{n()})}}login(){return this.store.dispatch(Ws(null)),this.store.dispatch(Jr()),new Promise(t=>{this.whenLoggedIn(()=>t())})}isLoggedIn(){return M(this,null,function*(){return(yield this.store.dispatch(Jr())).payload})}isConversationSupported(t,n){return M(this,null,function*(){return(yield this.store.dispatch(rh({externalId:t,options:n}))).payload})}createConversation(t){return M(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(vd(A(E({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return M(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(Sd({externalId:t,options:n}))).payload})}upsertConversation(t){return M(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(oh(A(E({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return M(this,null,function*(){yield this.store.dispatch(ih(t))})}updateConversation(t){return M(this,null,function*(){return(yield this.store.dispatch(xd(t))).payload})}resetConversation(){this.store.dispatch(lt()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(Yd(t))}setVisitorInfo(t){this.store.dispatch(zb(t))}setCustomData(t){this.store.dispatch(Hb(t))}setAgentInfo(t,n){return M(this,null,function*(){var o;yield this.store.dispatch(wl(E(E({},t),n))),(o=this.state.info.agentInfo)!=null&&o.agentNickname||this.broadcastEvents.send(Rd,{showNicknameDialog:!0})})}setAgentSettings(t){return M(this,null,function*(){yield this.store.dispatch(ah(t))})}getAgentSettings(){return M(this,null,function*(){return(yield this.store.dispatch(lh())).payload})}refresh(){return M(this,null,function*(){if(this.shouldAbort())return Promise.resolve();let t=[];return t.push(this.refreshTextSuggestions()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}syncInputMediator(){this.inputMediator&&this.store.dispatch(Ed({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),suggestionTextStart:this.inputMediator.getSuggestionTextStart()}))}notifyExternalSuggestion(t){this.store.dispatch(kn(t))}evaluateAssistant(t,n){return M(this,null,function*(){var c;let{input:r={},transcript:o,showCuesInWidget:i=!0,includeMetadata:s,externalConversationId:a}=n||{},l=yield this.store.dispatch(mn({assistantCode:t,transcript:o,includeMetadata:s,input:r,externalConversationId:a,skipState:!i}));if(l.error)throw new Error(`Assistant evaluation failed: ${(c=l.payload)!=null?c:l.error.message}`);return l.payload.output})}evaluateConversationAssistant(t,n){return M(this,null,function*(){var u,f,p;yield this.loadProfileConfig();let r=this.state.profile.data;if(!r&&((u=this.state.conversation.current)!=null&&u.profileCode)&&(yield this.loadProfileConfig(),r=this.state.profile.data),!r){te.warn("Can't evaluate assistant when profile is not loaded yet.");return}let o=QA(r,t),i=(f=n==null?void 0:n.showCuesInWidget)!=null?f:!0,d=n!=null?n:{},{showCuesInWidget:s}=d,a=ie(d,["showCuesInWidget"]),l=(p=n==null?void 0:n.externalConversationId)!=null?p:this.hasConversation()?this.externalId():"",c=yield Promise.all(o.map(m=>this.queues.push(m,()=>M(this,null,function*(){var v,h;let g=yield this.store.dispatch(mn(A(E({assistantCode:m,includeMetadata:!0},a),{skipState:!i})));if(g.error)throw new Error(`Assistant evaluation failed: ${(v=g.payload)!=null?v:g.error.message}`);return{assistantCode:m,evaluationId:g.payload.evaluationId,output:g.payload.output,externalConversationId:(h=g.payload.externalConversationId)!=null?h:l}})).catch(g=>{if(g instanceof xu)return te.warn(`Queued assistant "${m}" was outdated and dropped`),null;throw g})));if(!i)return c.filter(m=>m!==null)})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:i,selection:s}=this.state.input,{inlineSuggestions:a,autoSelectSuggestion:l,showTextSuggestions:c,suggestionsPlacement:u}=this.settings,f=a||l,d=u==="inline"||u==="below"?"below":"above",p=o.length>0;if(this.store.dispatch(Tb(sh(t))),!jr(this.state)||t.key!=="Tab"&&!c)return;let m=()=>{n||!p||s&&(t.shiftKey||(this.store.dispatch(Pb()),t.preventDefault()))},g=()=>{n||!p||f&&i<=0||s&&(t.shiftKey||(this.store.dispatch(Ib()),t.preventDefault()))};switch(t.key){case"ArrowUp":d==="below"?g():m();break;case"ArrowDown":{d==="below"?m():g();break}case"Escape":{n||(this.store.dispatch(bd(-1)),this.store.dispatch(Si({collapse:!0})),this.store.dispatch(mI(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let v=js(this.state);if(!v)return;this.store.dispatch(lu(!1)),this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(f||this.state.input.selectedSuggestionIndex===-1)return;let v=js(this.state);if(!v)return;this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(f||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let v=js(this.state);if(!v)return;this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(Si({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Ho([]))}handlingTimeStart(){this.state.handlingTime.startTime||(te.info("Start handling time"),this.store.dispatch(zA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(te.info("Stop handling time"),this.store.dispatch(jm()))}logSendMessage(t){let n=XA(this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEvent("Send Message",{conversationId:this.conversationId(),data:n}),this.emit("send-message-event",n))}logHandlingTime(){let t=YA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(HA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Di((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(_b()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(i){te.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),te.error(i)}})}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}setPlatformVariables(t){this.store.dispatch(Bb(t))}whenConversationLoaded(t){let n=i=>{var s;return(s=i.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());return n(this.state)&&r(),this.subscribe(n,i=>{i&&r()})}overlayContainerFactory(t,n,r,o){let[i,s]=wu(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),[i,s]}createInlineContainer(t,n){var a;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,s=i?i.ownerDocument.defaultView:null;if(i&&(s===window||(s==null?void 0:s.parent)===window)){let[l,c]=wu(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return os(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),te.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(te.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(Ab(r.metrics))):te.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Gm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let d=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=d,l=ie(d,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),os(t),this.inputMediator=a||(Ts(t)?new Ps(t):new Rs(t)),this.inputMediator.on("change",({plainText:p,rawHTML:m,suggestionTextStart:g})=>{this.store.dispatch(Ed({text:p,html:m,suggestionTextStart:g}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(kb(sh(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:m})=>{this.store.dispatch(Rb({text:p,selectionText:m}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(Cb(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(Cd(p))},500):this.store.dispatch(Cd(p))}),this.unmountHandlers.push(()=>{clearTimeout(u)}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(vm(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(vm(!0))}),this.renderSuggestions(t,c),this.subscribe(Ui("inlineSuggestions"),()=>{this.renderSuggestions(t,c)}),this.subscribe(Ui("suggestionsPlacement"),()=>{this.renderSuggestions(t,c)});let f=this.renderOverlays(n);this.unmountHandlers.push(()=>{f.unmount()}),this.store.dispatch(Ed({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),suggestionTextStart:this.inputMediator.getSuggestionTextStart()})),this.store.dispatch(Cd(this.inputMediator.getSelection())),this.store.dispatch(vm(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{this.restoreMetrics(),this.syncInputMediator(),this.refreshTextSuggestions(),this.promptForNickname()}),this.isMounted=!0}promptForNickname(t){if(this.nicknameDialogUnsubscribe||this.nicknameDialogFailed)return;let n=this.createContainer("nickname-dialog",document.body);document.body.appendChild(n);let r=(0,No.createRoot)(n),o=null,i=a=>{o=a,s()},s=()=>{r==null||r.render((0,ke.jsx)(ko,{store:this.store,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(_I,{id:"deepdesk-nickname-dialog",error:o,onSave:a=>M(this,null,function*(){try{yield this.store.dispatch(Db({agentNickname:a})).unwrap(),console.log("setAgentNickname",a),this.broadcastEvents.send(Rd,{showNicknameDialog:!1}),this.nicknameDialogUnsubscribe&&this.nicknameDialogUnsubscribe()}catch(l){te.error("Error setting agent nickname",l),i("error"),this.nicknameDialogFailed=!0}})})})}))};s(),this.nicknameDialogUnsubscribe=()=>{r.unmount(),n.remove(),this.nicknameDialogUnsubscribe=null}}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o,i;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.belowSuggestions)==null||r.unmount(),(o=this.floatingMenu)==null||o.unmount(),this.unmountHandlers.forEach(s=>s()),this.unmountHandlers=[],(i=this.inputMediator)==null||i.dispose(),this.nicknameDialogUnsubscribe&&this.nicknameDialogUnsubscribe(),this.isMounted=!1}dispose(){this.unmount(),this.unmountWidget(),this.disposeHandlers.forEach(t=>t()),this.disposeHandlers=[],this.off()}renderSuggestions(t,n){var r,o,i,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(i=this.aboveSuggestions)==null||i.unmount(),(s=this.belowSuggestions)==null||s.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions||this.settings.suggestionsPlacement==="inline"?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.settings.suggestionsPlacement==="below"?this.belowSuggestions=this.renderAboveOrBelowSuggestions(t,n,"below"):this.aboveSuggestions=this.renderAboveOrBelowSuggestions(t,n,"above")}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),i=(0,No.createRoot)(o);i.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(II,{})})}));let s=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",s),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",s),i.unmount(),o.remove()}}}renderAboveOrBelowSuggestions(t,n,r){let{customStyles:o,closestScrollSelector:i,appendOverlayTo:s}=n,a=i&&GS(t,i)||void 0,[l,c]=this.overlayContainerFactory("deepdesk-tab-completion",a||t,{appendTo:s,closestScrollElement:a,mirrorOverflow:!0,onRemove:()=>this.unmount()},o==null?void 0:o.rootNode),[u,f]=this.overlayContainerFactory("deepdesk-suggestions-overlay",a||t,{appendTo:s,placement:r},o==null?void 0:o.suggestionsRootNode),d=(0,No.createRoot)(l);d.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(tA,{inputElement:t})})}));let p=(0,No.createRoot)(u);return p.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(BI,{onLogIn:()=>this.loginViaPopup().catch(m=>te.warn(m.message))})})})),{unmount(){d.unmount(),p.unmount(),c(),f()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&GS(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:s!=null?s:i},r==null?void 0:r.floatingMenuParent),u=(0,No.createRoot)(l);return u.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(fI,{onLogIn:()=>this.loginViaPopup().catch(f=>te.warn(f.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,No.createRoot)(r);return o.render((0,ke.jsx)(ko,{store:this.store,customStyles:n,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(aI,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&te.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:i}),this.widgetRoot=(0,No.createRoot)(t),this.widgetRoot.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(RA,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>te.warn(s.message))})})}))}unmountWidget(){var t,n;(n=(t=this.widgetRoot)==null?void 0:t.unmount)==null||n.call(t),this.widgetRoot=null,this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r,s=(0,No.createRoot)(n);return s.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(FS,{children:(0,ke.jsxs)(Yp,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:Hl,children:[(0,ke.jsx)(Hs,{children:(0,ke.jsx)(Qp,{title:r.title,emptyState:r.emptyState})}),(0,ke.jsx)(DS,{children:(0,ke.jsx)(Xp,{})})]})})})})),{unmount(){s.unmount()}}}setupHandlingTime(t){let n=Xm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){ZA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){var t;return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(t=this.state.conversation.current)!=null&&t.profileCode?(this.loadProfileConfigPromise=Promise.resolve().then(()=>M(this,null,function*(){yield this.store.dispatch(Kc()).unwrap();let n=mi(this.state);n&&this.store.dispatch(Yd({showSearch:n.search,showImageSearch:n.imageSearch,showEntitiesCommand:n.entitiesCommand,showSummaryCommand:!!n.summarizerAssistantNew,showKnowledgeSearch:!!n.knowledgeAssistantNew||!!n.knowledgeAssistant,recommendTextSuggestions:n.recommendTextSuggestions}))})).finally(()=>{mi(this.state)||(this.loadProfileConfigPromise=null)}),this.loadProfileConfigPromise):Promise.resolve()}loginViaPopup(t){return M(this,null,function*(){return new Promise((n,r)=>{this.store.dispatch(hd());let o=new MessageChannel,i=o.port1,s=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=p=>M(this,null,function*(){var m,g;if((m=p.data)!=null&&m.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(El),l=!0,o.port1.close(),n()}catch(v){console.error(v),r(v)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let f=p=>M(this,null,function*(){var m;if(p.origin===a.origin)switch((m=p.data)==null?void 0:m.type){case"deepdesk-popup-request-origin":{try{let g=JSON.stringify({type:"deepdesk-popup-parent-origin"});u==null||u.postMessage(g,a.origin)}catch(g){te.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-loaded":{try{let g=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(g,a.origin,[o.port2])}catch(g){te.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{if(c(),p.data.message==="Platform account url mismatch"){let g=`Please contact your administrator: The platform account url (${p.data.targetOrigin}) is misconfigured as it differs from the origin of the page that opened the popup (${p.data.openerOrigin}).`;te.warn(g),this.store.dispatch(eh(g)),r(new Error(g))}if(p.data.message==="Timeout"){let g="Please contact your administrator: Popup timed out. Check if the account's platform url is configured correctly.";te.warn(g),this.store.dispatch(eh(g)),r(new Error(g))}r(new Error(p.data.message));break}}});window.addEventListener("message",f);let d=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.disposeHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}refreshTextSuggestions(){return M(this,null,function*(){this.isMounted&&(yield this.store.dispatch(gm()))})}refreshWidgetSuggestions(){return M(this,null,function*(){if(!this.widgetRoot)return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Gc(this.state);try{n.forEach(({type:r})=>{switch(r){case"entities":this.store.dispatch(vr());break;case"pinned-messages":case"sticky-messages":break;default:ju.includes(r)||this.store.dispatch(Sr(r))}})}catch(r){this.handleError(r)}})}};ol.version="19.3.2-beta.6",ol.count=0;var bu=ol;function mz(e){return M(this,null,function*(){var o,i,s;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(s=(i=e.mimeType)!=null?i:n.headers.get("Content-Type"))!=null?s:"image/jpeg"})})}function d_(e,t){return M(this,null,function*(){let n=yield mz(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}})}function f_(e,t,n){return M(this,null,function*(){yield new Mo(e).authenticateWithKey(t,n)})}function p_(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function m_(r,o){return M(this,arguments,function*(e,t,n={}){var f,d;let{value:i}=e,{start:s,end:a}=(f=n.replace)!=null?f:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,c=(d=n.selectionAfter)!=null?d:{start:s+t.length,end:s+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function g_(r,o){return M(this,arguments,function*(e,t,n={}){let i=n.replace?Ti(e,n.replace.start,n.replace.end):tl(e),s,a=()=>{if(n.setRange)return n.setRange(i.cloneRange());i.deleteContents(),s=document.createElement("span"),i.insertNode(s),n.insertBRs!==!1?t.split(`
84
- `).reverse().forEach((l,c)=>{c>0&&i.insertNode(document.createElement("br")),i.insertNode(document.createTextNode(l))}):i.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?Ti(e,n.selectionAfter.start,n.selectionAfter.end):(i.collapse(!1),i),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!s)return;s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}function gz(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function hz(e){let t=document.createDocumentFragment();return e.split(`
85
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function h_(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):h_(n,t)}function y_(o,i){return M(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let s;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var d;let l=(d=e.ownerDocument.defaultView)!=null?d:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;s=document.createElement("span"),u.insertNode(s);let f=r?gz(t):hz(t);n?h_(u.startContainer,f):(u.insertNode(f),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!s)try{s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}return B_(yz);})();
83
+ `);let m=d?r:0,g=p?Math.min(i,u.childNodes.length):u.childNodes.length;for(let v=m;v<g&&(c(u.childNodes[v]),a!==2);v++);break}default:break}p&&(a=2)}return c(e),l}var AA=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(AA||{}),_o=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedSuggestionTextStart=0;this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedSuggestionTextStart=this.getSuggestionTextStart(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}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)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.getSuggestionTextStart(),i=this.cachedCaretPosition===null;if(!this.isActive)return;t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit");let s=t!==this.cachedText,a=n!==null&&n!==this.cachedHTML,l=o!==this.cachedSuggestionTextStart;if((s||a||l)&&(s?(this.cachedText=t,this.cachedHTML=n):a&&(this.cachedHTML=n),this.cachedSuggestionTextStart=o,i=!0,this.emit("change",{plainText:t,rawHTML:n,suggestionTextStart:o})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,i=!0,this.emit("selection",r)),!i)return;let c=this.getCaretPosition();zo(c,this.cachedCaretPosition)||(this.cachedCaretPosition=c,this.emit("caretposition",c))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(AA).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}getSuggestionTextStart(){return 0}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))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function _A(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Rs=class extends _o{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),Su(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o=r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let i=this.element.ownerDocument.createRange();return i.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),i.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!i||!this.element.contains(i.startContainer)||!this.element.contains(i.endContainer)?null:i}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!_A(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!_A(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return vu(this.element,n);let r=this.lastKnownSelection;if(r&&IA(this.element,r.start,r.end))return r;let o=tl(this.element);return o.collapse(!1),vu(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return Su(this.element,Ti(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(i=>{var s,a;i.length===2&&i[0].addedNodes.length===1&&((s=i[0].addedNodes[0])==null?void 0:s.textContent)==="\u2060"&&((a=i[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var J6=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function MA(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,i=window.getComputedStyle(e),s=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",J6.forEach(u=>{o[u]=i[u]}),n?e.scrollHeight>Number.parseInt(i.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),s.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(i.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(i.borderLeftWidth)};return s.removeChild(r),c}var Ps=class extends _o{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return MA(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function NA(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function ez(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var HS=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},BS=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=NA(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},US=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),te.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new BS(t,this.deepdeskUrl,{debug:!0}):new HS(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=ez(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(te.info("Received broadcast event",this.externalId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;te.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage(A(E({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},OA=US;function tz(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function Ve(e){return Array.isArray(e)?e.map(Ve):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>A(E({},t),{[tz(n)]:Ve(e[n])}),{}):e}function nz(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Kt(e){return Array.isArray(e)?e.map(Kt):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>A(E({},t),{[nz(n)]:Kt(e[n])}),{}):e}var nl=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var VS=e=>new Promise(t=>{setTimeout(t,e)});var Is=class extends nl{constructor(){super(...arguments);this.name="ClientError"}},$S=class extends nl{constructor(){super(...arguments);this.name="ServerError"}},WS=new Map;function rz(e){return M(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(te.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var As=class{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.refreshingToken=null;this.lastFailedRefreshAt=null;this.failedRefreshCooldown=1e4;var r;this.fetch=(r=n.fetch)!=null?r:window.fetch.bind(window)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",C=n,{useCache:c=!1,abortLatest:u=!1,attempts:f=1,retryDelay:d=500,refreshTokenOn401:p=!0,retryOnError:m=k=>k instanceof TypeError,retryOnResponse:g=k=>k.status>=500,version:v=null}=C,h=ie(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(WS.has(s)){r(WS.get(s));return}}let y=A(E({credentials:"include"},h),{headers:E({Accept:"application/json","Content-Type":"application/json"},h.headers)});!l&&this.csrfToken&&(y.headers=A(E({},y.headers),{"X-CSRFToken":this.csrfToken})),typeof v=="string"&&(y.headers=A(E({},y.headers),{"X-Deepdesk-API-Version":v}));let S=f,x=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&u&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let T=()=>M(this,null,function*(){return S--,a(s,y).then(k=>M(this,null,function*(){return g(k)&&!i.isAborted&&S>0?(yield VS(d),T()):k.status===401&&p===!0&&x===!1?(x=!0,yield this.refreshToken(),T()):k})).catch(k=>M(this,null,function*(){if(m(k)&&!i.isAborted&&S>0)return yield VS(d),T();throw k}))});T().then(k=>M(this,null,function*(){let R=yield rz(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new $S("Server Error",R));return}if(k.status===401){o(new Is("Unauthorized",R));return}if(k.status===403){o(new Is("Forbidden",R));return}if(k.status===404){o(new Is("Not Found",R));return}if(k.status>=400){o(new Is("Bad Request",R));return}c&&WS.set(s,R),r(R)})).catch(k=>{o(k)})})}validateToken(){return M(this,null,function*(){let t,n,r;try{({has_valid_access_token:t,is_logged_in:n,has_valid_refresh_token:r}=yield this.get("/apis/admin/session/validate/",{refreshTokenOn401:!1}))}catch(o){return!1}if(!t){if(!r)return!1;try{yield this.refreshToken();let{is_logged_in:o}=yield this.get("/apis/admin/session/validate/",{refreshTokenOn401:!1});return o}catch(o){return!1}}return n})}refreshToken(){let t=Date.now();return this.lastFailedRefreshAt&&t-this.lastFailedRefreshAt<this.failedRefreshCooldown?Promise.reject(new Is("Unauthorized","Failed to refresh token")):this.refreshingToken?this.refreshingToken:(this.refreshingToken=this.get("/apis/admin/session/refresh/",{refreshTokenOn401:!1}).catch(n=>{throw(n==null?void 0:n.message)==="Unauthorized"&&(this.lastFailedRefreshAt=Date.now()),n}).finally(()=>{this.refreshingToken=null}),this.refreshingToken)}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,E({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,E({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,E({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,E({method:"DELETE"},n))}};var LA;(t=>{let e;(a=>(a.SUCCESS="success",a.FAILURE="failure",a.CONDITIONS_NOT_MET="conditions_not_met",a.MAX_RECURSION_LEVEL="max_recursion_level",a.NO_ACCESS_TO_ASSISTANT="no_access_to_assistant"))(e=t.EvaluationStatus||(t.EvaluationStatus={}))})(LA||(LA={}));function jS(e){return A(E({},Ve(e)),{metadata:e.metadata})}var _s=class _s{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new As(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>M(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return M(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(_s.exchangeTokenPromise||(_s.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),_s.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return M(this,null,function*(){var r;yield this.preflight(),te.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",A(E({chat_start_time:new Date().toISOString()},Kt(t)),{metadata:(r=t.metadata)!=null?r:{}}));return jS(n)})}getMe(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return Ve(t)})}postIdentity(t){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",Kt(t))})}patchMe(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",Kt(t));return Ve(n)})}getProfile(t){return M(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return Ve(n)})}getKnowledgeAssistant(t){return M(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return Ve(n)})}getContentTypes(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return Ve(t)})}getAccount(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return Ve(t)})}getPlatformConfig(t){return M(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return Ve(r)})}checkUserExists(t){return M(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return M(this,arguments,function*(t,n={}){yield this.preflight(),te.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:i=1e3}=n,s=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return te.info(`Successfully retrieved conversation ${s.id} for session ${t}`),jS(s)})}isConversationSupported(r){return M(this,arguments,function*(t,n={}){te.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:i=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return M(this,null,function*(){var i;yield this.preflight();let r=Kt(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return jS(o)})}postMessages(t,n){return M(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>A(E({},Kt(r)),{metadata:r.metadata})))})}sendEvent(t,n){return M(this,null,function*(){yield this.preflight();let a=n,{data:r}=a,o=ie(a,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((l,[c,u])=>A(E({},l),{[c]:u}),{}),s=["platform","agentId","agentName","agentEmail","conversationId"].reduce((l,c)=>(o[c]&&(l[c]=o[c]),l),{});return this.client.post("/api/v2/events",Kt(A(E(E({},i),s),{data:r,name:t})),{version:"v2"})})}getEntities(t){return M(this,null,function*(){return yield this.preflight(),yield this.client.post("/api/v2/entities",{messages:t.filter(r=>r.text)})})}getTemporaryExchangeToken(){return M(this,null,function*(){return(yield this.client.get("/apis/admin/session/exchange-token/")).jwt})}exchangeTokenForAccessCookie(t){return M(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw te.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",Kt(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return M(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,Kt(n),{abortLatest:!0})).map(s=>A(E({},Ve(s)),{text:s.text||s.url||s.message,source:r,type:r})).filter((s,a,l)=>a===l.findIndex(c=>c.text===s.text))})}isLoggedIn(){return M(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return M(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,Kt(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))})}getPinnedMessages(t){return M(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return Ve(n).map(r=>A(E({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return M(this,null,function*(){let n=yield this.client.post("/api/v2/style-suggestions",Kt(t),{abortLatest:!0,version:"v2"});return Ve(n)})}search(t){return M(this,null,function*(){let n=yield this.client.post(`/api/v2/profiles/${t.profile}/search`,Kt(t));return Ve(n)})}loginWithPassword(t,n){return M(this,null,function*(){yield this.preflight();let r=yield this.client.post("/apis/admin/session/login/",{username:t,password:n},{refreshTokenOn401:!1});return Ve(r)})}logout(){return M(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/logout/",{},{refreshTokenOn401:!1})})}requestLoginByEmail(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return Ve(n)})}requestPasswordlessToken(){return M(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return Ve(t.token)})}getCsrfToken(){return M(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return M(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return Ve(n)})}evaluateAssistant(t,n){return M(this,null,function*(){var l,c,u;yield this.preflight();let r=new URLSearchParams;n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let o=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,i=f=>Kt(f),s=(l=n==null?void 0:n.transcript)==null?void 0:l.map(f=>{var d;return E({source:f.source,text:f.text},(d=f.attachments)!=null&&d.length?{attachments:f.attachments.map(i)}:{})}),a=yield this.client.post(o,E({input:(c=n==null?void 0:n.input)!=null?c:{},conversation:s},(u=n==null?void 0:n.attachments)!=null&&u.length?{attachments:n.attachments.map(i)}:{}));return Ve(a)})}createAssistantThread(t){return M(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return Ve(r)})}postMessageToAssistantThread(t){return M(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,i=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return Ve(i)})}translateMessages(t){return M(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/v2/translate",Kt(t));return Ve(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(nw);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&te.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};_s.exchangeTokenPromise=null;var Mo=_s;var $m=class{constructor(t){this.options=t;this.socket=null;this.maxReconnectAttempts=5;this.reconnectInterval=25e3;this.cleanupCallbacks=[];var n,r;this.socket,this.eventListeners=new Map,this.url=t.url,this.maxReconnectAttempts=(n=t.maxReconnectAttempts)!=null?n:this.maxReconnectAttempts,this.reconnectInterval=(r=t.reconnectInterval)!=null?r:this.reconnectInterval,this.shouldReconnect=t.shouldReconnect}connect(){let t=()=>this.cleanup();window.addEventListener("beforeunload",t),this.cleanupCallbacks.push(()=>window.removeEventListener("beforeunload",t)),this.reconnect()}setupListeners(){this.socket&&(this.socket.onmessage=t=>{var n;try{let r=Ve(JSON.parse(t.data));r.event&&this.eventListeners.has(r.event)&&((n=this.eventListeners.get(r.event))==null||n.forEach(o=>o(r.data)))}catch(r){console.error("Error parsing WebSocket message:",r)}},this.socket.onclose=t=>{console.log("WebSocket connection closed:",t),setTimeout(()=>{this.reconnect()},this.reconnectInterval)},this.socket.onerror=t=>{console.error("WebSocket error:",t)})}reconnect(){var t,n;if(this.maxReconnectAttempts<=0){console.error("Max reconnect attempts reached, closing WebSocket connection."),(t=this.socket)==null||t.close();return}if(!this.shouldReconnect()){console.error("Should not reconnect, closing WebSocket connection."),(n=this.socket)==null||n.close();return}this.socket&&(this.socket.onmessage=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.close()),this.socket=new WebSocket(this.url),this.setupListeners(),this.maxReconnectAttempts--}send(t,n){if(!this.socket){console.error("WebSocket connection is not open.");return}this.socket.send(JSON.stringify({event:t,data:n}))}on(t,n){this.eventListeners.has(t)||this.eventListeners.set(t,[]);let r=this.eventListeners.get(t);r&&!r.includes(n)&&r.push(n)}close(){var t;(t=this.socket)==null||t.close()}cleanup(){this.close(),this.cleanupCallbacks.forEach(t=>t()),this.cleanupCallbacks=[]}};var DA={startTime:null,stopTime:null},FA=e=>e.handlingTime,zA=Re({name:"handlingTime",initialState:DA,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(lt,()=>DA)}}),{handlingTimeStart:HA,handlingTimeStop:jm,handlingTimeReset:BA}=zA.actions,UA=zA.reducer;var VA=(e={})=>{let t=E({onAuthError:Ws(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var WA=(e={})=>{let t,n=!0,r=E({getStyleSuggestions:Es,debounce:500},e);return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:d}=c.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function oz(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end&&e.suggestionTextStart===t.suggestionTextStart}var $A=(e={})=>{let t=E({getTextSuggestions:Sr,getAutocompleteSuggestions:su,debounce:200,check:jr},e),n;return r=>o=>i=>{var g;let{input:s}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,f=(g=l.conversation.current)==null?void 0:g.id,d=i.type===gm.toString();if(!f||!c&&!u)return a;let{input:p}=l;return oz(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let v=Ni(l);v===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(v))},d?0:t.debounce)),a}};var jA=Es.fulfilled.toString();function iz(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 KA=e=>t=>n=>r=>{var c;if(r.type!==jA){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;if(o===s)return;let l=iz(o,s);r.type===jA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var sz=Yu({assistants:AE,auth:gb,conversation:wb,contentTypes:vP,passwordlessToken:iA,entities:KP,handlingTime:UA,info:Wb,input:Nb,settings:ME,profile:EP,search:Yb,styleSuggestions:II,ui:yI,textSuggestions:nI});function GA(e){return nb({reducer:sz,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(VA()).concat($A({debounce:200})).concat(WA({debounce:500})).concat(KA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,i)=>o.concat(i),n)},preloadedState:e.preloadedState})}function qA(e,t,n){if(t==="")return null;let r=new RegExp(`\\b${Im(t)}\\b`,"gi"),o,i=null;for(;(o=r.exec(e))!==null&&!(o.index>n);)i={start:o.index,end:o.index+o[0].length};return i}var az=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},lz=e=>t=>n=>r=>{var l,c,u,f,d,p;let o=t.getState(),i=Ui("inlineSuggestions")(o),s=Ui("autoSelectSuggestion")(o)||i;switch(r.type){case Ws.toString():{!r.payload&&e.emit("logout",void 0);break}case gd.fulfilled.toString():{e.emit("logout",void 0);break}case vr.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(l=o.conversation.current)==null?void 0:l.id,data:{entities:r.payload}});break;case Di.toString():e.logSendMessage(r.payload);break;case Gd.toString():e.emit("call-to-action",{cue:r.payload});break;case mn.fulfilled.toString():if(!r.isBroadcasted){let{externalConversationId:m,currentExternalIdAtRequest:g}=(c=r.payload)!=null?c:{};(!m||!g||m===g)&&e.broadcast(uh,r,!1)}break;case mn.rejected.toString():break;default:break}let a=n(r);switch(r.type){case Di.toString():e.handleAfterSendMessage(r.payload);break;case lu.toString():e.onUpdateShowTabHint(r.payload);break;case jm.toString():e.logHandlingTime();break;case Ks.toString():e.broadcast(Pd,r);break;case Li.toString():e.broadcast(Pd,r);break;case qd.toString():t.dispatch(Li({source:"assistant",assistantCode:r.payload.code}));break;case"analytics/logEvent/fulfilled":{let m=o.assistants.cues.find(g=>g.code===r.meta.arg.data.assistantCode);e.emit("event",A(E({},r.meta.arg),{cue:m}));break}case kn.toString():{let{start:m,end:g}=o.input.selection;e.emit("select-suggestion",A(E({type:az(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:m,end:g}:{start:0,end:g}})),i&&t.dispatch(Ho([]));break}case PI.toString():{let{keyword:m,suggestion:g,eventMetrics:v}=r.payload,{text:h,selection:y}=o.input,S=qA(h,m,(u=y==null?void 0:y.end)!=null?u:h.length);if(!S)break;e.emit("select-suggestion",{text:g,type:"style",replace:S,suggestion:{text:g,source:"style"},eventMetrics:v});break}case wd.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(f=o.conversation.current)==null?void 0:f.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Ho.toString():{s&&r.payload.length>0&&t.dispatch(bd(0));break}case mn.fulfilled.toString():{let{evaluationId:m,output:g,externalConversationId:v}=r.payload,h=r.meta.arg.assistantCode;if(e.emit("event",{name:"Assistant evaluation completed",data:{evaluationId:m,assistantCode:h,assistantOutput:TE(g),externalConversationId:v,evaluationStatus:"success"}}),!r.meta.arg.skipState){let y=t.getState().assistants.cues;e.emit("cues",y)}break}case mn.rejected.toString():{let m=r.meta.arg.assistantCode,g=(p=r.meta.arg.externalConversationId)!=null?p:(d=t.getState().conversation.current)==null?void 0:d.externalId;e.emit("event",{name:"Assistant evaluation completed",data:{evaluationId:"",assistantCode:m,assistantOutput:"",externalConversationId:g,evaluationStatus:"failed"}});break}default:break}return a},YA=lz;function KS(e){return e.toISOString().replace("T"," ").replace("Z","")}var cz=(e,t)=>t.version,XA=fn([Gs,Pr,FA,cz],(e,t,n,r)=>{if(!t)return te.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:i}=n;return!o||!i?(te.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:KS(o),timeStop:KS(i)}});function QA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:i}}=e.input,s=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:s,numPastes:r,suggestions:i}}var xu=class extends Error{};function uz(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}var Km=class{constructor(){this.queues={}}push(t,n){let r=()=>{let i=this.queues[t][1];i?(this.queues[t]=[i.promise,null],i.resolve()):delete this.queues[t]};if(!this.queues[t]){let i=n().finally(r);return this.queues[t]=[i,null],i}this.queues[t][1]&&this.queues[t][1].reject(new xu("Queued async function is outdated"));let o=uz();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};function GS(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return GS(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?GS(o,t):null}function qS(e,t){return GS(e,t)}var dz={accepted:"onConversationAcceptedAssistants","new-message":"onConversationNewMessageAssistants",ended:"onConversationEndedAssistants"},ZA=(e,t)=>{var o,i,s;if(!((s=(i=(o=e.uiConfig)==null?void 0:o.widget)==null?void 0:i.types.find(a=>a.type==="cues"))==null?void 0:s.isActive))return te.warn("Triggered a conversation assistant, but cues are not configured in widget."),[];let r=e[dz[t]];return r&&r.length>0?r.map(a=>a.code):(te.warn(`No assistant set in profile for conversation event "${t}"`),[])};function JA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function fz(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Gm(e){return fz(e)&&(Ts(e)||Rm(e))}var t_,qr=new Map,pz=["bottom","height","left","right","top","width"],e_=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:pz.some(n=>e[n]!==t[n]);function n_(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...n_(t)]:[]}function r_(e,t){return!e||!t?null:A(E({},e),{top:e.top+t.top,left:e.left+t.left})}var qm=!1,o_=()=>{qm=!0;let e=[];if(qr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),qr.delete(n);return}let r=n.getBoundingClientRect();e_(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(r_,t.rect):t.rect;e_(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),qr.size===0){qm=!1;return}t_=window.requestAnimationFrame(o_)};function YS(e,t){let n=n_(e),r=[],o=n.map((i,s)=>YS(i,a=>{r[s]=a;let l=qr.get(e);if(!l)return;let c=r.reduce(r_,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),qr.has(e)){let s=qr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else qr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!qm&&o_()},unobserve(){o.forEach(s=>s.unobserve());let i=qr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||qr.delete(e),qr.size||(cancelAnimationFrame(t_),qm=!1)}}}}var i_,Yr=new Map,s_=()=>{Yr.forEach((e,t)=>{if(!t.isConnected){Yr.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)))}),Yr.size!==0&&(i_=window.requestAnimationFrame(s_))};function a_(e,t){return{observe(){let n=Yr.size===0;Yr.has(e)?Yr.get(e).callbacks.push(t):Yr.set(e,{visible:void 0,callbacks:[t]}),n&&s_()},unobserve(){let n=Yr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Yr.delete(e),Yr.size||cancelAnimationFrame(i_)}}}}var XS=["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 QS(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function rl(e){return Number.parseFloat(e)}function Ym(e){return Math.round(e*1e6)}function l_(e){return e/1e6}function ZS(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=rl(e.width),i=rl(e.borderLeftWidth),s=rl(e.borderRightWidth),a=rl(e.paddingRight),l=l_(Ym(o)-Ym(i)-Ym(s)),c=l_(Ym(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function wu(e,t={}){var u,f;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",os(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};QS(r,n,XS),ZS(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=a_(e,()=>{QS(r,n,XS),ZS(r,e,n),i(),setTimeout(i,0)}),a,l=!0,c=YS(e,d=>{if(d===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),d.height===0&&d.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(QS(r,n,XS),ZS(r,e,n),i(),t.placement==="below"&&n.classList.add("below"),n.style.top=`${d.top}px`,n.style.left=`${d.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),m=window.getComputedStyle(t.closestScrollElement),g=rl(m.borderTopWidth),v=rl(m.borderBottomWidth),h=p.top+g-d.top,y=d.top+d.height+-(p.top+p.height-v);n.style.clipPath=`inset(${h}px 0px ${y}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(f=e.parentElement)==null||f.appendChild(n),c.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),c.unobserve(),s.unobserve(),n.remove()}]}function mz(e){return e.offsetParent!==null}function c_(e){if(!mz(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 Xm(e,t,n=100){let r=c_(e);t({isVisible:r});let o=setInterval(()=>{let i=c_(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var u_=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){te.warn("[Deepdesk] SessionStorage is blocked by browser")}}});var ke=b(I());var d_=u_("showTabHint",!0),ol=class ol{constructor({deepdeskUrl:t,version:n=ol.version||"unknown",locale:r="en-US",token:o,fetch:i,productName:s,createCustomChannel:a,websocketClient:l=$m}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.disposeHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.belowSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.nicknameDialogUnsubscribe=null;this.nicknameDialogFailed=!1;this.dynamicThunkObject={};this.queues=new Km;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let c=t.replace(/\/api$/,"");this.deepdeskApi=new Mo(c,{token:o,fetch:i}),this.version=n,this.instanceId=ol.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[YA({broadcast:(m,g,v)=>{this.broadcastEvents.send(m,g,v)},emit:(m,g)=>this.emit(m,g),handleAfterSendMessage:m=>this.handleAfterSendMessage(m),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:m=>this.logSendMessage(m),onUpdateShowTabHint:m=>d_.update(m),sendEvent:(m,g)=>this.deepdeskApi.sendEvent(m,g)})]};this.store=GA(u),this.broadcastEvents=new OA({debug:!0,deepdeskUrl:c,eventMap:Xb(this.store),createCustomChannel:a}),this.disposeHandlers.push(()=>{this.broadcastEvents.cleanup()}),this.ws=new l({url:`${c}/api/v2/me/realtime`.replace("https","wss"),reconnectInterval:25e3,shouldReconnect:()=>M(this,null,function*(){var m;return(m=Pt(this.state))!=null?m:!1})}),this.whenLoggedIn(()=>this.ws.connect()),this.store.dispatch(lu(d_.value())),this.store.dispatch(Yd({locale:r,adminUrl:c,productName:s}));let f=[],d=m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(IE(m))};this.hasConversation()?g():f.push(g)};this.ws.on("assistants::direct_response",d),this.ws.on("assistants::user_notification",d),this.ws.on("assistants::response_chunk",m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(PE(m))};this.hasConversation()?g():f.push(g)}),this.ws.on("assistants::suggest_as_reply",m=>{if(!m.conversationId)return;let g=()=>{this.conversationId()===m.conversationId&&this.store.dispatch(Ks([{text:m.payload.message,type:"text",source:"assistant",assistantCode:m.code,sourceLabel:m.name}]))};this.hasConversation()?g():f.push(g)});let p=this.whenConversationLoaded(()=>{var m;this.broadcastEvents.setExternalId((m=this.state.conversation.current)==null?void 0:m.externalId),f.forEach(g=>g()),f.length=0});this.disposeHandlers.push(()=>{this.ws.cleanup(),f.length=0,p()})}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=Oi(this.state)[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(te.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(te.warn("Profile has not been loaded (yet)"),!0):(te.warn("No conversation loaded (yet)"),!0)}whenLoggedIn(t){if(Pt(this.state))t();else{let n=this.subscribe(Pt,r=>{r&&t()});this.disposeHandlers.push(()=>{n()})}}login(){return this.store.dispatch(Ws(null)),this.store.dispatch(Jr()),new Promise(t=>{this.whenLoggedIn(()=>t())})}isLoggedIn(){return M(this,null,function*(){return(yield this.store.dispatch(Jr())).payload})}isConversationSupported(t,n){return M(this,null,function*(){return(yield this.store.dispatch(rh({externalId:t,options:n}))).payload})}createConversation(t){return M(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(vd(A(E({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return M(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(Sd({externalId:t,options:n}))).payload})}upsertConversation(t){return M(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(oh(A(E({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return M(this,null,function*(){yield this.store.dispatch(ih(t))})}updateConversation(t){return M(this,null,function*(){return(yield this.store.dispatch(xd(t))).payload})}resetConversation(){this.store.dispatch(lt()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(Yd(t))}setVisitorInfo(t){this.store.dispatch(Hb(t))}setCustomData(t){this.store.dispatch(Bb(t))}setAgentInfo(t,n){return M(this,null,function*(){var o;yield this.store.dispatch(wl(E(E({},t),n))),(o=this.state.info.agentInfo)!=null&&o.agentNickname||this.broadcastEvents.send(Rd,{showNicknameDialog:!0})})}setAgentSettings(t){return M(this,null,function*(){yield this.store.dispatch(ah(t))})}getAgentSettings(){return M(this,null,function*(){return(yield this.store.dispatch(lh())).payload})}refresh(){return M(this,null,function*(){if(this.shouldAbort())return Promise.resolve();let t=[];return t.push(this.refreshTextSuggestions()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}syncInputMediator(){this.inputMediator&&this.store.dispatch(Ed({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),suggestionTextStart:this.inputMediator.getSuggestionTextStart()}))}notifyExternalSuggestion(t){this.store.dispatch(kn(t))}evaluateAssistant(t,n){return M(this,null,function*(){var u;let{input:r={},attachments:o=[],transcript:i,showCuesInWidget:s=!0,includeMetadata:a,externalConversationId:l}=n||{},c=yield this.store.dispatch(mn({assistantCode:t,attachments:o,transcript:i,includeMetadata:a,input:r,externalConversationId:l,skipState:!s}));if(c.error)throw new Error(`Assistant evaluation failed: ${(u=c.payload)!=null?u:c.error.message}`);return c.payload.output})}evaluateConversationAssistant(t,n){return M(this,null,function*(){var u,f,p;yield this.loadProfileConfig();let r=this.state.profile.data;if(!r&&((u=this.state.conversation.current)!=null&&u.profileCode)&&(yield this.loadProfileConfig(),r=this.state.profile.data),!r){te.warn("Can't evaluate assistant when profile is not loaded yet.");return}let o=ZA(r,t),i=(f=n==null?void 0:n.showCuesInWidget)!=null?f:!0,d=n!=null?n:{},{showCuesInWidget:s}=d,a=ie(d,["showCuesInWidget"]),l=(p=n==null?void 0:n.externalConversationId)!=null?p:this.hasConversation()?this.externalId():"",c=yield Promise.all(o.map(m=>this.queues.push(m,()=>M(this,null,function*(){var v,h;let g=yield this.store.dispatch(mn(E(A(E({assistantCode:m,includeMetadata:!0},a),{skipState:!i}),n!=null&&n.attachments&&(n==null?void 0:n.attachments.length)>0?{attachments:n==null?void 0:n.attachments}:{})));if(g.error)throw new Error(`Assistant evaluation failed: ${(v=g.payload)!=null?v:g.error.message}`);return{assistantCode:m,evaluationId:g.payload.evaluationId,output:g.payload.output,externalConversationId:(h=g.payload.externalConversationId)!=null?h:l}})).catch(g=>{if(g instanceof xu)return te.warn(`Queued assistant "${m}" was outdated and dropped`),null;throw g})));if(!i)return c.filter(m=>m!==null)})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:i,selection:s}=this.state.input,{inlineSuggestions:a,autoSelectSuggestion:l,showTextSuggestions:c,suggestionsPlacement:u}=this.settings,f=a||l,d=u==="inline"||u==="below"?"below":"above",p=o.length>0;if(this.store.dispatch(kb(sh(t))),!jr(this.state)||t.key!=="Tab"&&!c)return;let m=()=>{n||!p||s&&(t.shiftKey||(this.store.dispatch(Ib()),t.preventDefault()))},g=()=>{n||!p||f&&i<=0||s&&(t.shiftKey||(this.store.dispatch(Ab()),t.preventDefault()))};switch(t.key){case"ArrowUp":d==="below"?g():m();break;case"ArrowDown":{d==="below"?m():g();break}case"Escape":{n||(this.store.dispatch(bd(-1)),this.store.dispatch(Si({collapse:!0})),this.store.dispatch(gI(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let v=js(this.state);if(!v)return;this.store.dispatch(lu(!1)),this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(f||this.state.input.selectedSuggestionIndex===-1)return;let v=js(this.state);if(!v)return;this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(f||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let v=js(this.state);if(!v)return;this.store.dispatch(kn({text:v.text,suggestion:v,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(Si({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Ho([]))}handlingTimeStart(){this.state.handlingTime.startTime||(te.info("Start handling time"),this.store.dispatch(HA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(te.info("Stop handling time"),this.store.dispatch(jm()))}logSendMessage(t){let n=QA(this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEvent("Send Message",{conversationId:this.conversationId(),data:n}),this.emit("send-message-event",n))}logHandlingTime(){let t=XA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(BA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Di((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(Mb()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(i){te.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),te.error(i)}})}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}setPlatformVariables(t){this.store.dispatch(Ub(t))}whenConversationLoaded(t){let n=i=>{var s;return(s=i.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());return n(this.state)&&r(),this.subscribe(n,i=>{i&&r()})}overlayContainerFactory(t,n,r,o){let[i,s]=wu(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),[i,s]}createInlineContainer(t,n){var a;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,s=i?i.ownerDocument.defaultView:null;if(i&&(s===window||(s==null?void 0:s.parent)===window)){let[l,c]=wu(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return os(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),te.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(te.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(_b(r.metrics))):te.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Gm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let d=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=d,l=ie(d,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),os(t),this.inputMediator=a||(Ts(t)?new Ps(t):new Rs(t)),this.inputMediator.on("change",({plainText:p,rawHTML:m,suggestionTextStart:g})=>{this.store.dispatch(Ed({text:p,html:m,suggestionTextStart:g}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(Rb(sh(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:m})=>{this.store.dispatch(Pb({text:p,selectionText:m}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(Tb(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(Cd(p))},500):this.store.dispatch(Cd(p))}),this.unmountHandlers.push(()=>{clearTimeout(u)}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(vm(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(vm(!0))}),this.renderSuggestions(t,c),this.subscribe(Ui("inlineSuggestions"),()=>{this.renderSuggestions(t,c)}),this.subscribe(Ui("suggestionsPlacement"),()=>{this.renderSuggestions(t,c)});let f=this.renderOverlays(n);this.unmountHandlers.push(()=>{f.unmount()}),this.store.dispatch(Ed({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),suggestionTextStart:this.inputMediator.getSuggestionTextStart()})),this.store.dispatch(Cd(this.inputMediator.getSelection())),this.store.dispatch(vm(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{this.restoreMetrics(),this.syncInputMediator(),this.refreshTextSuggestions(),this.promptForNickname()}),this.isMounted=!0}promptForNickname(t){if(this.nicknameDialogUnsubscribe||this.nicknameDialogFailed)return;let n=this.createContainer("nickname-dialog",document.body);document.body.appendChild(n);let r=(0,No.createRoot)(n),o=null,i=a=>{o=a,s()},s=()=>{r==null||r.render((0,ke.jsx)(ko,{store:this.store,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(MI,{id:"deepdesk-nickname-dialog",error:o,onSave:a=>M(this,null,function*(){try{yield this.store.dispatch(Fb({agentNickname:a})).unwrap(),console.log("setAgentNickname",a),this.broadcastEvents.send(Rd,{showNicknameDialog:!1}),this.nicknameDialogUnsubscribe&&this.nicknameDialogUnsubscribe()}catch(l){te.error("Error setting agent nickname",l),i("error"),this.nicknameDialogFailed=!0}})})})}))};s(),this.nicknameDialogUnsubscribe=()=>{r.unmount(),n.remove(),this.nicknameDialogUnsubscribe=null}}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o,i;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.belowSuggestions)==null||r.unmount(),(o=this.floatingMenu)==null||o.unmount(),this.unmountHandlers.forEach(s=>s()),this.unmountHandlers=[],(i=this.inputMediator)==null||i.dispose(),this.nicknameDialogUnsubscribe&&this.nicknameDialogUnsubscribe(),this.isMounted=!1}dispose(){this.unmount(),this.unmountWidget(),this.disposeHandlers.forEach(t=>t()),this.disposeHandlers=[],this.off()}renderSuggestions(t,n){var r,o,i,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(i=this.aboveSuggestions)==null||i.unmount(),(s=this.belowSuggestions)==null||s.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions||this.settings.suggestionsPlacement==="inline"?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.settings.suggestionsPlacement==="below"?this.belowSuggestions=this.renderAboveOrBelowSuggestions(t,n,"below"):this.aboveSuggestions=this.renderAboveOrBelowSuggestions(t,n,"above")}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),i=(0,No.createRoot)(o);i.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(AI,{})})}));let s=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",s),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",s),i.unmount(),o.remove()}}}renderAboveOrBelowSuggestions(t,n,r){let{customStyles:o,closestScrollSelector:i,appendOverlayTo:s}=n,a=i&&qS(t,i)||void 0,[l,c]=this.overlayContainerFactory("deepdesk-tab-completion",a||t,{appendTo:s,closestScrollElement:a,mirrorOverflow:!0,onRemove:()=>this.unmount()},o==null?void 0:o.rootNode),[u,f]=this.overlayContainerFactory("deepdesk-suggestions-overlay",a||t,{appendTo:s,placement:r},o==null?void 0:o.suggestionsRootNode),d=(0,No.createRoot)(l);d.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(nA,{inputElement:t})})}));let p=(0,No.createRoot)(u);return p.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(UI,{onLogIn:()=>this.loginViaPopup().catch(m=>te.warn(m.message))})})})),{unmount(){d.unmount(),p.unmount(),c(),f()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&qS(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:s!=null?s:i},r==null?void 0:r.floatingMenuParent),u=(0,No.createRoot)(l);return u.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(pI,{onLogIn:()=>this.loginViaPopup().catch(f=>te.warn(f.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,No.createRoot)(r);return o.render((0,ke.jsx)(ko,{store:this.store,customStyles:n,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(lI,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&te.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:i}),this.widgetRoot=(0,No.createRoot)(t),this.widgetRoot.render((0,ke.jsx)(ko,{store:this.store,customStyles:r,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(PA,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>te.warn(s.message))})})}))}unmountWidget(){var t,n;(n=(t=this.widgetRoot)==null?void 0:t.unmount)==null||n.call(t),this.widgetRoot=null,this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r,s=(0,No.createRoot)(n);return s.render((0,ke.jsx)(ko,{store:this.store,customStyles:o,children:(0,ke.jsx)(to,{broadcastEvents:this.broadcastEvents,children:(0,ke.jsx)(zS,{children:(0,ke.jsxs)(Yp,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:Hl,children:[(0,ke.jsx)(Hs,{children:(0,ke.jsx)(Qp,{title:r.title,emptyState:r.emptyState})}),(0,ke.jsx)(FS,{children:(0,ke.jsx)(Xp,{})})]})})})})),{unmount(){s.unmount()}}}setupHandlingTime(t){let n=Xm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){JA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){var t;return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(t=this.state.conversation.current)!=null&&t.profileCode?(this.loadProfileConfigPromise=Promise.resolve().then(()=>M(this,null,function*(){yield this.store.dispatch(Kc()).unwrap();let n=mi(this.state);n&&this.store.dispatch(Yd({showSearch:n.search,showImageSearch:n.imageSearch,showEntitiesCommand:n.entitiesCommand,showSummaryCommand:!!n.summarizerAssistantNew,showKnowledgeSearch:!!n.knowledgeAssistantNew||!!n.knowledgeAssistant,recommendTextSuggestions:n.recommendTextSuggestions}))})).finally(()=>{mi(this.state)||(this.loadProfileConfigPromise=null)}),this.loadProfileConfigPromise):Promise.resolve()}loginViaPopup(t){return M(this,null,function*(){return new Promise((n,r)=>{this.store.dispatch(hd());let o=new MessageChannel,i=o.port1,s=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=p=>M(this,null,function*(){var m,g;if((m=p.data)!=null&&m.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(El),l=!0,o.port1.close(),n()}catch(v){console.error(v),r(v)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let f=p=>M(this,null,function*(){var m;if(p.origin===a.origin)switch((m=p.data)==null?void 0:m.type){case"deepdesk-popup-request-origin":{try{let g=JSON.stringify({type:"deepdesk-popup-parent-origin"});u==null||u.postMessage(g,a.origin)}catch(g){te.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-loaded":{try{let g=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(g,a.origin,[o.port2])}catch(g){te.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{if(c(),p.data.message==="Platform account url mismatch"){let g=`Please contact your administrator: The platform account url (${p.data.targetOrigin}) is misconfigured as it differs from the origin of the page that opened the popup (${p.data.openerOrigin}).`;te.warn(g),this.store.dispatch(eh(g)),r(new Error(g))}if(p.data.message==="Timeout"){let g="Please contact your administrator: Popup timed out. Check if the account's platform url is configured correctly.";te.warn(g),this.store.dispatch(eh(g)),r(new Error(g))}r(new Error(p.data.message));break}}});window.addEventListener("message",f);let d=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.disposeHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}refreshTextSuggestions(){return M(this,null,function*(){this.isMounted&&(yield this.store.dispatch(gm()))})}refreshWidgetSuggestions(){return M(this,null,function*(){if(!this.widgetRoot)return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Gc(this.state);try{n.forEach(({type:r})=>{switch(r){case"entities":this.store.dispatch(vr());break;case"pinned-messages":case"sticky-messages":break;default:ju.includes(r)||this.store.dispatch(Sr(r))}})}catch(r){this.handleError(r)}})}};ol.version="19.4.2-beta.0",ol.count=0;var bu=ol;function gz(e){return M(this,null,function*(){var o,i,s;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(s=(i=e.mimeType)!=null?i:n.headers.get("Content-Type"))!=null?s:"image/jpeg"})})}function f_(e,t){return M(this,null,function*(){let n=yield gz(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}})}function p_(e,t,n){return M(this,null,function*(){yield new Mo(e).authenticateWithKey(t,n)})}function m_(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function g_(r,o){return M(this,arguments,function*(e,t,n={}){var f,d;let{value:i}=e,{start:s,end:a}=(f=n.replace)!=null?f:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,c=(d=n.selectionAfter)!=null?d:{start:s+t.length,end:s+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function h_(r,o){return M(this,arguments,function*(e,t,n={}){let i=n.replace?Ti(e,n.replace.start,n.replace.end):tl(e),s,a=()=>{if(n.setRange)return n.setRange(i.cloneRange());i.deleteContents(),s=document.createElement("span"),i.insertNode(s),n.insertBRs!==!1?t.split(`
84
+ `).reverse().forEach((l,c)=>{c>0&&i.insertNode(document.createElement("br")),i.insertNode(document.createTextNode(l))}):i.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?Ti(e,n.selectionAfter.start,n.selectionAfter.end):(i.collapse(!1),i),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!s)return;s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}function hz(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function yz(e){let t=document.createDocumentFragment();return e.split(`
85
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function y_(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):y_(n,t)}function v_(o,i){return M(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let s;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var d;let l=(d=e.ownerDocument.defaultView)!=null?d:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;s=document.createElement("span"),u.insertNode(s);let f=r?hz(t):yz(t);n?y_(u.startContainer,f):(u.insertNode(f),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!s)try{s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}return U_(vz);})();
86
86
  /*! Bundled license information:
87
87
 
88
88
  classnames/index.js: