@deepdesk/deepdesk-sdk 17.0.0 → 17.0.1-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.
- package/dist/index.cjs.js +7 -7
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +42 -42
- package/package.json +2 -2
package/dist/index.iife.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var VA=Object.create;var Ga=Object.defineProperty,$A=Object.defineProperties,jA=Object.getOwnPropertyDescriptor,WA=Object.getOwnPropertyDescriptors,KA=Object.getOwnPropertyNames,hu=Object.getOwnPropertySymbols,GA=Object.getPrototypeOf,Sm=Object.prototype.hasOwnProperty,tx=Object.prototype.propertyIsEnumerable;var bm=Math.pow,wm=(e,t,n)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))Sm.call(t,n)&&wm(e,n,t[n]);if(hu)for(var n of hu(t))tx.call(t,n)&&wm(e,n,t[n]);return e},P=(e,t)=>$A(e,WA(t));var Em=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)Sm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hu)for(var r of hu(e))t.indexOf(r)<0&&tx.call(e,r)&&(n[r]=e[r]);return n};var tn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kt=(e,t)=>{for(var n in t)Ga(e,n,{get:t[n],enumerable:!0})},nx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KA(t))!Sm.call(e,o)&&o!==n&&Ga(e,o,{get:()=>t[o],enumerable:!(r=jA(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?VA(GA(e)):{},nx(t||!e||!e.__esModule?Ga(n,"default",{value:e,enumerable:!0}):n,e)),qA=e=>nx(Ga({},"__esModule",{value:!0}),e);var Ee=(e,t,n)=>wm(e,typeof t!="symbol"?t+"":t,n);var I=(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 Me=tn((YF,yu)=>{"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 yu!="undefined"&&yu.exports?(t.default=t,yu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var mx=tn(he=>{"use strict";var qa=Symbol.for("react.element"),YA=Symbol.for("react.portal"),XA=Symbol.for("react.fragment"),QA=Symbol.for("react.strict_mode"),ZA=Symbol.for("react.profiler"),JA=Symbol.for("react.provider"),eI=Symbol.for("react.context"),tI=Symbol.for("react.forward_ref"),nI=Symbol.for("react.suspense"),rI=Symbol.for("react.memo"),oI=Symbol.for("react.lazy"),rx=Symbol.iterator;function iI(e){return e===null||typeof e!="object"?null:(e=rx&&e[rx]||e["@@iterator"],typeof e=="function"?e:null)}var sx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ax=Object.assign,lx={};function bs(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||sx}bs.prototype.isReactComponent={};bs.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")};bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cx(){}cx.prototype=bs.prototype;function Cm(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||sx}var km=Cm.prototype=new cx;km.constructor=Cm;ax(km,bs.prototype);km.isPureReactComponent=!0;var ox=Array.isArray,ux=Object.prototype.hasOwnProperty,Rm={current:null},dx={key:!0,ref:!0,__self:!0,__source:!0};function fx(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)ux.call(t,r)&&!dx.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:qa,type:e,key:i,ref:s,props:o,_owner:Rm.current}}function sI(e,t){return{$$typeof:qa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pm(e){return typeof e=="object"&&e!==null&&e.$$typeof===qa}function aI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ix=/\/+/g;function Tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?aI(""+e.key):t.toString(36)}function xu(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 qa:case YA:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Tm(s,0):r,ox(o)?(n="",e!=null&&(n=e.replace(ix,"$&/")+"/"),xu(o,t,n,"",function(c){return c})):o!=null&&(Pm(o)&&(o=sI(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(ix,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",ox(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Tm(i,a);s+=xu(i,t,n,l,o)}else if(l=iI(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Tm(i,a++),s+=xu(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 vu(e,t,n){if(e==null)return e;var r=[],o=0;return xu(e,r,"","",function(i){return t.call(n,i,o++)}),r}function lI(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 Ft={current:null},wu={transition:null},cI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:wu,ReactCurrentOwner:Rm};function px(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:vu,forEach:function(e,t,n){vu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vu(e,function(){t++}),t},toArray:function(e){return vu(e,function(t){return t})||[]},only:function(e){if(!Pm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=bs;he.Fragment=XA;he.Profiler=ZA;he.PureComponent=Cm;he.StrictMode=QA;he.Suspense=nI;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cI;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=ax({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Rm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ux.call(t,l)&&!dx.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:qa,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:eI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:JA,_context:e},e.Consumer=e};he.createElement=fx;he.createFactory=function(e){var t=fx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:tI,render:e}};he.isValidElement=Pm;he.lazy=function(e){return{$$typeof:oI,_payload:{_status:-1,_result:e},_init:lI}};he.memo=function(e,t){return{$$typeof:rI,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=wu.transition;wu.transition={};try{e()}finally{wu.transition=t}};he.unstable_act=px;he.useCallback=function(e,t){return Ft.current.useCallback(e,t)};he.useContext=function(e){return Ft.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};he.useEffect=function(e,t){return Ft.current.useEffect(e,t)};he.useId=function(){return Ft.current.useId()};he.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ft.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};he.useRef=function(e){return Ft.current.useRef(e)};he.useState=function(e){return Ft.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ft.current.useTransition()};he.version="18.3.1"});var Q=tn((QF,gx)=>{"use strict";gx.exports=mx()});var xx=tn(bu=>{"use strict";var uI=Q(),dI=Symbol.for("react.element"),fI=Symbol.for("react.fragment"),pI=Object.prototype.hasOwnProperty,mI=uI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gI={key:!0,ref:!0,__self:!0,__source:!0};function vx(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)pI.call(t,r)&&!gI.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:dI,type:e,key:i,ref:s,props:o,_owner:mI.current}}bu.Fragment=fI;bu.jsx=vx;bu.jsxs=vx});var R=tn((i5,wx)=>{"use strict";wx.exports=xx()});var Jx=tn(_e=>{"use strict";function Dm(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Iu(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Ou(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>Iu(a,n))l<o&&0>Iu(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>Iu(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function Iu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(jx=performance,_e.unstable_now=function(){return jx.now()}):(Nm=Date,Wx=Nm.now(),_e.unstable_now=function(){return Nm.now()-Wx});var jx,Nm,Wx,Sr=[],Ro=[],NI=1,An=null,Rt=3,Nu=!1,vi=!1,Qa=!1,qx=typeof setTimeout=="function"?setTimeout:null,Yx=typeof clearTimeout=="function"?clearTimeout:null,Kx=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Fm(e){for(var t=jn(Ro);t!==null;){if(t.callback===null)Ou(Ro);else if(t.startTime<=e)Ou(Ro),t.sortIndex=t.expirationTime,Dm(Sr,t);else break;t=jn(Ro)}}function zm(e){if(Qa=!1,Fm(e),!vi)if(jn(Sr)!==null)vi=!0,Bm(Hm);else{var t=jn(Ro);t!==null&&Um(zm,t.startTime-e)}}function Hm(e,t){vi=!1,Qa&&(Qa=!1,Yx(Za),Za=-1),Nu=!0;var n=Rt;try{for(Fm(t),An=jn(Sr);An!==null&&(!(An.expirationTime>t)||e&&!Zx());){var r=An.callback;if(typeof r=="function"){An.callback=null,Rt=An.priorityLevel;var o=r(An.expirationTime<=t);t=_e.unstable_now(),typeof o=="function"?An.callback=o:An===jn(Sr)&&Ou(Sr),Fm(t)}else Ou(Sr);An=jn(Sr)}if(An!==null)var i=!0;else{var s=jn(Ro);s!==null&&Um(zm,s.startTime-t),i=!1}return i}finally{An=null,Rt=n,Nu=!1}}var Mu=!1,Lu=null,Za=-1,Xx=5,Qx=-1;function Zx(){return!(_e.unstable_now()-Qx<Xx)}function Mm(){if(Lu!==null){var e=_e.unstable_now();Qx=e;var t=!0;try{t=Lu(!0,e)}finally{t?Xa():(Mu=!1,Lu=null)}}else Mu=!1}var Xa;typeof Kx=="function"?Xa=function(){Kx(Mm)}:typeof MessageChannel!="undefined"?(_m=new MessageChannel,Gx=_m.port2,_m.port1.onmessage=Mm,Xa=function(){Gx.postMessage(null)}):Xa=function(){qx(Mm,0)};var _m,Gx;function Bm(e){Lu=e,Mu||(Mu=!0,Xa())}function Um(e,t){Za=qx(function(){e(_e.unstable_now())},t)}_e.unstable_IdlePriority=5;_e.unstable_ImmediatePriority=1;_e.unstable_LowPriority=4;_e.unstable_NormalPriority=3;_e.unstable_Profiling=null;_e.unstable_UserBlockingPriority=2;_e.unstable_cancelCallback=function(e){e.callback=null};_e.unstable_continueExecution=function(){vi||Nu||(vi=!0,Bm(Hm))};_e.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"):Xx=0<e?Math.floor(1e3/e):5};_e.unstable_getCurrentPriorityLevel=function(){return Rt};_e.unstable_getFirstCallbackNode=function(){return jn(Sr)};_e.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};_e.unstable_pauseExecution=function(){};_e.unstable_requestPaint=function(){};_e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};_e.unstable_scheduleCallback=function(e,t,n){var r=_e.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:NI++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Dm(Ro,e),jn(Sr)===null&&e===jn(Ro)&&(Qa?(Yx(Za),Za=-1):Qa=!0,Um(zm,n-r))):(e.sortIndex=o,Dm(Sr,e),vi||Nu||(vi=!0,Bm(Hm))),e};_e.unstable_shouldYield=Zx;_e.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var tw=tn((L6,ew)=>{"use strict";ew.exports=Jx()});var iE=tn(xn=>{"use strict";var MI=Q(),yn=tw();function D(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 lS=new Set,wl={};function Li(e,t){Gs(e,t),Gs(e+"Capture",t)}function Gs(e,t){for(wl[e]=t,e=0;e<t.length;e++)lS.add(t[e])}var Gr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),ug=Object.prototype.hasOwnProperty,_I=/^[: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]*$/,nw={},rw={};function DI(e){return ug.call(rw,e)?!0:ug.call(nw,e)?!1:_I.test(e)?rw[e]=!0:(nw[e]=!0,!1)}function FI(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 zI(e,t,n,r){if(t===null||typeof t=="undefined"||FI(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 Vt(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 bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Vt(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){bt[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var nh=/[\-:]([a-z])/g;function rh(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(nh,rh);bt[t]=new Vt(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(nh,rh);bt[t]=new Vt(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(nh,rh);bt[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function oh(e,t,n,r){var o=bt.hasOwnProperty(t)?bt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zI(t,n,o,r)&&(n=null),r||o===null?DI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qr=MI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_u=Symbol.for("react.element"),As=Symbol.for("react.portal"),Is=Symbol.for("react.fragment"),ih=Symbol.for("react.strict_mode"),dg=Symbol.for("react.profiler"),cS=Symbol.for("react.provider"),uS=Symbol.for("react.context"),sh=Symbol.for("react.forward_ref"),fg=Symbol.for("react.suspense"),pg=Symbol.for("react.suspense_list"),ah=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var dS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var ow=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=ow&&e[ow]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Vm;function al(e){if(Vm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vm=t&&t[1]||""}return`
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var $A=Object.create;var Ga=Object.defineProperty,jA=Object.defineProperties,WA=Object.getOwnPropertyDescriptor,KA=Object.getOwnPropertyDescriptors,GA=Object.getOwnPropertyNames,hu=Object.getOwnPropertySymbols,qA=Object.getPrototypeOf,Sm=Object.prototype.hasOwnProperty,tx=Object.prototype.propertyIsEnumerable;var bm=Math.pow,wm=(e,t,n)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))Sm.call(t,n)&&wm(e,n,t[n]);if(hu)for(var n of hu(t))tx.call(t,n)&&wm(e,n,t[n]);return e},P=(e,t)=>jA(e,KA(t));var Em=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)Sm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hu)for(var r of hu(e))t.indexOf(r)<0&&tx.call(e,r)&&(n[r]=e[r]);return n};var tn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kt=(e,t)=>{for(var n in t)Ga(e,n,{get:t[n],enumerable:!0})},nx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of GA(t))!Sm.call(e,o)&&o!==n&&Ga(e,o,{get:()=>t[o],enumerable:!(r=WA(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?$A(qA(e)):{},nx(t||!e||!e.__esModule?Ga(n,"default",{value:e,enumerable:!0}):n,e)),YA=e=>nx(Ga({},"__esModule",{value:!0}),e);var Ee=(e,t,n)=>wm(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(c){o(c)}},i=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);a((n=n.apply(e,t)).next())});var Me=tn((ZF,yu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(o=r(o,n(i)))}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 s="";for(var i in o)e.call(o,i)&&o[i]&&(s=r(s,i));return s}function r(o,s){return s?o?o+" "+s:o+s:o}typeof yu!="undefined"&&yu.exports?(t.default=t,yu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var mx=tn(he=>{"use strict";var qa=Symbol.for("react.element"),XA=Symbol.for("react.portal"),QA=Symbol.for("react.fragment"),ZA=Symbol.for("react.strict_mode"),JA=Symbol.for("react.profiler"),eI=Symbol.for("react.provider"),tI=Symbol.for("react.context"),nI=Symbol.for("react.forward_ref"),rI=Symbol.for("react.suspense"),oI=Symbol.for("react.memo"),sI=Symbol.for("react.lazy"),rx=Symbol.iterator;function iI(e){return e===null||typeof e!="object"?null:(e=rx&&e[rx]||e["@@iterator"],typeof e=="function"?e:null)}var ix={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ax=Object.assign,lx={};function bi(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||ix}bi.prototype.isReactComponent={};bi.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")};bi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cx(){}cx.prototype=bi.prototype;function Cm(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||ix}var km=Cm.prototype=new cx;km.constructor=Cm;ax(km,bi.prototype);km.isPureReactComponent=!0;var ox=Array.isArray,ux=Object.prototype.hasOwnProperty,Rm={current:null},dx={key:!0,ref:!0,__self:!0,__source:!0};function fx(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)ux.call(t,r)&&!dx.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:qa,type:e,key:s,ref:i,props:o,_owner:Rm.current}}function aI(e,t){return{$$typeof:qa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pm(e){return typeof e=="object"&&e!==null&&e.$$typeof===qa}function lI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var sx=/\/+/g;function Tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lI(""+e.key):t.toString(36)}function xu(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case qa:case XA:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Tm(i,0):r,ox(o)?(n="",e!=null&&(n=e.replace(sx,"$&/")+"/"),xu(o,t,n,"",function(c){return c})):o!=null&&(Pm(o)&&(o=aI(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(sx,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",ox(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Tm(s,a);i+=xu(s,t,n,l,o)}else if(l=iI(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Tm(s,a++),i+=xu(s,t,n,l,o);else if(s==="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 i}function vu(e,t,n){if(e==null)return e;var r=[],o=0;return xu(e,r,"","",function(s){return t.call(n,s,o++)}),r}function cI(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 Ft={current:null},wu={transition:null},uI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:wu,ReactCurrentOwner:Rm};function px(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:vu,forEach:function(e,t,n){vu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vu(e,function(){t++}),t},toArray:function(e){return vu(e,function(t){return t})||[]},only:function(e){if(!Pm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=bi;he.Fragment=QA;he.Profiler=JA;he.PureComponent=Cm;he.StrictMode=ZA;he.Suspense=rI;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uI;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=ax({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Rm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ux.call(t,l)&&!dx.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:qa,type:e.type,key:o,ref:s,props:r,_owner:i}};he.createContext=function(e){return e={$$typeof:tI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eI,_context:e},e.Consumer=e};he.createElement=fx;he.createFactory=function(e){var t=fx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:nI,render:e}};he.isValidElement=Pm;he.lazy=function(e){return{$$typeof:sI,_payload:{_status:-1,_result:e},_init:cI}};he.memo=function(e,t){return{$$typeof:oI,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=wu.transition;wu.transition={};try{e()}finally{wu.transition=t}};he.unstable_act=px;he.useCallback=function(e,t){return Ft.current.useCallback(e,t)};he.useContext=function(e){return Ft.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};he.useEffect=function(e,t){return Ft.current.useEffect(e,t)};he.useId=function(){return Ft.current.useId()};he.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ft.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};he.useRef=function(e){return Ft.current.useRef(e)};he.useState=function(e){return Ft.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ft.current.useTransition()};he.version="18.3.1"});var Q=tn((e5,gx)=>{"use strict";gx.exports=mx()});var xx=tn(bu=>{"use strict";var dI=Q(),fI=Symbol.for("react.element"),pI=Symbol.for("react.fragment"),mI=Object.prototype.hasOwnProperty,gI=dI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hI={key:!0,ref:!0,__self:!0,__source:!0};function vx(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)mI.call(t,r)&&!hI.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:fI,type:e,key:s,ref:i,props:o,_owner:gI.current}}bu.Fragment=pI;bu.jsx=vx;bu.jsxs=vx});var R=tn((l5,wx)=>{"use strict";wx.exports=xx()});var Jx=tn(_e=>{"use strict";function Dm(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Iu(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Ou(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,s=o>>>1;r<s;){var i=2*(r+1)-1,a=e[i],l=i+1,c=e[l];if(0>Iu(a,n))l<o&&0>Iu(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else if(l<o&&0>Iu(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function Iu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(jx=performance,_e.unstable_now=function(){return jx.now()}):(Nm=Date,Wx=Nm.now(),_e.unstable_now=function(){return Nm.now()-Wx});var jx,Nm,Wx,Sr=[],Ro=[],MI=1,An=null,Rt=3,Nu=!1,vs=!1,Qa=!1,qx=typeof setTimeout=="function"?setTimeout:null,Yx=typeof clearTimeout=="function"?clearTimeout:null,Kx=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Fm(e){for(var t=jn(Ro);t!==null;){if(t.callback===null)Ou(Ro);else if(t.startTime<=e)Ou(Ro),t.sortIndex=t.expirationTime,Dm(Sr,t);else break;t=jn(Ro)}}function zm(e){if(Qa=!1,Fm(e),!vs)if(jn(Sr)!==null)vs=!0,Bm(Hm);else{var t=jn(Ro);t!==null&&Um(zm,t.startTime-e)}}function Hm(e,t){vs=!1,Qa&&(Qa=!1,Yx(Za),Za=-1),Nu=!0;var n=Rt;try{for(Fm(t),An=jn(Sr);An!==null&&(!(An.expirationTime>t)||e&&!Zx());){var r=An.callback;if(typeof r=="function"){An.callback=null,Rt=An.priorityLevel;var o=r(An.expirationTime<=t);t=_e.unstable_now(),typeof o=="function"?An.callback=o:An===jn(Sr)&&Ou(Sr),Fm(t)}else Ou(Sr);An=jn(Sr)}if(An!==null)var s=!0;else{var i=jn(Ro);i!==null&&Um(zm,i.startTime-t),s=!1}return s}finally{An=null,Rt=n,Nu=!1}}var Mu=!1,Lu=null,Za=-1,Xx=5,Qx=-1;function Zx(){return!(_e.unstable_now()-Qx<Xx)}function Mm(){if(Lu!==null){var e=_e.unstable_now();Qx=e;var t=!0;try{t=Lu(!0,e)}finally{t?Xa():(Mu=!1,Lu=null)}}else Mu=!1}var Xa;typeof Kx=="function"?Xa=function(){Kx(Mm)}:typeof MessageChannel!="undefined"?(_m=new MessageChannel,Gx=_m.port2,_m.port1.onmessage=Mm,Xa=function(){Gx.postMessage(null)}):Xa=function(){qx(Mm,0)};var _m,Gx;function Bm(e){Lu=e,Mu||(Mu=!0,Xa())}function Um(e,t){Za=qx(function(){e(_e.unstable_now())},t)}_e.unstable_IdlePriority=5;_e.unstable_ImmediatePriority=1;_e.unstable_LowPriority=4;_e.unstable_NormalPriority=3;_e.unstable_Profiling=null;_e.unstable_UserBlockingPriority=2;_e.unstable_cancelCallback=function(e){e.callback=null};_e.unstable_continueExecution=function(){vs||Nu||(vs=!0,Bm(Hm))};_e.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"):Xx=0<e?Math.floor(1e3/e):5};_e.unstable_getCurrentPriorityLevel=function(){return Rt};_e.unstable_getFirstCallbackNode=function(){return jn(Sr)};_e.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};_e.unstable_pauseExecution=function(){};_e.unstable_requestPaint=function(){};_e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};_e.unstable_scheduleCallback=function(e,t,n){var r=_e.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:MI++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Dm(Ro,e),jn(Sr)===null&&e===jn(Ro)&&(Qa?(Yx(Za),Za=-1):Qa=!0,Um(zm,n-r))):(e.sortIndex=o,Dm(Sr,e),vs||Nu||(vs=!0,Bm(Hm))),e};_e.unstable_shouldYield=Zx;_e.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var tw=tn((M6,ew)=>{"use strict";ew.exports=Jx()});var sE=tn(xn=>{"use strict";var _I=Q(),yn=tw();function D(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 lS=new Set,wl={};function Ls(e,t){Gi(e,t),Gi(e+"Capture",t)}function Gi(e,t){for(wl[e]=t,e=0;e<t.length;e++)lS.add(t[e])}var Gr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),ug=Object.prototype.hasOwnProperty,DI=/^[: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]*$/,nw={},rw={};function FI(e){return ug.call(rw,e)?!0:ug.call(nw,e)?!1:DI.test(e)?rw[e]=!0:(nw[e]=!0,!1)}function zI(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 HI(e,t,n,r){if(t===null||typeof t=="undefined"||zI(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 Vt(e,t,n,r,o,s,i){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=s,this.removeEmptyString=i}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Vt(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){bt[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var nh=/[\-:]([a-z])/g;function rh(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(nh,rh);bt[t]=new Vt(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(nh,rh);bt[t]=new Vt(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(nh,rh);bt[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function oh(e,t,n,r){var o=bt.hasOwnProperty(t)?bt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(HI(t,n,o,r)&&(n=null),r||o===null?FI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qr=_I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_u=Symbol.for("react.element"),Ai=Symbol.for("react.portal"),Ii=Symbol.for("react.fragment"),sh=Symbol.for("react.strict_mode"),dg=Symbol.for("react.profiler"),cS=Symbol.for("react.provider"),uS=Symbol.for("react.context"),ih=Symbol.for("react.forward_ref"),fg=Symbol.for("react.suspense"),pg=Symbol.for("react.suspense_list"),ah=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var dS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var ow=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=ow&&e[ow]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Vm;function al(e){if(Vm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vm=t&&t[1]||""}return`
|
|
2
2
|
`+Vm+e}var $m=!1;function jm(e,t){if(!e||$m)return"";$m=!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
|
-
`),
|
|
4
|
-
`),
|
|
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{$m=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?al(e):""}function HI(e){switch(e.tag){case 5:return al(e.type);case 16:return al("Lazy");case 13:return al("Suspense");case 19:return al("SuspenseList");case 0:case 2:case 15:return e=jm(e.type,!1),e;case 11:return e=jm(e.type.render,!1),e;case 1:return e=jm(e.type,!0),e;default:return""}}function mg(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 Is:return"Fragment";case As:return"Portal";case dg:return"Profiler";case ih:return"StrictMode";case fg:return"Suspense";case pg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uS:return(e.displayName||"Context")+".Consumer";case cS:return(e._context.displayName||"Context")+".Provider";case sh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ah:return t=e.displayName||null,t!==null?t:mg(e.type)||"Memo";case Ao:t=e._payload,e=e._init;try{return mg(e(t))}catch(n){}}return null}function BI(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 mg(t);case 8:return t===ih?"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 $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UI(e){var t=fS(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 Du(e){e._valueTracker||(e._valueTracker=UI(e))}function pS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ud(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 gg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function iw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$o(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 mS(e,t){t=t.checked,t!=null&&oh(e,"checked",t,!1)}function hg(e,t){mS(e,t);var n=$o(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")?yg(e,t.type,n):t.hasOwnProperty("defaultValue")&&yg(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sw(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 yg(e,t,n){(t!=="number"||ud(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function Us(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=""+$o(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 vg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function aw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ll(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$o(n)}}function gS(e,t){var n=$o(t.value),r=$o(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 lw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hS(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 xg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Fu,yS=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(Fu=Fu||document.createElement("div"),Fu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Fu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dl={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},VI=["Webkit","ms","Moz","O"];Object.keys(dl).forEach(function(e){VI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dl[t]=dl[e]})});function vS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dl.hasOwnProperty(e)&&dl[e]?(""+t).trim():t+"px"}function xS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $I=Ge({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 wg(e,t){if(t){if($I[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Sg(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 bg=null;function lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eg=null,Vs=null,$s=null;function cw(e){if(e=Hl(e)){if(typeof Eg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=zd(t),Eg(e.stateNode,e.type,t))}}function wS(e){Vs?$s?$s.push(e):$s=[e]:Vs=e}function SS(){if(Vs){var e=Vs,t=$s;if($s=Vs=null,cw(e),t)for(e=0;e<t.length;e++)cw(t[e])}}function bS(e,t){return e(t)}function ES(){}var Wm=!1;function TS(e,t,n){if(Wm)return e(t,n);Wm=!0;try{return bS(e,t,n)}finally{Wm=!1,(Vs!==null||$s!==null)&&(ES(),SS())}}function bl(e,t){var n=e.stateNode;if(n===null)return null;var r=zd(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(D(231,t,typeof n));return n}var Tg=!1;if(Gr)try{Rs={},Object.defineProperty(Rs,"passive",{get:function(){Tg=!0}}),window.addEventListener("test",Rs,Rs),window.removeEventListener("test",Rs,Rs)}catch(e){Tg=!1}var Rs;function jI(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 fl=!1,dd=null,fd=!1,Cg=null,WI={onError:function(e){fl=!0,dd=e}};function KI(e,t,n,r,o,i,s,a,l){fl=!1,dd=null,jI.apply(WI,arguments)}function GI(e,t,n,r,o,i,s,a,l){if(KI.apply(this,arguments),fl){if(fl){var c=dd;fl=!1,dd=null}else throw Error(D(198));fd||(fd=!0,Cg=c)}}function Oi(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 CS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function uw(e){if(Oi(e)!==e)throw Error(D(188))}function qI(e){var t=e.alternate;if(!t){if(t=Oi(e),t===null)throw Error(D(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 uw(o),e;if(i===r)return uw(o),t;i=i.sibling}throw Error(D(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(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function kS(e){return e=qI(e),e!==null?RS(e):null}function RS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RS(e);if(t!==null)return t;e=e.sibling}return null}var PS=yn.unstable_scheduleCallback,dw=yn.unstable_cancelCallback,YI=yn.unstable_shouldYield,XI=yn.unstable_requestPaint,Je=yn.unstable_now,QI=yn.unstable_getCurrentPriorityLevel,ch=yn.unstable_ImmediatePriority,AS=yn.unstable_UserBlockingPriority,pd=yn.unstable_NormalPriority,ZI=yn.unstable_LowPriority,IS=yn.unstable_IdlePriority,Md=null,Cr=null;function JI(e){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Md,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:nL,eL=Math.log,tL=Math.LN2;function nL(e){return e>>>=0,e===0?32:31-(eL(e)/tL|0)|0}var zu=64,Hu=4194304;function cl(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 md(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=cl(a):(i&=s,i!==0&&(r=cl(i)))}else s=n&~o,s!==0?r=cl(s):i!==0&&(r=cl(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-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function rL(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 oL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Yn(i),a=1<<s,l=o[s];l===-1?((a&n)===0||(a&r)!==0)&&(o[s]=rL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function kg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function LS(){var e=zu;return zu<<=1,(zu&4194240)===0&&(zu=64),e}function Km(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function iL(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-Yn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function uh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ie=0;function OS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var NS,dh,MS,_S,DS,Rg=!1,Bu=[],_o=null,Do=null,Fo=null,El=new Map,Tl=new Map,Lo=[],sL="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 fw(e,t){switch(e){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":El.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(t.pointerId)}}function el(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=Hl(t),t!==null&&dh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function aL(e,t,n,r,o){switch(t){case"focusin":return _o=el(_o,e,t,n,r,o),!0;case"dragenter":return Do=el(Do,e,t,n,r,o),!0;case"mouseover":return Fo=el(Fo,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return El.set(i,el(El.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Tl.set(i,el(Tl.get(i)||null,e,t,n,r,o)),!0}return!1}function FS(e){var t=Si(e.target);if(t!==null){var n=Oi(t);if(n!==null){if(t=n.tag,t===13){if(t=CS(n),t!==null){e.blockedOn=t,DS(e.priority,function(){MS(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 ed(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bg=r,n.target.dispatchEvent(r),bg=null}else return t=Hl(n),t!==null&&dh(t),e.blockedOn=n,!1;t.shift()}return!0}function pw(e,t,n){ed(e)&&n.delete(t)}function lL(){Rg=!1,_o!==null&&ed(_o)&&(_o=null),Do!==null&&ed(Do)&&(Do=null),Fo!==null&&ed(Fo)&&(Fo=null),El.forEach(pw),Tl.forEach(pw)}function tl(e,t){e.blockedOn===t&&(e.blockedOn=null,Rg||(Rg=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,lL)))}function Cl(e){function t(o){return tl(o,e)}if(0<Bu.length){tl(Bu[0],e);for(var n=1;n<Bu.length;n++){var r=Bu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_o!==null&&tl(_o,e),Do!==null&&tl(Do,e),Fo!==null&&tl(Fo,e),El.forEach(t),Tl.forEach(t),n=0;n<Lo.length;n++)r=Lo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lo.length&&(n=Lo[0],n.blockedOn===null);)FS(n),n.blockedOn===null&&Lo.shift()}var js=Qr.ReactCurrentBatchConfig,gd=!0;function cL(e,t,n,r){var o=Ie,i=js.transition;js.transition=null;try{Ie=1,fh(e,t,n,r)}finally{Ie=o,js.transition=i}}function uL(e,t,n,r){var o=Ie,i=js.transition;js.transition=null;try{Ie=4,fh(e,t,n,r)}finally{Ie=o,js.transition=i}}function fh(e,t,n,r){if(gd){var o=Pg(e,t,n,r);if(o===null)Jm(e,t,r,hd,n),fw(e,r);else if(aL(o,e,t,n,r))r.stopPropagation();else if(fw(e,r),t&4&&-1<sL.indexOf(e)){for(;o!==null;){var i=Hl(o);if(i!==null&&NS(i),i=Pg(e,t,n,r),i===null&&Jm(e,t,r,hd,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Jm(e,t,r,null,n)}}var hd=null;function Pg(e,t,n,r){if(hd=null,e=lh(r),e=Si(e),e!==null)if(t=Oi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=CS(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 hd=e,null}function zS(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(QI()){case ch:return 1;case AS:return 4;case pd:case ZI:return 16;case IS:return 536870912;default:return 16}default:return 16}}var No=null,ph=null,td=null;function HS(){if(td)return td;var e,t=ph,n=t.length,r,o="value"in No?No.value:No.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 td=o.slice(e,1<r?1-r:void 0)}function nd(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 Uu(){return!0}function mw(){return!1}function vn(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)?Uu:mw,this.isPropagationStopped=mw,this}return Ge(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=Uu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),t}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mh=vn(ea),zl=Ge({},ea,{view:0,detail:0}),dL=vn(zl),Gm,qm,nl,_d=Ge({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gh,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!==nl&&(nl&&e.type==="mousemove"?(Gm=e.screenX-nl.screenX,qm=e.screenY-nl.screenY):qm=Gm=0,nl=e),Gm)},movementY:function(e){return"movementY"in e?e.movementY:qm}}),gw=vn(_d),fL=Ge({},_d,{dataTransfer:0}),pL=vn(fL),mL=Ge({},zl,{relatedTarget:0}),Ym=vn(mL),gL=Ge({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),hL=vn(gL),yL=Ge({},ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vL=vn(yL),xL=Ge({},ea,{data:0}),hw=vn(xL),wL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SL={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"},bL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bL[e])?!!t[e]:!1}function gh(){return EL}var TL=Ge({},zl,{key:function(e){if(e.key){var t=wL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gh,charCode:function(e){return e.type==="keypress"?nd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CL=vn(TL),kL=Ge({},_d,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yw=vn(kL),RL=Ge({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gh}),PL=vn(RL),AL=Ge({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),IL=vn(AL),LL=Ge({},_d,{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}),OL=vn(LL),NL=[9,13,27,32],hh=Gr&&"CompositionEvent"in window,pl=null;Gr&&"documentMode"in document&&(pl=document.documentMode);var ML=Gr&&"TextEvent"in window&&!pl,BS=Gr&&(!hh||pl&&8<pl&&11>=pl),vw=" ",xw=!1;function US(e,t){switch(e){case"keyup":return NL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function _L(e,t){switch(e){case"compositionend":return VS(t);case"keypress":return t.which!==32?null:(xw=!0,vw);case"textInput":return e=t.data,e===vw&&xw?null:e;default:return null}}function DL(e,t){if(Ls)return e==="compositionend"||!hh&&US(e,t)?(e=HS(),td=ph=No=null,Ls=!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 BS&&t.locale!=="ko"?null:t.data;default:return null}}var FL={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 ww(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!FL[e.type]:t==="textarea"}function $S(e,t,n,r){wS(r),t=yd(t,"onChange"),0<t.length&&(n=new mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ml=null,kl=null;function zL(e){eb(e,0)}function Dd(e){var t=Ms(e);if(pS(t))return e}function HL(e,t){if(e==="change")return t}var jS=!1;Gr&&(Gr?($u="oninput"in document,$u||(Xm=document.createElement("div"),Xm.setAttribute("oninput","return;"),$u=typeof Xm.oninput=="function"),Vu=$u):Vu=!1,jS=Vu&&(!document.documentMode||9<document.documentMode));var Vu,$u,Xm;function Sw(){ml&&(ml.detachEvent("onpropertychange",WS),kl=ml=null)}function WS(e){if(e.propertyName==="value"&&Dd(kl)){var t=[];$S(t,kl,e,lh(e)),TS(zL,t)}}function BL(e,t,n){e==="focusin"?(Sw(),ml=t,kl=n,ml.attachEvent("onpropertychange",WS)):e==="focusout"&&Sw()}function UL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dd(kl)}function VL(e,t){if(e==="click")return Dd(t)}function $L(e,t){if(e==="input"||e==="change")return Dd(t)}function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:jL;function Rl(e,t){if(Qn(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(!ug.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function bw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ew(e,t){var n=bw(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=bw(n)}}function KS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function GS(){for(var e=window,t=ud();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=ud(e.document)}return t}function yh(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 WL(e){var t=GS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&KS(n.ownerDocument.documentElement,n)){if(r!==null&&yh(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=Ew(n,i);var s=Ew(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 KL=Gr&&"documentMode"in document&&11>=document.documentMode,Os=null,Ag=null,gl=null,Ig=!1;function Tw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ig||Os==null||Os!==ud(r)||(r=Os,"selectionStart"in r&&yh(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}),gl&&Rl(gl,r)||(gl=r,r=yd(Ag,"onSelect"),0<r.length&&(t=new mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Os)))}function ju(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ns={animationend:ju("Animation","AnimationEnd"),animationiteration:ju("Animation","AnimationIteration"),animationstart:ju("Animation","AnimationStart"),transitionend:ju("Transition","TransitionEnd")},Qm={},qS={};Gr&&(qS=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function Fd(e){if(Qm[e])return Qm[e];if(!Ns[e])return e;var t=Ns[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qS)return Qm[e]=t[n];return e}var YS=Fd("animationend"),XS=Fd("animationiteration"),QS=Fd("animationstart"),ZS=Fd("transitionend"),JS=new Map,Cw="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 Wo(e,t){JS.set(e,t),Li(t,[e])}for(Wu=0;Wu<Cw.length;Wu++)Ku=Cw[Wu],kw=Ku.toLowerCase(),Rw=Ku[0].toUpperCase()+Ku.slice(1),Wo(kw,"on"+Rw);var Ku,kw,Rw,Wu;Wo(YS,"onAnimationEnd");Wo(XS,"onAnimationIteration");Wo(QS,"onAnimationStart");Wo("dblclick","onDoubleClick");Wo("focusin","onFocus");Wo("focusout","onBlur");Wo(ZS,"onTransitionEnd");Gs("onMouseEnter",["mouseout","mouseover"]);Gs("onMouseLeave",["mouseout","mouseover"]);Gs("onPointerEnter",["pointerout","pointerover"]);Gs("onPointerLeave",["pointerout","pointerover"]);Li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Li("onBeforeInput",["compositionend","keypress","textInput","paste"]);Li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="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(" "),GL=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function Pw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,GI(r,t,void 0,e),e.currentTarget=null}function eb(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;Pw(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;Pw(o,a,c),i=l}}}if(fd)throw e=Cg,fd=!1,Cg=null,e}function Fe(e,t){var n=t[_g];n===void 0&&(n=t[_g]=new Set);var r=e+"__bubble";n.has(r)||(tb(t,e,2,!1),n.add(r))}function Zm(e,t,n){var r=0;t&&(r|=4),tb(n,e,r,t)}var Gu="_reactListening"+Math.random().toString(36).slice(2);function Pl(e){if(!e[Gu]){e[Gu]=!0,lS.forEach(function(n){n!=="selectionchange"&&(GL.has(n)||Zm(n,!1,e),Zm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gu]||(t[Gu]=!0,Zm("selectionchange",!1,t))}}function tb(e,t,n,r){switch(zS(t)){case 1:var o=cL;break;case 4:o=uL;break;default:o=fh}n=o.bind(null,t,n,e),o=void 0,!Tg||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 Jm(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=Si(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}TS(function(){var c=i,u=lh(n),d=[];e:{var f=JS.get(e);if(f!==void 0){var p=mh,v=e;switch(e){case"keypress":if(nd(n)===0)break e;case"keydown":case"keyup":p=CL;break;case"focusin":v="focus",p=Ym;break;case"focusout":v="blur",p=Ym;break;case"beforeblur":case"afterblur":p=Ym;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=gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=pL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=PL;break;case YS:case XS:case QS:p=hL;break;case ZS:p=IL;break;case"scroll":p=dL;break;case"wheel":p=OL;break;case"copy":case"cut":case"paste":p=vL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yw}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var m=c,h;m!==null;){h=m;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,y!==null&&(w=bl(m,y),w!=null&&g.push(Al(m,w,h)))),x)break;m=m.return}0<g.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==bg&&(v=n.relatedTarget||n.fromElement)&&(Si(v)||v[qr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?Si(v):null,v!==null&&(x=Oi(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(g=gw,w="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=yw,w="onPointerLeave",y="onPointerEnter",m="pointer"),x=p==null?f:Ms(p),h=v==null?f:Ms(v),f=new g(w,m+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,Si(u)===c&&(g=new g(y,m+"enter",v,n,u),g.target=h,g.relatedTarget=x,w=g),x=w,p&&v)t:{for(g=p,y=v,m=0,h=g;h;h=Ps(h))m++;for(h=0,w=y;w;w=Ps(w))h++;for(;0<m-h;)g=Ps(g),m--;for(;0<h-m;)y=Ps(y),h--;for(;m--;){if(g===y||y!==null&&g===y.alternate)break t;g=Ps(g),y=Ps(y)}g=null}else g=null;p!==null&&Aw(d,f,p,g,!1),v!==null&&x!==null&&Aw(d,x,v,g,!0)}}e:{if(f=c?Ms(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=HL;else if(ww(f))if(jS)E=$L;else{E=UL;var C=BL}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=VL);if(E&&(E=E(e,c))){$S(d,E,n,u);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&yg(f,"number",f.value)}switch(C=c?Ms(c):window,e){case"focusin":(ww(C)||C.contentEditable==="true")&&(Os=C,Ag=c,gl=null);break;case"focusout":gl=Ag=Os=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,Tw(d,n,u);break;case"selectionchange":if(KL)break;case"keydown":case"keyup":Tw(d,n,u)}var k;if(hh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ls?US(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(BS&&n.locale!=="ko"&&(Ls||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ls&&(k=HS()):(No=u,ph="value"in No?No.value:No.textContent,Ls=!0)),C=yd(c,A),0<C.length&&(A=new hw(A,e,null,n,u),d.push({event:A,listeners:C}),k?A.data=k:(k=VS(n),k!==null&&(A.data=k)))),(k=ML?_L(e,n):DL(e,n))&&(c=yd(c,"onBeforeInput"),0<c.length&&(u=new hw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=k))}eb(d,t)})}function Al(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=bl(e,n),i!=null&&r.unshift(Al(e,i,o)),i=bl(e,t),i!=null&&r.push(Al(e,i,o))),e=e.return}return r}function Ps(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Aw(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=bl(n,i),l!=null&&s.unshift(Al(n,l,a))):o||(l=bl(n,i),l!=null&&s.push(Al(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var qL=/\r\n?/g,YL=/\u0000|\uFFFD/g;function Iw(e){return(typeof e=="string"?e:""+e).replace(qL,`
|
|
6
|
-
`).replace(YL,"")}function qu(e,t,n){if(t=Iw(t),Iw(e)!==t&&n)throw Error(D(425))}function vd(){}var Lg=null,Og=null;function Ng(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 Mg=typeof setTimeout=="function"?setTimeout:void 0,XL=typeof clearTimeout=="function"?clearTimeout:void 0,Lw=typeof Promise=="function"?Promise:void 0,QL=typeof queueMicrotask=="function"?queueMicrotask:typeof Lw!="undefined"?function(e){return Lw.resolve(null).then(e).catch(ZL)}:Mg;function ZL(e){setTimeout(function(){throw e})}function eg(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),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Cl(t)}function zo(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 Ow(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 ta=Math.random().toString(36).slice(2),Tr="__reactFiber$"+ta,Il="__reactProps$"+ta,qr="__reactContainer$"+ta,_g="__reactEvents$"+ta,JL="__reactListeners$"+ta,eO="__reactHandles$"+ta;function Si(e){var t=e[Tr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qr]||n[Tr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ow(e);e!==null;){if(n=e[Tr])return n;e=Ow(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){return e=e[Tr]||e[qr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ms(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function zd(e){return e[Il]||null}var Dg=[],_s=-1;function Ko(e){return{current:e}}function ze(e){0>_s||(e.current=Dg[_s],Dg[_s]=null,_s--)}function De(e,t){_s++,Dg[_s]=e.current,e.current=t}var jo={},Lt=Ko(jo),sn=Ko(!1),ki=jo;function qs(e,t){var n=e.type.contextTypes;if(!n)return jo;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 an(e){return e=e.childContextTypes,e!=null}function xd(){ze(sn),ze(Lt)}function Nw(e,t,n){if(Lt.current!==jo)throw Error(D(168));De(Lt,t),De(sn,n)}function nb(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(D(108,BI(e)||"Unknown",o));return Ge({},n,r)}function wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,ki=Lt.current,De(Lt,e),De(sn,sn.current),!0}function Mw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=nb(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,ze(sn),ze(Lt),De(Lt,e)):ze(sn),De(sn,n)}var $r=null,Hd=!1,tg=!1;function rb(e){$r===null?$r=[e]:$r.push(e)}function tO(e){Hd=!0,rb(e)}function Go(){if(!tg&&$r!==null){tg=!0;var e=0,t=Ie;try{var n=$r;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$r=null,Hd=!1}catch(o){throw $r!==null&&($r=$r.slice(e+1)),PS(ch,Go),o}finally{Ie=t,tg=!1}}return null}var Ds=[],Fs=0,Sd=null,bd=0,In=[],Ln=0,Ri=null,jr=1,Wr="";function xi(e,t){Ds[Fs++]=bd,Ds[Fs++]=Sd,Sd=e,bd=t}function ob(e,t,n){In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Ri,Ri=e;var r=jr;e=Wr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var i=32-Yn(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,jr=1<<32-Yn(t)+o|n<<o|r,Wr=i+e}else jr=1<<i|n<<o|r,Wr=e}function vh(e){e.return!==null&&(xi(e,1),ob(e,1,0))}function xh(e){for(;e===Sd;)Sd=Ds[--Fs],Ds[Fs]=null,bd=Ds[--Fs],Ds[Fs]=null;for(;e===Ri;)Ri=In[--Ln],In[Ln]=null,Wr=In[--Ln],In[Ln]=null,jr=In[--Ln],In[Ln]=null}var hn=null,gn=null,Ue=!1,qn=null;function ib(e,t){var n=On(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 _w(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,hn=e,gn=zo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,gn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ri!==null?{id:jr,overflow:Wr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=On(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,gn=null,!0):!1;default:return!1}}function Fg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zg(e){if(Ue){var t=gn;if(t){var n=t;if(!_w(e,t)){if(Fg(e))throw Error(D(418));t=zo(n.nextSibling);var r=hn;t&&_w(e,t)?ib(r,n):(e.flags=e.flags&-4097|2,Ue=!1,hn=e)}}else{if(Fg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,hn=e}}}function Dw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function Yu(e){if(e!==hn)return!1;if(!Ue)return Dw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ng(e.type,e.memoizedProps)),t&&(t=gn)){if(Fg(e))throw sb(),Error(D(418));for(;t;)ib(e,t),t=zo(t.nextSibling)}if(Dw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gn=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gn=null}}else gn=hn?zo(e.stateNode.nextSibling):null;return!0}function sb(){for(var e=gn;e;)e=zo(e.nextSibling)}function Ys(){gn=hn=null,Ue=!1}function wh(e){qn===null?qn=[e]:qn.push(e)}var nO=Qr.ReactCurrentBatchConfig;function rl(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(D(309));var r=n.stateNode}if(!r)throw Error(D(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(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Xu(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fw(e){var t=e._init;return t(e._payload)}function ab(e){function t(y,m){if(e){var h=y.deletions;h===null?(y.deletions=[m],y.flags|=16):h.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function o(y,m){return y=Vo(y,m),y.index=0,y.sibling=null,y}function i(y,m,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<m?(y.flags|=2,m):h):(y.flags|=2,m)):(y.flags|=1048576,m)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,m,h,w){return m===null||m.tag!==6?(m=lg(h,y.mode,w),m.return=y,m):(m=o(m,h),m.return=y,m)}function l(y,m,h,w){var E=h.type;return E===Is?u(y,m,h.props.children,w,h.key):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===m.type)?(w=o(m,h.props),w.ref=rl(y,m,h),w.return=y,w):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,w)}function c(y,m,h,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=cg(h,y.mode,w),m.return=y,m):(m=o(m,h.children||[]),m.return=y,m)}function u(y,m,h,w,E){return m===null||m.tag!==7?(m=Ci(h,y.mode,w,E),m.return=y,m):(m=o(m,h),m.return=y,m)}function d(y,m,h){if(typeof m=="string"&&m!==""||typeof m=="number")return m=lg(""+m,y.mode,h),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _u:return h=cd(m.type,m.key,m.props,null,y.mode,h),h.ref=rl(y,null,m),h.return=y,h;case As:return m=cg(m,y.mode,h),m.return=y,m;case Ao:var w=m._init;return d(y,w(m._payload),h)}if(ll(m)||Ja(m))return m=Ci(m,y.mode,h,null),m.return=y,m;Xu(y,m)}return null}function f(y,m,h,w){var E=m!==null?m.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:a(y,m,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:return h.key===E?l(y,m,h,w):null;case As:return h.key===E?c(y,m,h,w):null;case Ao:return E=h._init,f(y,m,E(h._payload),w)}if(ll(h)||Ja(h))return E!==null?null:u(y,m,h,w,null);Xu(y,h)}return null}function p(y,m,h,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(h)||null,a(m,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return y=y.get(w.key===null?h:w.key)||null,l(m,y,w,E);case As:return y=y.get(w.key===null?h:w.key)||null,c(m,y,w,E);case Ao:var C=w._init;return p(y,m,h,C(w._payload),E)}if(ll(w)||Ja(w))return y=y.get(h)||null,u(m,y,w,E,null);Xu(m,w)}return null}function v(y,m,h,w){for(var E=null,C=null,k=m,A=m=0,B=null;k!==null&&A<h.length;A++){k.index>A?(B=k,k=null):B=k.sibling;var M=f(y,k,h[A],w);if(M===null){k===null&&(k=B);break}e&&k&&M.alternate===null&&t(y,k),m=i(M,m,A),C===null?E=M:C.sibling=M,C=M,k=B}if(A===h.length)return n(y,k),Ue&&xi(y,A),E;if(k===null){for(;A<h.length;A++)k=d(y,h[A],w),k!==null&&(m=i(k,m,A),C===null?E=k:C.sibling=k,C=k);return Ue&&xi(y,A),E}for(k=r(y,k);A<h.length;A++)B=p(k,y,A,h[A],w),B!==null&&(e&&B.alternate!==null&&k.delete(B.key===null?A:B.key),m=i(B,m,A),C===null?E=B:C.sibling=B,C=B);return e&&k.forEach(function(N){return t(y,N)}),Ue&&xi(y,A),E}function g(y,m,h,w){var E=Ja(h);if(typeof E!="function")throw Error(D(150));if(h=E.call(h),h==null)throw Error(D(151));for(var C=E=null,k=m,A=m=0,B=null,M=h.next();k!==null&&!M.done;A++,M=h.next()){k.index>A?(B=k,k=null):B=k.sibling;var N=f(y,k,M.value,w);if(N===null){k===null&&(k=B);break}e&&k&&N.alternate===null&&t(y,k),m=i(N,m,A),C===null?E=N:C.sibling=N,C=N,k=B}if(M.done)return n(y,k),Ue&&xi(y,A),E;if(k===null){for(;!M.done;A++,M=h.next())M=d(y,M.value,w),M!==null&&(m=i(M,m,A),C===null?E=M:C.sibling=M,C=M);return Ue&&xi(y,A),E}for(k=r(y,k);!M.done;A++,M=h.next())M=p(k,y,A,M.value,w),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?A:M.key),m=i(M,m,A),C===null?E=M:C.sibling=M,C=M);return e&&k.forEach(function(Z){return t(y,Z)}),Ue&&xi(y,A),E}function x(y,m,h,w){if(typeof h=="object"&&h!==null&&h.type===Is&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:e:{for(var E=h.key,C=m;C!==null;){if(C.key===E){if(E=h.type,E===Is){if(C.tag===7){n(y,C.sibling),m=o(C,h.props.children),m.return=y,y=m;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===C.type){n(y,C.sibling),m=o(C,h.props),m.ref=rl(y,C,h),m.return=y,y=m;break e}n(y,C);break}else t(y,C);C=C.sibling}h.type===Is?(m=Ci(h.props.children,y.mode,w,h.key),m.return=y,y=m):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,y=w)}return s(y);case As:e:{for(C=h.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(y,m.sibling),m=o(m,h.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=cg(h,y.mode,w),m.return=y,y=m}return s(y);case Ao:return C=h._init,x(y,m,C(h._payload),w)}if(ll(h))return v(y,m,h,w);if(Ja(h))return g(y,m,h,w);Xu(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,m!==null&&m.tag===6?(n(y,m.sibling),m=o(m,h),m.return=y,y=m):(n(y,m),m=lg(h,y.mode,w),m.return=y,y=m),s(y)):n(y,m)}return x}var Xs=ab(!0),lb=ab(!1),Ed=Ko(null),Td=null,zs=null,Sh=null;function bh(){Sh=zs=Td=null}function Eh(e){var t=Ed.current;ze(Ed),e._currentValue=t}function Hg(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 Ws(e,t){Td=e,Sh=zs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(on=!0),e.firstContext=null)}function Mn(e){var t=e._currentValue;if(Sh!==e)if(e={context:e,memoizedValue:t,next:null},zs===null){if(Td===null)throw Error(D(308));zs=e,Td.dependencies={lanes:0,firstContext:e}}else zs=zs.next=e;return t}var bi=null;function Th(e){bi===null?bi=[e]:bi.push(e)}function cb(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Th(t)):(n.next=o.next,o.next=n),t.interleaved=n,Yr(e,r)}function Yr(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 Io=!1;function Ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ub(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 Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Se&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Yr(e,n)}return o=r.interleaved,o===null?(t.next=t,Th(r)):(t.next=o.next,o.next=t),r.interleaved=t,Yr(e,n)}function rd(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,uh(e,n)}}function zw(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 Cd(e,t,n,r){var o=e.updateQueue;Io=!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 d=o.baseState;s=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(f=t,p=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ge({},d,f);break e;case 2:Io=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),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);Ai|=s,e.lanes=s,e.memoizedState=d}}function Hw(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(D(191,o));o.call(r)}}}var Bl={},kr=Ko(Bl),Ll=Ko(Bl),Ol=Ko(Bl);function Ei(e){if(e===Bl)throw Error(D(174));return e}function kh(e,t){switch(De(Ol,t),De(Ll,e),De(kr,Bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xg(t,e)}ze(kr),De(kr,t)}function Qs(){ze(kr),ze(Ll),ze(Ol)}function db(e){Ei(Ol.current);var t=Ei(kr.current),n=xg(t,e.type);t!==n&&(De(Ll,e),De(kr,n))}function Rh(e){Ll.current===e&&(ze(kr),ze(Ll))}var We=Ko(0);function kd(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 ng=[];function Ph(){for(var e=0;e<ng.length;e++)ng[e]._workInProgressVersionPrimary=null;ng.length=0}var od=Qr.ReactCurrentDispatcher,rg=Qr.ReactCurrentBatchConfig,Pi=0,Ke=null,ot=null,pt=null,Rd=!1,hl=!1,Nl=0,rO=0;function Pt(){throw Error(D(321))}function Ah(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Ih(e,t,n,r,o,i){if(Pi=i,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,od.current=e===null||e.memoizedState===null?aO:lO,e=n(r,o),hl){i=0;do{if(hl=!1,Nl=0,25<=i)throw Error(D(301));i+=1,pt=ot=null,t.updateQueue=null,od.current=cO,e=n(r,o)}while(hl)}if(od.current=Pd,t=ot!==null&&ot.next!==null,Pi=0,pt=ot=Ke=null,Rd=!1,t)throw Error(D(300));return e}function Lh(){var e=Nl!==0;return Nl=0,e}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ke.memoizedState=pt=e:pt=pt.next=e,pt}function _n(){if(ot===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=pt===null?Ke.memoizedState:pt.next;if(t!==null)pt=t,ot=e;else{if(e===null)throw Error(D(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},pt===null?Ke.memoizedState=pt=e:pt=pt.next=e}return pt}function Ml(e,t){return typeof t=="function"?t(e):t}function og(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,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((Pi&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 d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Ke.lanes|=u,Ai|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,Qn(r,t.memoizedState)||(on=!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,Ke.lanes|=i,Ai|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ig(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(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);Qn(i,t.memoizedState)||(on=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function fb(){}function pb(e,t){var n=Ke,r=_n(),o=t(),i=!Qn(r.memoizedState,o);if(i&&(r.memoizedState=o,on=!0),r=r.queue,Oh(hb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,_l(9,gb.bind(null,n,r,o,t),void 0,null),mt===null)throw Error(D(349));(Pi&30)!==0||mb(n,t,o)}return o}function mb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gb(e,t,n,r){t.value=n,t.getSnapshot=r,yb(t)&&vb(e)}function hb(e,t,n){return n(function(){yb(t)&&vb(e)})}function yb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function vb(e){var t=Yr(e,1);t!==null&&Xn(t,e,1,-1)}function Bw(e){var t=Er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t.queue=e,e=e.dispatch=sO.bind(null,Ke,e),[t.memoizedState,e]}function _l(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 xb(){return _n().memoizedState}function id(e,t,n,r){var o=Er();Ke.flags|=e,o.memoizedState=_l(1|t,n,void 0,r===void 0?null:r)}function Bd(e,t,n,r){var o=_n();r=r===void 0?null:r;var i=void 0;if(ot!==null){var s=ot.memoizedState;if(i=s.destroy,r!==null&&Ah(r,s.deps)){o.memoizedState=_l(t,n,i,r);return}}Ke.flags|=e,o.memoizedState=_l(1|t,n,i,r)}function Uw(e,t){return id(8390656,8,e,t)}function Oh(e,t){return Bd(2048,8,e,t)}function wb(e,t){return Bd(4,2,e,t)}function Sb(e,t){return Bd(4,4,e,t)}function bb(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 Eb(e,t,n){return n=n!=null?n.concat([e]):null,Bd(4,4,bb.bind(null,t,e),n)}function Nh(){}function Tb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kb(e,t,n){return(Pi&21)===0?(e.baseState&&(e.baseState=!1,on=!0),e.memoizedState=n):(Qn(n,t)||(n=LS(),Ke.lanes|=n,Ai|=n,e.baseState=!0),t)}function oO(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=rg.transition;rg.transition={};try{e(!1),t()}finally{Ie=n,rg.transition=r}}function Rb(){return _n().memoizedState}function iO(e,t,n){var r=Uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Pb(e))Ab(t,n);else if(n=cb(e,t,n,r),n!==null){var o=Ut();Xn(n,e,r,o),Ib(n,t,r)}}function sO(e,t,n){var r=Uo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pb(e))Ab(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,Qn(a,s)){var l=t.interleaved;l===null?(o.next=o,Th(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=cb(e,t,o,r),n!==null&&(o=Ut(),Xn(n,e,r,o),Ib(n,t,r))}}function Pb(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Ab(e,t){hl=Rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ib(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uh(e,n)}}var Pd={readContext:Mn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},aO={readContext:Mn,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:Mn,useEffect:Uw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,id(4194308,4,bb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return id(4194308,4,e,t)},useInsertionEffect:function(e,t){return id(4,2,e,t)},useMemo:function(e,t){var n=Er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Er();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=iO.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:Bw,useDebugValue:Nh,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=Bw(!1),t=e[0];return e=oO.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Er();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),mt===null)throw Error(D(349));(Pi&30)!==0||mb(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Uw(hb.bind(null,r,i,e),[e]),r.flags|=2048,_l(9,gb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Er(),t=mt.identifierPrefix;if(Ue){var n=Wr,r=jr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:og,useRef:xb,useState:function(){return og(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return kb(t,ot.memoizedState,e)},useTransition:function(){var e=og(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1},cO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:ig,useRef:xb,useState:function(){return ig(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return ot===null?t.memoizedState=e:kb(t,ot.memoizedState,e)},useTransition:function(){var e=ig(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1};function Kn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ud={isMounted:function(e){return(e=e._reactInternals)?Oi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),i=Kr(r,o);i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),i=Kr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Uo(e),o=Kr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Ho(e,o,r),t!==null&&(Xn(t,e,r,n),rd(t,e,r))}};function Vw(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?!Rl(n,r)||!Rl(o,i):!0}function Lb(e,t,n){var r=!1,o=jo,i=t.contextType;return typeof i=="object"&&i!==null?i=Mn(i):(o=an(t)?ki:Lt.current,r=t.contextTypes,i=(r=r!=null)?qs(e,o):jo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ud,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function $w(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&&Ud.enqueueReplaceState(t,t.state,null)}function Ug(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ch(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Mn(i):(i=an(t)?ki:Lt.current,o.context=qs(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Bg(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&&Ud.enqueueReplaceState(o,o.state,null),Cd(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Zs(e,t){try{var n="",r=t;do n+=HI(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
7
|
-
Error generating stack: `+
|
|
8
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function sg(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Vg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uO=typeof WeakMap=="function"?WeakMap:Map;function Ob(e,t,n){n=Kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Id||(Id=!0,Zg=r),Vg(e,t)},n}function Nb(e,t,n){n=Kr(-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(){Vg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Vg(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function jw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uO;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=TO.bind(null,e,t,n),t.then(e,e))}function Ww(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 Kw(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=Kr(-1,1),t.tag=2,Ho(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var dO=Qr.ReactCurrentOwner,on=!1;function Bt(e,t,n,r){t.child=e===null?lb(t,null,n,r):Xs(t,e.child,n,r)}function Gw(e,t,n,r,o){n=n.render;var i=t.ref;return Ws(t,o),r=Ih(e,t,n,r,i,o),n=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&n&&vh(t),t.flags|=1,Bt(e,t,r,o),t.child)}function qw(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Uh(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Mb(e,t,i,r,o)):(e=cd(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:Rl,n(s,r)&&e.ref===t.ref)return Xr(e,t,o)}return t.flags|=1,e=Vo(i,r),e.ref=t.ref,e.return=t,t.child=e}function Mb(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Rl(i,r)&&e.ref===t.ref)if(on=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(on=!0);else return t.lanes=e.lanes,Xr(e,t,o)}return $g(e,t,n,r,o)}function _b(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},De(Bs,mn),mn|=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,De(Bs,mn),mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,De(Bs,mn),mn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,De(Bs,mn),mn|=r;return Bt(e,t,o,n),t.child}function Db(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $g(e,t,n,r,o){var i=an(n)?ki:Lt.current;return i=qs(t,i),Ws(t,o),n=Ih(e,t,n,r,i,o),r=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&r&&vh(t),t.flags|=1,Bt(e,t,n,o),t.child)}function Yw(e,t,n,r,o){if(an(n)){var i=!0;wd(t)}else i=!1;if(Ws(t,o),t.stateNode===null)sd(e,t),Lb(t,n,r),Ug(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=Mn(c):(c=an(n)?ki:Lt.current,c=qs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&$w(t,s,r,c),Io=!1;var f=t.memoizedState;s.state=f,Cd(t,r,s,o),l=t.memoizedState,a!==r||f!==l||sn.current||Io?(typeof u=="function"&&(Bg(t,n,u,r),l=t.memoizedState),(a=Io||Vw(t,n,a,r,f,l,c))?(d||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,ub(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kn(t.type,a),s.props=c,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Mn(l):(l=an(n)?ki:Lt.current,l=qs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&$w(t,s,r,l),Io=!1,f=t.memoizedState,s.state=f,Cd(t,r,s,o);var v=t.memoizedState;a!==d||f!==v||sn.current||Io?(typeof p=="function"&&(Bg(t,n,p,r),v=t.memoizedState),(c=Io||Vw(t,n,c,r,f,v,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jg(e,t,n,r,i,o)}function jg(e,t,n,r,o,i){Db(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Mw(t,n,!1),Xr(e,t,i);r=t.stateNode,dO.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Xs(t,e.child,null,i),t.child=Xs(t,null,a,i)):Bt(e,t,a,i),t.memoizedState=r.state,o&&Mw(t,n,!0),t.child}function Fb(e){var t=e.stateNode;t.pendingContext?Nw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nw(e,t.context,!1),kh(e,t.containerInfo)}function Xw(e,t,n,r,o){return Ys(),wh(o),t.flags|=256,Bt(e,t,n,r),t.child}var Wg={dehydrated:null,treeContext:null,retryLane:0};function Kg(e){return{baseLanes:e,cachePool:null,transitions:null}}function zb(e,t,n){var r=t.pendingProps,o=We.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),De(We,o&1),e===null)return zg(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=jd(s,r,0,null),e=Ci(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Kg(n),t.memoizedState=Wg,e):Mh(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return fO(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=Vo(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Vo(a,i):(i=Ci(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?Kg(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Wg,r}return i=e.child,e=i.sibling,r=Vo(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 Mh(e,t){return t=jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qu(e,t,n,r){return r!==null&&wh(r),Xs(t,e.child,null,n),e=Mh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fO(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=sg(Error(D(422))),Qu(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=jd({mode:"visible",children:r.children},o,0,null),i=Ci(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Xs(t,e.child,null,s),t.child.memoizedState=Kg(s),t.memoizedState=Wg,i);if((t.mode&1)===0)return Qu(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(D(419)),r=sg(i,r,void 0),Qu(e,t,s,r)}if(a=(s&e.childLanes)!==0,on||a){if(r=mt,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,Yr(e,o),Xn(r,e,o,-1))}return Bh(),r=sg(Error(D(421))),Qu(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=CO.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,gn=zo(o.nextSibling),hn=t,Ue=!0,qn=null,e!==null&&(In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Ri,jr=e.id,Wr=e.overflow,Ri=t),t=Mh(t,r.children),t.flags|=4096,t)}function Qw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hg(e.return,t,n)}function ag(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 Hb(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Bt(e,t,r.children,n),r=We.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&&Qw(e,n,t);else if(e.tag===19)Qw(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(De(We,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&&kd(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ag(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&&kd(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ag(t,!0,n,null,i);break;case"together":ag(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sd(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ai|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pO(e,t,n){switch(t.tag){case 3:Fb(t),Ys();break;case 5:db(t);break;case 1:an(t.type)&&wd(t);break;case 4:kh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Ed,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?zb(e,t,n):(De(We,We.current&1),e=Xr(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Hb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,_b(e,t,n)}return Xr(e,t,n)}var Bb,Gg,Ub,Vb;Bb=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}};Gg=function(){};Ub=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ei(kr.current);var i=null;switch(n){case"input":o=gg(e,o),r=gg(e,r),i=[];break;case"select":o=Ge({},o,{value:void 0}),r=Ge({},r,{value:void 0}),i=[];break;case"textarea":o=vg(e,o),r=vg(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vd)}wg(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"&&(wl.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"&&(wl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("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)}};Vb=function(e,t,n,r){n!==r&&(t.flags|=4)};function ol(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function At(e){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 mO(e,t,n){var r=t.pendingProps;switch(xh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return an(t.type)&&xd(),At(t),null;case 3:return r=t.stateNode,Qs(),ze(sn),ze(Lt),Ph(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qn!==null&&(th(qn),qn=null))),Gg(e,t),At(t),null;case 5:Rh(t);var o=Ei(Ol.current);if(n=t.type,e!==null&&t.stateNode!=null)Ub(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return At(t),null}if(e=Ei(kr.current),Yu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Tr]=t,r[Il]=i,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":iw(r,i),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Fe("invalid",r);break;case"textarea":aw(r,i),Fe("invalid",r)}wg(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&&qu(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&qu(r.textContent,a,e),o=["children",""+a]):wl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Du(r),sw(r,i,!0);break;case"textarea":Du(r),lw(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=vd)}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=hS(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[Tr]=t,e[Il]=r,Bb(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":iw(e,r),o=gg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ge({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":aw(e,r),o=vg(e,r),Fe("invalid",e);break;default:o=r}wg(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?xS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sl(e,l):typeof l=="number"&&Sl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(wl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Fe("scroll",e):l!=null&&oh(e,i,l,s))}switch(n){case"input":Du(e),sw(e,r,!1);break;case"textarea":Du(e),lw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$o(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Us(e,!!r.multiple,i,!1):r.defaultValue!=null&&Us(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=vd)}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 At(t),null;case 6:if(e&&t.stateNode!=null)Vb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Ei(Ol.current),Ei(kr.current),Yu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tr]=t,(i=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:qu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tr]=t,t.stateNode=r}return At(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&gn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)sb(),Ys(),t.flags|=98560,i=!1;else if(i=Yu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(D(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(D(317));i[Tr]=t}else Ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;At(t),i=!1}else qn!==null&&(th(qn),qn=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||(We.current&1)!==0?it===0&&(it=3):Bh())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return Qs(),Gg(e,t),e===null&&Pl(t.stateNode.containerInfo),At(t),null;case 10:return Eh(t.type._context),At(t),null;case 17:return an(t.type)&&xd(),At(t),null;case 19:if(ze(We),i=t.memoizedState,i===null)return At(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)ol(i,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=kd(e),s!==null){for(t.flags|=128,ol(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 De(We,We.current&1|2),t.child}e=e.sibling}i.tail!==null&&Je()>Js&&(t.flags|=128,r=!0,ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=kd(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ue)return At(t),null}else 2*Je()-i.renderingStartTime>Js&&n!==1073741824&&(t.flags|=128,r=!0,ol(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=We.current,De(We,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(mn&1073741824)!==0&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function gO(e,t){switch(xh(t),t.tag){case 1:return an(t.type)&&xd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qs(),ze(sn),ze(Lt),Ph(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Rh(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return Qs(),null;case 10:return Eh(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var Zu=!1,It=!1,hO=typeof WeakSet=="function"?WeakSet:Set,q=null;function Hs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function qg(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Zw=!1;function yO(e,t){if(Lg=gd,e=GS(),yh(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(w){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Og={focusedElem:e,selectionRange:n},gd=!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 v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,x=v.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Kn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return v=Zw,Zw=!1,v}function yl(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&&qg(t,n,i)}o=o.next}while(o!==r)}}function Vd(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 Yg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $b(e){var t=e.alternate;t!==null&&(e.alternate=null,$b(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Il],delete t[_g],delete t[JL],delete t[eO])),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 jb(e){return e.tag===5||e.tag===3||e.tag===4}function Jw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jb(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 Xg(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=vd));else if(r!==4&&(e=e.child,e!==null))for(Xg(e,t,n),e=e.sibling;e!==null;)Xg(e,t,n),e=e.sibling}function Qg(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(Qg(e,t,n),e=e.sibling;e!==null;)Qg(e,t,n),e=e.sibling}var wt=null,Gn=!1;function Po(e,t,n){for(n=n.child;n!==null;)Wb(e,t,n),n=n.sibling}function Wb(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Md,n)}catch(a){}switch(n.tag){case 5:It||Hs(n,t);case 6:var r=wt,o=Gn;wt=null,Po(e,t,n),wt=r,Gn=o,wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wt.removeChild(n.stateNode));break;case 18:wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?eg(e.parentNode,n):e.nodeType===1&&eg(e,n),Cl(e)):eg(wt,n.stateNode));break;case 4:r=wt,o=Gn,wt=n.stateNode.containerInfo,Gn=!0,Po(e,t,n),wt=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!It&&(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)&&qg(n,t,s),o=o.next}while(o!==r)}Po(e,t,n);break;case 1:if(!It&&(Hs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Po(e,t,n);break;case 21:Po(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Po(e,t,n),It=r):Po(e,t,n);break;default:Po(e,t,n)}}function eS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hO),t.forEach(function(r){var o=kO.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wn(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:wt=a.stateNode,Gn=!1;break e;case 3:wt=a.stateNode.containerInfo,Gn=!0;break e;case 4:wt=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(wt===null)throw Error(D(160));Wb(i,s,o),wt=null,Gn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Kb(t,e),t=t.sibling}function Kb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),br(e),r&4){try{yl(3,e,e.return),Vd(3,e)}catch(g){Ye(e,e.return,g)}try{yl(5,e,e.return)}catch(g){Ye(e,e.return,g)}}break;case 1:Wn(t,e),br(e),r&512&&n!==null&&Hs(n,n.return);break;case 5:if(Wn(t,e),br(e),r&512&&n!==null&&Hs(n,n.return),e.flags&32){var o=e.stateNode;try{Sl(o,"")}catch(g){Ye(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&&mS(o,i),Sg(a,s);var c=Sg(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?xS(o,d):u==="dangerouslySetInnerHTML"?yS(o,d):u==="children"?Sl(o,d):oh(o,u,d,c)}switch(a){case"input":hg(o,i);break;case"textarea":gS(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Us(o,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Us(o,!!i.multiple,i.defaultValue,!0):Us(o,!!i.multiple,i.multiple?[]:"",!1))}o[Il]=i}catch(g){Ye(e,e.return,g)}}break;case 6:if(Wn(t,e),br(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Ye(e,e.return,g)}}break;case 3:if(Wn(t,e),br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(g){Ye(e,e.return,g)}break;case 4:Wn(t,e),br(e);break;case 13:Wn(t,e),br(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Fh=Je())),r&4&&eS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||u,Wn(t,e),It=c):Wn(t,e),br(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(d=q=u;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:yl(4,f,f.return);break;case 1:Hs(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Ye(r,n,g)}}break;case 5:Hs(f,f.return);break;case 22:if(f.memoizedState!==null){nS(d);continue}}p!==null?(p.return=f,q=p):nS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=vS("display",s))}catch(g){Ye(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Ye(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Wn(t,e),br(e),r&4&&eS(e);break;case 21:break;default:Wn(t,e),br(e)}}function br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jb(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Sl(o,""),r.flags&=-33);var i=Jw(e);Qg(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Jw(e);Xg(e,a,s);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vO(e,t,n){q=e,Gb(e,t,n)}function Gb(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||Zu;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||It;a=Zu;var c=It;if(Zu=s,(It=l)&&!c)for(q=o;q!==null;)s=q,l=s.child,s.tag===22&&s.memoizedState!==null?rS(o):l!==null?(l.return=s,q=l):rS(o);for(;i!==null;)q=i,Gb(i,t,n),i=i.sibling;q=o,Zu=a,It=c}tS(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,q=i):tS(e,t,n)}}function tS(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:It||Vd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Hw(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}Hw(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 d=u.dehydrated;d!==null&&Cl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}It||t.flags&512&&Yg(t)}catch(f){Ye(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function nS(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 rS(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var i=t.return;try{Yg(t)}catch(l){Ye(t,i,l)}break;case 5:var s=t.return;try{Yg(t)}catch(l){Ye(t,s,l)}}}catch(l){Ye(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 xO=Math.ceil,Ad=Qr.ReactCurrentDispatcher,_h=Qr.ReactCurrentOwner,Nn=Qr.ReactCurrentBatchConfig,Se=0,mt=null,et=null,St=0,mn=0,Bs=Ko(0),it=0,Dl=null,Ai=0,$d=0,Dh=0,vl=null,rn=null,Fh=0,Js=1/0,Vr=null,Id=!1,Zg=null,Bo=null,Ju=!1,Mo=null,Ld=0,xl=0,Jg=null,ad=-1,ld=0;function Ut(){return(Se&6)!==0?Je():ad!==-1?ad:ad=Je()}function Uo(e){return(e.mode&1)===0?1:(Se&2)!==0&&St!==0?St&-St:nO.transition!==null?(ld===0&&(ld=LS()),ld):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:zS(e.type)),e)}function Xn(e,t,n,r){if(50<xl)throw xl=0,Jg=null,Error(D(185));Fl(e,n,r),((Se&2)===0||e!==mt)&&(e===mt&&((Se&2)===0&&($d|=n),it===4&&Oo(e,St)),ln(e,r),n===1&&Se===0&&(t.mode&1)===0&&(Js=Je()+500,Hd&&Go()))}function ln(e,t){var n=e.callbackNode;oL(e,t);var r=md(e,e===mt?St:0);if(r===0)n!==null&&dw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dw(n),t===1)e.tag===0?tO(oS.bind(null,e)):rb(oS.bind(null,e)),QL(function(){(Se&6)===0&&Go()}),n=null;else{switch(OS(r)){case 1:n=ch;break;case 4:n=AS;break;case 16:n=pd;break;case 536870912:n=IS;break;default:n=pd}n=tE(n,qb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qb(e,t){if(ad=-1,ld=0,(Se&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Ks()&&e.callbackNode!==n)return null;var r=md(e,e===mt?St:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Od(e,r);else{t=r;var o=Se;Se|=2;var i=Xb();(mt!==e||St!==t)&&(Vr=null,Js=Je()+500,Ti(e,t));do try{bO();break}catch(a){Yb(e,a)}while(!0);bh(),Ad.current=i,Se=o,et!==null?t=0:(mt=null,St=0,t=it)}if(t!==0){if(t===2&&(o=kg(e),o!==0&&(r=o,t=eh(e,o))),t===1)throw n=Dl,Ti(e,0),Oo(e,r),ln(e,Je()),n;if(t===6)Oo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!wO(o)&&(t=Od(e,r),t===2&&(i=kg(e),i!==0&&(r=i,t=eh(e,i))),t===1))throw n=Dl,Ti(e,0),Oo(e,r),ln(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:wi(e,rn,Vr);break;case 3:if(Oo(e,r),(r&130023424)===r&&(t=Fh+500-Je(),10<t)){if(md(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Mg(wi.bind(null,e,rn,Vr),t);break}wi(e,rn,Vr);break;case 4:if(Oo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Yn(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*xO(r/1960))-r,10<r){e.timeoutHandle=Mg(wi.bind(null,e,rn,Vr),r);break}wi(e,rn,Vr);break;case 5:wi(e,rn,Vr);break;default:throw Error(D(329))}}}return ln(e,Je()),e.callbackNode===n?qb.bind(null,e):null}function eh(e,t){var n=vl;return e.current.memoizedState.isDehydrated&&(Ti(e,t).flags|=256),e=Od(e,t),e!==2&&(t=rn,rn=n,t!==null&&th(t)),e}function th(e){rn===null?rn=e:rn.push.apply(rn,e)}function wO(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(!Qn(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 Oo(e,t){for(t&=~Dh,t&=~$d,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function oS(e){if((Se&6)!==0)throw Error(D(327));Ks();var t=md(e,0);if((t&1)===0)return ln(e,Je()),null;var n=Od(e,t);if(e.tag!==0&&n===2){var r=kg(e);r!==0&&(t=r,n=eh(e,r))}if(n===1)throw n=Dl,Ti(e,0),Oo(e,t),ln(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,rn,Vr),ln(e,Je()),null}function zh(e,t){var n=Se;Se|=1;try{return e(t)}finally{Se=n,Se===0&&(Js=Je()+500,Hd&&Go())}}function Ii(e){Mo!==null&&Mo.tag===0&&(Se&6)===0&&Ks();var t=Se;Se|=1;var n=Nn.transition,r=Ie;try{if(Nn.transition=null,Ie=1,e)return e()}finally{Ie=r,Nn.transition=n,Se=t,(Se&6)===0&&Go()}}function Hh(){mn=Bs.current,ze(Bs)}function Ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XL(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(xh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xd();break;case 3:Qs(),ze(sn),ze(Lt),Ph();break;case 5:Rh(r);break;case 4:Qs();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Eh(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(mt=e,et=e=Vo(e.current,null),St=mn=t,it=0,Dl=null,Dh=$d=Ai=0,rn=vl=null,bi!==null){for(t=0;t<bi.length;t++)if(n=bi[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}bi=null}return e}function Yb(e,t){do{var n=et;try{if(bh(),od.current=Pd,Rd){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Rd=!1}if(Pi=0,pt=ot=Ke=null,hl=!1,Nl=0,_h.current=null,n===null||n.return===null){it=1,Dl=t,et=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=St,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Ww(s);if(p!==null){p.flags&=-257,Kw(p,s,a,i,t),p.mode&1&&jw(i,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if((t&1)===0){jw(i,c,t),Bh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Ww(s);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),Kw(x,s,a,i,t),wh(Zs(l,a));break e}}i=l=Zs(l,a),it!==4&&(it=2),vl===null?vl=[i]:vl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=Ob(i,l,t);zw(i,y);break e;case 1:a=l;var m=i.type,h=i.stateNode;if((i.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Bo===null||!Bo.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Nb(i,a,t);zw(i,w);break e}}i=i.return}while(i!==null)}Zb(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Xb(){var e=Ad.current;return Ad.current=Pd,e===null?Pd:e}function Bh(){(it===0||it===3||it===2)&&(it=4),mt===null||(Ai&268435455)===0&&($d&268435455)===0||Oo(mt,St)}function Od(e,t){var n=Se;Se|=2;var r=Xb();(mt!==e||St!==t)&&(Vr=null,Ti(e,t));do try{SO();break}catch(o){Yb(e,o)}while(!0);if(bh(),Se=n,Ad.current=r,et!==null)throw Error(D(261));return mt=null,St=0,it}function SO(){for(;et!==null;)Qb(et)}function bO(){for(;et!==null&&!YI();)Qb(et)}function Qb(e){var t=eE(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?Zb(e):et=t,_h.current=null}function Zb(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=mO(n,t,mn),n!==null){et=n;return}}else{if(n=gO(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);it===0&&(it=5)}function wi(e,t,n){var r=Ie,o=Nn.transition;try{Nn.transition=null,Ie=1,EO(e,t,n,r)}finally{Nn.transition=o,Ie=r}return null}function EO(e,t,n,r){do Ks();while(Mo!==null);if((Se&6)!==0)throw Error(D(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(D(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(iL(e,i),e===mt&&(et=mt=null,St=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ju||(Ju=!0,tE(pd,function(){return Ks(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Nn.transition,Nn.transition=null;var s=Ie;Ie=1;var a=Se;Se|=4,_h.current=null,yO(e,n),Kb(n,e),WL(Og),gd=!!Lg,Og=Lg=null,e.current=n,vO(n,e,o),XI(),Se=a,Ie=s,Nn.transition=i}else e.current=n;if(Ju&&(Ju=!1,Mo=e,Ld=o),i=e.pendingLanes,i===0&&(Bo=null),JI(n.stateNode,r),ln(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(Id)throw Id=!1,e=Zg,Zg=null,e;return(Ld&1)!==0&&e.tag!==0&&Ks(),i=e.pendingLanes,(i&1)!==0?e===Jg?xl++:(xl=0,Jg=e):xl=0,Go(),null}function Ks(){if(Mo!==null){var e=OS(Ld),t=Nn.transition,n=Ie;try{if(Nn.transition=null,Ie=16>e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,Ld=0,(Se&6)!==0)throw Error(D(331));var o=Se;for(Se|=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:yl(8,u,i)}var d=u.child;if(d!==null)d.return=u,q=d;else for(;q!==null;){u=q;var f=u.sibling,p=u.return;if($b(u),u===c){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var x=g.sibling;g.sibling=null,g=x}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:yl(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,q=y;break e}q=i.return}}var m=e.current;for(q=m;q!==null;){s=q;var h=s.child;if((s.subtreeFlags&2064)!==0&&h!==null)h.return=s,q=h;else e:for(s=m;q!==null;){if(a=q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Vd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===s){q=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,q=w;break e}q=a.return}}if(Se=o,Go(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Md,e)}catch(E){}r=!0}return r}finally{Ie=n,Nn.transition=t}}return!1}function iS(e,t,n){t=Zs(n,t),t=Ob(e,t,1),e=Ho(e,t,1),t=Ut(),e!==null&&(Fl(e,1,t),ln(e,t))}function Ye(e,t,n){if(e.tag===3)iS(e,e,n);else for(;t!==null;){if(t.tag===3){iS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bo===null||!Bo.has(r))){e=Zs(n,e),e=Nb(t,e,1),t=Ho(t,e,1),e=Ut(),t!==null&&(Fl(t,1,e),ln(t,e));break}}t=t.return}}function TO(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(St&n)===n&&(it===4||it===3&&(St&130023424)===St&&500>Je()-Fh?Ti(e,0):Dh|=n),ln(e,t)}function Jb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Hu,Hu<<=1,(Hu&130023424)===0&&(Hu=4194304)));var n=Ut();e=Yr(e,t),e!==null&&(Fl(e,t,n),ln(e,n))}function CO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jb(e,n)}function kO(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(D(314))}r!==null&&r.delete(t),Jb(e,n)}var eE;eE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)on=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return on=!1,pO(e,t,n);on=(e.flags&131072)!==0}else on=!1,Ue&&(t.flags&1048576)!==0&&ob(t,bd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;sd(e,t),e=t.pendingProps;var o=qs(t,Lt.current);Ws(t,n),o=Ih(null,t,r,e,o,n);var i=Lh();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,an(r)?(i=!0,wd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ch(t),o.updater=Ud,t.stateNode=o,o._reactInternals=t,Ug(t,r,e,n),t=jg(null,t,r,!0,i,n)):(t.tag=0,Ue&&i&&vh(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(sd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=PO(r),e=Kn(r,e),o){case 0:t=$g(null,t,r,e,n);break e;case 1:t=Yw(null,t,r,e,n);break e;case 11:t=Gw(null,t,r,e,n);break e;case 14:t=qw(null,t,r,Kn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),$g(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Yw(e,t,r,o,n);case 3:e:{if(Fb(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ub(e,t),Cd(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=Zs(Error(D(423)),t),t=Xw(e,t,r,n,o);break e}else if(r!==o){o=Zs(Error(D(424)),t),t=Xw(e,t,r,n,o);break e}else for(gn=zo(t.stateNode.containerInfo.firstChild),hn=t,Ue=!0,qn=null,n=lb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ys(),r===o){t=Xr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return db(t),e===null&&zg(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ng(r,o)?s=null:i!==null&&Ng(r,i)&&(t.flags|=32),Db(e,t),Bt(e,t,s,n),t.child;case 6:return e===null&&zg(t),null;case 13:return zb(e,t,n);case 4:return kh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xs(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Gw(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(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,De(Ed,r._currentValue),r._currentValue=s,i!==null)if(Qn(i.value,s)){if(i.children===o.children&&!sn.current){t=Xr(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=Kr(-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),Hg(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(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Hg(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}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ws(t,n),o=Mn(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),qw(e,t,r,o,n);case 15:return Mb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),sd(e,t),t.tag=1,an(r)?(e=!0,wd(t)):e=!1,Ws(t,n),Lb(t,r,o),Ug(t,r,o,n),jg(null,t,r,!0,e,n);case 19:return Hb(e,t,n);case 22:return _b(e,t,n)}throw Error(D(156,t.tag))};function tE(e,t){return PS(e,t)}function RO(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 On(e,t,n,r){return new RO(e,t,n,r)}function Uh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PO(e){if(typeof e=="function")return Uh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sh)return 11;if(e===ah)return 14}return 2}function Vo(e,t){var n=e.alternate;return n===null?(n=On(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 cd(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Uh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Is:return Ci(n.children,o,i,t);case ih:s=8,o|=8;break;case dg:return e=On(12,n,t,o|2),e.elementType=dg,e.lanes=i,e;case fg:return e=On(13,n,t,o),e.elementType=fg,e.lanes=i,e;case pg:return e=On(19,n,t,o),e.elementType=pg,e.lanes=i,e;case dS:return jd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cS:s=10;break e;case uS:s=9;break e;case sh:s=11;break e;case ah:s=14;break e;case Ao:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=On(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ci(e,t,n,r){return e=On(7,e,r,t),e.lanes=n,e}function jd(e,t,n,r){return e=On(22,e,r,t),e.elementType=dS,e.lanes=n,e.stateNode={isHidden:!1},e}function lg(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function cg(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AO(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=Km(0),this.expirationTimes=Km(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Km(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vh(e,t,n,r,o,i,s,a,l){return e=new AO(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=On(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ch(i),e}function IO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:As,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nE(e){if(!e)return jo;e=e._reactInternals;e:{if(Oi(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(an(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(an(n))return nb(e,n,t)}return t}function rE(e,t,n,r,o,i,s,a,l){return e=Vh(n,r,!0,e,o,i,s,a,l),e.context=nE(null),n=e.current,r=Ut(),o=Uo(n),i=Kr(r,o),i.callback=t!=null?t:null,Ho(n,i,o),e.current.lanes=o,Fl(e,o,r),ln(e,r),e}function Wd(e,t,n,r){var o=t.current,i=Ut(),s=Uo(o);return n=nE(n),t.context===null?t.context=n:t.pendingContext=n,t=Kr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ho(o,t,s),e!==null&&(Xn(e,o,s,i),rd(e,o,s)),s}function Nd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function sS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $h(e,t){sS(e,t),(e=e.alternate)&&sS(e,t)}function LO(){return null}var oE=typeof reportError=="function"?reportError:function(e){console.error(e)};function jh(e){this._internalRoot=e}Kd.prototype.render=jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Wd(e,t,null,null)};Kd.prototype.unmount=jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ii(function(){Wd(null,e,null,null)}),t[qr]=null}};function Kd(e){this._internalRoot=e}Kd.prototype.unstable_scheduleHydration=function(e){if(e){var t=_S();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lo.length&&t!==0&&t<Lo[n].priority;n++);Lo.splice(n,0,e),n===0&&FS(e)}};function Wh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function aS(){}function OO(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=Nd(s);i.call(c)}}var s=rE(t,r,e,0,null,!1,!1,"",aS);return e._reactRootContainer=s,e[qr]=s.current,Pl(e.nodeType===8?e.parentNode:e),Ii(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=Nd(l);a.call(c)}}var l=Vh(e,0,!1,null,null,!1,!1,"",aS);return e._reactRootContainer=l,e[qr]=l.current,Pl(e.nodeType===8?e.parentNode:e),Ii(function(){Wd(t,l,n,r)}),l}function qd(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=Nd(s);a.call(l)}}Wd(t,s,e,o)}else s=OO(n,t,e,o,r);return Nd(s)}NS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cl(t.pendingLanes);n!==0&&(uh(t,n|1),ln(t,Je()),(Se&6)===0&&(Js=Je()+500,Go()))}break;case 13:Ii(function(){var r=Yr(e,1);if(r!==null){var o=Ut();Xn(r,e,1,o)}}),$h(e,1)}};dh=function(e){if(e.tag===13){var t=Yr(e,134217728);if(t!==null){var n=Ut();Xn(t,e,134217728,n)}$h(e,134217728)}};MS=function(e){if(e.tag===13){var t=Uo(e),n=Yr(e,t);if(n!==null){var r=Ut();Xn(n,e,t,r)}$h(e,t)}};_S=function(){return Ie};DS=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Eg=function(e,t,n){switch(t){case"input":if(hg(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=zd(r);if(!o)throw Error(D(90));pS(r),hg(r,o)}}}break;case"textarea":gS(e,n);break;case"select":t=n.value,t!=null&&Us(e,!!n.multiple,t,!1)}};bS=zh;ES=Ii;var NO={usingClientEntryPoint:!1,Events:[Hl,Ms,zd,wS,SS,zh]},il={findFiberByHostInstance:Si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MO={bundleType:il.bundleType,version:il.version,rendererPackageName:il.rendererPackageName,rendererConfig:il.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kS(e),e===null?null:e.stateNode},findFiberByHostInstance:il.findFiberByHostInstance||LO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(sl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!sl.isDisabled&&sl.supportsFiber))try{Md=sl.inject(MO),Cr=sl}catch(e){}var sl;xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NO;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wh(t))throw Error(D(200));return IO(e,t,null,n)};xn.createRoot=function(e,t){if(!Wh(e))throw Error(D(299));var n=!1,r="",o=oE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Vh(e,1,!1,null,null,n,!1,r,o),e[qr]=t.current,Pl(e.nodeType===8?e.parentNode:e),new jh(t)};xn.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(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=kS(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return Ii(e)};xn.hydrate=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!Wh(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=oE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=rE(t,null,e,1,n!=null?n:null,o,!1,i,s),e[qr]=t.current,Pl(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 Kd(t)};xn.render=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!Gd(e))throw Error(D(40));return e._reactRootContainer?(Ii(function(){qd(null,null,e,!1,function(){e._reactRootContainer=null,e[qr]=null})}),!0):!1};xn.unstable_batchedUpdates=zh;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gd(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return qd(e,t,n,!1,r)};xn.version="18.3.1-next-f1338f8080-20240426"});var Ul=tn((N6,aE)=>{"use strict";function sE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sE)}catch(e){console.error(e)}}sE(),aE.exports=iE()});var cE=tn(Kh=>{"use strict";var lE=Ul();Kh.createRoot=lE.createRoot,Kh.hydrateRoot=lE.hydrateRoot;var M6});var jE=tn($E=>{"use strict";var Wl=Q();function IN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var LN=typeof Object.is=="function"?Object.is:IN,ON=Wl.useSyncExternalStore,NN=Wl.useRef,MN=Wl.useEffect,_N=Wl.useMemo,DN=Wl.useDebugValue;$E.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=NN(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=_N(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var v=s.value;if(o(v,p))return d=v}return d=p}if(v=d,LN(u,p))return v;var g=r(p);return o!==void 0&&o(v,g)?(u=p,v):(u=p,d=g)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=ON(e,i[0],i[1]);return MN(function(){s.hasValue=!0,s.value=a},[a]),DN(a),a}});var KE=tn((Sz,WE)=>{"use strict";WE.exports=jE()});var By=tn((eH,xT)=>{"use strict";var S_="Expected a function",yT=NaN,b_="[object Symbol]",E_=/^\s+|\s+$/g,T_=/^[-+]0x[0-9a-f]+$/i,C_=/^0b[01]+$/i,k_=/^0o[0-7]+$/i,R_=parseInt,P_=typeof global=="object"&&global&&global.Object===Object&&global,A_=typeof self=="object"&&self&&self.Object===Object&&self,I_=P_||A_||Function("return this")(),L_=Object.prototype,O_=L_.toString,N_=Math.max,M_=Math.min,zy=function(){return I_.Date.now()};function __(e,t,n){var r,o,i,s,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(S_);t=vT(t)||0,Hy(n)&&(u=!!n.leading,d="maxWait"in n,i=d?N_(vT(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(C){var k=r,A=o;return r=o=void 0,c=C,s=e.apply(A,k),s}function v(C){return c=C,a=setTimeout(y,t),u?p(C):s}function g(C){var k=C-l,A=C-c,B=t-k;return d?M_(B,i-A):B}function x(C){var k=C-l,A=C-c;return l===void 0||k>=t||k<0||d&&A>=i}function y(){var C=zy();if(x(C))return m(C);a=setTimeout(y,g(C))}function m(C){return a=void 0,f&&r?p(C):(r=o=void 0,s)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?s:m(zy())}function E(){var C=zy(),k=x(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),s}return E.cancel=h,E.flush=w,E}function Hy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function D_(e){return!!e&&typeof e=="object"}function F_(e){return typeof e=="symbol"||D_(e)&&O_.call(e)==b_}function vT(e){if(typeof e=="number")return e;if(F_(e))return yT;if(Hy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(E_,"");var n=C_.test(e);return n||k_.test(e)?R_(e.slice(2),n?2:8):T_.test(e)?yT:+e}xT.exports=__});var zT=tn((FH,FT)=>{"use strict";var q_=/["'&<>]/;FT.exports=Y_;function Y_(e){var t=""+e,n=q_.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var GF={};kt(GF,{Card:()=>Te,ContentEditableInput:()=>ms,DeepdeskAPI:()=>bo,DeepdeskSDK:()=>uu,HTTPClient:()=>hs,InputMediator:()=>So,InputType:()=>ks,KeyboardHint:()=>ku,Label:()=>kx,Locale:()=>Kl,Section:()=>wr,SectionList:()=>Ts,Sources:()=>ko,Suggestion:()=>ye,SuggestionList:()=>Ht,TextAreaInput:()=>gs,ToggleButton:()=>yi,attachFile:()=>PA,authenticateWithKey:()=>AA,createFullRange:()=>Ba,createOverlayContainer:()=>lu,createRangeFromOffsets:()=>ui,escapeHTML:()=>fa,formatTextMarkup:()=>IA,getRangeOffsets:()=>su,getRangeText:()=>au,insertCKEditor:()=>MA,isHTML:()=>jf,isSupportedInputElement:()=>um,updateContentEditable:()=>OA,updateTextArea:()=>LA,useClickOutsideRoot:()=>ri,useStyles:()=>_,waitForElementVisibilityChange:()=>pm});var Im=b(Me()),Pn=b(Q());var Su=b(Q()),hx=b(Me());var Ya=Su.default.createContext({});function _(e,t){let i=(0,Su.useContext)(Ya),{debug:n}=i,o=oe(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},s),{[a]:(0,hx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var yx={root:"dd-4s9wq"};var gi=b(R()),Eu=()=>(0,gi.jsxs)("svg",{className:yx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,gi.jsx)("defs",{children:(0,gi.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,gi.jsx)("title",{children:"Failed loading image"}),(0,gi.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 Am={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var hi=b(R()),Tu=(0,Pn.createContext)(Am),hI=({title:e,src:t})=>{let n=(0,Pn.useContext)(Tu),[r,o]=(0,Pn.useState)(!1);return(0,Pn.useEffect)(()=>{o(!1)},[t]),(0,hi.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,hi.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,hi.jsx)(Eu,{})})},yI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pn.useContext)(Tu);return(0,hi.jsx)("div",{className:(0,Im.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},vI=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=oe(s,["as","cropText","className","children"]);let a=(0,Pn.useContext)(Tu);return Pn.default.createElement(e,S({className:(0,Im.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Cu=({children:e})=>{let t=_("Card",Am);return(0,hi.jsx)("div",{className:t.root,children:(0,hi.jsx)(Tu.Provider,{value:t,children:e})})};Cu.Image=hI;Cu.Content=yI;Cu.Title=vI;var Te=Cu;var bx=b(Me());var Sx={root:"dd-llBx9"};var Ex=b(R());var xI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},wI=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let i=_("KeyboardHint",Sx);return(0,Ex.jsx)("span",S({"data-key":xI[t],className:(0,bx.default)(e,i.root)},n))},ku=wI;var Cx=b(Me());var Tx={root:"dd-e6HXZ"};var Rx=b(R()),SI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let i=_("Label",Tx);return(0,Rx.jsx)("span",P(S({},n),{className:(0,Cx.default)(e,i.root),children:t}))},kx=SI;var Px={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var Es=b(R()),bI=o=>{var i=o,{title:e,children:t,type:n}=i,r=oe(i,["title","children","type"]);let s=_("Section",Px);return(0,Es.jsxs)("section",P(S({},r),{className:s.root,"data-section-type":n,children:[e&&(0,Es.jsx)("div",{className:s.subTitleContainer,children:(0,Es.jsx)("span",{className:s.subtitle,children:e})}),(0,Es.jsx)("div",{className:s.suggestions,children:t})]}))},wr=bI;var Mx=b(Me()),_x=b(Q());var Eo=b(Q()),Ox=b(R()),Ax=(0,Eo.createContext)(null),Ix=({scrollContainerRef:e,children:t})=>{let n=(0,Eo.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:i}=o.getBoundingClientRect(),{top:s}=r.getBoundingClientRect();o.scrollTo({top:s-i})},[]);return(0,Ox.jsx)(Ax.Provider,{value:n,children:t})},Lx=e=>{let t=(0,Eo.useContext)(Ax);(0,Eo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Nx={root:"dd-uoTXh"};var Lm=b(R()),EI=({className:e,children:t})=>{let n=_("SectionList",Nx),r=(0,_x.useRef)(null);return(0,Lm.jsx)(Ix,{scrollContainerRef:r,children:(0,Lm.jsx)("div",{ref:r,className:(0,Mx.default)(n.root,e),children:t})})},Ts=EI;var Cs=b(Me()),nn=b(Q());var Om={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",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var zt=b(R()),To=(0,nn.createContext)(Om),TI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let i=(0,nn.useContext)(To);return(0,zt.jsx)("div",P(S({},n),{className:(0,Cs.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function CI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:i}=l,s=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,nn.useContext)(To);return(0,zt.jsxs)(e||"button",P(S({type:"button",className:(0,Cs.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:i},t),title:r,"aria-label":r},s),{children:[n&&(0,zt.jsx)("span",{className:c.icon,children:n}),o]}))}var kI=({children:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.buttonsContainer,children:e})},RI=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,nn.useContext)(To);return(0,zt.jsxs)("div",{className:(0,Cs.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,zt.jsx)("ul",{className:i.dropdownList,children:o})]})},PI=({index:e,label:t,onClick:n})=>{let r=(0,nn.useContext)(To);return(0,zt.jsx)("li",{className:r.dropdownItem,children:(0,zt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},AI=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,nn.useContext)(To);return(0,zt.jsx)("button",{type:"button",className:(0,Cs.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:s=>s.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},II=({labels:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.labels,children:e.map(n=>(0,zt.jsx)("span",{className:t.label,children:n},n))})},Co=nn.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=oe(l,["className","selected","onClick","children","as"]);let c=_("Suggestion",Om),u=(0,nn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,zt.jsx)(o,P(S({},i),{ref:s,className:(0,Cs.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,zt.jsx)(To.Provider,{value:c,children:r})}))});Co.Labels=II;Co.Actions=TI;Co.ActionButton=AI;Co.DropdownButton=RI;Co.DropdownItem=PI;Co.ButtonsContainer=kI;Co.Button=CI;var ye=Co;var Fx=b(Me());var Dx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var zx=b(R()),LI=({withDivider:e,children:t})=>{let n=_("SuggestionList",Dx);return(0,zx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Fx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Ht=LI;var Bx=b(Me());var Hx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Ru=b(R()),OI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=_("ToggleButton",Hx);return(0,Ru.jsx)("button",{type:"button",className:(0,Bx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ru.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ru.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},yi=OI;var Ux=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Pu=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Vx=/x-deepdesk-(([a-z0-9\-_])+-version)/,Au=["cues","custom-data","custom-data-banner","knowledge-assist"],$x=Intl.DateTimeFormat().resolvedOptions().timeZone,ko=(g=>(g.SEARCH="search",g.TEMPLATE="template",g.ELASTIC_SEARCH="search-autocomplete",g.GPT="gpt",g.TRIE="trie",g.TRIE_WITH_TYPOS="trie-with-typos",g.SEMANTIC="semantic",g.TEXT_RECOMMENDATION="text_recommendation",g.URL_RECOMMENDATION="url_recommendation",g.LINK_RECOMMENDATION="link_recommendation",g.PERSONAL_COLLECTION="personal-collection",g.PERSONAL_COLLECTION_SEARCH="personal-collection-search",g.SEARCH_OVERLAY="search-overlay",g.SEARCH_PREVIEW="search-preview",g.SEARCH_URL="search-url",g))(ko||{}),ks=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(ks||{});var fi=b(cE());var RR=b(Q());function Et(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 _O=typeof Symbol=="function"&&Symbol.observable||"@@observable",uE=_O,Gh=()=>Math.random().toString(36).substring(7).split("").join("."),DO={INIT:`@@redux/INIT${Gh()}`,REPLACE:`@@redux/REPLACE${Gh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Gh()}`},Yd=DO;function Xd(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 qh(e,t,n){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Et(1));return n(qh)(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((x,y)=>{s.set(y,x)}))}function u(){if(l)throw new Error(Et(3));return o}function d(x){if(typeof x!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));let y=!0;c();let m=a++;return s.set(m,x),function(){if(y){if(l)throw new Error(Et(6));y=!1,c(),s.delete(m),i=null}}}function f(x){if(!Xd(x))throw new Error(Et(7));if(typeof x.type=="undefined")throw new Error(Et(8));if(typeof x.type!="string")throw new Error(Et(17));if(l)throw new Error(Et(9));try{l=!0,o=r(o,x)}finally{l=!1}return(i=s).forEach(m=>{m()}),x}function p(x){if(typeof x!="function")throw new Error(Et(10));r=x,f({type:Yd.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Et(11));function m(){let w=y;w.next&&w.next(u())}return m(),{unsubscribe:x(m)}},[uE](){return this}}}return f({type:Yd.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[uE]:v}}function FO(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Yd.INIT})=="undefined")throw new Error(Et(12));if(typeof n(void 0,{type:Yd.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Et(13))})}function Qd(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{FO(n)}catch(s){i=s}return function(a={},l){if(i)throw i;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],g=p(v,l);if(typeof g=="undefined"){let x=l&&l.type;throw new Error(Et(14))}u[f]=g,c=c||g!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function na(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function dE(...e){return t=>(n,r)=>{let o=t(n,r),i=()=>{throw new Error(Et(15))},s={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},a=e.map(l=>l(s));return i=na(...a)(o.dispatch),P(S({},o),{dispatch:i})}}function fE(e){return Xd(e)&&"type"in e&&typeof e.type=="string"}var vE=Symbol.for("immer-nothing"),pE=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ra=Object.getPrototypeOf;function qo(e){return!!e&&!!e[wn]}function Jn(e){var t;return e?xE(e)||Array.isArray(e)||!!e[pE]||!!((t=e.constructor)!=null&&t[pE])||nf(e)||rf(e):!1}var zO=Object.prototype.constructor.toString();function xE(e){if(!e||typeof e!="object")return!1;let t=ra(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zO}function Zd(e,t){tf(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function tf(e){let t=e[wn];return t?t.type_:Array.isArray(e)?1:nf(e)?2:rf(e)?3:0}function Qh(e,t){return tf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wE(e,t,n){let r=tf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function HO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nf(e){return e instanceof Map}function rf(e){return e instanceof Set}function Ni(e){return e.copy_||e.base_}function Zh(e,t){if(nf(e))return new Map(e);if(rf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=xE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[wn];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){let s=o[i],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(ra(e),r)}else{let r=ra(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function ry(e,t=!1){return of(e)||qo(e)||!Jn(e)||(tf(e)>1&&(e.set=e.add=e.clear=e.delete=BO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ry(r,!0))),e}function BO(){Zn(2)}function of(e){return Object.isFrozen(e)}var UO={};function Mi(e){let t=UO[e];return t||Zn(0,e),t}var Vl;function SE(){return Vl}function VO(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mE(e,t){t&&(Mi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jh(e){ey(e),e.drafts_.forEach($O),e.drafts_=null}function ey(e){e===Vl&&(Vl=e.parent_)}function gE(e){return Vl=VO(Vl,e)}function $O(e){let t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Jh(t),Zn(4)),Jn(e)&&(e=Jd(t,e),t.parent_||ef(t,e)),t.patches_&&Mi("Patches").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Jd(t,n,[]),Jh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vE?e:void 0}function Jd(e,t,n){if(of(t))return t;let r=t[wn];if(!r)return Zd(t,(o,i)=>yE(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ef(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Zd(i,(a,l)=>yE(e,r,o,a,l,n,s)),ef(e,o,!1),n&&e.patches_&&Mi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yE(e,t,n,r,o,i,s){if(qo(o)){let a=i&&t&&t.type_!==3&&!Qh(t.assigned_,r)?i.concat(r):void 0,l=Jd(e,o,a);if(wE(n,r,l),qo(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Jn(o)&&!of(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Jd(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ef(e,o)}}function ef(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ry(t,n)}function jO(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:SE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,i=oy;n&&(o=[r],i=$l);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var oy={get(e,t){if(t===wn)return e;let n=Ni(e);if(!Qh(n,t))return WO(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===Yh(e.base_,t)?(Xh(e),e.copy_[t]=ny(r,e)):r},has(e,t){return t in Ni(e)},ownKeys(e){return Reflect.ownKeys(Ni(e))},set(e,t,n){let r=bE(Ni(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=Yh(Ni(e),t),i=o==null?void 0:o[wn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(HO(n,o)&&(n!==void 0||Qh(e.base_,t)))return!0;Xh(e),ty(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Yh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xh(e),ty(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ni(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ra(e.base_)},setPrototypeOf(){Zn(12)}},$l={};Zd(oy,(e,t)=>{$l[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$l.deleteProperty=function(e,t){return $l.set.call(this,e,t,void 0)};$l.set=function(e,t,n){return oy.set.call(this,e[0],t,n,e[0])};function Yh(e,t){let n=e[wn];return(n?Ni(n):e)[t]}function WO(e,t,n){var o;let r=bE(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function bE(e,t){if(!(t in e))return;let n=ra(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ra(n)}}function ty(e){e.modified_||(e.modified_=!0,e.parent_&&ty(e.parent_))}function Xh(e){e.copy_||(e.copy_=Zh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var KO=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let i=n;n=t;let s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let i=gE(this),s=ny(t,void 0),a=!0;try{o=n(s),a=!1}finally{a?Jh(i):ey(i)}return mE(i,r),hE(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===vE&&(o=void 0),this.autoFreeze_&&ry(o,!0),r){let i=[],s=[];Mi("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")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]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),qo(e)&&(e=GO(e));let t=gE(this),n=ny(e,void 0);return n[wn].isManual_=!0,ey(t),n}finishDraft(e,t){let n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return mE(r,t),hE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}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=Mi("Patches").applyPatches_;return qo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ny(e,t){let n=nf(e)?Mi("MapSet").proxyMap_(e,t):rf(e)?Mi("MapSet").proxySet_(e,t):jO(e,t);return(t?t.scope_:SE()).drafts_.push(n),n}function GO(e){return qo(e)||Zn(10,e),EE(e)}function EE(e){if(!Jn(e)||of(e))return e;let t=e[wn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zh(e,!0);return Zd(n,(r,o)=>{wE(n,r,EE(o))}),t&&(t.finalized_=!1),n}var Sn=new KO,sf=Sn.produce,z6=Sn.produceWithPatches.bind(Sn),H6=Sn.setAutoFreeze.bind(Sn),B6=Sn.setUseStrictShallowCopy.bind(Sn),U6=Sn.applyPatches.bind(Sn),V6=Sn.createDraft.bind(Sn),$6=Sn.finishDraft.bind(Sn);function qO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function YO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function XO(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 TE=e=>Array.isArray(e)?e:[e];function QO(e){let t=Array.isArray(e[0])?e[0]:e;return XO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZO(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var G6=Symbol();var q6=Object.getPrototypeOf({});var JO=class{constructor(e){this.value=e}deref(){return this.value}},eN=typeof WeakRef!="undefined"?WeakRef:JO,tN=0,CE=1;function af(){return{s:tN,v:void 0,o:null,p:null}}function iy(e,t={}){let n=af(),{resultEqualityCheck:r}=t,o,i=0;function s(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}}let c=a,u;if(a.s===CE)u=a.v;else if(u=e.apply(null,arguments),i++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new eN(u):u}return c.s=CE,c.v=u,u}return s.clearCache=()=>{n=af(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function kE(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()),qO(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=iy,argsMemoizeOptions:v=[],devModeChecks:g={}}=u,x=TE(f),y=TE(v),m=QO(o),h=d(function(){return i++,c.apply(null,arguments)},...x),w=!0,E=p(function(){s++;let k=ZO(m,arguments);return a=h.apply(null,k),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dn=kE(iy),nN=Object.assign((e,t=Dn)=>{YO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>nN});function RE(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var PE=RE(),AE=RE;var rN=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?na:na.apply(null,arguments)},rz=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},oN=e=>e&&typeof e.match=="function";function st(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Zr(0));return S(S({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=>fE(r)&&r.type===e,n}var _E=class jl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jl.prototype)}static get[Symbol.species](){return jl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jl(...t[0].concat(this)):new jl(...t.concat(this))}};function IE(e){return Jn(e)?sf(e,()=>{}):e}function LE(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function iN(e){return typeof e=="boolean"}var sN=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t!=null?t:{},s=new _E;return n&&(iN(n)?s.push(PE):s.push(AE(n.extraArgument))),s},aN="RTK_autoBatch";var OE=e=>t=>{setTimeout(t,e)},lN=(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?window.requestAnimationFrame:OE(10):e.type==="callback"?e.queueNotification:OE(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[aN]),i=!o,i&&(s||(s=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},cN=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new _E(e);return r&&o.push(lN(typeof r=="object"?r:void 0)),o};function DE(e){let t=sN(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},a;if(typeof n=="function")a=n;else if(Xd(n))a=Qd(n);else throw new Error(Zr(1));let l;typeof r=="function"?l=r(t):l=t();let c=na;o&&(c=rN(S({trace:!1},typeof o=="object"&&o)));let u=dE(...l),d=cN(u),f=typeof s=="function"?s(d):d(),p=c(...f);return qh(a,i,p)}function FE(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},addMatcher(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function uN(e){return typeof e=="function"}function dN(e,t){let[n,r,o]=FE(t),i;if(uN(e))i=()=>IE(e());else{let a=IE(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,d)=>{if(d)if(qo(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return sf(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=i,s}var fN=(e,t)=>oN(e)?e.match(t):e(t);function pN(...e){return t=>e.some(n=>fN(n,t))}var mN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gN=(e=21)=>{let t="",n=e;for(;n--;)t+=mN[Math.random()*64|0];return t},hN=["name","message","stack","code"],sy=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},NE=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},yN=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of hN)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ME="External signal was aborted",ge=(()=>{function e(t,n,r){let o=st(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),i=st(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),s=st(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||yN)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,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,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):gN(),v=new AbortController,g,x;function y(h){x=h,v.abort()}c&&(c.aborted?y(ME):c.addEventListener("abort",()=>y(ME),{once:!0}));let m=function(){return I(this,null,function*(){var E,C;let h;try{let k=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(xN(k)&&(k=yield k),k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((B,M)=>{g=()=>{M({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",g)});u(i(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),h=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(B,M)=>new sy(B,M),fulfillWithValue:(B,M)=>new NE(B,M)})).then(B=>{if(B instanceof sy)throw B;return B instanceof NE?o(B.payload,p,l,B.meta):o(B,p,l)})])}catch(k){h=k instanceof sy?s(null,p,l,k.payload,k.meta):s(k,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(h)&&h.meta.condition||u(h),h})}();return Object.assign(m,{abort:y,requestId:p,arg:l,unwrap(){return m.then(vN)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:pN(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function vN(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function xN(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zE=Symbol.for("rtk-slice-createasyncthunk"),lz={[zE]:ge};function wN(e,t){return`${e}/${t}`}function SN({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[zE];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(EN()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(h,w){let E=typeof h=="string"?h:h.type;if(!E)throw new Error(Zr(12));if(E in c.sliceCaseReducersByType)throw new Error(Zr(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(h,w){return c.sliceMatchers.push({matcher:h,reducer:w}),u},exposeAction(h,w){return c.actionCreators[h]=w,u},exposeCaseReducer(h,w){return c.sliceCaseReducersByName[h]=w,u}};l.forEach(h=>{let w=a[h],E={reducerName:h,type:wN(i,h),createNotation:typeof o.reducers=="function"};CN(w)?RN(E,w,u,t):TN(E,w,u)});function d(){let[h={},w=[],E=void 0]=typeof o.extraReducers=="function"?FE(o.extraReducers):[o.extraReducers],C=S(S({},h),c.sliceCaseReducersByType);return dN(o.initialState,k=>{for(let A in C)k.addCase(A,C[A]);for(let A of c.sliceMatchers)k.addMatcher(A.matcher,A.reducer);for(let A of w)k.addMatcher(A.matcher,A.reducer);E&&k.addDefaultCase(E)})}let f=h=>h,p=new Map,v;function g(h,w){return v||(v=d()),v(h,w)}function x(){return v||(v=d()),v.getInitialState()}function y(h,w=!1){function E(k){let A=k[h];return typeof A=="undefined"&&w&&(A=x()),A}function C(k=f){let A=LE(p,w,()=>new WeakMap);return LE(A,k,()=>{var M;let B={};for(let[N,Z]of Object.entries((M=o.selectors)!=null?M:{}))B[N]=bN(Z,k,x,w);return B})}return{reducerPath:h,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}let m=P(S({name:i,reducer:g,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(s)),{injectInto(h,C={}){var k=C,{reducerPath:w}=k,E=oe(k,["reducerPath"]);let A=w!=null?w:s;return h.inject({reducerPath:A,reducer:g},E),S(S({},m),y(A,!0))}});return m}}function bN(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 ke=SN();function EN(){function e(t,n){return S({_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 TN({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!kN(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?st(e,s):st(e))}function CN(e){return e._reducerDefinitionType==="asyncThunk"}function kN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function RN({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,d=o(e,i,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:s||lf,pending:a||lf,rejected:l||lf,settled:c||lf})}function lf(){}var HE="listener",BE="completed",UE="cancelled",cz=`task-${UE}`,uz=`task-${BE}`,dz=`${HE}-${UE}`,fz=`${HE}-${BE}`;var{assign:VE}=Object;var ay="listenerMiddleware";var PN=VE(st(`${ay}/add`),{withTypes:()=>PN}),pz=st(`${ay}/removeAll`),AN=VE(st(`${ay}/remove`),{withTypes:()=>AN});var mz=Symbol.for("rtk-state-proxy-original");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 le=b(Q(),1),s1=b(KE(),1);var FN=le.version.startsWith("19"),zN=Symbol.for(FN?"react.transitional.element":"react.element"),HN=Symbol.for("react.portal"),BN=Symbol.for("react.fragment"),UN=Symbol.for("react.strict_mode"),VN=Symbol.for("react.profiler"),$N=Symbol.for("react.consumer"),jN=Symbol.for("react.context"),JE=Symbol.for("react.forward_ref"),WN=Symbol.for("react.suspense"),KN=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),GN=Symbol.for("react.lazy");var qN=JE,YN=py;function XN(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case zN:switch(e=e.type,e){case BN:case VN:case UN:case WN:case KN:return e;default:switch(e=e&&e.$$typeof,e){case jN:case JE:case GN:case py:return e;case $N:return e;default:return t}}case HN:return t}}}function QN(e){return XN(e)===py}function ZN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,c,u,d,f;function p(m,h){return l=m,c=h,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let m=e(l,c),h=!s(m,u);return u=m,h&&(f=n(u,d,c)),f}function y(m,h){let w=!i(h,c),E=!o(m,l,h,c);return l=m,c=h,w&&E?v():w?g():E?x():f}return function(h,w){return a?y(h,w):p(h,w)}}function JN(e,i){var s=i,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=s,o=oe(s,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return ZN(a,l,c,e,o)}function eM(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 dy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function GE(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function e1(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=GE(e);let c=i(a,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=GE(c),c=i(a,l)),c},i}}function my(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function tM(e){return e&&typeof e=="object"?dy(t=>eM(e,t)):e?typeof e=="function"?e1(e,"mapDispatchToProps"):my(e,"mapDispatchToProps"):dy(t=>({dispatch:t}))}function nM(e){return e?typeof e=="function"?e1(e,"mapStateToProps"):my(e,"mapStateToProps"):dy(()=>({}))}function rM(e,t,n){return S(S(S({},n),e),t)}function oM(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,c,u){let d=e(l,c,u);return i?o(d,s)||(s=d):(i=!0,s=d),s}}}function iM(e){return e?typeof e=="function"?oM(e):my(e,"mergeProps"):()=>rM}function sM(e){e()}function aM(){let e=null,t=null;return{clear(){e=null,t=null},notify(){sM(()=>{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 qE={notify(){},get:()=>[]};function t1(e,t){let n,r=qE,o=0,i=!1;function s(g){u();let x=r.subscribe(g),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=aM())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=qE)}function f(){i||(i=!0,u())}function p(){i&&(i=!1,d())}let v={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var lM=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",cM=lM(),uM=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",dM=uM(),fM=()=>cM||dM?le.useLayoutEffect:le.useEffect,cf=fM();function YE(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ly(e,t){if(YE(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])||!YE(e[n[o]],t[n[o]]))return!1;return!0}var pM={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},mM={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gM={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hM={[qN]:gM,[YN]:n1};function XE(e){return QN(e)?n1:hM[e.$$typeof]||pM}var yM=Object.defineProperty,vM=Object.getOwnPropertyNames,QE=Object.getOwnPropertySymbols,xM=Object.getOwnPropertyDescriptor,wM=Object.getPrototypeOf,ZE=Object.prototype;function fy(e,t){if(typeof t!="string"){if(ZE){let i=wM(t);i&&i!==ZE&&fy(e,i)}let n=vM(t);QE&&(n=n.concat(QE(t)));let r=XE(e),o=XE(t);for(let i=0;i<n.length;++i){let s=n[i];if(!mM[s]&&!(o&&o[s])&&!(r&&r[s])){let a=xM(t,s);try{yM(e,s,a)}catch(l){}}}}return e}var cy=Symbol.for("react-redux-context"),uy=typeof globalThis!="undefined"?globalThis:{};function SM(){var n;if(!le.createContext)return{};let e=(n=uy[cy])!=null?n:uy[cy]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var Jr=SM(),bM=[null,null];function EM(e,t,n){cf(()=>e(...t),n)}function TM(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function CM(e,t,n,r,o,i,s,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let g=t.getState(),x,y;try{x=r(g,o.current)}catch(m){y=m,f=m}y||(f=null),x===i.current?s.current||c():(i.current=x,l.current=x,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function kM(e,t){return e===t}function RM(e,t,n,{pure:r,areStatesEqual:o=kM,areOwnPropsEqual:i=ly,areStatePropsEqual:s=ly,areMergedPropsEqual:a=ly,forwardRef:l=!1,context:c=Jr}={}){let u=c,d=nM(e),f=tM(t),p=iM(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",m=`Connect(${y})`,h={shouldHandleStateChanges:v,displayName:m,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[A,B,M]=le.useMemo(()=>{let pe=k,{reactReduxForwardedRef:X}=pe,ae=oe(pe,["reactReduxForwardedRef"]);return[k.context,X,ae]},[k]),N=le.useMemo(()=>{let X=u;return A!=null&&A.Consumer,X},[A,u]),Z=le.useContext(N),Y=!!k.store&&!!k.store.getState&&!!k.store.dispatch,O=!!Z&&!!Z.store,F=Y?k.store:Z.store,ie=O?Z.getServerState:F.getState,G=le.useMemo(()=>JN(F.dispatch,h),[F]),[V,U]=le.useMemo(()=>{if(!v)return bM;let X=t1(F,Y?void 0:Z.subscription),ae=X.notifyNestedSubs.bind(X);return[X,ae]},[F,Y,Z]),K=le.useMemo(()=>Y?Z:P(S({},Z),{subscription:V}),[Y,Z,V]),$=le.useRef(void 0),W=le.useRef(M),z=le.useRef(void 0),fe=le.useRef(!1),de=le.useRef(!1),be=le.useRef(void 0);cf(()=>(de.current=!0,()=>{de.current=!1}),[]);let me=le.useMemo(()=>()=>z.current&&M===W.current?z.current:G(F.getState(),M),[F,M]),re=le.useMemo(()=>ae=>V?CM(v,F,V,G,W,$,fe,de,z,U,ae):()=>{},[V]);EM(TM,[W,$,fe,M,z,U]);let Ce;try{Ce=le.useSyncExternalStore(re,me,ie?()=>G(ie(),M):me)}catch(X){throw be.current&&(X.message+=`
|
|
3
|
+
`),s=r.stack.split(`
|
|
4
|
+
`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
|
|
5
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{$m=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?al(e):""}function BI(e){switch(e.tag){case 5:return al(e.type);case 16:return al("Lazy");case 13:return al("Suspense");case 19:return al("SuspenseList");case 0:case 2:case 15:return e=jm(e.type,!1),e;case 11:return e=jm(e.type.render,!1),e;case 1:return e=jm(e.type,!0),e;default:return""}}function mg(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 Ii:return"Fragment";case Ai:return"Portal";case dg:return"Profiler";case sh:return"StrictMode";case fg:return"Suspense";case pg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uS:return(e.displayName||"Context")+".Consumer";case cS:return(e._context.displayName||"Context")+".Provider";case ih:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ah:return t=e.displayName||null,t!==null?t:mg(e.type)||"Memo";case Ao:t=e._payload,e=e._init;try{return mg(e(t))}catch(n){}}return null}function UI(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 mg(t);case 8:return t===sh?"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 $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VI(e){var t=fS(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Du(e){e._valueTracker||(e._valueTracker=VI(e))}function pS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ud(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 gg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function sw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$o(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 mS(e,t){t=t.checked,t!=null&&oh(e,"checked",t,!1)}function hg(e,t){mS(e,t);var n=$o(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")?yg(e,t.type,n):t.hasOwnProperty("defaultValue")&&yg(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iw(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 yg(e,t,n){(t!=="number"||ud(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function Ui(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=""+$o(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 vg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function aw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ll(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$o(n)}}function gS(e,t){var n=$o(t.value),r=$o(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 lw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hS(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 xg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Fu,yS=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(Fu=Fu||document.createElement("div"),Fu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Fu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dl={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},$I=["Webkit","ms","Moz","O"];Object.keys(dl).forEach(function(e){$I.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dl[t]=dl[e]})});function vS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dl.hasOwnProperty(e)&&dl[e]?(""+t).trim():t+"px"}function xS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var jI=Ge({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 wg(e,t){if(t){if(jI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Sg(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 bg=null;function lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eg=null,Vi=null,$i=null;function cw(e){if(e=Hl(e)){if(typeof Eg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=zd(t),Eg(e.stateNode,e.type,t))}}function wS(e){Vi?$i?$i.push(e):$i=[e]:Vi=e}function SS(){if(Vi){var e=Vi,t=$i;if($i=Vi=null,cw(e),t)for(e=0;e<t.length;e++)cw(t[e])}}function bS(e,t){return e(t)}function ES(){}var Wm=!1;function TS(e,t,n){if(Wm)return e(t,n);Wm=!0;try{return bS(e,t,n)}finally{Wm=!1,(Vi!==null||$i!==null)&&(ES(),SS())}}function bl(e,t){var n=e.stateNode;if(n===null)return null;var r=zd(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(D(231,t,typeof n));return n}var Tg=!1;if(Gr)try{Ri={},Object.defineProperty(Ri,"passive",{get:function(){Tg=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch(e){Tg=!1}var Ri;function WI(e,t,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var fl=!1,dd=null,fd=!1,Cg=null,KI={onError:function(e){fl=!0,dd=e}};function GI(e,t,n,r,o,s,i,a,l){fl=!1,dd=null,WI.apply(KI,arguments)}function qI(e,t,n,r,o,s,i,a,l){if(GI.apply(this,arguments),fl){if(fl){var c=dd;fl=!1,dd=null}else throw Error(D(198));fd||(fd=!0,Cg=c)}}function Os(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 CS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function uw(e){if(Os(e)!==e)throw Error(D(188))}function YI(e){var t=e.alternate;if(!t){if(t=Os(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return uw(o),e;if(s===r)return uw(o),t;s=s.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function kS(e){return e=YI(e),e!==null?RS(e):null}function RS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RS(e);if(t!==null)return t;e=e.sibling}return null}var PS=yn.unstable_scheduleCallback,dw=yn.unstable_cancelCallback,XI=yn.unstable_shouldYield,QI=yn.unstable_requestPaint,Je=yn.unstable_now,ZI=yn.unstable_getCurrentPriorityLevel,ch=yn.unstable_ImmediatePriority,AS=yn.unstable_UserBlockingPriority,pd=yn.unstable_NormalPriority,JI=yn.unstable_LowPriority,IS=yn.unstable_IdlePriority,Md=null,Cr=null;function eL(e){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Md,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:rL,tL=Math.log,nL=Math.LN2;function rL(e){return e>>>=0,e===0?32:31-(tL(e)/nL|0)|0}var zu=64,Hu=4194304;function cl(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 md(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=cl(a):(s&=i,s!==0&&(r=cl(s)))}else i=n&~o,i!==0?r=cl(i):s!==0&&(r=cl(s));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&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-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function oL(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 sL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Yn(s),a=1<<i,l=o[i];l===-1?((a&n)===0||(a&r)!==0)&&(o[i]=oL(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function kg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function LS(){var e=zu;return zu<<=1,(zu&4194240)===0&&(zu=64),e}function Km(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function iL(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-Yn(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function uh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ie=0;function OS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var NS,dh,MS,_S,DS,Rg=!1,Bu=[],_o=null,Do=null,Fo=null,El=new Map,Tl=new Map,Lo=[],aL="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 fw(e,t){switch(e){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":El.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(t.pointerId)}}function el(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Hl(t),t!==null&&dh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function lL(e,t,n,r,o){switch(t){case"focusin":return _o=el(_o,e,t,n,r,o),!0;case"dragenter":return Do=el(Do,e,t,n,r,o),!0;case"mouseover":return Fo=el(Fo,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return El.set(s,el(El.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Tl.set(s,el(Tl.get(s)||null,e,t,n,r,o)),!0}return!1}function FS(e){var t=Ss(e.target);if(t!==null){var n=Os(t);if(n!==null){if(t=n.tag,t===13){if(t=CS(n),t!==null){e.blockedOn=t,DS(e.priority,function(){MS(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 ed(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bg=r,n.target.dispatchEvent(r),bg=null}else return t=Hl(n),t!==null&&dh(t),e.blockedOn=n,!1;t.shift()}return!0}function pw(e,t,n){ed(e)&&n.delete(t)}function cL(){Rg=!1,_o!==null&&ed(_o)&&(_o=null),Do!==null&&ed(Do)&&(Do=null),Fo!==null&&ed(Fo)&&(Fo=null),El.forEach(pw),Tl.forEach(pw)}function tl(e,t){e.blockedOn===t&&(e.blockedOn=null,Rg||(Rg=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,cL)))}function Cl(e){function t(o){return tl(o,e)}if(0<Bu.length){tl(Bu[0],e);for(var n=1;n<Bu.length;n++){var r=Bu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_o!==null&&tl(_o,e),Do!==null&&tl(Do,e),Fo!==null&&tl(Fo,e),El.forEach(t),Tl.forEach(t),n=0;n<Lo.length;n++)r=Lo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lo.length&&(n=Lo[0],n.blockedOn===null);)FS(n),n.blockedOn===null&&Lo.shift()}var ji=Qr.ReactCurrentBatchConfig,gd=!0;function uL(e,t,n,r){var o=Ie,s=ji.transition;ji.transition=null;try{Ie=1,fh(e,t,n,r)}finally{Ie=o,ji.transition=s}}function dL(e,t,n,r){var o=Ie,s=ji.transition;ji.transition=null;try{Ie=4,fh(e,t,n,r)}finally{Ie=o,ji.transition=s}}function fh(e,t,n,r){if(gd){var o=Pg(e,t,n,r);if(o===null)Jm(e,t,r,hd,n),fw(e,r);else if(lL(o,e,t,n,r))r.stopPropagation();else if(fw(e,r),t&4&&-1<aL.indexOf(e)){for(;o!==null;){var s=Hl(o);if(s!==null&&NS(s),s=Pg(e,t,n,r),s===null&&Jm(e,t,r,hd,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Jm(e,t,r,null,n)}}var hd=null;function Pg(e,t,n,r){if(hd=null,e=lh(r),e=Ss(e),e!==null)if(t=Os(e),t===null)e=null;else if(n=t.tag,n===13){if(e=CS(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 hd=e,null}function zS(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(ZI()){case ch:return 1;case AS:return 4;case pd:case JI:return 16;case IS:return 536870912;default:return 16}default:return 16}}var No=null,ph=null,td=null;function HS(){if(td)return td;var e,t=ph,n=t.length,r,o="value"in No?No.value:No.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return td=o.slice(e,1<r?1-r:void 0)}function nd(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 Uu(){return!0}function mw(){return!1}function vn(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Uu:mw,this.isPropagationStopped=mw,this}return Ge(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=Uu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),t}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mh=vn(ea),zl=Ge({},ea,{view:0,detail:0}),fL=vn(zl),Gm,qm,nl,_d=Ge({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gh,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!==nl&&(nl&&e.type==="mousemove"?(Gm=e.screenX-nl.screenX,qm=e.screenY-nl.screenY):qm=Gm=0,nl=e),Gm)},movementY:function(e){return"movementY"in e?e.movementY:qm}}),gw=vn(_d),pL=Ge({},_d,{dataTransfer:0}),mL=vn(pL),gL=Ge({},zl,{relatedTarget:0}),Ym=vn(gL),hL=Ge({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),yL=vn(hL),vL=Ge({},ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xL=vn(vL),wL=Ge({},ea,{data:0}),hw=vn(wL),SL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bL={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"},EL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=EL[e])?!!t[e]:!1}function gh(){return TL}var CL=Ge({},zl,{key:function(e){if(e.key){var t=SL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gh,charCode:function(e){return e.type==="keypress"?nd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kL=vn(CL),RL=Ge({},_d,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yw=vn(RL),PL=Ge({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gh}),AL=vn(PL),IL=Ge({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),LL=vn(IL),OL=Ge({},_d,{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}),NL=vn(OL),ML=[9,13,27,32],hh=Gr&&"CompositionEvent"in window,pl=null;Gr&&"documentMode"in document&&(pl=document.documentMode);var _L=Gr&&"TextEvent"in window&&!pl,BS=Gr&&(!hh||pl&&8<pl&&11>=pl),vw=" ",xw=!1;function US(e,t){switch(e){case"keyup":return ML.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Li=!1;function DL(e,t){switch(e){case"compositionend":return VS(t);case"keypress":return t.which!==32?null:(xw=!0,vw);case"textInput":return e=t.data,e===vw&&xw?null:e;default:return null}}function FL(e,t){if(Li)return e==="compositionend"||!hh&&US(e,t)?(e=HS(),td=ph=No=null,Li=!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 BS&&t.locale!=="ko"?null:t.data;default:return null}}var zL={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 ww(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zL[e.type]:t==="textarea"}function $S(e,t,n,r){wS(r),t=yd(t,"onChange"),0<t.length&&(n=new mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ml=null,kl=null;function HL(e){eb(e,0)}function Dd(e){var t=Mi(e);if(pS(t))return e}function BL(e,t){if(e==="change")return t}var jS=!1;Gr&&(Gr?($u="oninput"in document,$u||(Xm=document.createElement("div"),Xm.setAttribute("oninput","return;"),$u=typeof Xm.oninput=="function"),Vu=$u):Vu=!1,jS=Vu&&(!document.documentMode||9<document.documentMode));var Vu,$u,Xm;function Sw(){ml&&(ml.detachEvent("onpropertychange",WS),kl=ml=null)}function WS(e){if(e.propertyName==="value"&&Dd(kl)){var t=[];$S(t,kl,e,lh(e)),TS(HL,t)}}function UL(e,t,n){e==="focusin"?(Sw(),ml=t,kl=n,ml.attachEvent("onpropertychange",WS)):e==="focusout"&&Sw()}function VL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dd(kl)}function $L(e,t){if(e==="click")return Dd(t)}function jL(e,t){if(e==="input"||e==="change")return Dd(t)}function WL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:WL;function Rl(e,t){if(Qn(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(!ug.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function bw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ew(e,t){var n=bw(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=bw(n)}}function KS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function GS(){for(var e=window,t=ud();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=ud(e.document)}return t}function yh(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 KL(e){var t=GS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&KS(n.ownerDocument.documentElement,n)){if(r!==null&&yh(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,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Ew(n,s);var i=Ew(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 GL=Gr&&"documentMode"in document&&11>=document.documentMode,Oi=null,Ag=null,gl=null,Ig=!1;function Tw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ig||Oi==null||Oi!==ud(r)||(r=Oi,"selectionStart"in r&&yh(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}),gl&&Rl(gl,r)||(gl=r,r=yd(Ag,"onSelect"),0<r.length&&(t=new mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oi)))}function ju(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ni={animationend:ju("Animation","AnimationEnd"),animationiteration:ju("Animation","AnimationIteration"),animationstart:ju("Animation","AnimationStart"),transitionend:ju("Transition","TransitionEnd")},Qm={},qS={};Gr&&(qS=document.createElement("div").style,"AnimationEvent"in window||(delete Ni.animationend.animation,delete Ni.animationiteration.animation,delete Ni.animationstart.animation),"TransitionEvent"in window||delete Ni.transitionend.transition);function Fd(e){if(Qm[e])return Qm[e];if(!Ni[e])return e;var t=Ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qS)return Qm[e]=t[n];return e}var YS=Fd("animationend"),XS=Fd("animationiteration"),QS=Fd("animationstart"),ZS=Fd("transitionend"),JS=new Map,Cw="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 Wo(e,t){JS.set(e,t),Ls(t,[e])}for(Wu=0;Wu<Cw.length;Wu++)Ku=Cw[Wu],kw=Ku.toLowerCase(),Rw=Ku[0].toUpperCase()+Ku.slice(1),Wo(kw,"on"+Rw);var Ku,kw,Rw,Wu;Wo(YS,"onAnimationEnd");Wo(XS,"onAnimationIteration");Wo(QS,"onAnimationStart");Wo("dblclick","onDoubleClick");Wo("focusin","onFocus");Wo("focusout","onBlur");Wo(ZS,"onTransitionEnd");Gi("onMouseEnter",["mouseout","mouseover"]);Gi("onMouseLeave",["mouseout","mouseover"]);Gi("onPointerEnter",["pointerout","pointerover"]);Gi("onPointerLeave",["pointerout","pointerover"]);Ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ls("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="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(" "),qL=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function Pw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qI(r,t,void 0,e),e.currentTarget=null}function eb(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 s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;Pw(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;Pw(o,a,c),s=l}}}if(fd)throw e=Cg,fd=!1,Cg=null,e}function Fe(e,t){var n=t[_g];n===void 0&&(n=t[_g]=new Set);var r=e+"__bubble";n.has(r)||(tb(t,e,2,!1),n.add(r))}function Zm(e,t,n){var r=0;t&&(r|=4),tb(n,e,r,t)}var Gu="_reactListening"+Math.random().toString(36).slice(2);function Pl(e){if(!e[Gu]){e[Gu]=!0,lS.forEach(function(n){n!=="selectionchange"&&(qL.has(n)||Zm(n,!1,e),Zm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gu]||(t[Gu]=!0,Zm("selectionchange",!1,t))}}function tb(e,t,n,r){switch(zS(t)){case 1:var o=uL;break;case 4:o=dL;break;default:o=fh}n=o.bind(null,t,n,e),o=void 0,!Tg||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 Jm(e,t,n,r,o){var s=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Ss(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}TS(function(){var c=s,u=lh(n),d=[];e:{var f=JS.get(e);if(f!==void 0){var p=mh,v=e;switch(e){case"keypress":if(nd(n)===0)break e;case"keydown":case"keyup":p=kL;break;case"focusin":v="focus",p=Ym;break;case"focusout":v="blur",p=Ym;break;case"beforeblur":case"afterblur":p=Ym;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=gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=mL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=AL;break;case YS:case XS:case QS:p=yL;break;case ZS:p=LL;break;case"scroll":p=fL;break;case"wheel":p=NL;break;case"copy":case"cut":case"paste":p=xL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yw}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var m=c,h;m!==null;){h=m;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,y!==null&&(w=bl(m,y),w!=null&&g.push(Al(m,w,h)))),x)break;m=m.return}0<g.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==bg&&(v=n.relatedTarget||n.fromElement)&&(Ss(v)||v[qr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?Ss(v):null,v!==null&&(x=Os(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(g=gw,w="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=yw,w="onPointerLeave",y="onPointerEnter",m="pointer"),x=p==null?f:Mi(p),h=v==null?f:Mi(v),f=new g(w,m+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,Ss(u)===c&&(g=new g(y,m+"enter",v,n,u),g.target=h,g.relatedTarget=x,w=g),x=w,p&&v)t:{for(g=p,y=v,m=0,h=g;h;h=Pi(h))m++;for(h=0,w=y;w;w=Pi(w))h++;for(;0<m-h;)g=Pi(g),m--;for(;0<h-m;)y=Pi(y),h--;for(;m--;){if(g===y||y!==null&&g===y.alternate)break t;g=Pi(g),y=Pi(y)}g=null}else g=null;p!==null&&Aw(d,f,p,g,!1),v!==null&&x!==null&&Aw(d,x,v,g,!0)}}e:{if(f=c?Mi(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=BL;else if(ww(f))if(jS)E=jL;else{E=VL;var C=UL}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=$L);if(E&&(E=E(e,c))){$S(d,E,n,u);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&yg(f,"number",f.value)}switch(C=c?Mi(c):window,e){case"focusin":(ww(C)||C.contentEditable==="true")&&(Oi=C,Ag=c,gl=null);break;case"focusout":gl=Ag=Oi=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,Tw(d,n,u);break;case"selectionchange":if(GL)break;case"keydown":case"keyup":Tw(d,n,u)}var k;if(hh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Li?US(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(BS&&n.locale!=="ko"&&(Li||A!=="onCompositionStart"?A==="onCompositionEnd"&&Li&&(k=HS()):(No=u,ph="value"in No?No.value:No.textContent,Li=!0)),C=yd(c,A),0<C.length&&(A=new hw(A,e,null,n,u),d.push({event:A,listeners:C}),k?A.data=k:(k=VS(n),k!==null&&(A.data=k)))),(k=_L?DL(e,n):FL(e,n))&&(c=yd(c,"onBeforeInput"),0<c.length&&(u=new hw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=k))}eb(d,t)})}function Al(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=bl(e,n),s!=null&&r.unshift(Al(e,s,o)),s=bl(e,t),s!=null&&r.push(Al(e,s,o))),e=e.return}return r}function Pi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Aw(e,t,n,r,o){for(var s=t._reactName,i=[];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=bl(n,s),l!=null&&i.unshift(Al(n,l,a))):o||(l=bl(n,s),l!=null&&i.push(Al(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var YL=/\r\n?/g,XL=/\u0000|\uFFFD/g;function Iw(e){return(typeof e=="string"?e:""+e).replace(YL,`
|
|
6
|
+
`).replace(XL,"")}function qu(e,t,n){if(t=Iw(t),Iw(e)!==t&&n)throw Error(D(425))}function vd(){}var Lg=null,Og=null;function Ng(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 Mg=typeof setTimeout=="function"?setTimeout:void 0,QL=typeof clearTimeout=="function"?clearTimeout:void 0,Lw=typeof Promise=="function"?Promise:void 0,ZL=typeof queueMicrotask=="function"?queueMicrotask:typeof Lw!="undefined"?function(e){return Lw.resolve(null).then(e).catch(JL)}:Mg;function JL(e){setTimeout(function(){throw e})}function eg(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),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Cl(t)}function zo(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 Ow(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 ta=Math.random().toString(36).slice(2),Tr="__reactFiber$"+ta,Il="__reactProps$"+ta,qr="__reactContainer$"+ta,_g="__reactEvents$"+ta,eO="__reactListeners$"+ta,tO="__reactHandles$"+ta;function Ss(e){var t=e[Tr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qr]||n[Tr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ow(e);e!==null;){if(n=e[Tr])return n;e=Ow(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){return e=e[Tr]||e[qr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function zd(e){return e[Il]||null}var Dg=[],_i=-1;function Ko(e){return{current:e}}function ze(e){0>_i||(e.current=Dg[_i],Dg[_i]=null,_i--)}function De(e,t){_i++,Dg[_i]=e.current,e.current=t}var jo={},Lt=Ko(jo),sn=Ko(!1),ks=jo;function qi(e,t){var n=e.type.contextTypes;if(!n)return jo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function an(e){return e=e.childContextTypes,e!=null}function xd(){ze(sn),ze(Lt)}function Nw(e,t,n){if(Lt.current!==jo)throw Error(D(168));De(Lt,t),De(sn,n)}function nb(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(D(108,UI(e)||"Unknown",o));return Ge({},n,r)}function wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,ks=Lt.current,De(Lt,e),De(sn,sn.current),!0}function Mw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=nb(e,t,ks),r.__reactInternalMemoizedMergedChildContext=e,ze(sn),ze(Lt),De(Lt,e)):ze(sn),De(sn,n)}var $r=null,Hd=!1,tg=!1;function rb(e){$r===null?$r=[e]:$r.push(e)}function nO(e){Hd=!0,rb(e)}function Go(){if(!tg&&$r!==null){tg=!0;var e=0,t=Ie;try{var n=$r;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$r=null,Hd=!1}catch(o){throw $r!==null&&($r=$r.slice(e+1)),PS(ch,Go),o}finally{Ie=t,tg=!1}}return null}var Di=[],Fi=0,Sd=null,bd=0,In=[],Ln=0,Rs=null,jr=1,Wr="";function xs(e,t){Di[Fi++]=bd,Di[Fi++]=Sd,Sd=e,bd=t}function ob(e,t,n){In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Rs,Rs=e;var r=jr;e=Wr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var s=32-Yn(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jr=1<<32-Yn(t)+o|n<<o|r,Wr=s+e}else jr=1<<s|n<<o|r,Wr=e}function vh(e){e.return!==null&&(xs(e,1),ob(e,1,0))}function xh(e){for(;e===Sd;)Sd=Di[--Fi],Di[Fi]=null,bd=Di[--Fi],Di[Fi]=null;for(;e===Rs;)Rs=In[--Ln],In[Ln]=null,Wr=In[--Ln],In[Ln]=null,jr=In[--Ln],In[Ln]=null}var hn=null,gn=null,Ue=!1,qn=null;function sb(e,t){var n=On(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 _w(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,hn=e,gn=zo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,gn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Rs!==null?{id:jr,overflow:Wr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=On(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,gn=null,!0):!1;default:return!1}}function Fg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zg(e){if(Ue){var t=gn;if(t){var n=t;if(!_w(e,t)){if(Fg(e))throw Error(D(418));t=zo(n.nextSibling);var r=hn;t&&_w(e,t)?sb(r,n):(e.flags=e.flags&-4097|2,Ue=!1,hn=e)}}else{if(Fg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,hn=e}}}function Dw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function Yu(e){if(e!==hn)return!1;if(!Ue)return Dw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ng(e.type,e.memoizedProps)),t&&(t=gn)){if(Fg(e))throw ib(),Error(D(418));for(;t;)sb(e,t),t=zo(t.nextSibling)}if(Dw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gn=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gn=null}}else gn=hn?zo(e.stateNode.nextSibling):null;return!0}function ib(){for(var e=gn;e;)e=zo(e.nextSibling)}function Yi(){gn=hn=null,Ue=!1}function wh(e){qn===null?qn=[e]:qn.push(e)}var rO=Qr.ReactCurrentBatchConfig;function rl(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(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Xu(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fw(e){var t=e._init;return t(e._payload)}function ab(e){function t(y,m){if(e){var h=y.deletions;h===null?(y.deletions=[m],y.flags|=16):h.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function o(y,m){return y=Vo(y,m),y.index=0,y.sibling=null,y}function s(y,m,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<m?(y.flags|=2,m):h):(y.flags|=2,m)):(y.flags|=1048576,m)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,m,h,w){return m===null||m.tag!==6?(m=lg(h,y.mode,w),m.return=y,m):(m=o(m,h),m.return=y,m)}function l(y,m,h,w){var E=h.type;return E===Ii?u(y,m,h.props.children,w,h.key):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===m.type)?(w=o(m,h.props),w.ref=rl(y,m,h),w.return=y,w):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,w)}function c(y,m,h,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=cg(h,y.mode,w),m.return=y,m):(m=o(m,h.children||[]),m.return=y,m)}function u(y,m,h,w,E){return m===null||m.tag!==7?(m=Cs(h,y.mode,w,E),m.return=y,m):(m=o(m,h),m.return=y,m)}function d(y,m,h){if(typeof m=="string"&&m!==""||typeof m=="number")return m=lg(""+m,y.mode,h),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _u:return h=cd(m.type,m.key,m.props,null,y.mode,h),h.ref=rl(y,null,m),h.return=y,h;case Ai:return m=cg(m,y.mode,h),m.return=y,m;case Ao:var w=m._init;return d(y,w(m._payload),h)}if(ll(m)||Ja(m))return m=Cs(m,y.mode,h,null),m.return=y,m;Xu(y,m)}return null}function f(y,m,h,w){var E=m!==null?m.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:a(y,m,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:return h.key===E?l(y,m,h,w):null;case Ai:return h.key===E?c(y,m,h,w):null;case Ao:return E=h._init,f(y,m,E(h._payload),w)}if(ll(h)||Ja(h))return E!==null?null:u(y,m,h,w,null);Xu(y,h)}return null}function p(y,m,h,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(h)||null,a(m,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return y=y.get(w.key===null?h:w.key)||null,l(m,y,w,E);case Ai:return y=y.get(w.key===null?h:w.key)||null,c(m,y,w,E);case Ao:var C=w._init;return p(y,m,h,C(w._payload),E)}if(ll(w)||Ja(w))return y=y.get(h)||null,u(m,y,w,E,null);Xu(m,w)}return null}function v(y,m,h,w){for(var E=null,C=null,k=m,A=m=0,B=null;k!==null&&A<h.length;A++){k.index>A?(B=k,k=null):B=k.sibling;var M=f(y,k,h[A],w);if(M===null){k===null&&(k=B);break}e&&k&&M.alternate===null&&t(y,k),m=s(M,m,A),C===null?E=M:C.sibling=M,C=M,k=B}if(A===h.length)return n(y,k),Ue&&xs(y,A),E;if(k===null){for(;A<h.length;A++)k=d(y,h[A],w),k!==null&&(m=s(k,m,A),C===null?E=k:C.sibling=k,C=k);return Ue&&xs(y,A),E}for(k=r(y,k);A<h.length;A++)B=p(k,y,A,h[A],w),B!==null&&(e&&B.alternate!==null&&k.delete(B.key===null?A:B.key),m=s(B,m,A),C===null?E=B:C.sibling=B,C=B);return e&&k.forEach(function(N){return t(y,N)}),Ue&&xs(y,A),E}function g(y,m,h,w){var E=Ja(h);if(typeof E!="function")throw Error(D(150));if(h=E.call(h),h==null)throw Error(D(151));for(var C=E=null,k=m,A=m=0,B=null,M=h.next();k!==null&&!M.done;A++,M=h.next()){k.index>A?(B=k,k=null):B=k.sibling;var N=f(y,k,M.value,w);if(N===null){k===null&&(k=B);break}e&&k&&N.alternate===null&&t(y,k),m=s(N,m,A),C===null?E=N:C.sibling=N,C=N,k=B}if(M.done)return n(y,k),Ue&&xs(y,A),E;if(k===null){for(;!M.done;A++,M=h.next())M=d(y,M.value,w),M!==null&&(m=s(M,m,A),C===null?E=M:C.sibling=M,C=M);return Ue&&xs(y,A),E}for(k=r(y,k);!M.done;A++,M=h.next())M=p(k,y,A,M.value,w),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?A:M.key),m=s(M,m,A),C===null?E=M:C.sibling=M,C=M);return e&&k.forEach(function(J){return t(y,J)}),Ue&&xs(y,A),E}function x(y,m,h,w){if(typeof h=="object"&&h!==null&&h.type===Ii&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:e:{for(var E=h.key,C=m;C!==null;){if(C.key===E){if(E=h.type,E===Ii){if(C.tag===7){n(y,C.sibling),m=o(C,h.props.children),m.return=y,y=m;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===C.type){n(y,C.sibling),m=o(C,h.props),m.ref=rl(y,C,h),m.return=y,y=m;break e}n(y,C);break}else t(y,C);C=C.sibling}h.type===Ii?(m=Cs(h.props.children,y.mode,w,h.key),m.return=y,y=m):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,y=w)}return i(y);case Ai:e:{for(C=h.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(y,m.sibling),m=o(m,h.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=cg(h,y.mode,w),m.return=y,y=m}return i(y);case Ao:return C=h._init,x(y,m,C(h._payload),w)}if(ll(h))return v(y,m,h,w);if(Ja(h))return g(y,m,h,w);Xu(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,m!==null&&m.tag===6?(n(y,m.sibling),m=o(m,h),m.return=y,y=m):(n(y,m),m=lg(h,y.mode,w),m.return=y,y=m),i(y)):n(y,m)}return x}var Xi=ab(!0),lb=ab(!1),Ed=Ko(null),Td=null,zi=null,Sh=null;function bh(){Sh=zi=Td=null}function Eh(e){var t=Ed.current;ze(Ed),e._currentValue=t}function Hg(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 Wi(e,t){Td=e,Sh=zi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(on=!0),e.firstContext=null)}function Mn(e){var t=e._currentValue;if(Sh!==e)if(e={context:e,memoizedValue:t,next:null},zi===null){if(Td===null)throw Error(D(308));zi=e,Td.dependencies={lanes:0,firstContext:e}}else zi=zi.next=e;return t}var bs=null;function Th(e){bs===null?bs=[e]:bs.push(e)}function cb(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Th(t)):(n.next=o.next,o.next=n),t.interleaved=n,Yr(e,r)}function Yr(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 Io=!1;function Ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ub(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 Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Se&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Yr(e,n)}return o=r.interleaved,o===null?(t.next=t,Th(r)):(t.next=o.next,o.next=t),r.interleaved=t,Yr(e,n)}function rd(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,uh(e,n)}}function zw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,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 Cd(e,t,n,r){var o=e.updateQueue;Io=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(f=t,p=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ge({},d,f);break e;case 2:Io=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);As|=i,e.lanes=i,e.memoizedState=d}}function Hw(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(D(191,o));o.call(r)}}}var Bl={},kr=Ko(Bl),Ll=Ko(Bl),Ol=Ko(Bl);function Es(e){if(e===Bl)throw Error(D(174));return e}function kh(e,t){switch(De(Ol,t),De(Ll,e),De(kr,Bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xg(t,e)}ze(kr),De(kr,t)}function Qi(){ze(kr),ze(Ll),ze(Ol)}function db(e){Es(Ol.current);var t=Es(kr.current),n=xg(t,e.type);t!==n&&(De(Ll,e),De(kr,n))}function Rh(e){Ll.current===e&&(ze(kr),ze(Ll))}var We=Ko(0);function kd(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 ng=[];function Ph(){for(var e=0;e<ng.length;e++)ng[e]._workInProgressVersionPrimary=null;ng.length=0}var od=Qr.ReactCurrentDispatcher,rg=Qr.ReactCurrentBatchConfig,Ps=0,Ke=null,ot=null,pt=null,Rd=!1,hl=!1,Nl=0,oO=0;function Pt(){throw Error(D(321))}function Ah(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Ih(e,t,n,r,o,s){if(Ps=s,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,od.current=e===null||e.memoizedState===null?lO:cO,e=n(r,o),hl){s=0;do{if(hl=!1,Nl=0,25<=s)throw Error(D(301));s+=1,pt=ot=null,t.updateQueue=null,od.current=uO,e=n(r,o)}while(hl)}if(od.current=Pd,t=ot!==null&&ot.next!==null,Ps=0,pt=ot=Ke=null,Rd=!1,t)throw Error(D(300));return e}function Lh(){var e=Nl!==0;return Nl=0,e}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ke.memoizedState=pt=e:pt=pt.next=e,pt}function _n(){if(ot===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=pt===null?Ke.memoizedState:pt.next;if(t!==null)pt=t,ot=e;else{if(e===null)throw Error(D(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},pt===null?Ke.memoizedState=pt=e:pt=pt.next=e}return pt}function Ml(e,t){return typeof t=="function"?t(e):t}function og(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Ps&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 d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=r):l=l.next=d,Ke.lanes|=u,As|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Qn(r,t.memoizedState)||(on=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ke.lanes|=s,As|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sg(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Qn(s,t.memoizedState)||(on=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function fb(){}function pb(e,t){var n=Ke,r=_n(),o=t(),s=!Qn(r.memoizedState,o);if(s&&(r.memoizedState=o,on=!0),r=r.queue,Oh(hb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,_l(9,gb.bind(null,n,r,o,t),void 0,null),mt===null)throw Error(D(349));(Ps&30)!==0||mb(n,t,o)}return o}function mb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gb(e,t,n,r){t.value=n,t.getSnapshot=r,yb(t)&&vb(e)}function hb(e,t,n){return n(function(){yb(t)&&vb(e)})}function yb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function vb(e){var t=Yr(e,1);t!==null&&Xn(t,e,1,-1)}function Bw(e){var t=Er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t.queue=e,e=e.dispatch=aO.bind(null,Ke,e),[t.memoizedState,e]}function _l(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 xb(){return _n().memoizedState}function sd(e,t,n,r){var o=Er();Ke.flags|=e,o.memoizedState=_l(1|t,n,void 0,r===void 0?null:r)}function Bd(e,t,n,r){var o=_n();r=r===void 0?null:r;var s=void 0;if(ot!==null){var i=ot.memoizedState;if(s=i.destroy,r!==null&&Ah(r,i.deps)){o.memoizedState=_l(t,n,s,r);return}}Ke.flags|=e,o.memoizedState=_l(1|t,n,s,r)}function Uw(e,t){return sd(8390656,8,e,t)}function Oh(e,t){return Bd(2048,8,e,t)}function wb(e,t){return Bd(4,2,e,t)}function Sb(e,t){return Bd(4,4,e,t)}function bb(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 Eb(e,t,n){return n=n!=null?n.concat([e]):null,Bd(4,4,bb.bind(null,t,e),n)}function Nh(){}function Tb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kb(e,t,n){return(Ps&21)===0?(e.baseState&&(e.baseState=!1,on=!0),e.memoizedState=n):(Qn(n,t)||(n=LS(),Ke.lanes|=n,As|=n,e.baseState=!0),t)}function sO(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=rg.transition;rg.transition={};try{e(!1),t()}finally{Ie=n,rg.transition=r}}function Rb(){return _n().memoizedState}function iO(e,t,n){var r=Uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Pb(e))Ab(t,n);else if(n=cb(e,t,n,r),n!==null){var o=Ut();Xn(n,e,r,o),Ib(n,t,r)}}function aO(e,t,n){var r=Uo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pb(e))Ab(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,i)){var l=t.interleaved;l===null?(o.next=o,Th(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=cb(e,t,o,r),n!==null&&(o=Ut(),Xn(n,e,r,o),Ib(n,t,r))}}function Pb(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Ab(e,t){hl=Rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ib(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uh(e,n)}}var Pd={readContext:Mn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},lO={readContext:Mn,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:Mn,useEffect:Uw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sd(4194308,4,bb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sd(4194308,4,e,t)},useInsertionEffect:function(e,t){return sd(4,2,e,t)},useMemo:function(e,t){var n=Er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Er();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=iO.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:Bw,useDebugValue:Nh,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=Bw(!1),t=e[0];return e=sO.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Er();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),mt===null)throw Error(D(349));(Ps&30)!==0||mb(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Uw(hb.bind(null,r,s,e),[e]),r.flags|=2048,_l(9,gb.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Er(),t=mt.identifierPrefix;if(Ue){var n=Wr,r=jr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=oO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:og,useRef:xb,useState:function(){return og(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return kb(t,ot.memoizedState,e)},useTransition:function(){var e=og(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1},uO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:sg,useRef:xb,useState:function(){return sg(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return ot===null?t.memoizedState=e:kb(t,ot.memoizedState,e)},useTransition:function(){var e=sg(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1};function Kn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ud={isMounted:function(e){return(e=e._reactInternals)?Os(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),s=Kr(r,o);s.payload=t,n!=null&&(s.callback=n),t=Ho(e,s,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),s=Kr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ho(e,s,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Uo(e),o=Kr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Ho(e,o,r),t!==null&&(Xn(t,e,r,n),rd(t,e,r))}};function Vw(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Rl(n,r)||!Rl(o,s):!0}function Lb(e,t,n){var r=!1,o=jo,s=t.contextType;return typeof s=="object"&&s!==null?s=Mn(s):(o=an(t)?ks:Lt.current,r=t.contextTypes,s=(r=r!=null)?qi(e,o):jo),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ud,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function $w(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&&Ud.enqueueReplaceState(t,t.state,null)}function Ug(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ch(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Mn(s):(s=an(t)?ks:Lt.current,o.context=qi(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Bg(e,t,s,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&&Ud.enqueueReplaceState(o,o.state,null),Cd(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Zi(e,t){try{var n="",r=t;do n+=BI(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function ig(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Vg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var dO=typeof WeakMap=="function"?WeakMap:Map;function Ob(e,t,n){n=Kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Id||(Id=!0,Zg=r),Vg(e,t)},n}function Nb(e,t,n){n=Kr(-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(){Vg(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Vg(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function jw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dO;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=CO.bind(null,e,t,n),t.then(e,e))}function Ww(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 Kw(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=Kr(-1,1),t.tag=2,Ho(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var fO=Qr.ReactCurrentOwner,on=!1;function Bt(e,t,n,r){t.child=e===null?lb(t,null,n,r):Xi(t,e.child,n,r)}function Gw(e,t,n,r,o){n=n.render;var s=t.ref;return Wi(t,o),r=Ih(e,t,n,r,s,o),n=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&n&&vh(t),t.flags|=1,Bt(e,t,r,o),t.child)}function qw(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Uh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Mb(e,t,s,r,o)):(e=cd(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,(e.lanes&o)===0){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Rl,n(i,r)&&e.ref===t.ref)return Xr(e,t,o)}return t.flags|=1,e=Vo(s,r),e.ref=t.ref,e.return=t,t.child=e}function Mb(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Rl(s,r)&&e.ref===t.ref)if(on=!1,t.pendingProps=r=s,(e.lanes&o)!==0)(e.flags&131072)!==0&&(on=!0);else return t.lanes=e.lanes,Xr(e,t,o)}return $g(e,t,n,r,o)}function _b(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Bi,mn),mn|=n;else{if((n&1073741824)===0)return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Bi,mn),mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De(Bi,mn),mn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De(Bi,mn),mn|=r;return Bt(e,t,o,n),t.child}function Db(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $g(e,t,n,r,o){var s=an(n)?ks:Lt.current;return s=qi(t,s),Wi(t,o),n=Ih(e,t,n,r,s,o),r=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&r&&vh(t),t.flags|=1,Bt(e,t,n,o),t.child)}function Yw(e,t,n,r,o){if(an(n)){var s=!0;wd(t)}else s=!1;if(Wi(t,o),t.stateNode===null)id(e,t),Lb(t,n,r),Ug(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Mn(c):(c=an(n)?ks:Lt.current,c=qi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&$w(t,i,r,c),Io=!1;var f=t.memoizedState;i.state=f,Cd(t,r,i,o),l=t.memoizedState,a!==r||f!==l||sn.current||Io?(typeof u=="function"&&(Bg(t,n,u,r),l=t.memoizedState),(a=Io||Vw(t,n,a,r,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ub(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kn(t.type,a),i.props=c,d=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Mn(l):(l=an(n)?ks:Lt.current,l=qi(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&$w(t,i,r,l),Io=!1,f=t.memoizedState,i.state=f,Cd(t,r,i,o);var v=t.memoizedState;a!==d||f!==v||sn.current||Io?(typeof p=="function"&&(Bg(t,n,p,r),v=t.memoizedState),(c=Io||Vw(t,n,c,r,f,v,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jg(e,t,n,r,s,o)}function jg(e,t,n,r,o,s){Db(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&Mw(t,n,!1),Xr(e,t,s);r=t.stateNode,fO.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Xi(t,e.child,null,s),t.child=Xi(t,null,a,s)):Bt(e,t,a,s),t.memoizedState=r.state,o&&Mw(t,n,!0),t.child}function Fb(e){var t=e.stateNode;t.pendingContext?Nw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nw(e,t.context,!1),kh(e,t.containerInfo)}function Xw(e,t,n,r,o){return Yi(),wh(o),t.flags|=256,Bt(e,t,n,r),t.child}var Wg={dehydrated:null,treeContext:null,retryLane:0};function Kg(e){return{baseLanes:e,cachePool:null,transitions:null}}function zb(e,t,n){var r=t.pendingProps,o=We.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(We,o&1),e===null)return zg(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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},(r&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=i):s=jd(i,r,0,null),e=Cs(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Kg(n),t.memoizedState=Wg,e):Mh(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return pO(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vo(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=Vo(a,s):(s=Cs(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Kg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Wg,r}return s=e.child,e=s.sibling,r=Vo(s,{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 Mh(e,t){return t=jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qu(e,t,n,r){return r!==null&&wh(r),Xi(t,e.child,null,n),e=Mh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pO(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=ig(Error(D(422))),Qu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=jd({mode:"visible",children:r.children},o,0,null),s=Cs(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,(t.mode&1)!==0&&Xi(t,e.child,null,i),t.child.memoizedState=Kg(i),t.memoizedState=Wg,s);if((t.mode&1)===0)return Qu(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(D(419)),r=ig(s,r,void 0),Qu(e,t,i,r)}if(a=(i&e.childLanes)!==0,on||a){if(r=mt,r!==null){switch(i&-i){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|i))!==0?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Yr(e,o),Xn(r,e,o,-1))}return Bh(),r=ig(Error(D(421))),Qu(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=kO.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,gn=zo(o.nextSibling),hn=t,Ue=!0,qn=null,e!==null&&(In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Rs,jr=e.id,Wr=e.overflow,Rs=t),t=Mh(t,r.children),t.flags|=4096,t)}function Qw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hg(e.return,t,n)}function ag(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Hb(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Bt(e,t,r.children,n),r=We.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&&Qw(e,n,t);else if(e.tag===19)Qw(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(De(We,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&&kd(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ag(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&kd(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ag(t,!0,n,null,s);break;case"together":ag(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function id(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),As|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mO(e,t,n){switch(t.tag){case 3:Fb(t),Yi();break;case 5:db(t);break;case 1:an(t.type)&&wd(t);break;case 4:kh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Ed,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?zb(e,t,n):(De(We,We.current&1),e=Xr(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Hb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,_b(e,t,n)}return Xr(e,t,n)}var Bb,Gg,Ub,Vb;Bb=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}};Gg=function(){};Ub=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Es(kr.current);var s=null;switch(n){case"input":o=gg(e,o),r=gg(e,r),s=[];break;case"select":o=Ge({},o,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case"textarea":o=vg(e,o),r=vg(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vd)}wg(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wl.hasOwnProperty(c)?s||(s=[]):(s=s||[]).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(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Vb=function(e,t,n,r){n!==r&&(t.flags|=4)};function ol(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function At(e){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 gO(e,t,n){var r=t.pendingProps;switch(xh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return an(t.type)&&xd(),At(t),null;case 3:return r=t.stateNode,Qi(),ze(sn),ze(Lt),Ph(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qn!==null&&(th(qn),qn=null))),Gg(e,t),At(t),null;case 5:Rh(t);var o=Es(Ol.current);if(n=t.type,e!==null&&t.stateNode!=null)Ub(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return At(t),null}if(e=Es(kr.current),Yu(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Tr]=t,r[Il]=s,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":sw(r,s),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Fe("invalid",r);break;case"textarea":aw(r,s),Fe("invalid",r)}wg(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&qu(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&qu(r.textContent,a,e),o=["children",""+a]):wl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Du(r),iw(r,s,!0);break;case"textarea":Du(r),lw(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=vd)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Tr]=t,e[Il]=r,Bb(e,t,!1,!1),t.stateNode=e;e:{switch(i=Sg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":sw(e,r),o=gg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ge({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":aw(e,r),o=vg(e,r),Fe("invalid",e);break;default:o=r}wg(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?xS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sl(e,l):typeof l=="number"&&Sl(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wl.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Fe("scroll",e):l!=null&&oh(e,s,l,i))}switch(n){case"input":Du(e),iw(e,r,!1);break;case"textarea":Du(e),lw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$o(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ui(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ui(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=vd)}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 At(t),null;case 6:if(e&&t.stateNode!=null)Vb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Es(Ol.current),Es(kr.current),Yu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tr]=t,(s=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:qu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qu(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tr]=t,t.stateNode=r}return At(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&gn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ib(),Yi(),t.flags|=98560,s=!1;else if(s=Yu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(D(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(D(317));s[Tr]=t}else Yi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;At(t),s=!1}else qn!==null&&(th(qn),qn=null),s=!0;if(!s)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||(We.current&1)!==0?st===0&&(st=3):Bh())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return Qi(),Gg(e,t),e===null&&Pl(t.stateNode.containerInfo),At(t),null;case 10:return Eh(t.type._context),At(t),null;case 17:return an(t.type)&&xd(),At(t),null;case 19:if(ze(We),s=t.memoizedState,s===null)return At(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)ol(s,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=kd(e),i!==null){for(t.flags|=128,ol(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}s.tail!==null&&Je()>Ji&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304)}else{if(!r)if(e=kd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ue)return At(t),null}else 2*Je()-s.renderingStartTime>Ji&&n!==1073741824&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(mn&1073741824)!==0&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function hO(e,t){switch(xh(t),t.tag){case 1:return an(t.type)&&xd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(),ze(sn),ze(Lt),Ph(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Rh(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return Qi(),null;case 10:return Eh(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var Zu=!1,It=!1,yO=typeof WeakSet=="function"?WeakSet:Set,q=null;function Hi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function qg(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Zw=!1;function vO(e,t){if(Lg=gd,e=GS(),yh(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(w){n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=i),f===s&&++u===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Og={focusedElem:e,selectionRange:n},gd=!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 v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,x=v.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Kn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return v=Zw,Zw=!1,v}function yl(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 s=o.destroy;o.destroy=void 0,s!==void 0&&qg(t,n,s)}o=o.next}while(o!==r)}}function Vd(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 Yg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $b(e){var t=e.alternate;t!==null&&(e.alternate=null,$b(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Il],delete t[_g],delete t[eO],delete t[tO])),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 jb(e){return e.tag===5||e.tag===3||e.tag===4}function Jw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jb(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 Xg(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=vd));else if(r!==4&&(e=e.child,e!==null))for(Xg(e,t,n),e=e.sibling;e!==null;)Xg(e,t,n),e=e.sibling}function Qg(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(Qg(e,t,n),e=e.sibling;e!==null;)Qg(e,t,n),e=e.sibling}var wt=null,Gn=!1;function Po(e,t,n){for(n=n.child;n!==null;)Wb(e,t,n),n=n.sibling}function Wb(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Md,n)}catch(a){}switch(n.tag){case 5:It||Hi(n,t);case 6:var r=wt,o=Gn;wt=null,Po(e,t,n),wt=r,Gn=o,wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wt.removeChild(n.stateNode));break;case 18:wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?eg(e.parentNode,n):e.nodeType===1&&eg(e,n),Cl(e)):eg(wt,n.stateNode));break;case 4:r=wt,o=Gn,wt=n.stateNode.containerInfo,Gn=!0,Po(e,t,n),wt=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&((s&2)!==0||(s&4)!==0)&&qg(n,t,i),o=o.next}while(o!==r)}Po(e,t,n);break;case 1:if(!It&&(Hi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Po(e,t,n);break;case 21:Po(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Po(e,t,n),It=r):Po(e,t,n);break;default:Po(e,t,n)}}function eS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yO),t.forEach(function(r){var o=RO.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:wt=a.stateNode,Gn=!1;break e;case 3:wt=a.stateNode.containerInfo,Gn=!0;break e;case 4:wt=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(wt===null)throw Error(D(160));Wb(s,i,o),wt=null,Gn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Kb(t,e),t=t.sibling}function Kb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),br(e),r&4){try{yl(3,e,e.return),Vd(3,e)}catch(g){Ye(e,e.return,g)}try{yl(5,e,e.return)}catch(g){Ye(e,e.return,g)}}break;case 1:Wn(t,e),br(e),r&512&&n!==null&&Hi(n,n.return);break;case 5:if(Wn(t,e),br(e),r&512&&n!==null&&Hi(n,n.return),e.flags&32){var o=e.stateNode;try{Sl(o,"")}catch(g){Ye(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&mS(o,s),Sg(a,i);var c=Sg(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?xS(o,d):u==="dangerouslySetInnerHTML"?yS(o,d):u==="children"?Sl(o,d):oh(o,u,d,c)}switch(a){case"input":hg(o,s);break;case"textarea":gS(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ui(o,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ui(o,!!s.multiple,s.defaultValue,!0):Ui(o,!!s.multiple,s.multiple?[]:"",!1))}o[Il]=s}catch(g){Ye(e,e.return,g)}}break;case 6:if(Wn(t,e),br(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(g){Ye(e,e.return,g)}}break;case 3:if(Wn(t,e),br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(g){Ye(e,e.return,g)}break;case 4:Wn(t,e),br(e);break;case 13:Wn(t,e),br(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Fh=Je())),r&4&&eS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||u,Wn(t,e),It=c):Wn(t,e),br(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(d=q=u;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:yl(4,f,f.return);break;case 1:Hi(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Ye(r,n,g)}}break;case 5:Hi(f,f.return);break;case 22:if(f.memoizedState!==null){nS(d);continue}}p!==null?(p.return=f,q=p):nS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=vS("display",i))}catch(g){Ye(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Ye(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Wn(t,e),br(e),r&4&&eS(e);break;case 21:break;default:Wn(t,e),br(e)}}function br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jb(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Sl(o,""),r.flags&=-33);var s=Jw(e);Qg(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Jw(e);Xg(e,a,i);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xO(e,t,n){q=e,Gb(e,t,n)}function Gb(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Zu;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||It;a=Zu;var c=It;if(Zu=i,(It=l)&&!c)for(q=o;q!==null;)i=q,l=i.child,i.tag===22&&i.memoizedState!==null?rS(o):l!==null?(l.return=i,q=l):rS(o);for(;s!==null;)q=s,Gb(s,t,n),s=s.sibling;q=o,Zu=a,It=c}tS(e,t,n)}else(o.subtreeFlags&8772)!==0&&s!==null?(s.return=o,q=s):tS(e,t,n)}}function tS(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:It||Vd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Hw(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Hw(t,i,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 d=u.dehydrated;d!==null&&Cl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}It||t.flags&512&&Yg(t)}catch(f){Ye(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function nS(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 rS(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var s=t.return;try{Yg(t)}catch(l){Ye(t,s,l)}break;case 5:var i=t.return;try{Yg(t)}catch(l){Ye(t,i,l)}}}catch(l){Ye(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 wO=Math.ceil,Ad=Qr.ReactCurrentDispatcher,_h=Qr.ReactCurrentOwner,Nn=Qr.ReactCurrentBatchConfig,Se=0,mt=null,et=null,St=0,mn=0,Bi=Ko(0),st=0,Dl=null,As=0,$d=0,Dh=0,vl=null,rn=null,Fh=0,Ji=1/0,Vr=null,Id=!1,Zg=null,Bo=null,Ju=!1,Mo=null,Ld=0,xl=0,Jg=null,ad=-1,ld=0;function Ut(){return(Se&6)!==0?Je():ad!==-1?ad:ad=Je()}function Uo(e){return(e.mode&1)===0?1:(Se&2)!==0&&St!==0?St&-St:rO.transition!==null?(ld===0&&(ld=LS()),ld):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:zS(e.type)),e)}function Xn(e,t,n,r){if(50<xl)throw xl=0,Jg=null,Error(D(185));Fl(e,n,r),((Se&2)===0||e!==mt)&&(e===mt&&((Se&2)===0&&($d|=n),st===4&&Oo(e,St)),ln(e,r),n===1&&Se===0&&(t.mode&1)===0&&(Ji=Je()+500,Hd&&Go()))}function ln(e,t){var n=e.callbackNode;sL(e,t);var r=md(e,e===mt?St:0);if(r===0)n!==null&&dw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dw(n),t===1)e.tag===0?nO(oS.bind(null,e)):rb(oS.bind(null,e)),ZL(function(){(Se&6)===0&&Go()}),n=null;else{switch(OS(r)){case 1:n=ch;break;case 4:n=AS;break;case 16:n=pd;break;case 536870912:n=IS;break;default:n=pd}n=tE(n,qb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qb(e,t){if(ad=-1,ld=0,(Se&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Ki()&&e.callbackNode!==n)return null;var r=md(e,e===mt?St:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Od(e,r);else{t=r;var o=Se;Se|=2;var s=Xb();(mt!==e||St!==t)&&(Vr=null,Ji=Je()+500,Ts(e,t));do try{EO();break}catch(a){Yb(e,a)}while(!0);bh(),Ad.current=s,Se=o,et!==null?t=0:(mt=null,St=0,t=st)}if(t!==0){if(t===2&&(o=kg(e),o!==0&&(r=o,t=eh(e,o))),t===1)throw n=Dl,Ts(e,0),Oo(e,r),ln(e,Je()),n;if(t===6)Oo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!SO(o)&&(t=Od(e,r),t===2&&(s=kg(e),s!==0&&(r=s,t=eh(e,s))),t===1))throw n=Dl,Ts(e,0),Oo(e,r),ln(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:ws(e,rn,Vr);break;case 3:if(Oo(e,r),(r&130023424)===r&&(t=Fh+500-Je(),10<t)){if(md(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Mg(ws.bind(null,e,rn,Vr),t);break}ws(e,rn,Vr);break;case 4:if(Oo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Yn(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}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*wO(r/1960))-r,10<r){e.timeoutHandle=Mg(ws.bind(null,e,rn,Vr),r);break}ws(e,rn,Vr);break;case 5:ws(e,rn,Vr);break;default:throw Error(D(329))}}}return ln(e,Je()),e.callbackNode===n?qb.bind(null,e):null}function eh(e,t){var n=vl;return e.current.memoizedState.isDehydrated&&(Ts(e,t).flags|=256),e=Od(e,t),e!==2&&(t=rn,rn=n,t!==null&&th(t)),e}function th(e){rn===null?rn=e:rn.push.apply(rn,e)}function SO(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],s=o.getSnapshot;o=o.value;try{if(!Qn(s(),o))return!1}catch(i){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 Oo(e,t){for(t&=~Dh,t&=~$d,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function oS(e){if((Se&6)!==0)throw Error(D(327));Ki();var t=md(e,0);if((t&1)===0)return ln(e,Je()),null;var n=Od(e,t);if(e.tag!==0&&n===2){var r=kg(e);r!==0&&(t=r,n=eh(e,r))}if(n===1)throw n=Dl,Ts(e,0),Oo(e,t),ln(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ws(e,rn,Vr),ln(e,Je()),null}function zh(e,t){var n=Se;Se|=1;try{return e(t)}finally{Se=n,Se===0&&(Ji=Je()+500,Hd&&Go())}}function Is(e){Mo!==null&&Mo.tag===0&&(Se&6)===0&&Ki();var t=Se;Se|=1;var n=Nn.transition,r=Ie;try{if(Nn.transition=null,Ie=1,e)return e()}finally{Ie=r,Nn.transition=n,Se=t,(Se&6)===0&&Go()}}function Hh(){mn=Bi.current,ze(Bi)}function Ts(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,QL(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(xh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xd();break;case 3:Qi(),ze(sn),ze(Lt),Ph();break;case 5:Rh(r);break;case 4:Qi();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Eh(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(mt=e,et=e=Vo(e.current,null),St=mn=t,st=0,Dl=null,Dh=$d=As=0,rn=vl=null,bs!==null){for(t=0;t<bs.length;t++)if(n=bs[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}bs=null}return e}function Yb(e,t){do{var n=et;try{if(bh(),od.current=Pd,Rd){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Rd=!1}if(Ps=0,pt=ot=Ke=null,hl=!1,Nl=0,_h.current=null,n===null||n.return===null){st=1,Dl=t,et=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=St,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Ww(i);if(p!==null){p.flags&=-257,Kw(p,i,a,s,t),p.mode&1&&jw(s,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if((t&1)===0){jw(s,c,t),Bh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Ww(i);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),Kw(x,i,a,s,t),wh(Zi(l,a));break e}}s=l=Zi(l,a),st!==4&&(st=2),vl===null?vl=[s]:vl.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Ob(s,l,t);zw(s,y);break e;case 1:a=l;var m=s.type,h=s.stateNode;if((s.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Bo===null||!Bo.has(h)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Nb(s,a,t);zw(s,w);break e}}s=s.return}while(s!==null)}Zb(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Xb(){var e=Ad.current;return Ad.current=Pd,e===null?Pd:e}function Bh(){(st===0||st===3||st===2)&&(st=4),mt===null||(As&268435455)===0&&($d&268435455)===0||Oo(mt,St)}function Od(e,t){var n=Se;Se|=2;var r=Xb();(mt!==e||St!==t)&&(Vr=null,Ts(e,t));do try{bO();break}catch(o){Yb(e,o)}while(!0);if(bh(),Se=n,Ad.current=r,et!==null)throw Error(D(261));return mt=null,St=0,st}function bO(){for(;et!==null;)Qb(et)}function EO(){for(;et!==null&&!XI();)Qb(et)}function Qb(e){var t=eE(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?Zb(e):et=t,_h.current=null}function Zb(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=gO(n,t,mn),n!==null){et=n;return}}else{if(n=hO(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{st=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);st===0&&(st=5)}function ws(e,t,n){var r=Ie,o=Nn.transition;try{Nn.transition=null,Ie=1,TO(e,t,n,r)}finally{Nn.transition=o,Ie=r}return null}function TO(e,t,n,r){do Ki();while(Mo!==null);if((Se&6)!==0)throw Error(D(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(D(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(iL(e,s),e===mt&&(et=mt=null,St=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ju||(Ju=!0,tE(pd,function(){return Ki(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=Nn.transition,Nn.transition=null;var i=Ie;Ie=1;var a=Se;Se|=4,_h.current=null,vO(e,n),Kb(n,e),KL(Og),gd=!!Lg,Og=Lg=null,e.current=n,xO(n,e,o),QI(),Se=a,Ie=i,Nn.transition=s}else e.current=n;if(Ju&&(Ju=!1,Mo=e,Ld=o),s=e.pendingLanes,s===0&&(Bo=null),eL(n.stateNode,r),ln(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(Id)throw Id=!1,e=Zg,Zg=null,e;return(Ld&1)!==0&&e.tag!==0&&Ki(),s=e.pendingLanes,(s&1)!==0?e===Jg?xl++:(xl=0,Jg=e):xl=0,Go(),null}function Ki(){if(Mo!==null){var e=OS(Ld),t=Nn.transition,n=Ie;try{if(Nn.transition=null,Ie=16>e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,Ld=0,(Se&6)!==0)throw Error(D(331));var o=Se;for(Se|=4,q=e.current;q!==null;){var s=q,i=s.child;if((q.flags&16)!==0){var a=s.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:yl(8,u,s)}var d=u.child;if(d!==null)d.return=u,q=d;else for(;q!==null;){u=q;var f=u.sibling,p=u.return;if($b(u),u===c){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var v=s.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}q=s}}if((s.subtreeFlags&2064)!==0&&i!==null)i.return=s,q=i;else e:for(;q!==null;){if(s=q,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:yl(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,q=y;break e}q=s.return}}var m=e.current;for(q=m;q!==null;){i=q;var h=i.child;if((i.subtreeFlags&2064)!==0&&h!==null)h.return=i,q=h;else e:for(i=m;q!==null;){if(a=q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Vd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===i){q=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,q=w;break e}q=a.return}}if(Se=o,Go(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Md,e)}catch(E){}r=!0}return r}finally{Ie=n,Nn.transition=t}}return!1}function sS(e,t,n){t=Zi(n,t),t=Ob(e,t,1),e=Ho(e,t,1),t=Ut(),e!==null&&(Fl(e,1,t),ln(e,t))}function Ye(e,t,n){if(e.tag===3)sS(e,e,n);else for(;t!==null;){if(t.tag===3){sS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bo===null||!Bo.has(r))){e=Zi(n,e),e=Nb(t,e,1),t=Ho(t,e,1),e=Ut(),t!==null&&(Fl(t,1,e),ln(t,e));break}}t=t.return}}function CO(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(St&n)===n&&(st===4||st===3&&(St&130023424)===St&&500>Je()-Fh?Ts(e,0):Dh|=n),ln(e,t)}function Jb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Hu,Hu<<=1,(Hu&130023424)===0&&(Hu=4194304)));var n=Ut();e=Yr(e,t),e!==null&&(Fl(e,t,n),ln(e,n))}function kO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jb(e,n)}function RO(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(D(314))}r!==null&&r.delete(t),Jb(e,n)}var eE;eE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)on=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return on=!1,mO(e,t,n);on=(e.flags&131072)!==0}else on=!1,Ue&&(t.flags&1048576)!==0&&ob(t,bd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;id(e,t),e=t.pendingProps;var o=qi(t,Lt.current);Wi(t,n),o=Ih(null,t,r,e,o,n);var s=Lh();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,an(r)?(s=!0,wd(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ch(t),o.updater=Ud,t.stateNode=o,o._reactInternals=t,Ug(t,r,e,n),t=jg(null,t,r,!0,s,n)):(t.tag=0,Ue&&s&&vh(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(id(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=AO(r),e=Kn(r,e),o){case 0:t=$g(null,t,r,e,n);break e;case 1:t=Yw(null,t,r,e,n);break e;case 11:t=Gw(null,t,r,e,n);break e;case 14:t=qw(null,t,r,Kn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),$g(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Yw(e,t,r,o,n);case 3:e:{if(Fb(t),e===null)throw Error(D(387));r=t.pendingProps,s=t.memoizedState,o=s.element,ub(e,t),Cd(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Zi(Error(D(423)),t),t=Xw(e,t,r,n,o);break e}else if(r!==o){o=Zi(Error(D(424)),t),t=Xw(e,t,r,n,o);break e}else for(gn=zo(t.stateNode.containerInfo.firstChild),hn=t,Ue=!0,qn=null,n=lb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yi(),r===o){t=Xr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return db(t),e===null&&zg(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Ng(r,o)?i=null:s!==null&&Ng(r,s)&&(t.flags|=32),Db(e,t),Bt(e,t,i,n),t.child;case 6:return e===null&&zg(t),null;case 13:return zb(e,t,n);case 4:return kh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xi(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Gw(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,De(Ed,r._currentValue),r._currentValue=i,s!==null)if(Qn(s.value,i)){if(s.children===o.children&&!sn.current){t=Xr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Kr(-1,n&-n),l.tag=2;var c=s.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}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Hg(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(D(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Hg(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Wi(t,n),o=Mn(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),qw(e,t,r,o,n);case 15:return Mb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),id(e,t),t.tag=1,an(r)?(e=!0,wd(t)):e=!1,Wi(t,n),Lb(t,r,o),Ug(t,r,o,n),jg(null,t,r,!0,e,n);case 19:return Hb(e,t,n);case 22:return _b(e,t,n)}throw Error(D(156,t.tag))};function tE(e,t){return PS(e,t)}function PO(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 On(e,t,n,r){return new PO(e,t,n,r)}function Uh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AO(e){if(typeof e=="function")return Uh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ih)return 11;if(e===ah)return 14}return 2}function Vo(e,t){var n=e.alternate;return n===null?(n=On(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 cd(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Uh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ii:return Cs(n.children,o,s,t);case sh:i=8,o|=8;break;case dg:return e=On(12,n,t,o|2),e.elementType=dg,e.lanes=s,e;case fg:return e=On(13,n,t,o),e.elementType=fg,e.lanes=s,e;case pg:return e=On(19,n,t,o),e.elementType=pg,e.lanes=s,e;case dS:return jd(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cS:i=10;break e;case uS:i=9;break e;case ih:i=11;break e;case ah:i=14;break e;case Ao:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=On(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Cs(e,t,n,r){return e=On(7,e,r,t),e.lanes=n,e}function jd(e,t,n,r){return e=On(22,e,r,t),e.elementType=dS,e.lanes=n,e.stateNode={isHidden:!1},e}function lg(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function cg(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function IO(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=Km(0),this.expirationTimes=Km(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Km(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vh(e,t,n,r,o,s,i,a,l){return e=new IO(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=On(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ch(s),e}function LO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ai,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nE(e){if(!e)return jo;e=e._reactInternals;e:{if(Os(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(an(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(an(n))return nb(e,n,t)}return t}function rE(e,t,n,r,o,s,i,a,l){return e=Vh(n,r,!0,e,o,s,i,a,l),e.context=nE(null),n=e.current,r=Ut(),o=Uo(n),s=Kr(r,o),s.callback=t!=null?t:null,Ho(n,s,o),e.current.lanes=o,Fl(e,o,r),ln(e,r),e}function Wd(e,t,n,r){var o=t.current,s=Ut(),i=Uo(o);return n=nE(n),t.context===null?t.context=n:t.pendingContext=n,t=Kr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ho(o,t,i),e!==null&&(Xn(e,o,i,s),rd(e,o,i)),i}function Nd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function iS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $h(e,t){iS(e,t),(e=e.alternate)&&iS(e,t)}function OO(){return null}var oE=typeof reportError=="function"?reportError:function(e){console.error(e)};function jh(e){this._internalRoot=e}Kd.prototype.render=jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Wd(e,t,null,null)};Kd.prototype.unmount=jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Is(function(){Wd(null,e,null,null)}),t[qr]=null}};function Kd(e){this._internalRoot=e}Kd.prototype.unstable_scheduleHydration=function(e){if(e){var t=_S();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lo.length&&t!==0&&t<Lo[n].priority;n++);Lo.splice(n,0,e),n===0&&FS(e)}};function Wh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function aS(){}function NO(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=Nd(i);s.call(c)}}var i=rE(t,r,e,0,null,!1,!1,"",aS);return e._reactRootContainer=i,e[qr]=i.current,Pl(e.nodeType===8?e.parentNode:e),Is(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=Nd(l);a.call(c)}}var l=Vh(e,0,!1,null,null,!1,!1,"",aS);return e._reactRootContainer=l,e[qr]=l.current,Pl(e.nodeType===8?e.parentNode:e),Is(function(){Wd(t,l,n,r)}),l}function qd(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=Nd(i);a.call(l)}}Wd(t,i,e,o)}else i=NO(n,t,e,o,r);return Nd(i)}NS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cl(t.pendingLanes);n!==0&&(uh(t,n|1),ln(t,Je()),(Se&6)===0&&(Ji=Je()+500,Go()))}break;case 13:Is(function(){var r=Yr(e,1);if(r!==null){var o=Ut();Xn(r,e,1,o)}}),$h(e,1)}};dh=function(e){if(e.tag===13){var t=Yr(e,134217728);if(t!==null){var n=Ut();Xn(t,e,134217728,n)}$h(e,134217728)}};MS=function(e){if(e.tag===13){var t=Uo(e),n=Yr(e,t);if(n!==null){var r=Ut();Xn(n,e,t,r)}$h(e,t)}};_S=function(){return Ie};DS=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Eg=function(e,t,n){switch(t){case"input":if(hg(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=zd(r);if(!o)throw Error(D(90));pS(r),hg(r,o)}}}break;case"textarea":gS(e,n);break;case"select":t=n.value,t!=null&&Ui(e,!!n.multiple,t,!1)}};bS=zh;ES=Is;var MO={usingClientEntryPoint:!1,Events:[Hl,Mi,zd,wS,SS,zh]},sl={findFiberByHostInstance:Ss,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_O={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kS(e),e===null?null:e.stateNode},findFiberByHostInstance:sl.findFiberByHostInstance||OO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(il=__REACT_DEVTOOLS_GLOBAL_HOOK__,!il.isDisabled&&il.supportsFiber))try{Md=il.inject(_O),Cr=il}catch(e){}var il;xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MO;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wh(t))throw Error(D(200));return LO(e,t,null,n)};xn.createRoot=function(e,t){if(!Wh(e))throw Error(D(299));var n=!1,r="",o=oE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Vh(e,1,!1,null,null,n,!1,r,o),e[qr]=t.current,Pl(e.nodeType===8?e.parentNode:e),new jh(t)};xn.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(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=kS(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return Is(e)};xn.hydrate=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!Wh(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=oE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=rE(t,null,e,1,n!=null?n:null,o,!1,s,i),e[qr]=t.current,Pl(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 Kd(t)};xn.render=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!Gd(e))throw Error(D(40));return e._reactRootContainer?(Is(function(){qd(null,null,e,!1,function(){e._reactRootContainer=null,e[qr]=null})}),!0):!1};xn.unstable_batchedUpdates=zh;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gd(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return qd(e,t,n,!1,r)};xn.version="18.3.1-next-f1338f8080-20240426"});var Ul=tn((D6,aE)=>{"use strict";function iE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iE)}catch(e){console.error(e)}}iE(),aE.exports=sE()});var cE=tn(Kh=>{"use strict";var lE=Ul();Kh.createRoot=lE.createRoot,Kh.hydrateRoot=lE.hydrateRoot;var F6});var jE=tn($E=>{"use strict";var Wl=Q();function LN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ON=typeof Object.is=="function"?Object.is:LN,NN=Wl.useSyncExternalStore,MN=Wl.useRef,_N=Wl.useEffect,DN=Wl.useMemo,FN=Wl.useDebugValue;$E.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=MN(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=DN(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&i.hasValue){var v=i.value;if(o(v,p))return d=v}return d=p}if(v=d,ON(u,p))return v;var g=r(p);return o!==void 0&&o(v,g)?(u=p,v):(u=p,d=g)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=NN(e,s[0],s[1]);return _N(function(){i.hasValue=!0,i.value=a},[a]),FN(a),a}});var KE=tn((Tz,WE)=>{"use strict";WE.exports=jE()});var By=tn((rH,xT)=>{"use strict";var b_="Expected a function",yT=NaN,E_="[object Symbol]",T_=/^\s+|\s+$/g,C_=/^[-+]0x[0-9a-f]+$/i,k_=/^0b[01]+$/i,R_=/^0o[0-7]+$/i,P_=parseInt,A_=typeof global=="object"&&global&&global.Object===Object&&global,I_=typeof self=="object"&&self&&self.Object===Object&&self,L_=A_||I_||Function("return this")(),O_=Object.prototype,N_=O_.toString,M_=Math.max,__=Math.min,zy=function(){return L_.Date.now()};function D_(e,t,n){var r,o,s,i,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(b_);t=vT(t)||0,Hy(n)&&(u=!!n.leading,d="maxWait"in n,s=d?M_(vT(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(C){var k=r,A=o;return r=o=void 0,c=C,i=e.apply(A,k),i}function v(C){return c=C,a=setTimeout(y,t),u?p(C):i}function g(C){var k=C-l,A=C-c,B=t-k;return d?__(B,s-A):B}function x(C){var k=C-l,A=C-c;return l===void 0||k>=t||k<0||d&&A>=s}function y(){var C=zy();if(x(C))return m(C);a=setTimeout(y,g(C))}function m(C){return a=void 0,f&&r?p(C):(r=o=void 0,i)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?i:m(zy())}function E(){var C=zy(),k=x(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),i}return E.cancel=h,E.flush=w,E}function Hy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function F_(e){return!!e&&typeof e=="object"}function z_(e){return typeof e=="symbol"||F_(e)&&N_.call(e)==E_}function vT(e){if(typeof e=="number")return e;if(z_(e))return yT;if(Hy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(T_,"");var n=k_.test(e);return n||R_.test(e)?P_(e.slice(2),n?2:8):C_.test(e)?yT:+e}xT.exports=D_});var zT=tn((BH,FT)=>{"use strict";var Y_=/["'&<>]/;FT.exports=X_;function X_(e){var t=""+e,n=Y_.exec(t);if(!n)return t;var r,o="",s=0,i=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}i!==s&&(o+=t.substring(i,s)),i=s+1,o+=r}return i!==s?o+t.substring(i,s):o}});var XF={};kt(XF,{Card:()=>Te,ContentEditableInput:()=>mi,DeepdeskAPI:()=>bo,DeepdeskSDK:()=>uu,HTTPClient:()=>hi,InputMediator:()=>So,InputType:()=>ki,KeyboardHint:()=>ku,Label:()=>kx,Locale:()=>Kl,Section:()=>wr,SectionList:()=>Ti,Sources:()=>ko,Suggestion:()=>ye,SuggestionList:()=>Ht,TextAreaInput:()=>gi,ToggleButton:()=>ys,attachFile:()=>AA,authenticateWithKey:()=>IA,createFullRange:()=>Ba,createOverlayContainer:()=>lu,createRangeFromOffsets:()=>us,escapeHTML:()=>fa,formatTextMarkup:()=>LA,getRangeOffsets:()=>iu,getRangeText:()=>au,insertCKEditor:()=>_A,isHTML:()=>jf,isSupportedInputElement:()=>um,updateContentEditable:()=>NA,updateTextArea:()=>OA,useClickOutsideRoot:()=>rs,useStyles:()=>_,waitForElementVisibilityChange:()=>pm});var Im=b(Me()),Pn=b(Q());var Su=b(Q()),hx=b(Me());var Ya=Su.default.createContext({});function _(e,t){let s=(0,Su.useContext)(Ya),{debug:n}=s,o=oe(s,["debug"])[e];return Object.entries(t).reduce((i,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},i),{[a]:(0,hx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var yx={root:"dd-4s9wq"};var gs=b(R()),Eu=()=>(0,gs.jsxs)("svg",{className:yx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,gs.jsx)("defs",{children:(0,gs.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,gs.jsx)("title",{children:"Failed loading image"}),(0,gs.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 Am={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var hs=b(R()),Tu=(0,Pn.createContext)(Am),yI=({title:e,src:t})=>{let n=(0,Pn.useContext)(Tu),[r,o]=(0,Pn.useState)(!1);return(0,Pn.useEffect)(()=>{o(!1)},[t]),(0,hs.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,hs.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,hs.jsx)(Eu,{})})},vI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pn.useContext)(Tu);return(0,hs.jsx)("div",{className:(0,Im.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},xI=s=>{var i=s,{as:e="h1",cropText:t=!1,className:n,children:r}=i,o=oe(i,["as","cropText","className","children"]);let a=(0,Pn.useContext)(Tu);return Pn.default.createElement(e,S({className:(0,Im.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Cu=({children:e})=>{let t=_("Card",Am);return(0,hs.jsx)("div",{className:t.root,children:(0,hs.jsx)(Tu.Provider,{value:t,children:e})})};Cu.Image=yI;Cu.Content=vI;Cu.Title=xI;var Te=Cu;var bx=b(Me());var Sx={root:"dd-llBx9"};var Ex=b(R());var wI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},SI=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let s=_("KeyboardHint",Sx);return(0,Ex.jsx)("span",S({"data-key":wI[t],className:(0,bx.default)(e,s.root)},n))},ku=SI;var Cx=b(Me());var Tx={root:"dd-e6HXZ"};var Rx=b(R()),bI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let s=_("Label",Tx);return(0,Rx.jsx)("span",P(S({},n),{className:(0,Cx.default)(e,s.root),children:t}))},kx=bI;var Px={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var Ei=b(R()),EI=o=>{var s=o,{title:e,children:t,type:n}=s,r=oe(s,["title","children","type"]);let i=_("Section",Px);return(0,Ei.jsxs)("section",P(S({},r),{className:i.root,"data-section-type":n,children:[e&&(0,Ei.jsx)("div",{className:i.subTitleContainer,children:(0,Ei.jsx)("span",{className:i.subtitle,children:e})}),(0,Ei.jsx)("div",{className:i.suggestions,children:t})]}))},wr=EI;var Mx=b(Me()),_x=b(Q());var Eo=b(Q()),Ox=b(R()),Ax=(0,Eo.createContext)(null),Ix=({scrollContainerRef:e,children:t})=>{let n=(0,Eo.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:s}=o.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();o.scrollTo({top:i-s})},[]);return(0,Ox.jsx)(Ax.Provider,{value:n,children:t})},Lx=e=>{let t=(0,Eo.useContext)(Ax);(0,Eo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Nx={root:"dd-uoTXh"};var Lm=b(R()),TI=({className:e,children:t})=>{let n=_("SectionList",Nx),r=(0,_x.useRef)(null);return(0,Lm.jsx)(Ix,{scrollContainerRef:r,children:(0,Lm.jsx)("div",{ref:r,className:(0,Mx.default)(n.root,e),children:t})})},Ti=TI;var Ci=b(Me()),nn=b(Q());var Om={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",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var zt=b(R()),To=(0,nn.createContext)(Om),CI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let s=(0,nn.useContext)(To);return(0,zt.jsx)("div",P(S({},n),{className:(0,Ci.default)(s.actions,{[s.actionsIsFixed]:e}),children:t}))};function kI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:s}=l,i=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,nn.useContext)(To);return(0,zt.jsxs)(e||"button",P(S({type:"button",className:(0,Ci.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:s},t),title:r,"aria-label":r},i),{children:[n&&(0,zt.jsx)("span",{className:c.icon,children:n}),o]}))}var RI=({children:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.buttonsContainer,children:e})},PI=({className:e,primary:t,disabled:n,label:r,children:o})=>{let s=(0,nn.useContext)(To);return(0,zt.jsxs)("div",{className:(0,Ci.default)(e,s.actionButton,s.dropdownButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onMouseDown:i=>i.stopPropagation(),onClick:i=>i.stopPropagation(),children:[r,(0,zt.jsx)("ul",{className:s.dropdownList,children:o})]})},AI=({index:e,label:t,onClick:n})=>{let r=(0,nn.useContext)(To);return(0,zt.jsx)("li",{className:r.dropdownItem,children:(0,zt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},II=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let s=(0,nn.useContext)(To);return(0,zt.jsx)("button",{type:"button",className:(0,Ci.default)(e,s.actionButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onClick:r!=null?r:i=>i.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},LI=({labels:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.labels,children:e.map(n=>(0,zt.jsx)("span",{className:t.label,children:n},n))})},Co=nn.default.forwardRef((a,i)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,s=oe(l,["className","selected","onClick","children","as"]);let c=_("Suggestion",Om),u=(0,nn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,zt.jsx)(o,P(S({},s),{ref:i,className:(0,Ci.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,zt.jsx)(To.Provider,{value:c,children:r})}))});Co.Labels=LI;Co.Actions=CI;Co.ActionButton=II;Co.DropdownButton=PI;Co.DropdownItem=AI;Co.ButtonsContainer=RI;Co.Button=kI;var ye=Co;var Fx=b(Me());var Dx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var zx=b(R()),OI=({withDivider:e,children:t})=>{let n=_("SuggestionList",Dx);return(0,zx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Fx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Ht=OI;var Bx=b(Me());var Hx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Ru=b(R()),NI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=_("ToggleButton",Hx);return(0,Ru.jsx)("button",{type:"button",className:(0,Bx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ru.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ru.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},ys=NI;var Ux=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Pu=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Vx=/x-deepdesk-(([a-z0-9\-_])+-version)/,Au=["cues","custom-data","custom-data-banner","knowledge-assist"],$x=Intl.DateTimeFormat().resolvedOptions().timeZone,ko=(g=>(g.SEARCH="search",g.TEMPLATE="template",g.ELASTIC_SEARCH="search-autocomplete",g.GPT="gpt",g.TRIE="trie",g.TRIE_WITH_TYPOS="trie-with-typos",g.SEMANTIC="semantic",g.TEXT_RECOMMENDATION="text_recommendation",g.URL_RECOMMENDATION="url_recommendation",g.LINK_RECOMMENDATION="link_recommendation",g.PERSONAL_COLLECTION="personal-collection",g.PERSONAL_COLLECTION_SEARCH="personal-collection-search",g.SEARCH_OVERLAY="search-overlay",g.SEARCH_PREVIEW="search-preview",g.SEARCH_URL="search-url",g))(ko||{}),ki=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i.SPACE="space",i))(ki||{});var fs=b(cE());var RR=b(Q());function Et(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 DO=typeof Symbol=="function"&&Symbol.observable||"@@observable",uE=DO,Gh=()=>Math.random().toString(36).substring(7).split("").join("."),FO={INIT:`@@redux/INIT${Gh()}`,REPLACE:`@@redux/REPLACE${Gh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Gh()}`},Yd=FO;function Xd(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 qh(e,t,n){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Et(1));return n(qh)(e,t)}let r=e,o=t,s=new Map,i=s,a=0,l=!1;function c(){i===s&&(i=new Map,s.forEach((x,y)=>{i.set(y,x)}))}function u(){if(l)throw new Error(Et(3));return o}function d(x){if(typeof x!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));let y=!0;c();let m=a++;return i.set(m,x),function(){if(y){if(l)throw new Error(Et(6));y=!1,c(),i.delete(m),s=null}}}function f(x){if(!Xd(x))throw new Error(Et(7));if(typeof x.type=="undefined")throw new Error(Et(8));if(typeof x.type!="string")throw new Error(Et(17));if(l)throw new Error(Et(9));try{l=!0,o=r(o,x)}finally{l=!1}return(s=i).forEach(m=>{m()}),x}function p(x){if(typeof x!="function")throw new Error(Et(10));r=x,f({type:Yd.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Et(11));function m(){let w=y;w.next&&w.next(u())}return m(),{unsubscribe:x(m)}},[uE](){return this}}}return f({type:Yd.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[uE]:v}}function zO(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Yd.INIT})=="undefined")throw new Error(Et(12));if(typeof n(void 0,{type:Yd.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Et(13))})}function Qd(e){let t=Object.keys(e),n={};for(let i=0;i<t.length;i++){let a=t[i];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,s;try{zO(n)}catch(i){s=i}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],g=p(v,l);if(typeof g=="undefined"){let x=l&&l.type;throw new Error(Et(14))}u[f]=g,c=c||g!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function na(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function dE(...e){return t=>(n,r)=>{let o=t(n,r),s=()=>{throw new Error(Et(15))},i={getState:o.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(i));return s=na(...a)(o.dispatch),P(S({},o),{dispatch:s})}}function fE(e){return Xd(e)&&"type"in e&&typeof e.type=="string"}var vE=Symbol.for("immer-nothing"),pE=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ra=Object.getPrototypeOf;function qo(e){return!!e&&!!e[wn]}function Jn(e){var t;return e?xE(e)||Array.isArray(e)||!!e[pE]||!!((t=e.constructor)!=null&&t[pE])||nf(e)||rf(e):!1}var HO=Object.prototype.constructor.toString();function xE(e){if(!e||typeof e!="object")return!1;let t=ra(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===HO}function Zd(e,t){tf(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function tf(e){let t=e[wn];return t?t.type_:Array.isArray(e)?1:nf(e)?2:rf(e)?3:0}function Qh(e,t){return tf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wE(e,t,n){let r=tf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function BO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nf(e){return e instanceof Map}function rf(e){return e instanceof Set}function Ns(e){return e.copy_||e.base_}function Zh(e,t){if(nf(e))return new Map(e);if(rf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=xE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[wn];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){let i=o[s],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(ra(e),r)}else{let r=ra(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function ry(e,t=!1){return of(e)||qo(e)||!Jn(e)||(tf(e)>1&&(e.set=e.add=e.clear=e.delete=UO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ry(r,!0))),e}function UO(){Zn(2)}function of(e){return Object.isFrozen(e)}var VO={};function Ms(e){let t=VO[e];return t||Zn(0,e),t}var Vl;function SE(){return Vl}function $O(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mE(e,t){t&&(Ms("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jh(e){ey(e),e.drafts_.forEach(jO),e.drafts_=null}function ey(e){e===Vl&&(Vl=e.parent_)}function gE(e){return Vl=$O(Vl,e)}function jO(e){let t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Jh(t),Zn(4)),Jn(e)&&(e=Jd(t,e),t.parent_||ef(t,e)),t.patches_&&Ms("Patches").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Jd(t,n,[]),Jh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vE?e:void 0}function Jd(e,t,n){if(of(t))return t;let r=t[wn];if(!r)return Zd(t,(o,s)=>yE(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ef(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Zd(s,(a,l)=>yE(e,r,o,a,l,n,i)),ef(e,o,!1),n&&e.patches_&&Ms("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yE(e,t,n,r,o,s,i){if(qo(o)){let a=s&&t&&t.type_!==3&&!Qh(t.assigned_,r)?s.concat(r):void 0,l=Jd(e,o,a);if(wE(n,r,l),qo(l))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Jn(o)&&!of(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Jd(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ef(e,o)}}function ef(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ry(t,n)}function WO(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:SE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,s=oy;n&&(o=[r],s=$l);let{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var oy={get(e,t){if(t===wn)return e;let n=Ns(e);if(!Qh(n,t))return KO(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===Yh(e.base_,t)?(Xh(e),e.copy_[t]=ny(r,e)):r},has(e,t){return t in Ns(e)},ownKeys(e){return Reflect.ownKeys(Ns(e))},set(e,t,n){let r=bE(Ns(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=Yh(Ns(e),t),s=o==null?void 0:o[wn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(BO(n,o)&&(n!==void 0||Qh(e.base_,t)))return!0;Xh(e),ty(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Yh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xh(e),ty(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ns(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ra(e.base_)},setPrototypeOf(){Zn(12)}},$l={};Zd(oy,(e,t)=>{$l[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$l.deleteProperty=function(e,t){return $l.set.call(this,e,t,void 0)};$l.set=function(e,t,n){return oy.set.call(this,e[0],t,n,e[0])};function Yh(e,t){let n=e[wn];return(n?Ns(n):e)[t]}function KO(e,t,n){var o;let r=bE(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function bE(e,t){if(!(t in e))return;let n=ra(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ra(n)}}function ty(e){e.modified_||(e.modified_=!0,e.parent_&&ty(e.parent_))}function Xh(e){e.copy_||(e.copy_=Zh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var GO=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let s=n;n=t;let i=this;return function(l=s,...c){return i.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let s=gE(this),i=ny(t,void 0),a=!0;try{o=n(i),a=!1}finally{a?Jh(s):ey(s)}return mE(s,r),hE(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===vE&&(o=void 0),this.autoFreeze_&&ry(o,!0),r){let s=[],i=[];Ms("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,l=>t(l,...a));let r,o;return[this.produce(t,n,(i,a)=>{r=i,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),qo(e)&&(e=qO(e));let t=gE(this),n=ny(e,void 0);return n[wn].isManual_=!0,ey(t),n}finishDraft(e,t){let n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return mE(r,t),hE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}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=Ms("Patches").applyPatches_;return qo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ny(e,t){let n=nf(e)?Ms("MapSet").proxyMap_(e,t):rf(e)?Ms("MapSet").proxySet_(e,t):WO(e,t);return(t?t.scope_:SE()).drafts_.push(n),n}function qO(e){return qo(e)||Zn(10,e),EE(e)}function EE(e){if(!Jn(e)||of(e))return e;let t=e[wn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zh(e,!0);return Zd(n,(r,o)=>{wE(n,r,EE(o))}),t&&(t.finalized_=!1),n}var Sn=new GO,sf=Sn.produce,U6=Sn.produceWithPatches.bind(Sn),V6=Sn.setAutoFreeze.bind(Sn),$6=Sn.setUseStrictShallowCopy.bind(Sn),j6=Sn.applyPatches.bind(Sn),W6=Sn.createDraft.bind(Sn),K6=Sn.finishDraft.bind(Sn);function YO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function XO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function QO(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 TE=e=>Array.isArray(e)?e:[e];function ZO(e){let t=Array.isArray(e[0])?e[0]:e;return QO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function JO(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var X6=Symbol();var Q6=Object.getPrototypeOf({});var eN=class{constructor(e){this.value=e}deref(){return this.value}},tN=typeof WeakRef!="undefined"?WeakRef:eN,nN=0,CE=1;function af(){return{s:nN,v:void 0,o:null,p:null}}function sy(e,t={}){let n=af(),{resultEqualityCheck:r}=t,o,s=0;function i(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}}let c=a,u;if(a.s===CE)u=a.v;else if(u=e.apply(null,arguments),s++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new tN(u):u}return c.s=CE,c.v=u,u}return i.clearCache=()=>{n=af(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function kE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),YO(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=sy,argsMemoizeOptions:v=[],devModeChecks:g={}}=u,x=TE(f),y=TE(v),m=ZO(o),h=d(function(){return s++,c.apply(null,arguments)},...x),w=!0,E=p(function(){i++;let k=JO(m,arguments);return a=h.apply(null,k),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dn=kE(sy),rN=Object.assign((e,t=Dn)=>{XO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>rN});function RE(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var PE=RE(),AE=RE;var oN=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?na:na.apply(null,arguments)},iz=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},sN=e=>e&&typeof e.match=="function";function it(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Zr(0));return S(S({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=>fE(r)&&r.type===e,n}var _E=class jl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jl.prototype)}static get[Symbol.species](){return jl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jl(...t[0].concat(this)):new jl(...t.concat(this))}};function IE(e){return Jn(e)?sf(e,()=>{}):e}function LE(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function iN(e){return typeof e=="boolean"}var aN=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t!=null?t:{},i=new _E;return n&&(iN(n)?i.push(PE):i.push(AE(n.extraArgument))),i},lN="RTK_autoBatch";var OE=e=>t=>{setTimeout(t,e)},cN=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,s=!1,i=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:OE(10):e.type==="callback"?e.queueNotification:OE(e.timeout),c=()=>{i=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[lN]),s=!o,s&&(i||(i=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},uN=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new _E(e);return r&&o.push(cN(typeof r=="object"?r:void 0)),o};function DE(e){let t=aN(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{},a;if(typeof n=="function")a=n;else if(Xd(n))a=Qd(n);else throw new Error(Zr(1));let l;typeof r=="function"?l=r(t):l=t();let c=na;o&&(c=oN(S({trace:!1},typeof o=="object"&&o)));let u=dE(...l),d=uN(u),f=typeof i=="function"?i(d):d(),p=c(...f);return qh(a,s,p)}function FE(e){let t={},n=[],r,o={addCase(s,i){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(Zr(28));if(a in t)throw new Error(Zr(29));return t[a]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function dN(e){return typeof e=="function"}function fN(e,t){let[n,r,o]=FE(t),s;if(dN(e))s=()=>IE(e());else{let a=IE(e);s=()=>a}function i(a=s(),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,d)=>{if(d)if(qo(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return sf(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return i.getInitialState=s,i}var pN=(e,t)=>sN(e)?e.match(t):e(t);function mN(...e){return t=>e.some(n=>pN(n,t))}var gN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hN=(e=21)=>{let t="",n=e;for(;n--;)t+=gN[Math.random()*64|0];return t},yN=["name","message","stack","code"],iy=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},NE=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},vN=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of yN)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ME="External signal was aborted",ge=(()=>{function e(t,n,r){let o=it(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),s=it(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),i=it(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||vN)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,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,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):hN(),v=new AbortController,g,x;function y(h){x=h,v.abort()}c&&(c.aborted?y(ME):c.addEventListener("abort",()=>y(ME),{once:!0}));let m=function(){return I(this,null,function*(){var E,C;let h;try{let k=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(wN(k)&&(k=yield k),k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((B,M)=>{g=()=>{M({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",g)});u(s(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),h=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(B,M)=>new iy(B,M),fulfillWithValue:(B,M)=>new NE(B,M)})).then(B=>{if(B instanceof iy)throw B;return B instanceof NE?o(B.payload,p,l,B.meta):o(B,p,l)})])}catch(k){h=k instanceof iy?i(null,p,l,k.payload,k.meta):i(k,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&i.match(h)&&h.meta.condition||u(h),h})}();return Object.assign(m,{abort:y,requestId:p,arg:l,unwrap(){return m.then(xN)}})}}return Object.assign(a,{pending:s,rejected:i,fulfilled:o,settled:mN(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function xN(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function wN(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zE=Symbol.for("rtk-slice-createasyncthunk"),dz={[zE]:ge};function SN(e,t){return`${e}/${t}`}function bN({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[zE];return function(o){let{name:s,reducerPath:i=s}=o;if(!s)throw new Error(Zr(11));let a=(typeof o.reducers=="function"?o.reducers(TN()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(h,w){let E=typeof h=="string"?h:h.type;if(!E)throw new Error(Zr(12));if(E in c.sliceCaseReducersByType)throw new Error(Zr(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(h,w){return c.sliceMatchers.push({matcher:h,reducer:w}),u},exposeAction(h,w){return c.actionCreators[h]=w,u},exposeCaseReducer(h,w){return c.sliceCaseReducersByName[h]=w,u}};l.forEach(h=>{let w=a[h],E={reducerName:h,type:SN(s,h),createNotation:typeof o.reducers=="function"};kN(w)?PN(E,w,u,t):CN(E,w,u)});function d(){let[h={},w=[],E=void 0]=typeof o.extraReducers=="function"?FE(o.extraReducers):[o.extraReducers],C=S(S({},h),c.sliceCaseReducersByType);return fN(o.initialState,k=>{for(let A in C)k.addCase(A,C[A]);for(let A of c.sliceMatchers)k.addMatcher(A.matcher,A.reducer);for(let A of w)k.addMatcher(A.matcher,A.reducer);E&&k.addDefaultCase(E)})}let f=h=>h,p=new Map,v;function g(h,w){return v||(v=d()),v(h,w)}function x(){return v||(v=d()),v.getInitialState()}function y(h,w=!1){function E(k){let A=k[h];return typeof A=="undefined"&&w&&(A=x()),A}function C(k=f){let A=LE(p,w,()=>new WeakMap);return LE(A,k,()=>{var M;let B={};for(let[N,J]of Object.entries((M=o.selectors)!=null?M:{}))B[N]=EN(J,k,x,w);return B})}return{reducerPath:h,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}let m=P(S({name:s,reducer:g,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(i)),{injectInto(h,C={}){var k=C,{reducerPath:w}=k,E=oe(k,["reducerPath"]);let A=w!=null?w:i;return h.inject({reducerPath:A,reducer:g},E),S(S({},m),y(A,!0))}});return m}}function EN(e,t,n,r){function o(s,...i){let a=t(s);return typeof a=="undefined"&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var ke=bN();function TN(){function e(t,n){return S({_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 CN({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!RN(r))throw new Error(Zr(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?it(e,i):it(e))}function kN(e){return e._reducerDefinitionType==="asyncThunk"}function RN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function PN({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Zr(18));let{payloadCreator:s,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,s,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||lf,pending:a||lf,rejected:l||lf,settled:c||lf})}function lf(){}var HE="listener",BE="completed",UE="cancelled",fz=`task-${UE}`,pz=`task-${BE}`,mz=`${HE}-${UE}`,gz=`${HE}-${BE}`;var{assign:VE}=Object;var ay="listenerMiddleware";var AN=VE(it(`${ay}/add`),{withTypes:()=>AN}),hz=it(`${ay}/removeAll`),IN=VE(it(`${ay}/remove`),{withTypes:()=>IN});var yz=Symbol.for("rtk-state-proxy-original");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 le=b(Q(),1),i1=b(KE(),1);var zN=le.version.startsWith("19"),HN=Symbol.for(zN?"react.transitional.element":"react.element"),BN=Symbol.for("react.portal"),UN=Symbol.for("react.fragment"),VN=Symbol.for("react.strict_mode"),$N=Symbol.for("react.profiler"),jN=Symbol.for("react.consumer"),WN=Symbol.for("react.context"),JE=Symbol.for("react.forward_ref"),KN=Symbol.for("react.suspense"),GN=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),qN=Symbol.for("react.lazy");var YN=JE,XN=py;function QN(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case HN:switch(e=e.type,e){case UN:case $N:case VN:case KN:case GN:return e;default:switch(e=e&&e.$$typeof,e){case WN:case JE:case qN:case py:return e;case jN:return e;default:return t}}case BN:return t}}}function ZN(e){return QN(e)===py}function JN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let a=!1,l,c,u,d,f;function p(m,h){return l=m,c=h,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let m=e(l,c),h=!i(m,u);return u=m,h&&(f=n(u,d,c)),f}function y(m,h){let w=!s(h,c),E=!o(m,l,h,c);return l=m,c=h,w&&E?v():w?g():E?x():f}return function(h,w){return a?y(h,w):p(h,w)}}function eM(e,s){var i=s,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=i,o=oe(i,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return JN(a,l,c,e,o)}function tM(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function dy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function GE(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function e1(e,t){return function(r,{displayName:o}){let s=function(a,l){return s.dependsOnOwnProps?s.mapToProps(a,l):s.mapToProps(a,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(a,l){s.mapToProps=e,s.dependsOnOwnProps=GE(e);let c=s(a,l);return typeof c=="function"&&(s.mapToProps=c,s.dependsOnOwnProps=GE(c),c=s(a,l)),c},s}}function my(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function nM(e){return e&&typeof e=="object"?dy(t=>tM(e,t)):e?typeof e=="function"?e1(e,"mapDispatchToProps"):my(e,"mapDispatchToProps"):dy(t=>({dispatch:t}))}function rM(e){return e?typeof e=="function"?e1(e,"mapStateToProps"):my(e,"mapStateToProps"):dy(()=>({}))}function oM(e,t,n){return S(S(S({},n),e),t)}function sM(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(l,c,u){let d=e(l,c,u);return s?o(d,i)||(i=d):(s=!0,i=d),i}}}function iM(e){return e?typeof e=="function"?sM(e):my(e,"mergeProps"):()=>oM}function aM(e){e()}function lM(){let e=null,t=null;return{clear(){e=null,t=null},notify(){aM(()=>{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 qE={notify(){},get:()=>[]};function t1(e,t){let n,r=qE,o=0,s=!1;function i(g){u();let x=r.subscribe(g),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return s}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=lM())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=qE)}function f(){s||(s=!0,u())}function p(){s&&(s=!1,d())}let v={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var cM=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",uM=cM(),dM=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",fM=dM(),pM=()=>uM||fM?le.useLayoutEffect:le.useEffect,cf=pM();function YE(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ly(e,t){if(YE(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])||!YE(e[n[o]],t[n[o]]))return!1;return!0}var mM={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gM={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},hM={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yM={[YN]:hM,[XN]:n1};function XE(e){return ZN(e)?n1:yM[e.$$typeof]||mM}var vM=Object.defineProperty,xM=Object.getOwnPropertyNames,QE=Object.getOwnPropertySymbols,wM=Object.getOwnPropertyDescriptor,SM=Object.getPrototypeOf,ZE=Object.prototype;function fy(e,t){if(typeof t!="string"){if(ZE){let s=SM(t);s&&s!==ZE&&fy(e,s)}let n=xM(t);QE&&(n=n.concat(QE(t)));let r=XE(e),o=XE(t);for(let s=0;s<n.length;++s){let i=n[s];if(!gM[i]&&!(o&&o[i])&&!(r&&r[i])){let a=wM(t,i);try{vM(e,i,a)}catch(l){}}}}return e}var cy=Symbol.for("react-redux-context"),uy=typeof globalThis!="undefined"?globalThis:{};function bM(){var n;if(!le.createContext)return{};let e=(n=uy[cy])!=null?n:uy[cy]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var Jr=bM(),EM=[null,null];function TM(e,t,n){cf(()=>e(...t),n)}function CM(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function kM(e,t,n,r,o,s,i,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let g=t.getState(),x,y;try{x=r(g,o.current)}catch(m){y=m,f=m}y||(f=null),x===s.current?i.current||c():(s.current=x,l.current=x,i.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function RM(e,t){return e===t}function PM(e,t,n,{pure:r,areStatesEqual:o=RM,areOwnPropsEqual:s=ly,areStatePropsEqual:i=ly,areMergedPropsEqual:a=ly,forwardRef:l=!1,context:c=Jr}={}){let u=c,d=rM(e),f=nM(t),p=iM(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",m=`Connect(${y})`,h={shouldHandleStateChanges:v,displayName:m,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:a};function w(k){let[A,B,M]=le.useMemo(()=>{let pe=k,{reactReduxForwardedRef:X}=pe,ae=oe(pe,["reactReduxForwardedRef"]);return[k.context,X,ae]},[k]),N=le.useMemo(()=>{let X=u;return A!=null&&A.Consumer,X},[A,u]),J=le.useContext(N),Y=!!k.store&&!!k.store.getState&&!!k.store.dispatch,O=!!J&&!!J.store,F=Y?k.store:J.store,se=O?J.getServerState:F.getState,G=le.useMemo(()=>eM(F.dispatch,h),[F]),[V,U]=le.useMemo(()=>{if(!v)return EM;let X=t1(F,Y?void 0:J.subscription),ae=X.notifyNestedSubs.bind(X);return[X,ae]},[F,Y,J]),K=le.useMemo(()=>Y?J:P(S({},J),{subscription:V}),[Y,J,V]),$=le.useRef(void 0),W=le.useRef(M),z=le.useRef(void 0),fe=le.useRef(!1),de=le.useRef(!1),be=le.useRef(void 0);cf(()=>(de.current=!0,()=>{de.current=!1}),[]);let me=le.useMemo(()=>()=>z.current&&M===W.current?z.current:G(F.getState(),M),[F,M]),re=le.useMemo(()=>ae=>V?kM(v,F,V,G,W,$,fe,de,z,U,ae):()=>{},[V]);TM(CM,[W,$,fe,M,z,U]);let Ce;try{Ce=le.useSyncExternalStore(re,me,se?()=>G(se(),M):me)}catch(X){throw be.current&&(X.message+=`
|
|
9
9
|
The error may be correlated with this previous error:
|
|
10
10
|
${be.current.stack}
|
|
11
11
|
|
|
12
|
-
`),X}cf(()=>{be.current=void 0,z.current=void 0,$.current=Ce});let rt=le.useMemo(()=>le.createElement(x,P(S({},Ce),{ref:B})),[B,x,Ce]);return le.useMemo(()=>v?le.createElement(N.Provider,{value:K},rt):rt,[N,rt,K])}let C=le.memo(w);if(C.WrappedComponent=x,C.displayName=w.displayName=m,l){let A=le.forwardRef(function(M,N){return le.createElement(C,P(S({},M),{reactReduxForwardedRef:N}))});return A.displayName=m,A.WrappedComponent=x,fy(A,x)}return fy(C,x)}}var oa=
|
|
13
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var FM=new to;FM.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var zM=new to;zM.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function df(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?df=function(t){return typeof t}:df=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}var HM=Object.prototype.toString,Yl=new to;Yl.useLongestToken=!0;Yl.tokenize=w1.tokenize;Yl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s=="undefined"?n:s}:r;return typeof e=="string"?e:JSON.stringify(hy(e,null,null,o),o," ")};Yl.equals=function(e,t){return to.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function hy(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(HM.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=hy(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),df(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=hy(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var yy=new to;yy.tokenize=function(e){return e.slice()};yy.join=yy.removeEmpty=function(e){return e};function S1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Yo(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)=>Yo(i,t[s],n-1)):S1(e)&&S1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Yo(e[s],t[s],n-1)):!1}function BM(e){return Math.max(...e.map(t=>t.length))}function UM(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return P(S({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function b1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<BM(r);o++){let i=UM(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 VM=2;function E1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=b1(e,VM);return n&&n.text!==t?n:e[0]}var $M={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},ee=$M;var T1={current:null,isSupported:null},at=st("resetConversation"),C1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Rr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},sa=e=>e.conversation.isSupported,vy=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),ff=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),pf=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),mf=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),xy=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})})}),wy=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),jM=[ff.rejected,pf.rejected,mf.rejected,wy.rejected].map(e=>e==null?void 0:e.toString());function WM(e){return jM.includes(e.type)}var KM=ke({name:"conversation",initialState:T1,reducers:{},extraReducers:e=>{e.addCase(vy.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(ff.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(pf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xy.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(mf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(at,()=>T1).addMatcher(WM,(t,n)=>{var r;throw ee.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),k1=KM.reducer;var _i={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Sy(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 gf=st("input/replaceText"),Di=st("input/sendMessage"),hf=st("input/applyImageSuggestion"),no=st("input/sendEvent"),R1=ke({name:"input",initialState:_i,reducers:{setInput(e,t){var i,s;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=_i.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=v1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((i=n.selection)==null?void 0:i.start)!==void 0&&((s=n.selection)==null?void 0:s.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},setSelection(e,t){t.payload!==null&&(Yo(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,text:u},eventMetrics:{inputType:d},replace:f}=n,p=o==="search"||o==="personal-collection-search",v=r.slice(e.text.substring(0,e.selection.start).length);(p||f==="selection")&&(v=r),n.suggestion.source==="search-overlay"&&(v=u),e.metrics.textSuggestions.push({text:v,source:o,abVariant:i,abTestName:s,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:p?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=P(S({},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=P(S({},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.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=e.text.substring(0,e.selection.end),r=E1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=_i.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=_i.mixedSuggestion,t.textSuggestions=_i.textSuggestions,t.selectedSuggestionIndex=_i.selectedSuggestionIndex,t.metrics=_i.metrics})}}),aa=e=>e.input.text.substring(0,e.input.selection.end),GM=e=>e.input.selection,la=e=>{let{mixedSuggestion:t,selectedSuggestionIndex:n,textSuggestions:r}=e.input;return n>-1?r[n]:t},P1=()=>j(GM),{commitSuggestion:er,offeredTextSuggestion:A1,registerCut:I1,registerKeyDown:L1,registerKeyUp:O1,registerPaste:N1,selectNextTextSuggestion:M1,selectPreviousTextSuggestion:_1,selectTextSuggestionByIndex:yf,setInput:vf,setMetrics:D1,setSelection:xf,setTextSuggestions:Xo,resetMetrics:F1}=R1.actions,z1=R1.reducer;function H1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var qM={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},ca=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},B1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},U1=e=>{var t;return(t=e.info.customData)!=null?t:null},Ql=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&H1(e.visitorTimeZone)?e.visitorTimeZone:$x,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},YM=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Xl=ge("info/setAgentInfo",(e,t)=>I(void 0,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=YM.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]: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}})),by=ge("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),Ey=ge("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),V1=ke({name:"info",initialState:qM,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Xl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Xl.rejected,t=>{t.fetchState="error"}).addCase(Xl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(by.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Ey.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(at,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:$1,setCustomData:j1,setPlatformVariables:W1}=V1.actions,K1=V1.reducer;function cn(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var wf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},G1=e=>e.search.isOpen,q1=e=>e.search.page,Ty=e=>e.search.list,Y1=e=>e.search.aggregates,XM=Dn([Ty,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),X1=e=>t=>XM(t,e),Fi=ge("search/getAll",(e,t)=>I(void 0,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:Ql(r)});return{results:s.map(c=>P(S(S({},c),c.title&&i?{title:cn(c.title,i)}:{}),{text:cn(c.text,i!=null?i:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Q1=ke({name:"search",initialState:wf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=wf.fetchState,e.list=wf.list}},extraReducers:e=>{e.addCase(Fi.pending,t=>{t.fetchState="loading"}).addCase(Fi.rejected,(t,n)=>{t.fetchState="error",ee.error(n.error)}).addCase(Fi.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>wf)}}),{resetSearch:Sf,setIsOpen:Fn,setPage:ro}=Q1.actions,Z1=Q1.reducer;var Cy="SetOutputs",ua="ShowLoginOverlay",Zl="UserLoggedIn",QM="UserLoggedOut",Pr="ApplySuggestion",ky="ApplyImageSuggestion",ZM="ShowCommandPalette",JM=e=>({[Cy]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[ZM]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(ro(t.page))},[ua]:t=>{e.dispatch(m1(t))},[Zl]:()=>{e.dispatch(eo())},[QM]:()=>{e.dispatch(eo())},[ky]:t=>{e.dispatch(hf({suggestion:t.suggestion}))},[Pr]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),J1=JM;var Jl=b(Q()),tT=b(R()),eT=Jl.default.createContext(null),Qo=({broadcastEvents:e,children:t})=>{let n=Jl.default.useMemo(()=>e,[]);return(0,tT.jsx)(eT.Provider,{value:n,children:t})},un=()=>{let e=(0,Jl.useContext)(eT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var Of=b(Me()),tr=b(Q());var Af=b(Q());var Ry=function(e,t){return Ry=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])},Ry(e,t)};function ec(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ry(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var En=function(){return En=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},En.apply(this,arguments)};function nT(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 bf(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 Ef(e,t){var n=t&&t.cache?t.cache:s_,r=t&&t.serializer?t.serializer:o_,o=t&&t.strategy?t.strategy:t_;return o(e,{cache:n,serializer:r})}function e_(e){return e==null||typeof e=="number"||typeof e=="boolean"}function rT(e,t,n,r){var o=e_(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function oT(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 Py(e,t,n,r,o){return n.bind(t,e,r,o)}function t_(e,t){var n=e.length===1?rT:oT;return Py(e,this,n,t.cache.create(),t.serializer)}function n_(e,t){return Py(e,this,oT,t.cache.create(),t.serializer)}function r_(e,t){return Py(e,this,rT,t.cache.create(),t.serializer)}var o_=function(){return JSON.stringify(arguments)},i_=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}(),s_={create:function(){return new i_}},Tf={variadic:n_,monadic:r_};var Cf;(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"})(Cf||(Cf={}));var kf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(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"})(zn||(zn={}));var Rf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Rf||(Rf={}));function Ay(e){return e.type===zn.literal}function Iy(e){return e.type===zn.argument}function tc(e){return e.type===zn.number}function nc(e){return e.type===zn.date}function rc(e){return e.type===zn.time}function oc(e){return e.type===zn.select}function ic(e){return e.type===zn.plural}function iT(e){return e.type===zn.pound}function sc(e){return e.type===zn.tag}function Pf(e){return!!(e&&typeof e=="object"&&e.type===Rf.number)}function ac(e){return!!(e&&typeof e=="object"&&e.type===Rf.dateTime)}function Ly(e){e.forEach(function(t){if(delete t.location,oc(t)||ic(t))for(var n in t.options)delete t.options[n].location,Ly(t.options[n].value);else tc(t)&&Pf(t.style)||(nc(t)||rc(t))&&ac(t.style)?delete t.style.location:sc(t)&&Ly(t.children)})}function sT(e,t){t===void 0&&(t={}),t=En({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new kf(e,t).parse();if(n.err){var r=SyntaxError(Cf[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ly(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 lc=function(e){ec(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 Oy=function(e){ec(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}(lc);var aT=function(e){ec(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}(lc);var lT=function(e){ec(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}(lc);var Ot;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ot||(Ot={}));function a_(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ot.literal||n.type!==Ot.literal?t.push(n):r.value+=n.value,t},[])}function l_(e){return typeof e=="function"}function cc(e,t,n,r,o,i,s){if(e.length===1&&Ay(e[0]))return[{type:Ot.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(Ay(u)){a.push({type:Ot.literal,value:u.value});continue}if(iT(u)){typeof i=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(i)});continue}var d=u.value;if(!(o&&d in o))throw new lT(d,s);var f=o[d];if(Iy(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Ot.literal:Ot.object,value:f});continue}if(nc(u)){var p=typeof u.style=="string"?r.date[u.style]:ac(u.style)?u.style.parsedOptions:void 0;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(rc(u)){var p=typeof u.style=="string"?r.time[u.style]:ac(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(tc(u)){var p=typeof u.style=="string"?r.number[u.style]:Pf(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Ot.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(sc(u)){var v=u.children,g=u.value,x=o[g];if(!l_(x))throw new aT(g,"function",s);var y=cc(v,t,n,r,o,i),m=x(y.map(function(E){return E.value}));Array.isArray(m)||(m=[m]),a.push.apply(a,m.map(function(E){return{type:typeof E=="string"?Ot.literal:Ot.object,value:E}}))}if(oc(u)){var h=u.options[f]||u.options.other;if(!h)throw new Oy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o));continue}if(ic(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new lc(`Intl.PluralRules is not available in this environment.
|
|
12
|
+
`),X}cf(()=>{be.current=void 0,z.current=void 0,$.current=Ce});let rt=le.useMemo(()=>le.createElement(x,P(S({},Ce),{ref:B})),[B,x,Ce]);return le.useMemo(()=>v?le.createElement(N.Provider,{value:K},rt):rt,[N,rt,K])}let C=le.memo(w);if(C.WrappedComponent=x,C.displayName=w.displayName=m,l){let A=le.forwardRef(function(M,N){return le.createElement(C,P(S({},M),{reactReduxForwardedRef:N}))});return A.displayName=m,A.WrappedComponent=x,fy(A,x)}return fy(C,x)}}var oa=PM;function AM(e){let{children:t,context:n,serverState:r,store:o}=e,s=le.useMemo(()=>{let l=t1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),i=le.useMemo(()=>o.getState(),[o]);return cf(()=>{let{subscription:l}=s;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[s,i]),le.createElement((n||Jr).Provider,{value:s},t)}var r1=AM;function gy(e=Jr){return function(){return le.useContext(e)}}var o1=gy();function s1(e=Jr){let t=e===Jr?o1:gy(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var IM=s1();function LM(e=Jr){let t=e===Jr?IM:s1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ve=LM(),OM=(e,t)=>e===t;function NM(e=Jr){let t=e===Jr?o1:gy(e),n=(r,o={})=>{let{equalityFn:s=OM}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:a,subscription:l,getServerState:c}=i,u=le.useRef(!0),d=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=(0,i1.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,d,s);return le.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var j=NM();var Kl=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Kl||{});var MM={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},a1=ke({name:"settings",initialState:MM,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:uf}=a1.actions,Gl=e=>t=>t.settings[e],te=e=>j(Gl(e)),l1=a1.reducer;var _M={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},$t=e=>e.auth.isLoggedIn,c1=e=>e.auth.loginFetchState,u1=e=>e.auth.verifyFetchState,d1=e=>e.auth.showLoginOverlay,eo=ge("auth/validate",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),f1=ge("auth/requestLogin",(n,r)=>I(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),ql=ge("auth/verifyLoginToken",(n,r)=>I(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),p1=ke({name:"auth",initialState:_M,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(eo.pending,t=>{t.loginFetchState="loading"}),e.addCase(eo.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(eo.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ql.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ql.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ql.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:sa,setShowLoginOverlay:m1}=p1.actions,g1=p1.reducer;function to(){}to.prototype={diff:function(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(w){return s?(setTimeout(function(){s(void 0,w)},0),!0):w}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,u=1,d=l+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var f=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,v=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=c&&g+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function m(){for(var w=Math.max(x,-u);w<=Math.min(y,u);w+=2){var E=void 0,C=v[w-1],k=v[w+1];C&&(v[w-1]=void 0);var A=!1;if(k){var B=k.oldPos-w;A=k&&0<=B&&B<l}var M=C&&C.oldPos+1<c;if(!A&&!M){v[w]=void 0;continue}if(!M||A&&C.oldPos+1<k.oldPos?E=i.addToPath(k,!0,void 0,0):E=i.addToPath(C,void 0,!0,1),g=i.extractCommon(E,n,t,w),E.oldPos+1>=c&&g+1>=l)return a(DM(i,E.lastComponent,n,t,i.useLongestToken));v[w]=E,E.oldPos+1>=c&&(y=Math.min(y,w-1)),g+1>=l&&(x=Math.max(x,w+1))}u++}if(s)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return s();m()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var h=m();if(h)return h}},addToPath:function(t,n,r,o){var s=t.lastComponent;return s&&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:function(t,n,r,o){for(var s=n.length,i=r.length,a=t.oldPos,l=a-o,c=0;l+1<s&&a+1<i&&this.equals(n[l+1],r[a+1]);)l++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function DM(e,t,n,r,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,l=s.length,c=0,u=0;a<l;a++){var d=s[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&s[a-1].added){var p=s[a-1];s[a-1]=s[a],s[a]=p}}else{if(!d.added&&o){var f=n.slice(c,c+d.count);f=f.map(function(g,x){var y=r[u+x];return y.length>g.length?y:g}),d.value=e.join(f)}else d.value=e.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}var v=s[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(s[l-2].value+=v.value,s.pop()),s}var FM=new to;function v1(e,t,n){return FM.diff(e,t,n)}var h1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,y1=/\S/,x1=new to;x1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!y1.test(e)&&!y1.test(t)};x1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&h1.test(t[n])&&h1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var w1=new to;w1.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
13
|
+
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var zM=new to;zM.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var HM=new to;HM.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function df(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?df=function(t){return typeof t}:df=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}var BM=Object.prototype.toString,Yl=new to;Yl.useLongestToken=!0;Yl.tokenize=w1.tokenize;Yl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(s,i){return typeof i=="undefined"?n:i}:r;return typeof e=="string"?e:JSON.stringify(hy(e,null,null,o),o," ")};Yl.equals=function(e,t){return to.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function hy(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var i;if(BM.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=hy(e[s],t,n,r,o);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),df(e)==="object"&&e!==null){t.push(e),i={},n.push(i);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],i[l]=hy(e[l],t,n,r,l);t.pop(),n.pop()}else i=e;return i}var yy=new to;yy.tokenize=function(e){return e.slice()};yy.join=yy.removeEmpty=function(e){return e};function S1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Yo(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((s,i)=>Yo(s,t[i],n-1)):S1(e)&&S1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>Yo(e[i],t[i],n-1)):!1}function UM(e){return Math.max(...e.map(t=>t.length))}function VM(e,t){let n=e.reduce((r,o)=>{if(o){let s=r[o]?r[o]+1:1;return P(S({},r),{[o]:s})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function b1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<UM(r);o++){let s=VM(r.map(a=>a[o]),t),i=r.filter(a=>!s.includes(a[o]));if(i.length>=t)r=i;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var $M=2;function E1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=b1(e,$M);return n&&n.text!==t?n:e[0]}var jM={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},Z=jM;var T1={current:null,isSupported:null},at=it("resetConversation"),C1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Rr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},ia=e=>e.conversation.isSupported,vy=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),ff=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),pf=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),mf=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),xy=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:s,agentEmail:i,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:i,agentName:s,agentNickname:a,metadata:l})})}),wy=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),WM=[ff.rejected,pf.rejected,mf.rejected,wy.rejected].map(e=>e==null?void 0:e.toString());function KM(e){return WM.includes(e.type)}var GM=ke({name:"conversation",initialState:T1,reducers:{},extraReducers:e=>{e.addCase(vy.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(ff.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(pf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xy.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(mf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(at,()=>T1).addMatcher(KM,(t,n)=>{var r;throw Z.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),k1=GM.reducer;var _s={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Sy(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}}var gf=it("input/replaceText"),Ds=it("input/sendMessage"),hf=it("input/applyImageSuggestion"),no=it("input/sendEvent"),R1=ke({name:"input",initialState:_s,reducers:{setInput(e,t){var s,i;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=_s.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=v1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((s=n.selection)==null?void 0:s.start)!==void 0&&((i=n.selection)==null?void 0:i.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},setSelection(e,t){t.payload!==null&&(Yo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:s,abTestName:i,trainingJobs:a,sourceText:l,searchTerm:c,text:u},eventMetrics:{inputType:d},replace:f}=n,p=o==="search"||o==="personal-collection-search",v=r.slice(e.text.substring(0,e.selection.start).length);(p||f==="selection")&&(v=r),n.suggestion.source==="search-overlay"&&(v=u),e.metrics.textSuggestions.push({text:v,source:o,abVariant:s,abTestName:i,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:p?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(s=>s.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=P(S({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,s=n.numCharsDeleted+(o!=null&&o.length?o.length:0),i=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:s,deletions:i,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.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=e.text.substring(0,e.selection.end),r=E1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=_s.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=_s.mixedSuggestion,t.textSuggestions=_s.textSuggestions,t.selectedSuggestionIndex=_s.selectedSuggestionIndex,t.metrics=_s.metrics})}}),aa=e=>e.input.text.substring(0,e.input.selection.end),qM=e=>e.input.selection,la=e=>{let{mixedSuggestion:t,selectedSuggestionIndex:n,textSuggestions:r}=e.input;return n>-1?r[n]:t},P1=()=>j(qM),{commitSuggestion:er,offeredTextSuggestion:A1,registerCut:I1,registerKeyDown:L1,registerKeyUp:O1,registerPaste:N1,selectNextTextSuggestion:M1,selectPreviousTextSuggestion:_1,selectTextSuggestionByIndex:yf,setInput:vf,setMetrics:D1,setSelection:xf,setTextSuggestions:Xo,resetMetrics:F1}=R1.actions,z1=R1.reducer;function H1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var YM={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},ca=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},B1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},U1=e=>{var t;return(t=e.info.customData)!=null?t:null},Ql=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&H1(e.visitorTimeZone)?e.visitorTimeZone:$x,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},XM=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Xl=ge("info/setAgentInfo",(e,t)=>I(void 0,null,function*(){var s,i,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=XM.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]: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:(s=r.nickname)!=null?s:e.agentNickname,agentEmail:(i=r.email)!=null?i:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),by=ge("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),Ey=ge("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),V1=ke({name:"info",initialState:YM,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Xl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Xl.rejected,t=>{t.fetchState="error"}).addCase(Xl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(by.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Ey.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(at,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:$1,setCustomData:j1,setPlatformVariables:W1}=V1.actions,K1=V1.reducer;function cn(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var wf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},G1=e=>e.search.isOpen,q1=e=>e.search.page,Ty=e=>e.search.list,Y1=e=>e.search.aggregates,QM=Dn([Ty,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),X1=e=>t=>QM(t,e),Fs=ge("search/getAll",(e,t)=>I(void 0,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:s}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ql(r)});return{results:i.map(c=>P(S(S({},c),c.title&&s?{title:cn(c.title,s)}:{}),{text:cn(c.text,s!=null?s:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Q1=ke({name:"search",initialState:wf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=wf.fetchState,e.list=wf.list}},extraReducers:e=>{e.addCase(Fs.pending,t=>{t.fetchState="loading"}).addCase(Fs.rejected,(t,n)=>{t.fetchState="error",Z.error(n.error)}).addCase(Fs.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>wf)}}),{resetSearch:Sf,setIsOpen:Fn,setPage:ro}=Q1.actions,Z1=Q1.reducer;var Cy="SetOutputs",ua="ShowLoginOverlay",Zl="UserLoggedIn",ZM="UserLoggedOut",Pr="ApplySuggestion",ky="ApplyImageSuggestion",JM="ShowCommandPalette",e_=e=>({[Cy]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[JM]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(ro(t.page))},[ua]:t=>{e.dispatch(m1(t))},[Zl]:()=>{e.dispatch(eo())},[ZM]:()=>{e.dispatch(eo())},[ky]:t=>{e.dispatch(hf({suggestion:t.suggestion}))},[Pr]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),J1=e_;var Jl=b(Q()),tT=b(R()),eT=Jl.default.createContext(null),Qo=({broadcastEvents:e,children:t})=>{let n=Jl.default.useMemo(()=>e,[]);return(0,tT.jsx)(eT.Provider,{value:n,children:t})},un=()=>{let e=(0,Jl.useContext)(eT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var Of=b(Me()),tr=b(Q());var Af=b(Q());var Ry=function(e,t){return Ry=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])},Ry(e,t)};function ec(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ry(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},En.apply(this,arguments)};function nT(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 bf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Ef(e,t){var n=t&&t.cache?t.cache:a_,r=t&&t.serializer?t.serializer:s_,o=t&&t.strategy?t.strategy:n_;return o(e,{cache:n,serializer:r})}function t_(e){return e==null||typeof e=="number"||typeof e=="boolean"}function rT(e,t,n,r){var o=t_(r)?r:n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.call(this,r),t.set(o,s)),s}function oT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.apply(this,r),t.set(o,s)),s}function Py(e,t,n,r,o){return n.bind(t,e,r,o)}function n_(e,t){var n=e.length===1?rT:oT;return Py(e,this,n,t.cache.create(),t.serializer)}function r_(e,t){return Py(e,this,oT,t.cache.create(),t.serializer)}function o_(e,t){return Py(e,this,rT,t.cache.create(),t.serializer)}var s_=function(){return JSON.stringify(arguments)},i_=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}(),a_={create:function(){return new i_}},Tf={variadic:r_,monadic:o_};var Cf;(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"})(Cf||(Cf={}));var kf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(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"})(zn||(zn={}));var Rf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Rf||(Rf={}));function Ay(e){return e.type===zn.literal}function Iy(e){return e.type===zn.argument}function tc(e){return e.type===zn.number}function nc(e){return e.type===zn.date}function rc(e){return e.type===zn.time}function oc(e){return e.type===zn.select}function sc(e){return e.type===zn.plural}function sT(e){return e.type===zn.pound}function ic(e){return e.type===zn.tag}function Pf(e){return!!(e&&typeof e=="object"&&e.type===Rf.number)}function ac(e){return!!(e&&typeof e=="object"&&e.type===Rf.dateTime)}function Ly(e){e.forEach(function(t){if(delete t.location,oc(t)||sc(t))for(var n in t.options)delete t.options[n].location,Ly(t.options[n].value);else tc(t)&&Pf(t.style)||(nc(t)||rc(t))&&ac(t.style)?delete t.style.location:ic(t)&&Ly(t.children)})}function iT(e,t){t===void 0&&(t={}),t=En({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new kf(e,t).parse();if(n.err){var r=SyntaxError(Cf[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ly(n.val),n.val}var zs;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(zs||(zs={}));var lc=function(e){ec(t,e);function t(n,r,o){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=o,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Oy=function(e){ec(t,e);function t(n,r,o,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),zs.INVALID_VALUE,s)||this}return t}(lc);var aT=function(e){ec(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),zs.INVALID_VALUE,o)||this}return t}(lc);var lT=function(e){ec(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,'"'),zs.MISSING_VALUE,r)||this}return t}(lc);var Ot;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ot||(Ot={}));function l_(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ot.literal||n.type!==Ot.literal?t.push(n):r.value+=n.value,t},[])}function c_(e){return typeof e=="function"}function cc(e,t,n,r,o,s,i){if(e.length===1&&Ay(e[0]))return[{type:Ot.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(Ay(u)){a.push({type:Ot.literal,value:u.value});continue}if(sT(u)){typeof s=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(s)});continue}var d=u.value;if(!(o&&d in o))throw new lT(d,i);var f=o[d];if(Iy(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Ot.literal:Ot.object,value:f});continue}if(nc(u)){var p=typeof u.style=="string"?r.date[u.style]:ac(u.style)?u.style.parsedOptions:void 0;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(rc(u)){var p=typeof u.style=="string"?r.time[u.style]:ac(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(tc(u)){var p=typeof u.style=="string"?r.number[u.style]:Pf(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Ot.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(ic(u)){var v=u.children,g=u.value,x=o[g];if(!c_(x))throw new aT(g,"function",i);var y=cc(v,t,n,r,o,s),m=x(y.map(function(E){return E.value}));Array.isArray(m)||(m=[m]),a.push.apply(a,m.map(function(E){return{type:typeof E=="string"?Ot.literal:Ot.object,value:E}}))}if(oc(u)){var h=u.options[f]||u.options.other;if(!h)throw new Oy(u.value,f,Object.keys(u.options),i);a.push.apply(a,cc(h.value,t,n,r,o));continue}if(sc(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new lc(`Intl.PluralRules is not available in this environment.
|
|
14
14
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
-
`,zi.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Oy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o,f-(u.offset||0)));continue}}return a_(a)}function c_(e,t){return t?En(En(En({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=En(En({},e[r]),t[r]||{}),n},{})):e}function u_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=c_(e[r],t[r]),n},En({},e)):e}function Ny(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function d_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.number),strategy:Tf.variadic}),getDateTimeFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.dateTime),strategy:Tf.variadic}),getPluralRules:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.pluralRules),strategy:Tf.variadic})}}var My=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 d=u.reduce(function(f,p){return!f.length||p.type!==Ot.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return cc(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=nT(s,["formatters"]);this.ast=e.__parse(t,En(En({},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=u_(e.formats,r),this.formatters=o&&o.formatters||d_(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=sT,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 f_(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var p_="dummy",_y=(0,Af.createContext)(null);function ue(e){var r;let t=(0,Af.useContext)(_y);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=f_(n,o);return s?new My(s).format(i):(t!==p_&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var If=b(Q());var cT={root:"dd-tvkOF",content:"dd-eXA1D"};var Dy=b(R()),m_=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,If.useRef)(null),c=_("Dialog",cT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}i&&i(f)},d=f=>{f.target===l.current&&e&&r()};return(0,If.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,Dy.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":s,ref:l,onKeyDown:u,onMouseDown:d,children:(0,Dy.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},Lf=m_;var dT=b(Me());var uT={root:"dd-ranhW"};var fT=b(R()),g_=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let i=_("TextInput",uT);return(0,fT.jsx)("input",S({className:(0,dT.default)(e,i.root),type:"text",value:t},n))},uc=g_;var Fy={};kt(Fy,{enUS:()=>h_,nlNL:()=>y_});var h_={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"}]},y_={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 pT={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 tt=b(R());var v_=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},x_=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=ue(Fy),s=_("LoginTokenDialog",pT),a=j(u1),l=ve(),c=te("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,g]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(f1({email:u})),p(1)}),[n,u]),y=()=>{g(""),p(0)},m=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=v_(w.target.elements.token.value);if(!E){g(i("verifyCodeError",{login:h}));return}l(ql({token:E}))}),[n]),h=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&g(i("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(Lf,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:c}),overlayAriaLabel:i("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:s.root,children:[(0,tt.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:c})}),(0,tt.jsx)(uc,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:s.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:m,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,tt.jsx)(uc,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:s.errorMessage,children:v}),(0,tt.jsxs)("div",{className:s.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Of.default)(s.button),onClick:y,children:i("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},mT=x_;var hT=b(R()),w_=()=>{let e=j(d1),t=j(ca),n=te("adminUrl"),r=un(),o=()=>r.send(ua,!1),i=()=>{r.send(ua,!1),r.send(Zl)};return(0,hT.jsx)(mT,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},gT=w_;var CR=b(By()),Xt=b(Q());var dc="__summarizerAssistant__",wT={cues:[],threads:{},pending:[]},ST=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var fc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Nf=st("assistants/callToAction"),oo=ge("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let i=yield t.dispatch(nr(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(i.error)throw new Error(i.error.message);if(typeof i.payload!="string")throw ee.warn("Unexpected summary output",i),new Error("Unexpected summary output");return i.payload})),z_=1,Hi=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,g,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:i}=t.extra,s=t.getState(),{platformVariables:a}=s.info;n||(n=z_++,r&&r(n));let l=(p=fc(n)(s))!=null?p:[],c=yield i.getKnowledgeAssistant(e.assistantCode),u=(v=s.conversation.current)==null?void 0:v.externalId,d=(x=(g=s.info)==null?void 0:g.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield i.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=cn(f.answer,a)),{threadId:n,question:o,answer:f}})),Bi=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){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(nr(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:cn(l.response,s!=null?s:{}),sources:l.sources}}})),nr=ge("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:i={},expectFormat:s,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(i,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:s,input:i,transcript:d,externalConversationId:u,threadId:a});switch(s){case"text":return cn(f,c);case"json-schema:cues":return Array.isArray(f)?f.map(v=>P(S({},v),{name:cn(v.name,c),response:cn(v.response,c)})):[];case"json-schema:knowledge-assist":{let v=f;return P(S({},v),{answer:cn(v.response,c)})}default:return f}})),bT=ke({name:"assistants",initialState:wT,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]}},extraReducers:e=>{e.addCase(nr.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&ee.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(nr.rejected,(t,n)=>{var o;ee.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(nr.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let o=n.payload,i=o.map(a=>a.code),s=t.cues.filter(a=>!i.includes(a.code));t.cues=[...s,...o];break}}}).addCase(Bi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Hi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(oo.pending,t=>{let n={code:dc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==dc);t.cues=[...r,n]}).addCase(oo.rejected,t=>{let n=t.cues.filter(r=>r.code!==dc);t.cues=n}).addCase(oo.fulfilled,(t,n)=>{let r={code:dc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(i=>i.code!==dc);t.cues=[...o,r]}).addCase(at,()=>wT)}}),{removeCueByCode:ET,resetCues:sH,removeThreadById:da}=bT.actions,TT=bT.reducer;var H_={data:null,fetchState:"idle"},CT=e=>e.contentTypes.data,pc=ge("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),B_=ke({name:"contentTypes",initialState:H_,reducers:{},extraReducers:e=>{e.addCase(pc.pending,t=>{t.fetchState="loading"}).addCase(pc.rejected,t=>{t.fetchState="error"}).addCase(pc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),kT=B_.reducer;var U_={data:null,fetchState:"idle"},V_=[],Ui=e=>e.profile.data,$_=e=>e.profile.data?e.profile.data.uiConfig.widget.types:V_,gc=Dn([$_],e=>e.filter(t=>t.isActive)),RT=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.summarizerAssistantNew)!=null?n:null},PT=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},AT=e=>t=>gc(t).find(n=>n.type===e),IT=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,Mf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},_f=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistant)!=null?n:null},mc=ge("profile/getProfile",(e,t)=>I(void 0,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)})),j_=ke({name:"profile",initialState:U_,reducers:{},extraReducers:e=>{e.addCase(mc.pending,t=>{t.fetchState="loading"}).addCase(mc.rejected,t=>{t.fetchState="error"}).addCase(mc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),LT=j_.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 uo=b(Q());var OT=b(Q()),Df=b(Me());var Tn={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 io={};kt(io,{enUS:()=>W_,nlNL:()=>K_});var W_={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"}]},K_={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 Zo=b(R()),G_=({src:e,title:t})=>{let n=_("CommandPalette",Tn),[r,o]=(0,OT.useState)("loading"),i=ue(io);return(0,Zo.jsxs)("div",{className:n.image,children:[(0,Zo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Df.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:(0,Zo.jsx)(Eu,{})}),t&&(0,Zo.jsx)("span",{className:n.imageTitle,children:t})]})},NT=G_;var MT=b(Q()),_T=b(Me());var Vi=b(R());function Uy({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=ue(io),s=_("CommandPalette",Tn);return MT.default.Children.count(e)===0?null:(0,Vi.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Vi.jsxs)("div",{className:s.listHeader,children:[t&&(0,Vi.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Vi.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Vi.jsx)("div",{className:(0,_T.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Ac=b(Me());var Ff=b(Q());function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=1,$y=2,jy=4,lt=8,zf=16,yc=32,rr=64,Vy={a:{content:Re|lt,self:!1,type:Re|lt|yc|rr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Re|lt,void:!0},body:{content:Re|$y|jy|lt|zf|yc|rr},button:{content:lt,type:Re|lt|yc|rr},caption:{content:Re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Re|yc|rr},dd:{content:Re,parent:["dl"]},dl:{children:["dt","dd"],type:Re},dt:{content:Re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Re,void:!0},img:{void:!0},li:{content:Re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Re},picture:{children:["source","img"],type:Re|lt|zf},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:lt,parent:["ruby","rtc"]},rtc:{content:lt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:lt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Re},tbody:{parent:["table"],children:["tr"]},td:{content:Re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Re,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:Re},video:{children:["track","source"]},wbr:{type:Re|lt,void:!0}};function ji(e){return t=>{Vy[t]=S(S({},e),Vy[t])}}["address","main","div","figure","p","pre"].forEach(ji({content:Re,type:Re|rr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(ji({content:lt,type:Re|lt|rr}));["p","pre"].forEach(ji({content:lt,type:Re|rr}));["s","small","span","del","ins"].forEach(ji({content:lt,type:Re|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach(ji({content:Re,type:Re|$y|rr}));["h1","h2","h3","h4","h5","h6"].forEach(ji({content:lt,type:Re|jy|rr}));["audio","canvas","iframe","img","video"].forEach(ji({type:Re|lt|zf|rr}));var xc=Object.freeze(Vy),Wy=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ky=Object.keys(xc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,Gy=2,$i=3,Jo=4,Bf=5,Uf=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:$i,controls:Jo,datetime:Oe,default:Jo,disabled:Jo,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:Jo,media:Oe,muted:Jo,poster:Oe,rel:Oe,role:Oe,rowspan:$i,scope:Oe,sizes:Oe,span:$i,start:$i,style:Bf,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),qy=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Hf(){return Hf=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},Hf.apply(this,arguments)}function Vf({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ff.default.createElement(i,Hf({className:t},e)):Ff.default.createElement(i,Hf({className:t},e),n)}var vc=class{attribute(t,n){return n}node(t,n){return n}};function DT(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var so=class{constructor(t,n,r){hc(this,"greedy",!1),hc(this,"options",void 0),hc(this,"propName",void 0),hc(this,"inverseName",void 0),hc(this,"factory",void 0),this.options=S({},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?Ff.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return DT(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Wi=b(Q()),BT=b(zT());function ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X_=/(url|image|image-set)\(/i,Yy=class extends vc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(X_)&&delete n[r]}),n}},HT=1,Q_=3,Z_=/^<(!doctype|(html|head|body)(\s|>))/i,J_=/^(aria-|data-|\w+:)/iu,e2=/{{{(\w+)\/?}}}/;function t2(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var $f=class{constructor(t,n={},r=[],o=[]){var i;ao(this,"allowed",void 0),ao(this,"banned",void 0),ao(this,"blocked",void 0),ao(this,"container",void 0),ao(this,"content",[]),ao(this,"props",void 0),ao(this,"matchers",void 0),ao(this,"filters",void 0),ao(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Yy],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Ky),this.banned=new Set(Wy),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 d="";for(;i&&(a=l.match(i));){let f=a,{index:p,length:v,match:g,valid:x,void:y}=f,m=oe(f,["index","length","match","valid","void"]),h=l.propName+String(s);p>0&&(d+=i.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${g}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:g,matcher:l,props:P(S(S({},o),m),{key:this.keyIndex})}):d+=g,l.greedy?(i=d+i.slice(p+v),d=""):i=i.slice(p+(v||g.length))}l.greedy||(i=d+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
|
|
15
|
+
`,zs.MISSING_INTL_API,i);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Oy(u.value,f,Object.keys(u.options),i);a.push.apply(a,cc(h.value,t,n,r,o,f-(u.offset||0)));continue}}return l_(a)}function u_(e,t){return t?En(En(En({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=En(En({},e[r]),t[r]||{}),n},{})):e}function d_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=u_(e[r],t[r]),n},En({},e)):e}function Ny(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function f_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.number),strategy:Tf.variadic}),getDateTimeFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.dateTime),strategy:Tf.variadic}),getPluralRules:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.pluralRules),strategy:Tf.variadic})}}var My=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=s.formatToParts(c);if(u.length===1)return u[0].value;var d=u.reduce(function(f,p){return!f.length||p.type!==Ot.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return cc(s.ast,s.locales,s.formatters,s.formats,c,void 0,s.message)},this.resolvedOptions=function(){var c;return{locale:((c=s.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 i=o||{},a=i.formatters,l=nT(i,["formatters"]);this.ast=e.__parse(t,En(En({},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=d_(e.formats,r),this.formatters=o&&o.formatters||f_(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=iT,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 p_(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var m_="dummy",_y=(0,Af.createContext)(null);function ue(e){var r;let t=(0,Af.useContext)(_y);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,s)=>{let i=p_(n,o);return i?new My(i).format(s):(t!==m_&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var If=b(Q());var cT={root:"dd-tvkOF",content:"dd-eXA1D"};var Dy=b(R()),g_=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:s,overlayAriaLabel:i,contentAriaLabel:a})=>{let l=(0,If.useRef)(null),c=_("Dialog",cT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}s&&s(f)},d=f=>{f.target===l.current&&e&&r()};return(0,If.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,Dy.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":i,ref:l,onKeyDown:u,onMouseDown:d,children:(0,Dy.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},Lf=g_;var dT=b(Me());var uT={root:"dd-ranhW"};var fT=b(R()),h_=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let s=_("TextInput",uT);return(0,fT.jsx)("input",S({className:(0,dT.default)(e,s.root),type:"text",value:t},n))},uc=h_;var Fy={};kt(Fy,{enUS:()=>y_,nlNL:()=>v_});var y_={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"}]},v_={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 pT={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 tt=b(R());var x_=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},w_=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let s=ue(Fy),i=_("LoginTokenDialog",pT),a=j(u1),l=ve(),c=te("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,g]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(f1({email:u})),p(1)}),[n,u]),y=()=>{g(""),p(0)},m=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=x_(w.target.elements.token.value);if(!E){g(s("verifyCodeError",{login:h}));return}l(ql({token:E}))}),[n]),h=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:i.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&g(s("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(Lf,{autoFocus:!0,isOpen:t,contentAriaLabel:s("promptTitle",{productName:c}),overlayAriaLabel:s("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:i.root,children:[(0,tt.jsx)("h1",{className:i.title,children:s("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("requestCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("requestCodeBody",{productName:c})}),(0,tt.jsx)(uc,{className:i.input,name:"email",placeholder:s("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:i.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(i.button,i.primaryButton),children:s("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:m,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("verifyCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("verifyCodeBody")}),(0,tt.jsx)(uc,{className:i.input,name:"token",placeholder:s("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:i.errorMessage,children:v}),(0,tt.jsxs)("div",{className:i.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Of.default)(i.button),onClick:y,children:s("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(i.button,i.primaryButton),disabled:["loading","done"].includes(a),children:s("verifyCodeSubmitLabel")})]})]})]})})},mT=w_;var hT=b(R()),S_=()=>{let e=j(d1),t=j(ca),n=te("adminUrl"),r=un(),o=()=>r.send(ua,!1),s=()=>{r.send(ua,!1),r.send(Zl)};return(0,hT.jsx)(mT,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:s})},gT=S_;var CR=b(By()),Xt=b(Q());var dc="__summarizerAssistant__",wT={cues:[],threads:{},pending:[]},ST=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var fc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Nf=it("assistants/callToAction"),oo=ge("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let s=yield t.dispatch(nr(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(s.error)throw new Error(s.error.message);if(typeof s.payload!="string")throw Z.warn("Unexpected summary output",s),new Error("Unexpected summary output");return s.payload})),H_=1,Hs=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,g,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:s}=t.extra,i=t.getState(),{platformVariables:a}=i.info;n||(n=H_++,r&&r(n));let l=(p=fc(n)(i))!=null?p:[],c=yield s.getKnowledgeAssistant(e.assistantCode),u=(v=i.conversation.current)==null?void 0:v.externalId,d=(x=(g=i.info)==null?void 0:g.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield s.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=cn(f.answer,a)),{threadId:n,question:o,answer:f}})),Bs=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,s=t.getState(),{platformVariables:i}=s.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(nr(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:cn(l.response,i!=null?i:{}),sources:l.sources}}})),nr=ge("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:s={},expectFormat:i,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(s,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:i,input:s,transcript:d,externalConversationId:u,threadId:a});switch(i){case"text":return cn(f,c);case"json-schema:cues":return Array.isArray(f)?f.map(v=>P(S({},v),{name:cn(v.name,c),response:cn(v.response,c)})):[];case"json-schema:knowledge-assist":{let v=f;return P(S({},v),{answer:cn(v.response,c)})}default:return f}})),bT=ke({name:"assistants",initialState:wT,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]}},extraReducers:e=>{e.addCase(nr.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&Z.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(nr.rejected,(t,n)=>{var o;Z.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(nr.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let o=n.payload,s=o.map(a=>a.code),i=t.cues.filter(a=>!s.includes(a.code));t.cues=[...i,...o];break}}}).addCase(Bs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Hs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(oo.pending,t=>{let n={code:dc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==dc);t.cues=[...r,n]}).addCase(oo.rejected,t=>{let n=t.cues.filter(r=>r.code!==dc);t.cues=n}).addCase(oo.fulfilled,(t,n)=>{let r={code:dc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(s=>s.code!==dc);t.cues=[...o,r]}).addCase(at,()=>wT)}}),{removeCueByCode:ET,resetCues:cH,removeThreadById:da}=bT.actions,TT=bT.reducer;var B_={data:null,fetchState:"idle"},CT=e=>e.contentTypes.data,pc=ge("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),U_=ke({name:"contentTypes",initialState:B_,reducers:{},extraReducers:e=>{e.addCase(pc.pending,t=>{t.fetchState="loading"}).addCase(pc.rejected,t=>{t.fetchState="error"}).addCase(pc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),kT=U_.reducer;var V_={data:null,fetchState:"idle"},$_=[],Us=e=>e.profile.data,j_=e=>e.profile.data?e.profile.data.uiConfig.widget.types:$_,gc=Dn([j_],e=>e.filter(t=>t.isActive)),RT=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.summarizerAssistantNew)!=null?n:null},PT=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},AT=e=>t=>gc(t).find(n=>n.type===e),IT=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,Mf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},_f=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistant)!=null?n:null},mc=ge("profile/getProfile",(e,t)=>I(void 0,null,function*(){var s;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((s=r.profile.data)==null?void 0:s.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),W_=ke({name:"profile",initialState:V_,reducers:{},extraReducers:e=>{e.addCase(mc.pending,t=>{t.fetchState="loading"}).addCase(mc.rejected,t=>{t.fetchState="error"}).addCase(mc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),LT=W_.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 uo=b(Q());var OT=b(Q()),Df=b(Me());var Tn={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 so={};kt(so,{enUS:()=>K_,nlNL:()=>G_});var K_={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"}]},G_={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 Zo=b(R()),q_=({src:e,title:t})=>{let n=_("CommandPalette",Tn),[r,o]=(0,OT.useState)("loading"),s=ue(so);return(0,Zo.jsxs)("div",{className:n.image,children:[(0,Zo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Df.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:s("loading")}),r==="error"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:(0,Zo.jsx)(Eu,{})}),t&&(0,Zo.jsx)("span",{className:n.imageTitle,children:t})]})},NT=q_;var MT=b(Q()),_T=b(Me());var Vs=b(R());function Uy({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let s=ue(so),i=_("CommandPalette",Tn);return MT.default.Children.count(e)===0?null:(0,Vs.jsxs)("div",{"data-testid":"commandpalette-list",className:i.list,children:[(t||r)&&(0,Vs.jsxs)("div",{className:i.listHeader,children:[t&&(0,Vs.jsx)("h4",{className:i.listHeading,children:t}),r&&o&&(0,Vs.jsx)("button",{onClick:o,className:i.listMoreButton,type:"button",children:s("showAll")})]}),(0,Vs.jsx)("div",{className:(0,_T.default)(i.listWrapper,n==="horizontal"&&i.listHorizontal),children:e})]})}var Ac=b(Me());var Ff=b(Q());function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=1,$y=2,jy=4,lt=8,zf=16,yc=32,rr=64,Vy={a:{content:Re|lt,self:!1,type:Re|lt|yc|rr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Re|lt,void:!0},body:{content:Re|$y|jy|lt|zf|yc|rr},button:{content:lt,type:Re|lt|yc|rr},caption:{content:Re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Re|yc|rr},dd:{content:Re,parent:["dl"]},dl:{children:["dt","dd"],type:Re},dt:{content:Re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Re,void:!0},img:{void:!0},li:{content:Re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Re},picture:{children:["source","img"],type:Re|lt|zf},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:lt,parent:["ruby","rtc"]},rtc:{content:lt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:lt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Re},tbody:{parent:["table"],children:["tr"]},td:{content:Re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Re,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:Re},video:{children:["track","source"]},wbr:{type:Re|lt,void:!0}};function js(e){return t=>{Vy[t]=S(S({},e),Vy[t])}}["address","main","div","figure","p","pre"].forEach(js({content:Re,type:Re|rr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(js({content:lt,type:Re|lt|rr}));["p","pre"].forEach(js({content:lt,type:Re|rr}));["s","small","span","del","ins"].forEach(js({content:lt,type:Re|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach(js({content:Re,type:Re|$y|rr}));["h1","h2","h3","h4","h5","h6"].forEach(js({content:lt,type:Re|jy|rr}));["audio","canvas","iframe","img","video"].forEach(js({type:Re|lt|zf|rr}));var xc=Object.freeze(Vy),Wy=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ky=Object.keys(xc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,Gy=2,$s=3,Jo=4,Bf=5,Uf=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:$s,controls:Jo,datetime:Oe,default:Jo,disabled:Jo,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:Jo,media:Oe,muted:Jo,poster:Oe,rel:Oe,role:Oe,rowspan:$s,scope:Oe,sizes:Oe,span:$s,start:$s,style:Bf,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),qy=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Hf(){return Hf=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},Hf.apply(this,arguments)}function Vf({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let s=o;return r?Ff.default.createElement(s,Hf({className:t},e)):Ff.default.createElement(s,Hf({className:t},e),n)}var vc=class{attribute(t,n){return n}node(t,n){return n}};function DT(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var io=class{constructor(t,n,r){hc(this,"greedy",!1),hc(this,"options",void 0),hc(this,"propName",void 0),hc(this,"inverseName",void 0),hc(this,"factory",void 0),this.options=S({},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?Ff.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return DT(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Ws=b(Q()),BT=b(zT());function ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q_=/(url|image|image-set)\(/i,Yy=class extends vc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Q_)&&delete n[r]}),n}},HT=1,Z_=3,J_=/^<(!doctype|(html|head|body)(\s|>))/i,e2=/^(aria-|data-|\w+:)/iu,t2=/{{{(\w+)\/?}}}/;function n2(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var $f=class{constructor(t,n={},r=[],o=[]){var s;ao(this,"allowed",void 0),ao(this,"banned",void 0),ao(this,"blocked",void 0),ao(this,"container",void 0),ao(this,"content",[]),ao(this,"props",void 0),ao(this,"matchers",void 0),ao(this,"filters",void 0),ao(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Yy],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((s=n.allowList)!==null&&s!==void 0?s:Ky),this.banned=new Set(Wy),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,s=t,i=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 d="";for(;s&&(a=l.match(s));){let f=a,{index:p,length:v,match:g,valid:x,void:y}=f,m=oe(f,["index","length","match","valid","void"]),h=l.propName+String(i);p>0&&(d+=s.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${g}{{{/${h}}}}`,this.keyIndex+=1,i+=1,r[h]={children:g,matcher:l,props:P(S(S({},o),m),{key:this.keyIndex})}):d+=g,l.greedy?(s=d+s.slice(p+v),d=""):s=s.slice(p+(v||g.length))}l.greedy||(s=d+s)}),i===0?t:this.replaceTokens(s,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
|
|
16
16
|
`);return o=o.replace(/\n{3,}/g,`
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||t2)();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(Z_)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,BT.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==HT||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),c=Uf[l]||Uf[s];if(!this.isSafe(t)||!l.match(J_)&&(!n&&(!c||c===Gy)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===Jo?u=!0:c===$i?u=Number.parseFloat(String(u)):c!==Bf&&(u=String(u)),r[qy[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 xc[t]?P(S(S({},n),xc[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===HT){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let g;if(s&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;g=this.parseNode(v,p);let y=s(v,g,p);if(y===null)return;if(typeof y!="undefined"){l.push(Wi.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(i||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(Wi.default.createElement(Vf,P(S({},y),{key:this.keyIndex}),(d=g)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===Q_){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(e2);){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:d,props:f}=n[a],p;if(c)p=s.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(s.length,v.index),n),f))}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 n2(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",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new $f(i!=null?i:"",e).parse();p.length>0&&(f=p)}return f||(f=s),d?Wi.default.createElement(Wi.default.Fragment,null,f):Wi.default.createElement(Vf,{attributes:n,className:r,tagName:u},f)}function Ki(e){let E=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:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=i?[]:l,g=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(C=>{C.onBeforeParse&&x.push(C.onBeforeParse.bind(C)),C.onAfterParse&&y.push(C.onAfterParse.bind(C))});let m=x.reduce((C,k)=>k(C,e),r!=null?r:""),h=new $f(m,p,v,g),w=y.reduce((C,k)=>k(C,e),h.parse());return Wi.default.createElement(n2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var Ic=b(Q());var r2=/[.*+?^${}()|[\]\\]/g,o2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function i2(e){return e.replace(r2,"\\$&")}function s2(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function a2(e){return e.search(o2)}function UT(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${i2(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function VT(e){return e.replace(Pu,'<mark data-type="placeholder">$1</mark>')}function fa(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function l2(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 Xy(e,t,n={}){if(t){let r=s2(t.toLowerCase(),e.toLowerCase()),o=fa(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=a2(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let s=t.split(Ux).length>3||t.length>30?l2(t.trim(),r):0;return`${`${s>0?"\u2026":""}${fa(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var c2=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function jf(e){return c2.test(e)}function $T(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var Wf=b(Q()),KT=b(R()),jT=Wf.default.createContext(void 0);function ei(){let e=Wf.default.useContext(jT);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var WT=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Wf.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,KT.jsx)(jT.Provider,{value:s,children:e})};var Lr=b(Q());var L=b(Q(),1),Ta=b(Q(),1);function Gf(){return typeof window!="undefined"}function Ir(e){return GT(e)?(e.nodeName||"").toLowerCase():"#document"}function jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(GT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GT(e){return Gf()?e instanceof Node||e instanceof jt(e).Node:!1}function Ne(e){return Gf()?e instanceof Element||e instanceof jt(e).Element:!1}function Xe(e){return Gf()?e instanceof HTMLElement||e instanceof jt(e).HTMLElement:!1}function Kf(e){return!Gf()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof jt(e).ShadowRoot}function pa(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function qT(e){return["table","td","th"].includes(Ir(e))}function wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function qf(e){let t=ma(),n=Ne(e)?dn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YT(e){let t=or(e);for(;Xe(t)&&!sr(t);){if(qf(t))return t;if(wc(t))return null;t=or(t)}return null}function ma(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(Ir(e))}function dn(e){return jt(e).getComputedStyle(e)}function Sc(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function or(e){if(Ir(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Kf(e)&&e.host||ir(e);return Kf(t)?t.host:t}function XT(e){let t=or(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&pa(t)?t:XT(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=XT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=jt(o);if(i){let a=Yf(s);return t.concat(s,s.visualViewport||[],pa(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Yf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ti(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 gt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Kf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function QT(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zy(){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 ZT(e){return e.mozInputSource===0&&e.isTrusted?!0:Qy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JT(e){return u2()?!1:!Qy()&&e.width===0&&e.height===0||Qy()&&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 eC(){return/apple/i.test(navigator.vendor)}function Qy(){let e=/android/i;return e.test(QT())||e.test(Zy())}function u2(){return Zy().includes("jsdom/")}function ga(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tC(e){return"nativeEvent"in e}function nC(e){return e.matches("html,body")}function ht(e){return(e==null?void 0:e.ownerDocument)||document}function Xf(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 lo(e){return"composedPath"in e?e.composedPath()[0]:e.target}var d2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jy(e){return Xe(e)&&e.matches(d2)}function Qf(e){e.preventDefault(),e.stopPropagation()}function ev(e){return e?e.getAttribute("role")==="combobox"&&Jy(e):!1}var ha=Math.min,co=Math.max,Ec=Math.round,Tc=Math.floor,ar=e=>({x:e,y:e}),f2={left:"right",right:"left",bottom:"top",top:"bottom"},p2={start:"end",end:"start"};function tv(e,t,n){return co(e,ha(t,n))}function Cc(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function nv(e){return e==="x"?"y":"x"}function rv(e){return e==="y"?"height":"width"}function Gi(e){return["top","bottom"].includes(ni(e))?"y":"x"}function ov(e){return nv(Gi(e))}function rC(e,t,n){n===void 0&&(n=!1);let r=kc(e),o=ov(e),i=rv(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=bc(s)),[s,bc(s)]}function oC(e){let t=bc(e);return[Zf(e),t,Zf(t)]}function Zf(e){return e.replace(/start|end/g,t=>p2[t])}function m2(e,t,n){let r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function iC(e,t,n,r){let o=kc(e),i=m2(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Zf)))),i}function bc(e){return e.replace(/left|right|bottom|top/g,t=>f2[t])}function g2(e){return S({top:0,right:0,bottom:0,left:0},e)}function sC(e){return typeof e!="number"?g2(e):{top:e,right:e,bottom:e,left:e}}function qi(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 pn=b(R(),1);var h2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Jf=h2.join(","),lC=typeof Element=="undefined",ya=lC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ep=!lC&&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},tp=function e(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&&e(t.parentNode);return s},y2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},v2=function(t,n,r){if(tp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Jf));return n&&ya.call(t,Jf)&&o.unshift(t),o=o.filter(r),o},x2=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!tp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=ya.call(s,Jf);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!tp(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=e(d===!0?s.children:d.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},cC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},uC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||y2(t))&&!cC(t)?0:t.tabIndex},w2=function(t,n){var r=uC(t);return r<0&&n&&!cC(t)?0:r},S2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dC=function(t){return t.tagName==="INPUT"},b2=function(t){return dC(t)&&t.type==="hidden"},E2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},T2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},C2=function(t){if(!t.name)return!0;var n=t.form||ep(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=T2(o,t.form);return!i||i===t},k2=function(t){return dC(t)&&t.type==="radio"},R2=function(t){return k2(t)&&!C2(t)},P2=function(t){var n,r=t&&ep(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,d;r=ep(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},aC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},A2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ya.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(ya.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ep(t);if(l&&!l.shadowRoot&&o(l)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(P2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},I2=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 ya.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},L2=function(t,n){return!(n.disabled||tp(n)||b2(n)||A2(n,t)||E2(n)||I2(n))},iv=function(t,n){return!(R2(n)||uC(n)<0||!L2(t,n))},O2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},N2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=w2(a,s),c=s?e(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(S2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=x2([t],n.includeContainer,{filter:iv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:O2}):r=v2(t,n.includeContainer,iv.bind(null,n)),N2(r)};var fC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ya.call(t,Jf)===!1?!1:iv(n,t)};var wv=b(Ul(),1);function pC(e,t,n){let{reference:r,floating:o}=e,i=Gi(t),s=ov(t),a=rv(s),l=ni(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=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:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kc(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}var mC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield s.isRTL==null?void 0:s.isRTL(t),c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=pC(c,r,l),f=r,p={},v=0;for(let g=0;g<a.length;g++){let{name:x,fn:y}=a[g],{x:m,y:h,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=m!=null?m:u,d=h!=null?h:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=pC(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function sv(e,t){return I(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:d="floating",altBoundary:f=!1,padding:p=0}=Cc(t,e),v=sC(p),x=a[f?d==="floating"?"reference":"floating":d],y=qi(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(x))==null||n?x:x.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,h=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),w=(yield i.isElement==null?void 0:i.isElement(h))?(yield i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},E=qi(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:h,strategy:l}):m);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var gC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,F=Cc(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0}=F,y=oe(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let m=ni(i),h=Gi(l),w=ni(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(w||!x?[bc(l)]:oC(l)),k=g!=="none";!p&&k&&C.push(...iC(l,x,g,E));let A=[l,...C],B=yield sv(n,y),M=[],N=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&M.push(B[m]),f){let ie=rC(i,a,E);M.push(B[ie[0]],B[ie[1]])}if(N=[...N,{placement:i,overflows:M}],!M.every(ie=>ie<=0)){var Z,Y;let ie=(((Z=s.flip)==null?void 0:Z.index)||0)+1,G=A[ie];if(G)return{data:{index:ie,overflows:N},reset:{placement:G}};let V=(Y=N.filter(U=>U.overflows[0]<=0).sort((U,K)=>U.overflows[1]-K.overflows[1])[0])==null?void 0:Y.placement;if(!V)switch(v){case"bestFit":{var O;let U=(O=N.filter(K=>{if(k){let $=Gi(K.placement);return $===h||$==="y"}return!0}).map(K=>[K.placement,K.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((K,$)=>K[1]-$[1])[0])==null?void 0:O[0];U&&(V=U);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}})}}};function M2(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=ni(n),a=kc(n),l=Gi(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Cc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var hC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,c=yield M2(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:P(S({},c),{placement:a})}})}}},yC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:i}=n,y=Cc(e,n),{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:m=>{let{x:h,y:w}=m;return{x:h,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield sv(n,c),f=Gi(ni(i)),p=nv(f),v=u[p],g=u[f];if(s){let m=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[m],E=v-d[h];v=tv(w,v,E)}if(a){let m=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=g+d[m],E=g-d[h];g=tv(w,g,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:g}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:s,[f]:a}}})})}}};function wC(e){let t=dn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ec(n)!==i||Ec(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function lv(e){return Ne(e)?e:e.contextElement}function va(e){let t=lv(e);if(!Xe(t))return ar(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wC(t),s=(i?Ec(n.width):n.width)/r,a=(i?Ec(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var _2=ar(0);function SC(e){let t=jt(e);return!ma()||!t.visualViewport?_2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function D2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jt(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=lv(e),s=ar(1);t&&(r?Ne(r)&&(s=va(r)):s=va(e));let a=D2(i,n,r)?SC(i):ar(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){let f=jt(i),p=r&&Ne(r)?jt(r):r,v=f,g=Yf(v);for(;g&&r&&p!==v;){let x=va(g),y=g.getBoundingClientRect(),m=dn(g),h=y.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,w=y.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=h,c+=w,v=jt(g),g=Yf(v)}}return qi({width:u,height:d,x:l,y:c})}function cv(e,t){let n=Sc(e).scrollLeft;return t?t.left+n:Yi(ir(e)).left+n}function bC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:cv(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function F2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=ir(r),a=t?wc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1),u=ar(0),d=Xe(r);if((d||!d&&!i)&&((Ir(r)!=="body"||pa(s))&&(l=Sc(r)),Xe(r))){let p=Yi(r);c=va(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=s&&!d&&!i?bC(s,l,!0):ar(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function z2(e){return Array.from(e.getClientRects())}function H2(e){let t=ir(e),n=Sc(e),r=e.ownerDocument.body,o=co(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=co(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+cv(e),a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=co(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function B2(e,t){let n=jt(e),r=ir(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=ma();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function U2(e,t){let n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xe(e)?va(e):ar(1),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 vC(e,t,n){let r;if(t==="viewport")r=B2(e,n);else if(t==="document")r=H2(ir(e));else if(Ne(t))r=U2(t,n);else{let o=SC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qi(r)}function EC(e,t){let n=or(e);return n===t||!Ne(n)||sr(n)?!1:dn(n).position==="fixed"||EC(n,t)}function V2(e,t){let n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Ne(a)&&Ir(a)!=="body"),o=null,i=dn(e).position==="fixed",s=i?or(e):e;for(;Ne(s)&&!sr(s);){let a=dn(s),l=qf(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||pa(s)&&!l&&EC(e,s))?r=r.filter(u=>u!==s):o=a,s=or(s)}return t.set(e,r),r}function $2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?wc(t)?[]:V2(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{let d=vC(t,u,o);return c.top=co(d.top,c.top),c.right=ha(d.right,c.right),c.bottom=ha(d.bottom,c.bottom),c.left=co(d.left,c.left),c},vC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function j2(e){let{width:t,height:n}=wC(e);return{width:t,height:n}}function W2(e,t,n){let r=Xe(t),o=ir(t),i=n==="fixed",s=Yi(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=ar(0);if(r||!r&&!i)if((Ir(t)!=="body"||pa(o))&&(a=Sc(t)),r){let f=Yi(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=cv(o));let c=o&&!r&&!i?bC(o,a):ar(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function av(e){return dn(e).position==="static"}function xC(e,t){if(!Xe(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ir(e)===n&&(n=n.ownerDocument.body),n}function TC(e,t){let n=jt(e);if(wc(e))return n;if(!Xe(e)){let o=or(e);for(;o&&!sr(o);){if(Ne(o)&&!av(o))return o;o=or(o)}return n}let r=xC(e,t);for(;r&&qT(r)&&av(r);)r=xC(r,t);return r&&sr(r)&&av(r)&&!qf(r)?n:r||YT(e)||n}var K2=function(e){return I(this,null,function*(){let t=this.getOffsetParent||TC,n=this.getDimensions,r=yield n(e.floating);return{reference:W2(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G2(e){return dn(e).direction==="rtl"}var uv={convertOffsetParentRelativeRectToViewportRelativeRect:F2,getDocumentElement:ir,getClippingRect:$2,getOffsetParent:TC,getElementRects:K2,getClientRects:z2,getDimensions:j2,getScale:va,isElement:Ne,isRTL:G2};function CC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q2(e,t){let n=null,r,o=ir(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Tc(d),g=Tc(o.clientWidth-(u+f)),x=Tc(o.clientHeight-(d+p)),y=Tc(u),h={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:co(0,ha(1,l))||1},w=!0;function E(C){let k=C[0].intersectionRatio;if(k!==l){if(!w)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!CC(c,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(C){n=new IntersectionObserver(E,h)}n.observe(e)}return s(!0),i}function np(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=lv(e),u=o||i?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let d=c&&a?q2(c,n):null,f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?Yi(e):null;l&&x();function x(){let y=Yi(e);g&&!CC(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var kC=hC;var RC=yC,PC=gC;var rp=(e,t,n)=>{let r=new Map,o=S({platform:uv},n),i=P(S({},o.platform),{_c:r});return mC(e,t,P(S({},o),{platform:i}))};var nt=b(Q(),1),sp=b(Q(),1),LC=b(Ul(),1);var op=typeof document!="undefined"?sp.useLayoutEffect:sp.useEffect;function ip(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(!ip(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)&&!ip(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function OC(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AC(e,t){let n=OC(e);return Math.round(t*n)/n}function dv(e){let t=nt.useRef(e);return op(()=>{t.current=e}),t}function NC(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,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);ip(f,r)||p(r);let[v,g]=nt.useState(null),[x,y]=nt.useState(null),m=nt.useCallback(V=>{V!==C.current&&(C.current=V,g(V))},[]),h=nt.useCallback(V=>{V!==k.current&&(k.current=V,y(V))},[]),w=i||v,E=s||x,C=nt.useRef(null),k=nt.useRef(null),A=nt.useRef(u),B=l!=null,M=dv(l),N=dv(o),Z=dv(c),Y=nt.useCallback(()=>{if(!C.current||!k.current)return;let V={placement:t,strategy:n,middleware:f};N.current&&(V.platform=N.current),rp(C.current,k.current,V).then(U=>{let K=P(S({},U),{isPositioned:Z.current!==!1});O.current&&!ip(A.current,K)&&(A.current=K,LC.flushSync(()=>{d(K)}))})},[f,t,n,N,Z]);op(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>P(S({},V),{isPositioned:!1})))},[c]);let O=nt.useRef(!1);op(()=>(O.current=!0,()=>{O.current=!1}),[]),op(()=>{if(w&&(C.current=w),E&&(k.current=E),w&&E){if(M.current)return M.current(w,E,Y);Y()}},[w,E,Y,M,B]);let F=nt.useMemo(()=>({reference:C,floating:k,setReference:m,setFloating:h}),[m,h]),ie=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),G=nt.useMemo(()=>{let V={position:n,left:0,top:0};if(!ie.floating)return V;let U=AC(ie.floating,u.x),K=AC(ie.floating,u.y);return a?S(P(S({},V),{transform:"translate("+U+"px, "+K+"px)"}),OC(ie.floating)>=1.5&&{willChange:"transform"}):{position:n,left:U,top:K}},[n,a,ie.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:Y,refs:F,elements:ie,floatingStyles:G}),[u,Y,F,ie,G])}var ap=(e,t)=>P(S({},kC(e)),{options:[e,t]}),fv=(e,t)=>P(S({},RC(e)),{options:[e,t]});var pv=(e,t)=>P(S({},PC(e)),{options:[e,t]});function Sv(e){let t=L.useRef(void 0),n=L.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 L.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var YC=S({},L),Y2=YC.useInsertionEffect,X2=Y2||(e=>e());function kn(e){let t=L.useRef(()=>{});return X2(()=>{t.current=e}),L.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 Q2="ArrowUp",Z2="ArrowDown",J2="ArrowLeft",eD="ArrowRight";var fn=typeof document!="undefined"?Ta.useLayoutEffect:Ta.useEffect;var tD=[J2,eD],nD=[Q2,Z2],D7=[...tD,...nD];var MC=!1,rD=0,_C=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+rD++;function oD(){let[e,t]=L.useState(()=>MC?_C():void 0);return fn(()=>{e==null&&t(_C())},[]),L.useEffect(()=>{MC=!0},[]),e}var iD=YC.useId,bv=iD||oD;function sD(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var aD=L.createContext(null),lD=L.createContext(null),Ev=()=>{var e;return((e=L.useContext(aD))==null?void 0:e.id)||null},dp=()=>L.useContext(lD);function Ea(e){return"data-floating-ui-"+e}function lr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Sa(e){let t=(0,Ta.useRef)(e);return fn(()=>{t.current=e}),t}var DC=Ea("safe-polygon");function mv(e,t,n){return n&&!ga(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function XC(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:d=0,move:f=!0}=t,p=dp(),v=Ev(),g=Sa(c),x=Sa(l),y=Sa(n),m=L.useRef(),h=L.useRef(-1),w=L.useRef(),E=L.useRef(-1),C=L.useRef(!0),k=L.useRef(!1),A=L.useRef(()=>{}),B=L.useRef(!1),M=L.useCallback(()=>{var G;let V=(G=o.current.openEvent)==null?void 0:G.type;return(V==null?void 0:V.includes("mouse"))&&V!=="mousedown"},[o]);L.useEffect(()=>{if(!a)return;function G(V){let{open:U}=V;U||(lr(h),lr(E),C.current=!0,B.current=!1)}return i.on("openchange",G),()=>{i.off("openchange",G)}},[a,i]),L.useEffect(()=>{if(!a||!g.current||!n)return;function G(U){M()&&r(!1,U,"hover")}let V=ht(s.floating).documentElement;return V.addEventListener("mouseleave",G),()=>{V.removeEventListener("mouseleave",G)}},[s.floating,n,r,a,g,M]);let N=L.useCallback(function(G,V,U){V===void 0&&(V=!0),U===void 0&&(U="hover");let K=mv(x.current,"close",m.current);K&&!w.current?(lr(h),h.current=window.setTimeout(()=>r(!1,G,U),K)):V&&(lr(h),r(!1,G,U))},[x,r]),Z=kn(()=>{A.current(),w.current=void 0}),Y=kn(()=>{if(k.current){let G=ht(s.floating).body;G.style.pointerEvents="",G.removeAttribute(DC),k.current=!1}}),O=kn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);L.useEffect(()=>{if(!a)return;function G($){if(lr(h),C.current=!1,u&&!ga(m.current)||d>0&&!mv(x.current,"open"))return;let W=mv(x.current,"open",m.current);W?h.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},W):n||r(!0,$,"hover")}function V($){if(O())return;A.current();let W=ht(s.floating);if(lr(E),B.current=!1,g.current&&o.current.floatingContext){n||lr(h),w.current=g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),Z(),O()||N($,!0,"safe-polygon")}}));let fe=w.current;W.addEventListener("mousemove",fe),A.current=()=>{W.removeEventListener("mousemove",fe)};return}(m.current==="touch"?!gt(s.floating,$.relatedTarget):!0)&&N($)}function U($){O()||o.current.floatingContext&&(g.current==null||g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),Z(),O()||N($)}}))($))}if(Ne(s.domReference)){var K;let $=s.domReference;return n&&$.addEventListener("mouseleave",U),(K=s.floating)==null||K.addEventListener("mouseleave",U),f&&$.addEventListener("mousemove",G,{once:!0}),$.addEventListener("mouseenter",G),$.addEventListener("mouseleave",V),()=>{var W;n&&$.removeEventListener("mouseleave",U),(W=s.floating)==null||W.removeEventListener("mouseleave",U),f&&$.removeEventListener("mousemove",G),$.removeEventListener("mouseenter",G),$.removeEventListener("mouseleave",V)}}},[s,a,e,u,d,f,N,Z,Y,r,n,y,p,x,g,o,O]),fn(()=>{var G;if(a&&n&&(G=g.current)!=null&&G.__options.blockPointerEvents&&M()){k.current=!0;let U=s.floating;if(Ne(s.domReference)&&U){var V;let K=ht(s.floating).body;K.setAttribute(DC,"");let $=s.domReference,W=p==null||(V=p.nodesRef.current.find(z=>z.id===v))==null||(V=V.context)==null?void 0:V.elements.floating;return W&&(W.style.pointerEvents=""),K.style.pointerEvents="none",$.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{K.style.pointerEvents="",$.style.pointerEvents="",U.style.pointerEvents=""}}}},[a,n,v,s,p,g,M]),fn(()=>{n||(m.current=void 0,B.current=!1,Z(),Y())},[n,Z,Y]),L.useEffect(()=>()=>{Z(),lr(h),lr(E),Y()},[a,s.domReference,Z,Y]);let F=L.useMemo(()=>{function G(V){m.current=V.pointerType}return{onPointerDown:G,onPointerEnter:G,onMouseMove(V){let{nativeEvent:U}=V;function K(){!C.current&&!y.current&&r(!0,U,"hover")}u&&!ga(m.current)||n||d===0||B.current&&bm(V.movementX,2)+bm(V.movementY,2)<2||(lr(E),m.current==="touch"?K():(B.current=!0,E.current=window.setTimeout(K,d)))}}},[u,r,n,y,d]),ie=L.useMemo(()=>({onMouseEnter(){lr(h)},onMouseLeave(G){O()||N(G.nativeEvent,!1)}}),[N,O]);return L.useMemo(()=>a?{reference:F,floating:ie}:{},[a,F,ie])}var FC=0;function xa(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(FC);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():FC=requestAnimationFrame(i)}function zC(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 ba(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var wa=new WeakMap,lp=new WeakSet,cp={},gv=0,cD=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,QC=e=>e&&(e.host||QC(e.parentNode)),uD=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=QC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function dD(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=uD(t,e),a=new Set,l=new Set(s),c=[];cp[o]||(cp[o]=new WeakMap);let u=cp[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Ir(v)!=="script")if(a.has(v))f(v);else{let g=i?v.getAttribute(i):null,x=g!==null&&g!=="false",y=wa.get(v)||0,m=i?y+1:y,h=(u.get(v)||0)+1;wa.set(v,m),u.set(v,h),c.push(v),m===1&&x&&lp.add(v),h===1&&v.setAttribute(o,""),!x&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return gv++,()=>{c.forEach(p=>{let v=wa.get(p)||0,g=i?v-1:v,x=(u.get(p)||0)-1;wa.set(p,g),u.set(p,x),g||(!lp.has(p)&&i&&p.removeAttribute(i),lp.delete(p)),x||p.removeAttribute(o)}),gv--,gv||(wa=new WeakMap,wa=new WeakMap,lp=new WeakSet,cp={})}}function HC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=ht(e[0]).body;return dD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var fp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZC(e,t){let n=Rc(e,fp());t==="prev"&&n.reverse();let r=n.indexOf(ti(ht(e)));return n.slice(r+1)[0]}function JC(e){return ZC(ht(e).body,"next")||e}function ek(e){return ZC(ht(e).body,"prev")||e}function Pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function fD(e){Rc(e,fp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function BC(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 pp={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},up=L.forwardRef(function(t,n){let[r,o]=L.useState();fn(()=>{eC()&&o("button")},[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ea("focus-guard")]:"",style:pp};return(0,pn.jsx)("span",S(S({},t),i))}),tk=L.createContext(null),UC=Ea("portal");function pD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=bv(),o=rk(),[i,s]=L.useState(null),a=L.useRef(null);return fn(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),fn(()=>{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(UC,""),l.appendChild(c),a.current=c,s(c)},[t,r]),fn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ne(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(UC,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function nk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=pD({id:n,root:r}),[s,a]=L.useState(null),l=L.useRef(null),c=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=s==null?void 0:s.modal,p=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||i);return L.useEffect(()=>{if(!i||!o||f)return;function g(x){i&&Pc(x)&&(x.type==="focusin"?BC:fD)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,f]),L.useEffect(()=>{i&&(p||BC(i))},[p,i]),(0,pn.jsxs)(tk.Provider,{value:L.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[v&&i&&(0,pn.jsx)(up,{"data-type":"outside",ref:l,onFocus:g=>{if(Pc(g,i)){var x;(x=u.current)==null||x.focus()}else{let y=s?s.domReference:null,m=ek(y);m==null||m.focus()}}}),v&&i&&(0,pn.jsx)("span",{"aria-owns":i.id,style:pp}),i&&wv.createPortal(t,i),v&&i&&(0,pn.jsx)(up,{"data-type":"outside",ref:c,onFocus:g=>{if(Pc(g,i)){var x;(x=d.current)==null||x.focus()}else{let y=s?s.domReference:null,m=JC(y);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var rk=()=>L.useContext(tk),xv="data-floating-ui-focusable";function VC(e){return e?e.hasAttribute(xv)?e:e.querySelector("["+xv+"]")||e:null}function $C(e){return L.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var mD=20,Xi=[];function gD(e){Xi=Xi.filter(t=>t.isConnected),e&&Ir(e)!=="body"&&(Xi.push(e),Xi.length>mD&&(Xi=Xi.slice(-20)))}function jC(){return Xi.slice().reverse().find(e=>e.isConnected)}function hD(e){let t=fp();return fC(e,t)?e:Rc(e,t)[0]||e}var yD=L.forwardRef(function(t,n){return(0,pn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:pp}))});function ok(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:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:x,dataRef:y,elements:{domReference:m,floating:h}}=t,w=kn(()=>{var se;return(se=y.current.floatingContext)==null?void 0:se.nodeId}),E=kn(p),C=typeof s=="number"&&s<0,k=ev(m)&&C,A=cD(),B=A?i:!0,M=!B||A&&f,N=Sa(o),Z=Sa(s),Y=Sa(a),O=dp(),F=rk(),ie=L.useRef(null),G=L.useRef(null),V=L.useRef(!1),U=L.useRef(!1),K=L.useRef(-1),$=F!=null,W=VC(h),z=kn(function(se){return se===void 0&&(se=W),se?Rc(se,fp()):[]}),fe=kn(se=>{let X=z(se);return N.current.map(ae=>m&&ae==="reference"?m:W&&ae==="floating"?W:X).filter(Boolean).flat()});L.useEffect(()=>{if(r||!c)return;function se(ae){if(ae.key==="Tab"){gt(W,ti(ht(W)))&&z().length===0&&!k&&Qf(ae);let pe=fe(),je=lo(ae);N.current[0]==="reference"&&je===m&&(Qf(ae),ae.shiftKey?xa(pe[pe.length-1]):xa(pe[1])),N.current[1]==="floating"&&je===W&&ae.shiftKey&&(Qf(ae),xa(pe[0]))}}let X=ht(W);return X.addEventListener("keydown",se),()=>{X.removeEventListener("keydown",se)}},[r,m,W,c,N,k,z,fe]),L.useEffect(()=>{if(r||!h)return;function se(X){let ae=lo(X),je=z().indexOf(ae);je!==-1&&(K.current=je)}return h.addEventListener("focusin",se),()=>{h.removeEventListener("focusin",se)}},[r,h,z]),L.useEffect(()=>{if(r||!d)return;function se(){U.current=!0,setTimeout(()=>{U.current=!1})}function X(ae){let pe=ae.relatedTarget;queueMicrotask(()=>{let je=w(),vt=!(gt(m,pe)||gt(h,pe)||gt(pe,h)||gt(F==null?void 0:F.portalNode,pe)||pe!=null&&pe.hasAttribute(Ea("focus-guard"))||O&&(ba(O.nodesRef.current,je).find(Qe=>{var He,Ze;return gt((He=Qe.context)==null?void 0:He.elements.floating,pe)||gt((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||zC(O.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,VC((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&vt&&ti(ht(W))===ht(W).body){Xe(W)&&W.focus();let Qe=K.current,He=z(),Ze=He[Qe]||He[He.length-1]||W;Xe(Ze)&&Ze.focus()}(k||!c)&&pe&&vt&&!U.current&&pe!==jC()&&(V.current=!0,g(!1,ae,"focus-out"))})}if(h&&Xe(m))return m.addEventListener("focusout",X),m.addEventListener("pointerdown",se),h.addEventListener("focusout",X),()=>{m.removeEventListener("focusout",X),m.removeEventListener("pointerdown",se),h.removeEventListener("focusout",X)}},[r,m,h,W,c,O,F,g,d,l,z,k,w]);let de=L.useRef(null),be=L.useRef(null),me=$C([de,F==null?void 0:F.beforeInsideRef]),re=$C([be,F==null?void 0:F.afterInsideRef]);L.useEffect(()=>{var se,X;if(r||!h)return;let ae=Array.from((F==null||(se=F.portalNode)==null?void 0:se.querySelectorAll("["+Ea("portal")+"]"))||[]),pe=O?zC(O.nodesRef.current,w()):[],je=O&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],vt=(X=pe.find(Ze=>{var dt;return ev(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(X=X.context)==null?void 0:X.elements.domReference,Qe=[h,vt,...ae,...je,...E(),ie.current,G.current,de.current,be.current,F==null?void 0:F.beforeOutsideRef.current,F==null?void 0:F.afterOutsideRef.current,N.current.includes("reference")||k?m:null].filter(Ze=>Ze!=null),He=c||k?HC(Qe,!M,M):HC(Qe);return()=>{He()}},[r,m,h,c,N,F,k,B,M,O,w,E]),fn(()=>{if(r||!Xe(W))return;let se=ht(W),X=ti(se);queueMicrotask(()=>{let ae=fe(W),pe=Z.current,je=(typeof pe=="number"?ae[pe]:pe.current)||W,vt=gt(W,X);!C&&!vt&&v&&xa(je,{preventScroll:je===W})})},[r,v,W,C,fe,Z]),fn(()=>{if(r||!W)return;let se=!1,X=!1,ae=ht(W),pe=ti(ae),vt=y.current.openEvent;gD(pe);function Qe(dt){let{open:pi,reason:mi,event:Jt,nested:yr}=dt;if(pi&&(vt=Jt),mi==="escape-key"&&(X=!0),["hover","safe-polygon"].includes(mi)&&Jt.type==="mouseleave"&&(V.current=!0),mi==="outside-press")if(yr)V.current=!1,se=!0;else if(ZT(Jt)||JT(Jt))V.current=!1;else{let Hr=!1;document.createElement("div").focus({get preventScroll(){return Hr=!0,!1}}),Hr?(V.current=!1,se=!0):V.current=!0}}x.on("openchange",Qe);let He=ae.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,pp),$&&m&&m.insertAdjacentElement("afterend",He);function Ze(){return typeof Y.current=="boolean"?X&&m?m:jC()||He:Y.current.current||He}return()=>{x.off("openchange",Qe);let dt=ti(ae),pi=gt(h,dt)||O&&ba(O.nodesRef.current,w()).some(Jt=>{var yr;return gt((yr=Jt.context)==null?void 0:yr.elements.floating,dt)});(pi||vt&&["click","mousedown"].includes(vt.type))&&(X=!0);let mi=Ze();queueMicrotask(()=>{let Jt=hD(mi);Y.current&&!V.current&&Xe(Jt)&&(!(Jt!==dt&&dt!==ae.body)||pi)&&Jt.focus({preventScroll:se}),He.remove()})}},[r,h,W,Y,y,x,O,$,m,w]),L.useEffect(()=>{queueMicrotask(()=>{V.current=!1})},[r]),fn(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:m}),()=>{F.setFocusManagerState(null)}},[r,F,c,v,g,d,m]),fn(()=>{if(r||!W||typeof MutationObserver!="function"||C)return;let se=()=>{let ae=W.getAttribute("tabindex"),pe=z(),je=ti(ht(h)),vt=pe.indexOf(je);vt!==-1&&(K.current=vt),N.current.includes("floating")||je!==m&&pe.length===0?ae!=="0"&&W.setAttribute("tabindex","0"):ae!=="-1"&&W.setAttribute("tabindex","-1")};se();let X=new MutationObserver(se);return X.observe(W,{childList:!0,subtree:!0,attributes:!0}),()=>{X.disconnect()}},[r,h,W,m,N,z,C]);function Ce(se){return r||!u||!c?null:(0,pn.jsx)(yD,{ref:se==="start"?ie:G,onClick:X=>g(!1,X.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let rt=!r&&B&&(c?!k:!0)&&($||c);return(0,pn.jsxs)(pn.Fragment,{children:[rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:me,onFocus:se=>{if(c){let ae=fe();xa(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(V.current=!1,Pc(se,F.portalNode)){let ae=JC(m);ae==null||ae.focus()}else{var X;(X=F.beforeOutsideRef.current)==null||X.focus()}}}),!k&&Ce("start"),n,Ce("end"),rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:re,onFocus:se=>{if(c)xa(fe()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(V.current=!0),Pc(se,F.portalNode)){let ae=ek(m);ae==null||ae.focus()}else{var X;(X=F.afterOutsideRef.current)==null||X.focus()}}})]})}function WC(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function vD(e){return Xe(e.target)&&e.target.tagName==="A"}function KC(e){return Jy(e)}function ik(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:d=!0}=t,f=L.useRef(),p=L.useRef(!1),v=L.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let x=f.current;g.button===0&&a!=="click"&&(ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||WC(g))&&(g.key===" "&&!KC(i)&&(g.preventDefault(),p.current=!0),!vD(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||WC(g)||KC(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return L.useMemo(()=>s?{reference:v}:{},[s,v])}var xD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},GC=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 sk(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:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,g=dp(),x=kn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,m=L.useRef(!1),h=L.useRef(!1),{escapeKey:w,outsidePress:E}=GC(p),{escapeKey:C,outsidePress:k}=GC(v),A=L.useRef(!1),B=kn(F=>{var ie;if(!n||!s||!a||F.key!=="Escape"||A.current)return;let G=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,V=g?ba(g.nodesRef.current,G):[];if(!w&&(F.stopPropagation(),V.length>0)){let U=!0;if(V.forEach(K=>{var $;if(($=K.context)!=null&&$.open&&!K.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,tC(F)?F.nativeEvent:F,"escape-key")}),M=kn(F=>{var ie;let G=()=>{var V;B(F),(V=lo(F))==null||V.removeEventListener("keydown",G)};(ie=lo(F))==null||ie.addEventListener("keydown",G)}),N=kn(F=>{var ie;let G=m.current;m.current=!1;let V=h.current;if(h.current=!1,c==="click"&&V||G||typeof y=="function"&&!y(F))return;let U=lo(F),K="["+Ea("inert")+"]",$=ht(o.floating).querySelectorAll(K),W=Ne(U)?U:null;for(;W&&!sr(W);){let be=or(W);if(sr(be)||!Ne(be))break;W=be}if($.length&&Ne(U)&&!nC(U)&&!gt(U,o.floating)&&Array.from($).every(be=>!gt(W,be)))return;if(Xe(U)&&O){let be=sr(U),me=dn(U),re=/auto|scroll/,Ce=be||re.test(me.overflowX),rt=be||re.test(me.overflowY),se=Ce&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,X=rt&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,ae=me.direction==="rtl",pe=X&&(ae?F.offsetX<=U.offsetWidth-U.clientWidth:F.offsetX>U.clientWidth),je=se&&F.offsetY>U.clientHeight;if(pe||je)return}let z=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,fe=g&&ba(g.nodesRef.current,z).some(be=>{var me;return Xf(F,(me=be.context)==null?void 0:me.elements.floating)});if(Xf(F,o.floating)||Xf(F,o.domReference)||fe)return;let de=g?ba(g.nodesRef.current,z):[];if(de.length>0){let be=!0;if(de.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){be=!1;return}}),!be)return}r(!1,F,"outside-press")}),Z=kn(F=>{var ie;let G=()=>{var V;N(F),(V=lo(F))==null||V.removeEventListener(c,G)};(ie=lo(F))==null||ie.addEventListener(c,G)});L.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=E;let F=-1;function ie($){r(!1,$,"ancestor-scroll")}function G(){window.clearTimeout(F),A.current=!0}function V(){F=window.setTimeout(()=>{A.current=!1},ma()?5:0)}let U=ht(o.floating);a&&(U.addEventListener("keydown",C?M:B,C),U.addEventListener("compositionstart",G),U.addEventListener("compositionend",V)),y&&U.addEventListener(c,k?Z:N,k);let K=[];return f&&(Ne(o.domReference)&&(K=Cn(o.domReference)),Ne(o.floating)&&(K=K.concat(Cn(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(K=K.concat(Cn(o.reference.contextElement)))),K=K.filter($=>{var W;return $!==((W=U.defaultView)==null?void 0:W.visualViewport)}),K.forEach($=>{$.addEventListener("scroll",ie,{passive:!0})}),()=>{a&&(U.removeEventListener("keydown",C?M:B,C),U.removeEventListener("compositionstart",G),U.removeEventListener("compositionend",V)),y&&U.removeEventListener(c,k?Z:N,k),K.forEach($=>{$.removeEventListener("scroll",ie)}),window.clearTimeout(F)}},[i,o,a,y,c,n,r,f,s,w,E,B,C,M,N,k,Z]),L.useEffect(()=>{m.current=!1},[y,c]);let Y=L.useMemo(()=>S({onKeyDown:B},u&&S({[xD[d]]:F=>{r(!1,F.nativeEvent,"reference-press")}},d!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}})),[B,r,u,d]),O=L.useMemo(()=>({onKeyDown:B,onMouseDown(){h.current=!0},onMouseUp(){h.current=!0},[wD[c]]:()=>{m.current=!0}}),[B,c]);return L.useMemo(()=>s?{reference:Y,floating:O}:{},[s,Y,O])}function SD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=bv(),i=L.useRef({}),[s]=L.useState(()=>sD()),a=Ev()!=null,[l,c]=L.useState(r.reference),u=kn((p,v,g)=>{i.current.openEvent=p?v:void 0,s.emit("openchange",{open:p,event:v,reason:g,nested:a}),n==null||n(p,v,g)}),d=L.useMemo(()=>({setPositionReference:c}),[]),f=L.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return L.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function ak(e){e===void 0&&(e={});let{nodeId:t}=e,n=SD(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[i,s]=L.useState(null),[a,l]=L.useState(null),u=(o==null?void 0:o.domReference)||i,d=L.useRef(null),f=dp();fn(()=>{u&&(d.current=u)},[u]);let p=NC(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=L.useCallback(h=>{let w=Ne(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;l(w),p.refs.setReference(w)},[p.refs]),g=L.useCallback(h=>{(Ne(h)||h===null)&&(d.current=h,s(h)),(Ne(p.refs.reference.current)||p.refs.reference.current===null||h!==null&&!Ne(h))&&p.refs.setReference(h)},[p.refs]),x=L.useMemo(()=>P(S({},p.refs),{setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=L.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),m=L.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return fn(()=>{r.dataRef.current.floatingContext=m;let h=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);h&&(h.context=m)}),L.useMemo(()=>P(S({},p),{context:m,refs:x,elements:y}),[p,x,y,m])}var hv="active",yv="selected";function vv(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[hv]:a,[yv]:l}=s;i=oe(s,[Em(hv),Em(yv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[xv]:""}),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,d]=c;if(!(o&&[hv,yv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,g=new Array(v),x=0;x<v;x++)g[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...g)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function lk(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=L.useCallback(a=>vv(a,e,"reference"),t),i=L.useCallback(a=>vv(a,e,"floating"),n),s=L.useCallback(a=>vv(a,e,"item"),r);return L.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var bD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ck(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=bD.get(s))!=null?n:s,l=bv(),u=Ev()!=null,d=L.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0},a==="listbox"&&{role:"combobox"}),a==="menu"&&{id:l}),a==="menu"&&u&&{role:"menuitem"}),s==="select"&&{"aria-autocomplete":"none"}),s==="combobox"&&{"aria-autocomplete":"list"}),[a,o,u,r,l,s]),f=L.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||s==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,s]),p=L.useCallback(v=>{let{active:g,selected:x}=v,y=S({role:"option"},g&&{id:o+"-option"});switch(s){case"select":return P(S({},y),{"aria-selected":g&&x});case"combobox":return S(S({},y),g&&{"aria-selected":!0})}return{}},[o,s]);return L.useMemo(()=>i?{reference:d,floating:f,item:p}:{},[i,d,f,p])}function qC(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,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function ED(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,i=!1,s=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(s===null||a===null||v===0)return s=d,a=f,l=p,null;let g=d-s,x=f-a,m=Math.sqrt(g*g+x*x)/v;return s=d,a=f,l=p,m}let u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:x,nodeId:y,tree:m}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;let{clientX:C,clientY:k}=w,A=[C,k],B=lo(w),M=w.type==="mouseleave",N=gt(g.floating,B),Z=gt(g.domReference,B),Y=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),F=v.split("-")[0],ie=f>O.right-O.width/2,G=p>O.bottom-O.height/2,V=ED(A,Y),U=O.width>Y.width,K=O.height>Y.height,$=(U?Y:O).left,W=(U?Y:O).right,z=(K?Y:O).top,fe=(K?Y:O).bottom;if(N&&(i=!0,!M))return;if(Z&&(i=!1),Z&&!M){i=!0;return}if(M&&Ne(w.relatedTarget)&>(g.floating,w.relatedTarget)||m&&ba(m.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(F==="top"&&p>=Y.bottom-1||F==="bottom"&&p<=Y.top+1||F==="left"&&f>=Y.right-1||F==="right"&&f<=Y.left+1)return E();let de=[];switch(F){case"top":de=[[$,Y.top+1],[$,O.bottom-1],[W,O.bottom-1],[W,Y.top+1]];break;case"bottom":de=[[$,O.top+1],[$,Y.bottom-1],[W,Y.bottom-1],[W,O.top+1]];break;case"left":de=[[O.right-1,fe],[O.right-1,z],[Y.left+1,z],[Y.left+1,fe]];break;case"right":de=[[Y.right-1,fe],[Y.right-1,z],[O.left+1,z],[O.left+1,fe]];break}function be(me){let[re,Ce]=me;switch(F){case"top":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Ce+t+1],se=[U?re-t/2:ie?re+t*4:re-t*4,Ce+t+1],X=[[O.left,ie||U?O.bottom-t:O.top],[O.right,ie?U?O.bottom-t:O.top:O.bottom-t]];return[rt,se,...X]}case"bottom":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Ce-t],se=[U?re-t/2:ie?re+t*4:re-t*4,Ce-t],X=[[O.left,ie||U?O.top+t:O.bottom],[O.right,ie?U?O.top+t:O.bottom:O.top+t]];return[rt,se,...X]}case"left":{let rt=[re+t+1,K?Ce+t/2:G?Ce+t*4:Ce-t*4],se=[re+t+1,K?Ce-t/2:G?Ce+t*4:Ce-t*4];return[...[[G||K?O.right-t:O.left,O.top],[G?K?O.right-t:O.left:O.right-t,O.bottom]],rt,se]}case"right":{let rt=[re-t,K?Ce+t/2:G?Ce+t*4:Ce-t*4],se=[re-t,K?Ce-t/2:G?Ce+t*4:Ce-t*4],X=[[G||K?O.left+t:O.right,O.top],[G?K?O.left+t:O.right:O.left+t,O.bottom]];return[rt,se,...X]}}}if(!qC([C,k],de)){if(i&&!V)return E();if(!M&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}qC([C,k],be([f,p]))?!i&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var mp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function TD({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=Lr.useState(e),l=o!=null?o:s,c=i!=null?i:a,u=ak({placement:t,open:l,onOpenChange:c,whileElementsMounted:np,middleware:[ap(5),pv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),fv({padding:10})]}),d=u.context,f=ik(d,{enabled:o==null}),p=sk(d),v=ck(d),g=XC(d,{enabled:r!=null?r:!1,handleClose:uk()}),x=lk([f,p,v,g]);return Lr.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var dk=Lr.createContext(null),Tv=()=>{let e=Lr.useContext(dk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Qi=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let i=TD(S({modal:t},n));return(0,Hn.jsx)(dk.Provider,{value:i,children:e})};function CD(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let i=Tv(),s=e||"button",a=t.ref,l=Sv([i.refs.setReference,a]);return(0,Hn.jsx)(s,P(S({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var kD=Lr.forwardRef(function(o,r){var i=o,{style:t}=i,n=oe(i,["style"]);let c=Tv(),{context:s}=c,a=oe(c,["context"]),l=Sv([a.refs.setFloating,r]);return s.open?(0,Hn.jsx)(nk,{children:(0,Hn.jsx)(ok,{context:s,modal:a.modal,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function RD(o){var i=o,{as:e,children:t,onClick:n}=i,r=oe(i,["as","children","onClick"]);let{setOpen:s}=Tv();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),s(!1),c.stopPropagation()}},r),{children:t}))}function fk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(Qi,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(Qi.Content,{className:mp.tooltip,children:[t,(0,Hn.jsx)("div",{className:mp.arrow})]}),(0,Hn.jsx)(Qi.Trigger,{className:mp.tooltipTrigger,children:e})]})}Qi.Trigger=CD;Qi.Content=kD;Qi.Button=RD;var yt=Qi;var Wt=b(R()),PD=3,AD=90,pk=({children:e})=>{let t=_("CommandPalette",Tn);return(0,Wt.jsx)("div",{className:t.listItemActions,children:e})};function Cv(p){var v=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:d=PD}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var A;let g=ue(io),[x,y]=(0,Ic.useState)(!1),{selected:m,onChangeOpen:h}=ei(),[w,E]=(0,Ic.useState)(!1),C=_("CommandPalette",Tn);function k(B){o(B),e&&h(!1)}return(0,Ic.useEffect)(()=>{E(m===c)},[m]),(0,Wt.jsxs)("div",{className:(0,Ac.default)(C.listItem,c===m&&C.listItemSelected),children:[(0,Wt.jsxs)(yt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,Wt.jsx)(yt.Trigger,P(S({className:C.listItemAction,"aria-disabled":(A=f.disabled)!=null?A:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,Wt.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,Wt.jsx)("p",{className:(0,Ac.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,a&&typeof a=="string"?(0,Wt.jsx)(Ki,{tagName:"p",allowList:[],content:jf(a)?$T(a):a,className:(0,Ac.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),n&&n.toString().length>AD&&(0,Wt.jsx)(yt.Content,{className:C.listItemTooltip,children:(0,Wt.jsx)(Ki,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),c===m&&i,l&&l.length>0&&(0,Wt.jsxs)("div",{className:C.sources,children:[(0,Wt.jsx)("span",{className:C.sourcesTitle,children:g("sources")}),l.slice(0,x?l.length:d).map(B=>(0,Wt.jsx)("a",{className:C.source,href:B.url,target:"_blank",title:B.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(B),children:B.name},B.url)),!x&&l.length>d&&(0,Wt.jsx)("button",{className:(0,Ac.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>y(!0),children:g("showMore",{amount:l.length-d})})]})]})}var Lc=b(R()),mk=()=>(0,Lc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Lc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Lc.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 Zi=b(R());function kv({children:e,title:t,id:n,onDismiss:r}){let o=ue(io),i=_("CommandPalette",Tn),{page:s}=ei();return s!==n?null:(0,Zi.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Zi.jsxs)("div",{className:i.pageNav,children:[(0,Zi.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Zi.jsx)(mk,{}),o("back")]}),t&&(0,Zi.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var gk=b(Q());var Oc=b(R()),Ca=()=>(0,Oc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Oc.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Oc.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 cr=b(R());function ID({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=_("CommandPalette",Tn);return(0,cr.jsxs)("div",{className:l.search,children:[(0,cr.jsx)("div",{className:l.searchIcon,children:(0,cr.jsx)(Ca,{})}),(0,cr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,cr.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,cr.jsx)("div",{className:l.selectWrapper,children:(0,cr.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,cr.jsx)("option",{children:r}),o.map(c=>(0,cr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var hk=(0,gk.forwardRef)(ID);var Rv=b(Me());var gp=b(R()),LD=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=oe(i,["onClick","shortKeys","children"]);let s=_("CommandPalette",Tn);return(0,gp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,Rv.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,gp.jsx)("span",{className:(0,Rv.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},yk=LD;var Nc=b(R()),OD="[data-command-palette-item]";function Ji({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:d,search:f,updateDeps:p=[]}){let[v,g]=(0,uo.useState)(),x=(0,uo.useRef)(null),y=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=x.current)==null||N.focus();return}if(f.length>0){i("");return}a(!1)},h=()=>{let N=w();N.length!==0&&g(N[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(OD)||[]),E=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let Z=E(N);Z&&g(Z.dataset.itemId)},k=N=>{let Z=E(N);Z&&Z.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let N=w(),Z=E(v);if(!Z)return;let Y=N.indexOf(Z),O=N[Y+1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):h()},B=()=>{if(!v)return;let N=w(),Z=E(v);if(!Z)return;let Y=N.indexOf(Z),O=N[Y-1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):C(N[N.length-1].dataset.itemId)},M=(0,uo.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),A();break}case"ArrowUp":{N.preventDefault(),B();break}case"Enter":{if(v){let Z=E(v);Z==null||Z.click()}break}}},[v]);return(0,uo.useEffect)(()=>{h()},[f,r,l,d,...p]),(0,uo.useEffect)(()=>{v&&k(v)},[v]),(0,Nc.jsx)(Lf,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:m,onClose:y,onKeyDown:M,children:(0,Nc.jsxs)(WT,{selected:v,setSelected:g,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Nc.jsx)(hk,{ref:x,onChange:i,onChangeType:s,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}Ji.Page=kv;Ji.List=Uy;Ji.Image=NT;Ji.ListItem=Cv;Ji.ListItemActions=pk;Ji.Button=yk;var qe=Ji;var vk=b(Q());function xk(e,t){(0,vk.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 Mc=b(Q());var wk={data:null,fetchState:"idle"},ND=e=>{var t;return(t=e.entities.data)!=null?t:null},hp=Dn([ND,ca,B1],(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}),ur=ge("entities/getEntities",(e,t)=>I(void 0,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)})),MD=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),_D=ke({name:"entities",initialState:wk,reducers:{},extraReducers:e=>{e.addCase(ur.pending,t=>{t.fetchState="loading"}).addCase(ur.rejected,t=>{t.fetchState="error"}).addCase(ur.fulfilled,(t,n)=>{t.fetchState="done",t.data=MD(t.data?[...t.data,...n.payload]:n.payload)}).addCase(at,()=>wk)}}),Sk=_D.reducer;var Pv={};kt(Pv,{enUS:()=>DD,nlNL:()=>FD});var DD={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},FD={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var bk={root:"dd-TYTKs",empty:"dd-AU7uT"};var ka=b(R()),zD=({onCopy:e})=>{let t=(0,Mc.useRef)(null),n=_("EntitiesList",bk),r=j(hp),{setSelected:o}=ei(),i=ue(Pv),s=ve();return(0,Mc.useEffect)(()=>{s(ur())},[]),(0,Mc.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,ka.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,ka.jsx)(qe.List,{children:r.map((a,l)=>(0,ka.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,ka.jsx)("p",{className:n.empty,children:i("noResults")})]})},Ek=zD;var as=b(Q());var Ra=b(Q());function es(e,t){let n=(0,Ra.useRef)(e);n.current=e;let[r,o]=(0,Ra.useState)(void 0),[i,s]=(0,Ra.useState)(void 0),[a,l]=(0,Ra.useState)("idle"),c=ve();return{error:i,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).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 yp=b(Me()),Rk=b(Q());var Av=b(R()),Iv=e=>(0,Av.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Av.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 Lv=b(R()),Tk=e=>(0,Lv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Lv.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 Pa(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 Ov={};kt(Ov,{enUS:()=>HD,nlNL:()=>BD});var HD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},BD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Ck(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,P(S({conversationId:r},o),{data:t.data}))})(e)}function ct(){let e=ve();return(t,n)=>I(this,null,function*(){yield e(Ck({name:t,data:n}))})}var kk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Aa=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 fo=b(R()),UD=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=_("FeedbackThumbs",kk),i=te("enableFeedbackForm"),s=j(Rr),a=j(Aa(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ue(Ov),c=ct(),[u,d]=(0,Rk.useState)(null),f=v=>{v.stopPropagation(),Pa(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Pa(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,fo.jsxs)("div",{className:o.thumbs,children:[(0,fo.jsx)(ye.Button,{title:l("thumbsUp"),onClick:f,icon:(0,fo.jsx)(Tk,{}),className:(0,yp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),i&&a?(0,fo.jsx)(ye.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,fo.jsx)(ye.Button,{title:l("thumbsDown"),onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},ts=UD;var _c=b(R()),Pk=()=>(0,_c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,_c.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,_c.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Nv={};kt(Nv,{enUS:()=>VD,nlNL:()=>$D});var VD={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},$D={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var Ak={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:Hk,setPrototypeOf:Ik,isFrozen:jD,getPrototypeOf:WD,getOwnPropertyDescriptor:KD}=Object,{freeze:Gt,seal:Bn,create:Bk}=Object,{apply:Hv,construct:Bv}=typeof Reflect!="undefined"&&Reflect;Gt||(Gt=function(t){return t});Bn||(Bn=function(t){return t});Hv||(Hv=function(t,n,r){return t.apply(n,r)});Bv||(Bv=function(t,n){return new t(...n)});var vp=qt(Array.prototype.forEach),GD=qt(Array.prototype.lastIndexOf),Lk=qt(Array.prototype.pop),Dc=qt(Array.prototype.push),qD=qt(Array.prototype.splice),wp=qt(String.prototype.toLowerCase),Mv=qt(String.prototype.toString),Ok=qt(String.prototype.match),Fc=qt(String.prototype.replace),YD=qt(String.prototype.indexOf),XD=qt(String.prototype.trim),dr=qt(Object.prototype.hasOwnProperty),Kt=qt(RegExp.prototype.test),zc=QD(TypeError);function qt(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 Hv(e,t,r)}}function QD(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bv(e,n)}}function xe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wp;Ik&&Ik(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(jD(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ZD(e){for(let t=0;t<e.length;t++)dr(e,t)||(e[t]=null);return e}function ns(e){let t=Bk(null);for(let[n,r]of Hk(e))dr(e,n)&&(Array.isArray(r)?t[n]=ZD(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ns(r):t[n]=r);return t}function Hc(e,t){for(;e!==null;){let r=KD(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=WD(e)}function n(){return null}return n}var Nk=Gt(["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","section","select","shadow","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"]),_v=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dv=Gt(["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"]),JD=Gt(["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"]),Fv=Gt(["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"]),e3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mk=Gt(["#text"]),_k=Gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zv=Gt(["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","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","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-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"]),Dk=Gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),xp=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),t3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),n3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),r3=Bn(/\$\{[\w\W]*/gm),o3=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),i3=Bn(/^aria-[\-\w]+$/),Uk=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s3=Bn(/^(?:\w+script|data):/i),a3=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vk=Bn(/^html$/i),l3=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),Fk=Object.freeze({__proto__:null,ARIA_ATTR:i3,ATTR_WHITESPACE:a3,CUSTOM_ELEMENT:l3,DATA_ATTR:o3,DOCTYPE_NAME:Vk,ERB_EXPR:n3,IS_ALLOWED_URI:Uk,IS_SCRIPT_OR_DATA:s3,MUSTACHE_EXPR:t3,TMPLIT_EXPR:r3}),Bc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},c3=function(){return typeof window=="undefined"?null:window},u3=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}},zk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c3(),t=ne=>$k(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Bc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,g=Hc(v,"cloneNode"),x=Hc(v,"remove"),y=Hc(v,"nextSibling"),m=Hc(v,"childNodes"),h=Hc(v,"parentNode");if(typeof s=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:C,createNodeIterator:k,createDocumentFragment:A,getElementsByTagName:B}=n,{importNode:M}=r,N=zk();t.isSupported=typeof Hk=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Z,ERB_EXPR:Y,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:U}=Fk,{IS_ALLOWED_URI:K}=Fk,$=null,W=xe({},[...Nk,..._v,...Dv,...Fv,...Mk]),z=null,fe=xe({},[..._k,...zv,...Dk,...xp]),de=Object.seal(Bk(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}})),be=null,me=null,re=!0,Ce=!0,rt=!1,se=!0,X=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,pi=!1,mi="user-content-",Jt=!0,yr=!1,Hr={},xs=null,H0=xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),B0=null,U0=xe({},["audio","video","img","source","image","track"]),gm=null,V0=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),du="http://www.w3.org/1998/Math/MathML",fu="http://www.w3.org/2000/svg",Br="http://www.w3.org/1999/xhtml",ws=Br,hm=!1,ym=null,_A=xe({},[du,fu,Br],Mv),pu=xe({},["mi","mo","mn","ms","mtext"]),mu=xe({},["annotation-xml"]),DA=xe({},["title","style","font","a","script"]),Wa=null,FA=["application/xhtml+xml","text/html"],zA="text/html",ft=null,Ss=null,HA=n.createElement("form"),$0=function(T){return T instanceof RegExp||T instanceof Function},vm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ss&&Ss===T)){if((!T||typeof T!="object")&&(T={}),T=ns(T),Wa=FA.indexOf(T.PARSER_MEDIA_TYPE)===-1?zA:T.PARSER_MEDIA_TYPE,ft=Wa==="application/xhtml+xml"?Mv:wp,$=dr(T,"ALLOWED_TAGS")?xe({},T.ALLOWED_TAGS,ft):W,z=dr(T,"ALLOWED_ATTR")?xe({},T.ALLOWED_ATTR,ft):fe,ym=dr(T,"ALLOWED_NAMESPACES")?xe({},T.ALLOWED_NAMESPACES,Mv):_A,gm=dr(T,"ADD_URI_SAFE_ATTR")?xe(ns(V0),T.ADD_URI_SAFE_ATTR,ft):V0,B0=dr(T,"ADD_DATA_URI_TAGS")?xe(ns(U0),T.ADD_DATA_URI_TAGS,ft):U0,xs=dr(T,"FORBID_CONTENTS")?xe({},T.FORBID_CONTENTS,ft):H0,be=dr(T,"FORBID_TAGS")?xe({},T.FORBID_TAGS,ft):{},me=dr(T,"FORBID_ATTR")?xe({},T.FORBID_ATTR,ft):{},Hr=dr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Ce=T.ALLOW_DATA_ATTR!==!1,rt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,se=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=T.SAFE_FOR_TEMPLATES||!1,ae=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,vt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,pi=T.SANITIZE_NAMED_PROPS||!1,Jt=T.KEEP_CONTENT!==!1,yr=T.IN_PLACE||!1,K=T.ALLOWED_URI_REGEXP||Uk,ws=T.NAMESPACE||Br,pu=T.MATHML_TEXT_INTEGRATION_POINTS||pu,mu=T.HTML_INTEGRATION_POINTS||mu,de=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Ce=!1),He&&(Qe=!0),Hr&&($=xe({},Mk),z=[],Hr.html===!0&&(xe($,Nk),xe(z,_k)),Hr.svg===!0&&(xe($,_v),xe(z,zv),xe(z,xp)),Hr.svgFilters===!0&&(xe($,Dv),xe(z,zv),xe(z,xp)),Hr.mathMl===!0&&(xe($,Fv),xe(z,Dk),xe(z,xp))),T.ADD_TAGS&&($===W&&($=ns($)),xe($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(z===fe&&(z=ns(z)),xe(z,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&xe(gm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(xs===H0&&(xs=ns(xs)),xe(xs,T.FORBID_CONTENTS,ft)),Jt&&($["#text"]=!0),pe&&xe($,["html","head","body"]),$.table&&(xe($,["tbody"]),delete be.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=u3(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Gt&&Gt(T),Ss=T}},j0=xe({},[..._v,...Dv,...JD]),W0=xe({},[...Fv,...e3]),BA=function(T){let H=h(T);(!H||!H.tagName)&&(H={namespaceURI:ws,tagName:"template"});let J=wp(T.tagName),Be=wp(H.tagName);return ym[T.namespaceURI]?T.namespaceURI===fu?H.namespaceURI===Br?J==="svg":H.namespaceURI===du?J==="svg"&&(Be==="annotation-xml"||pu[Be]):!!j0[J]:T.namespaceURI===du?H.namespaceURI===Br?J==="math":H.namespaceURI===fu?J==="math"&&mu[Be]:!!W0[J]:T.namespaceURI===Br?H.namespaceURI===fu&&!mu[Be]||H.namespaceURI===du&&!pu[Be]?!1:!W0[J]&&(DA[J]||!j0[J]):!!(Wa==="application/xhtml+xml"&&ym[T.namespaceURI]):!1},vr=function(T){Dc(t.removed,{element:T});try{h(T).removeChild(T)}catch(H){x(T)}},gu=function(T,H){try{Dc(t.removed,{attribute:H.getAttributeNode(T),from:H})}catch(J){Dc(t.removed,{attribute:null,from:H})}if(H.removeAttribute(T),T==="is")if(Qe||He)try{vr(H)}catch(J){}else try{H.setAttribute(T,"")}catch(J){}},K0=function(T){let H=null,J=null;if(vt)T="<remove></remove>"+T;else{let xt=Ok(T,/^[\r\n\t ]+/);J=xt&&xt[0]}Wa==="application/xhtml+xml"&&ws===Br&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(ws===Br)try{H=new f().parseFromString(Be,Wa)}catch(xt){}if(!H||!H.documentElement){H=C.createDocument(ws,"template",null);try{H.documentElement.innerHTML=hm?E:Be}catch(xt){}}let Ct=H.body||H.documentElement;return T&&J&&Ct.insertBefore(n.createTextNode(J),Ct.childNodes[0]||null),ws===Br?B.call(H,pe?"html":"body")[0]:pe?H.documentElement:Ct},G0=function(T){return k.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xm=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},q0=function(T){return typeof a=="function"&&T instanceof a};function Ur(ne,T,H){vp(ne,J=>{J.call(t,T,H,Ss)})}let Y0=function(T){let H=null;if(Ur(N.beforeSanitizeElements,T,null),xm(T))return vr(T),!0;let J=ft(T.nodeName);if(Ur(N.uponSanitizeElement,T,{tagName:J,allowedTags:$}),T.hasChildNodes()&&!q0(T.firstElementChild)&&Kt(/<[/\w!]/g,T.innerHTML)&&Kt(/<[/\w!]/g,T.textContent)||T.nodeType===Bc.progressingInstruction||ae&&T.nodeType===Bc.comment&&Kt(/<[/\w]/g,T.data))return vr(T),!0;if(!$[J]||be[J]){if(!be[J]&&Q0(J)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,J)||de.tagNameCheck instanceof Function&&de.tagNameCheck(J)))return!1;if(Jt&&!xs[J]){let Be=h(T)||T.parentNode,Ct=m(T)||T.childNodes;if(Ct&&Be){let xt=Ct.length;for(let en=xt-1;en>=0;--en){let xr=g(Ct[en],!0);xr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(xr,y(T))}}}return vr(T),!0}return T instanceof l&&!BA(T)||(J==="noscript"||J==="noembed"||J==="noframes")&&Kt(/<\/no(script|embed|frames)/i,T.innerHTML)?(vr(T),!0):(X&&T.nodeType===Bc.text&&(H=T.textContent,vp([Z,Y,O],Be=>{H=Fc(H,Be," ")}),T.textContent!==H&&(Dc(t.removed,{element:T.cloneNode()}),T.textContent=H)),Ur(N.afterSanitizeElements,T,null),!1)},X0=function(T,H,J){if(dt&&(H==="id"||H==="name")&&(J in n||J in HA))return!1;if(!(Ce&&!me[H]&&Kt(F,H))){if(!(re&&Kt(ie,H))){if(!z[H]||me[H]){if(!(Q0(T)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,T)||de.tagNameCheck instanceof Function&&de.tagNameCheck(T))&&(de.attributeNameCheck instanceof RegExp&&Kt(de.attributeNameCheck,H)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(H))||H==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,J)||de.tagNameCheck instanceof Function&&de.tagNameCheck(J))))return!1}else if(!gm[H]){if(!Kt(K,Fc(J,V,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&T!=="script"&&YD(J,"data:")===0&&B0[T])){if(!(rt&&!Kt(G,Fc(J,V,"")))){if(J)return!1}}}}}}return!0},Q0=function(T){return T!=="annotation-xml"&&Ok(T,U)},Z0=function(T){Ur(N.beforeSanitizeAttributes,T,null);let{attributes:H}=T;if(!H||xm(T))return;let J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},Be=H.length;for(;Be--;){let Ct=H[Be],{name:xt,namespaceURI:en,value:xr}=Ct,Ka=ft(xt),Dt=xt==="value"?xr:XD(xr);if(J.attrName=Ka,J.attrValue=Dt,J.keepAttr=!0,J.forceKeepAttr=void 0,Ur(N.uponSanitizeAttribute,T,J),Dt=J.attrValue,pi&&(Ka==="id"||Ka==="name")&&(gu(xt,T),Dt=mi+Dt),ae&&Kt(/((--!?|])>)|<\/(style|title)/i,Dt)){gu(xt,T);continue}if(J.forceKeepAttr||(gu(xt,T),!J.keepAttr))continue;if(!se&&Kt(/\/>/i,Dt)){gu(xt,T);continue}X&&vp([Z,Y,O],ex=>{Dt=Fc(Dt,ex," ")});let J0=ft(T.nodeName);if(X0(J0,Ka,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!en)switch(p.getAttributeType(J0,Ka)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{en?T.setAttributeNS(en,xt,Dt):T.setAttribute(xt,Dt),xm(T)?vr(T):Lk(t.removed)}catch(ex){}}}Ur(N.afterSanitizeAttributes,T,null)},UA=function ne(T){let H=null,J=G0(T);for(Ur(N.beforeSanitizeShadowDOM,T,null);H=J.nextNode();)Ur(N.uponSanitizeShadowNode,H,null),Y0(H),Z0(H),H.content instanceof i&&ne(H.content);Ur(N.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,J=null,Be=null,Ct=null;if(hm=!ne,hm&&(ne="<!-->"),typeof ne!="string"&&!q0(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw zc("dirty is not a string, aborting")}else throw zc("toString is not a function");if(!t.isSupported)return ne;if(je||vm(T),t.removed=[],typeof ne=="string"&&(yr=!1),yr){if(ne.nodeName){let xr=ft(ne.nodeName);if(!$[xr]||be[xr])throw zc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)H=K0("<!---->"),J=H.ownerDocument.importNode(ne,!0),J.nodeType===Bc.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?H=J:H.appendChild(J);else{if(!Qe&&!X&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(H=K0(ne),!H)return Qe?null:Ze?E:""}H&&vt&&vr(H.firstChild);let xt=G0(yr?ne:H);for(;Be=xt.nextNode();)Y0(Be),Z0(Be),Be.content instanceof i&&UA(Be.content);if(yr)return ne;if(Qe){if(He)for(Ct=A.call(H.ownerDocument);H.firstChild;)Ct.appendChild(H.firstChild);else Ct=H;return(z.shadowroot||z.shadowrootmode)&&(Ct=M.call(r,Ct,!0)),Ct}let en=pe?H.outerHTML:H.innerHTML;return pe&&$["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&Kt(Vk,H.ownerDocument.doctype.name)&&(en="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
|
|
20
|
-
`+en),X&&vp([Z,Y,O],xr=>{en=Fc(en,xr," ")}),w&&Ze?w.createHTML(en):en},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vm(ne),je=!0},t.clearConfig=function(){Ss=null,je=!1},t.isValidAttribute=function(ne,T,H){Ss||vm({});let J=ft(ne),Be=ft(T);return X0(J,Be,H)},t.addHook=function(ne,T){typeof T=="function"&&Dc(N[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let H=GD(N[ne],T);return H===-1?void 0:qD(N[ne],H,1)[0]}return Lk(N[ne])},t.removeHooks=function(ne){N[ne]=[]},t.removeAllHooks=function(){N=zk()},t}var jk=$k();var mo=b(Q());var Vv=b(Me()),Un=b(Q());var Sp=b(Q()),d3=["bottom","height","left","right","top","width"],f3=(e={},t={})=>d3.some(n=>e[n]!==t[n]),po=new Map,Wk,Kk=()=>{let e=[],t=[];po.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();f3(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{po.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Wk=window.requestAnimationFrame(Kk)};function p3(e,t){return{observe(){let n=po.size===0;if(po.has(e)){let r=po.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else po.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Kk()},unobserve(){let n=po.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||po.delete(e),po.size||cancelAnimationFrame(Wk)}}}}function Uv(e){let[t,n]=(0,Sp.useState)(null);return(0,Sp.useLayoutEffect)(()=>{if(!e.current)return;let r=p3(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ia=b(Q()),Yk=b(Ul());var Gk=b(Q());function ri(e){(0,Gk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function rs(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var qk={root:"dd-r-dgo"};var Xk=({children:e,parentNode:t})=>{let[n,r]=(0,Ia.useState)(null),o=(0,Ia.useContext)(Ya);return(0,Ia.useLayoutEffect)(()=>{let i=document.createElement("div");return rs(i),i.classList.add(qk.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,Yk.createPortal)(e,n):null};var Or={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 bp=b(R()),Ep=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),i=(0,Un.useCallback)(()=>n(a=>!a),[]),s=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function $v(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 La=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=$v,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=Uv(t),f=Uv(n),p=(0,Un.useMemo)(()=>s(d,f,0),[d,f]);return(0,bp.jsx)(Xk,{parentNode:a,children:(0,bp.jsx)("div",P(S({className:(0,Vv.default)(Or.ref,{[Or.positionAbove]:r==="above",[Or.positionBelow]:r==="below",[Or.positionLeft]:r==="left",[Or.positionRight]:r==="right",[Or.alignStart]:o==="start",[Or.alignCenter]:o==="center",[Or.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,bp.jsx)("div",{className:(0,Vv.default)(e,Or.root),children:i})}))})};var Qk={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};function Kv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ss=Kv();function rR(e){ss=e}var $c={exec:()=>null};function Ae(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(Yt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Yt={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")},m3=/^(?:[ \t]*(?:\n|$))+/,g3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,y3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gv=/(?:[*+-]|\d{1,9}[.)])/,oR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iR=Ae(oR).replace(/bull/g,Gv).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(),v3=Ae(oR).replace(/bull/g,Gv).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(),qv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,x3=/^[^\n]+/,Yv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,w3=Ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S3=Ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gv).getRegex(),kp="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",Xv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b3=Ae("^ {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",Xv).replace("tag",kp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sR=Ae(qv).replace("hr",Wc).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",kp).getRegex(),E3=Ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sR).getRegex(),Qv={blockquote:E3,code:g3,def:w3,fences:h3,heading:y3,hr:Wc,html:b3,lheading:iR,list:S3,newline:m3,paragraph:sR,table:$c,text:x3},Zk=Ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wc).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",kp).getRegex(),T3=P(S({},Qv),{lheading:v3,table:Zk,paragraph:Ae(qv).replace("hr",Wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zk).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",kp).getRegex()}),C3=P(S({},Qv),{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xv).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:$c,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ae(qv).replace("hr",Wc).replace("heading",` *#{1,6} *[^
|
|
21
|
-
]`).replace("lheading",
|
|
22
|
-
`).map(
|
|
23
|
-
`)}var Oa=class{constructor(t){Ee(this,"options");Ee(this,"rules");Ee(this,"lexer");this.options=t||
|
|
24
|
-
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||n2)();if(!o)return;let s=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",i=s==="body"||s==="fragment"?o.body:o.createElement(s);return t.match(J_)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,BT.default)(t):t)),i}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==HT||!t.attributes||([...t.attributes].forEach(s=>{let{name:i,value:a}=s,l=i.toLowerCase(),c=Uf[l]||Uf[i];if(!this.isSafe(t)||!l.match(e2)&&(!n&&(!c||c===Gy)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===Jo?u=!0:c===$s?u=Number.parseFloat(String(u)):c!==Bf&&(u=String(u)),r[qy[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,(s,i)=>String(i).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return xc[t]?P(S(S({},n),xc[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:s,transform:i,transformOnlyAllowList:a}=this.props,l=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===HT){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let g;if(i&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;g=this.parseNode(v,p);let y=i(v,g,p);if(y===null)return;if(typeof y!="undefined"){l.push(Ws.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(s||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(Ws.default.createElement(Vf,P(S({},y),{key:this.keyIndex}),(d=g)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===Z_){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,s=null;for(;s=o.match(t2);){let[i,a]=s,l=s.index,c=i.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:d,props:f}=n[a],p;if(c)p=i.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(i.length,v.index),n),f))}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 r2(e){var t;let{attributes:n,className:r,containerTagName:o,content:s,emptyContent:i,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new $f(s!=null?s:"",e).parse();p.length>0&&(f=p)}return f||(f=i),d?Ws.default.createElement(Ws.default.Fragment,null,f):Ws.default.createElement(Vf,{attributes:n,className:r,tagName:u},f)}function Ks(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:s=!1,emptyContent:i=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=s?[]:l,g=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(C=>{C.onBeforeParse&&x.push(C.onBeforeParse.bind(C)),C.onAfterParse&&y.push(C.onAfterParse.bind(C))});let m=x.reduce((C,k)=>k(C,e),r!=null?r:""),h=new $f(m,p,v,g),w=y.reduce((C,k)=>k(C,e),h.parse());return Ws.default.createElement(r2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:i,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var Ic=b(Q());var o2=/[.*+?^${}()|[\]\\]/g,s2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function i2(e){return e.replace(o2,"\\$&")}function a2(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function l2(e){return e.search(s2)}function UT(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${i2(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function VT(e){return e.replace(Pu,'<mark data-type="placeholder">$1</mark>')}function fa(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function c2(e,t){return e.split("").map((i,a)=>({char:i,index:a})).filter(({char:i,index:a})=>/\s/.test(i)&&a<=t).map(({index:i})=>i).reverse()[0]}function Xy(e,t,n={}){if(t){let r=a2(t.toLowerCase(),e.toLowerCase()),o=fa(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=l2(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let i=t.split(Ux).length>3||t.length>30?c2(t.trim(),r):0;return`${`${i>0?"\u2026":""}${fa(e.substring(i,r))}`}<strong>${o}</strong>`}return e}var u2=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function jf(e){return u2.test(e)}function $T(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var Wf=b(Q()),KT=b(R()),jT=Wf.default.createContext(void 0);function es(){let e=Wf.default.useContext(jT);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var WT=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s})=>{let i=Wf.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s}),[n,t,o]);return(0,KT.jsx)(jT.Provider,{value:i,children:e})};var Lr=b(Q());var L=b(Q(),1),Ta=b(Q(),1);function Gf(){return typeof window!="undefined"}function Ir(e){return GT(e)?(e.nodeName||"").toLowerCase():"#document"}function jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(GT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GT(e){return Gf()?e instanceof Node||e instanceof jt(e).Node:!1}function Ne(e){return Gf()?e instanceof Element||e instanceof jt(e).Element:!1}function Xe(e){return Gf()?e instanceof HTMLElement||e instanceof jt(e).HTMLElement:!1}function Kf(e){return!Gf()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof jt(e).ShadowRoot}function pa(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function qT(e){return["table","td","th"].includes(Ir(e))}function wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function qf(e){let t=ma(),n=Ne(e)?dn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YT(e){let t=or(e);for(;Xe(t)&&!ir(t);){if(qf(t))return t;if(wc(t))return null;t=or(t)}return null}function ma(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(Ir(e))}function dn(e){return jt(e).getComputedStyle(e)}function Sc(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function or(e){if(Ir(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Kf(e)&&e.host||sr(e);return Kf(t)?t.host:t}function XT(e){let t=or(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&pa(t)?t:XT(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=XT(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=jt(o);if(s){let a=Yf(i);return t.concat(i,i.visualViewport||[],pa(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Yf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ts(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 gt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Kf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function QT(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zy(){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 ZT(e){return e.mozInputSource===0&&e.isTrusted?!0:Qy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JT(e){return d2()?!1:!Qy()&&e.width===0&&e.height===0||Qy()&&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 eC(){return/apple/i.test(navigator.vendor)}function Qy(){let e=/android/i;return e.test(QT())||e.test(Zy())}function d2(){return Zy().includes("jsdom/")}function ga(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tC(e){return"nativeEvent"in e}function nC(e){return e.matches("html,body")}function ht(e){return(e==null?void 0:e.ownerDocument)||document}function Xf(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 lo(e){return"composedPath"in e?e.composedPath()[0]:e.target}var f2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jy(e){return Xe(e)&&e.matches(f2)}function Qf(e){e.preventDefault(),e.stopPropagation()}function ev(e){return e?e.getAttribute("role")==="combobox"&&Jy(e):!1}var ha=Math.min,co=Math.max,Ec=Math.round,Tc=Math.floor,ar=e=>({x:e,y:e}),p2={left:"right",right:"left",bottom:"top",top:"bottom"},m2={start:"end",end:"start"};function tv(e,t,n){return co(e,ha(t,n))}function Cc(e,t){return typeof e=="function"?e(t):e}function ns(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function nv(e){return e==="x"?"y":"x"}function rv(e){return e==="y"?"height":"width"}function Gs(e){return["top","bottom"].includes(ns(e))?"y":"x"}function ov(e){return nv(Gs(e))}function rC(e,t,n){n===void 0&&(n=!1);let r=kc(e),o=ov(e),s=rv(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bc(i)),[i,bc(i)]}function oC(e){let t=bc(e);return[Zf(e),t,Zf(t)]}function Zf(e){return e.replace(/start|end/g,t=>m2[t])}function g2(e,t,n){let r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function sC(e,t,n,r){let o=kc(e),s=g2(ns(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Zf)))),s}function bc(e){return e.replace(/left|right|bottom|top/g,t=>p2[t])}function h2(e){return S({top:0,right:0,bottom:0,left:0},e)}function iC(e){return typeof e!="number"?h2(e):{top:e,right:e,bottom:e,left:e}}function qs(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 pn=b(R(),1);var y2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Jf=y2.join(","),lC=typeof Element=="undefined",ya=lC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ep=!lC&&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},tp=function e(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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},v2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},x2=function(t,n,r){if(tp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Jf));return n&&ya.call(t,Jf)&&o.unshift(t),o=o.filter(r),o},w2=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!tp(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=ya.call(i,Jf);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!tp(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var p=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},cC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},uC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v2(t))&&!cC(t)?0:t.tabIndex},S2=function(t,n){var r=uC(t);return r<0&&n&&!cC(t)?0:r},b2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dC=function(t){return t.tagName==="INPUT"},E2=function(t){return dC(t)&&t.type==="hidden"},T2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},C2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},k2=function(t){if(!t.name)return!0;var n=t.form||ep(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(i){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",i.message),!1}var s=C2(o,t.form);return!s||s===t},R2=function(t){return dC(t)&&t.type==="radio"},P2=function(t){return R2(t)&&!k2(t)},A2=function(t){var n,r=t&&ep(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=ep(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},aC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},I2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=ya.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(ya.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ep(t);if(l&&!l.shadowRoot&&o(l)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(A2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},L2=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 ya.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},O2=function(t,n){return!(n.disabled||tp(n)||E2(n)||I2(n,t)||T2(n)||L2(n))},sv=function(t,n){return!(P2(n)||uC(n)<0||!O2(t,n))},N2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},M2=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=S2(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(b2).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=w2([t],n.includeContainer,{filter:sv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:N2}):r=x2(t,n.includeContainer,sv.bind(null,n)),M2(r)};var fC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ya.call(t,Jf)===!1?!1:sv(n,t)};var wv=b(Ul(),1);function pC(e,t,n){let{reference:r,floating:o}=e,s=Gs(t),i=ov(t),a=rv(i),l=ns(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=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:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kc(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1);break}return p}var mC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=yield i.isRTL==null?void 0:i.isRTL(t),c=yield i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=pC(c,r,l),f=r,p={},v=0;for(let g=0;g<a.length;g++){let{name:x,fn:y}=a[g],{x:m,y:h,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=m!=null?m:u,d=h!=null?h:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=pC(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function iv(e,t){return I(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Cc(t,e),v=iC(p),x=a[f?d==="floating"?"reference":"floating":d],y=qs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(x))==null||n?x:x.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,h=yield s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating),w=(yield s.isElement==null?void 0:s.isElement(h))?(yield s.getScale==null?void 0:s.getScale(h))||{x:1,y:1}:{x:1,y:1},E=qs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:h,strategy:l}):m);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var gC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=n,F=Cc(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0}=F,y=oe(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let m=ns(s),h=Gs(l),w=ns(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(w||!x?[bc(l)]:oC(l)),k=g!=="none";!p&&k&&C.push(...sC(l,x,g,E));let A=[l,...C],B=yield iv(n,y),M=[],N=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&M.push(B[m]),f){let se=rC(s,a,E);M.push(B[se[0]],B[se[1]])}if(N=[...N,{placement:s,overflows:M}],!M.every(se=>se<=0)){var J,Y;let se=(((J=i.flip)==null?void 0:J.index)||0)+1,G=A[se];if(G)return{data:{index:se,overflows:N},reset:{placement:G}};let V=(Y=N.filter(U=>U.overflows[0]<=0).sort((U,K)=>U.overflows[1]-K.overflows[1])[0])==null?void 0:Y.placement;if(!V)switch(v){case"bestFit":{var O;let U=(O=N.filter(K=>{if(k){let $=Gs(K.placement);return $===h||$==="y"}return!0}).map(K=>[K.placement,K.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((K,$)=>K[1]-$[1])[0])==null?void 0:O[0];U&&(V=U);break}case"initialPlacement":V=l;break}if(s!==V)return{reset:{placement:V}}}return{}})}}};function _2(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,s=yield r.isRTL==null?void 0:r.isRTL(o.floating),i=ns(n),a=kc(n),l=Gs(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=Cc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var hC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:s,y:i,placement:a,middlewareData:l}=n,c=yield _2(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:P(S({},c),{placement:a})}})}}},yC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:s}=n,y=Cc(e,n),{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:m=>{let{x:h,y:w}=m;return{x:h,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield iv(n,c),f=Gs(ns(s)),p=nv(f),v=u[p],g=u[f];if(i){let m=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[m],E=v-d[h];v=tv(w,v,E)}if(a){let m=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=g+d[m],E=g-d[h];g=tv(w,g,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:g}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:i,[f]:a}}})})}}};function wC(e){let t=dn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ec(n)!==s||Ec(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function lv(e){return Ne(e)?e:e.contextElement}function va(e){let t=lv(e);if(!Xe(t))return ar(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:s}=wC(t),i=(s?Ec(n.width):n.width)/r,a=(s?Ec(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var D2=ar(0);function SC(e){let t=jt(e);return!ma()||!t.visualViewport?D2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function F2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jt(e)?!1:t}function Ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=lv(e),i=ar(1);t&&(r?Ne(r)&&(i=va(r)):i=va(e));let a=F2(s,n,r)?SC(s):ar(0),l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){let f=jt(s),p=r&&Ne(r)?jt(r):r,v=f,g=Yf(v);for(;g&&r&&p!==v;){let x=va(g),y=g.getBoundingClientRect(),m=dn(g),h=y.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,w=y.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=h,c+=w,v=jt(g),g=Yf(v)}}return qs({width:u,height:d,x:l,y:c})}function cv(e,t){let n=Sc(e).scrollLeft;return t?t.left+n:Ys(sr(e)).left+n}function bC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:cv(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function z2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,s=o==="fixed",i=sr(r),a=t?wc(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1),u=ar(0),d=Xe(r);if((d||!d&&!s)&&((Ir(r)!=="body"||pa(i))&&(l=Sc(r)),Xe(r))){let p=Ys(r);c=va(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=i&&!d&&!s?bC(i,l,!0):ar(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function H2(e){return Array.from(e.getClientRects())}function B2(e){let t=sr(e),n=Sc(e),r=e.ownerDocument.body,o=co(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=co(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+cv(e),a=-n.scrollTop;return dn(r).direction==="rtl"&&(i+=co(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function U2(e,t){let n=jt(e),r=sr(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;let c=ma();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function V2(e,t){let n=Ys(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?va(e):ar(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function vC(e,t,n){let r;if(t==="viewport")r=U2(e,n);else if(t==="document")r=B2(sr(e));else if(Ne(t))r=V2(t,n);else{let o=SC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qs(r)}function EC(e,t){let n=or(e);return n===t||!Ne(n)||ir(n)?!1:dn(n).position==="fixed"||EC(n,t)}function $2(e,t){let n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Ne(a)&&Ir(a)!=="body"),o=null,s=dn(e).position==="fixed",i=s?or(e):e;for(;Ne(i)&&!ir(i);){let a=dn(i),l=qf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||pa(i)&&!l&&EC(e,i))?r=r.filter(u=>u!==i):o=a,i=or(i)}return t.set(e,r),r}function j2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?wc(t)?[]:$2(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{let d=vC(t,u,o);return c.top=co(d.top,c.top),c.right=ha(d.right,c.right),c.bottom=ha(d.bottom,c.bottom),c.left=co(d.left,c.left),c},vC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function W2(e){let{width:t,height:n}=wC(e);return{width:t,height:n}}function K2(e,t,n){let r=Xe(t),o=sr(t),s=n==="fixed",i=Ys(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=ar(0);if(r||!r&&!s)if((Ir(t)!=="body"||pa(o))&&(a=Sc(t)),r){let f=Ys(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=cv(o));let c=o&&!r&&!s?bC(o,a):ar(0),u=i.left+a.scrollLeft-l.x-c.x,d=i.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function av(e){return dn(e).position==="static"}function xC(e,t){if(!Xe(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function TC(e,t){let n=jt(e);if(wc(e))return n;if(!Xe(e)){let o=or(e);for(;o&&!ir(o);){if(Ne(o)&&!av(o))return o;o=or(o)}return n}let r=xC(e,t);for(;r&&qT(r)&&av(r);)r=xC(r,t);return r&&ir(r)&&av(r)&&!qf(r)?n:r||YT(e)||n}var G2=function(e){return I(this,null,function*(){let t=this.getOffsetParent||TC,n=this.getDimensions,r=yield n(e.floating);return{reference:K2(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function q2(e){return dn(e).direction==="rtl"}var uv={convertOffsetParentRelativeRectToViewportRelativeRect:z2,getDocumentElement:sr,getClippingRect:j2,getOffsetParent:TC,getElementRects:G2,getClientRects:H2,getDimensions:W2,getScale:va,isElement:Ne,isRTL:q2};function CC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Y2(e,t){let n=null,r,o=sr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Tc(d),g=Tc(o.clientWidth-(u+f)),x=Tc(o.clientHeight-(d+p)),y=Tc(u),h={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:co(0,ha(1,l))||1},w=!0;function E(C){let k=C[0].intersectionRatio;if(k!==l){if(!w)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!CC(c,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(C){n=new IntersectionObserver(E,h)}n.observe(e)}return i(!0),s}function np(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=lv(e),u=o||s?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});let d=c&&a?Y2(c,n):null,f=-1,p=null;i&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?Ys(e):null;l&&x();function x(){let y=Ys(e);g&&!CC(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(m=>{o&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var kC=hC;var RC=yC,PC=gC;var rp=(e,t,n)=>{let r=new Map,o=S({platform:uv},n),s=P(S({},o.platform),{_c:r});return mC(e,t,P(S({},o),{platform:s}))};var nt=b(Q(),1),ip=b(Q(),1),LC=b(Ul(),1);var op=typeof document!="undefined"?ip.useLayoutEffect:ip.useEffect;function sp(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(!sp(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!sp(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function OC(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AC(e,t){let n=OC(e);return Math.round(t*n)/n}function dv(e){let t=nt.useRef(e);return op(()=>{t.current=e}),t}function NC(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);sp(f,r)||p(r);let[v,g]=nt.useState(null),[x,y]=nt.useState(null),m=nt.useCallback(V=>{V!==C.current&&(C.current=V,g(V))},[]),h=nt.useCallback(V=>{V!==k.current&&(k.current=V,y(V))},[]),w=s||v,E=i||x,C=nt.useRef(null),k=nt.useRef(null),A=nt.useRef(u),B=l!=null,M=dv(l),N=dv(o),J=dv(c),Y=nt.useCallback(()=>{if(!C.current||!k.current)return;let V={placement:t,strategy:n,middleware:f};N.current&&(V.platform=N.current),rp(C.current,k.current,V).then(U=>{let K=P(S({},U),{isPositioned:J.current!==!1});O.current&&!sp(A.current,K)&&(A.current=K,LC.flushSync(()=>{d(K)}))})},[f,t,n,N,J]);op(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>P(S({},V),{isPositioned:!1})))},[c]);let O=nt.useRef(!1);op(()=>(O.current=!0,()=>{O.current=!1}),[]),op(()=>{if(w&&(C.current=w),E&&(k.current=E),w&&E){if(M.current)return M.current(w,E,Y);Y()}},[w,E,Y,M,B]);let F=nt.useMemo(()=>({reference:C,floating:k,setReference:m,setFloating:h}),[m,h]),se=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),G=nt.useMemo(()=>{let V={position:n,left:0,top:0};if(!se.floating)return V;let U=AC(se.floating,u.x),K=AC(se.floating,u.y);return a?S(P(S({},V),{transform:"translate("+U+"px, "+K+"px)"}),OC(se.floating)>=1.5&&{willChange:"transform"}):{position:n,left:U,top:K}},[n,a,se.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:Y,refs:F,elements:se,floatingStyles:G}),[u,Y,F,se,G])}var ap=(e,t)=>P(S({},kC(e)),{options:[e,t]}),fv=(e,t)=>P(S({},RC(e)),{options:[e,t]});var pv=(e,t)=>P(S({},PC(e)),{options:[e,t]});function Sv(e){let t=L.useRef(void 0),n=L.useCallback(r=>{let o=e.map(s=>{if(s!=null){if(typeof s=="function"){let i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return L.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var YC=S({},L),X2=YC.useInsertionEffect,Q2=X2||(e=>e());function kn(e){let t=L.useRef(()=>{});return Q2(()=>{t.current=e}),L.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 Z2="ArrowUp",J2="ArrowDown",eD="ArrowLeft",tD="ArrowRight";var fn=typeof document!="undefined"?Ta.useLayoutEffect:Ta.useEffect;var nD=[eD,tD],rD=[Z2,J2],H7=[...nD,...rD];var MC=!1,oD=0,_C=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+oD++;function sD(){let[e,t]=L.useState(()=>MC?_C():void 0);return fn(()=>{e==null&&t(_C())},[]),L.useEffect(()=>{MC=!0},[]),e}var iD=YC.useId,bv=iD||sD;function aD(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var lD=L.createContext(null),cD=L.createContext(null),Ev=()=>{var e;return((e=L.useContext(lD))==null?void 0:e.id)||null},dp=()=>L.useContext(cD);function Ea(e){return"data-floating-ui-"+e}function lr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Sa(e){let t=(0,Ta.useRef)(e);return fn(()=>{t.current=e}),t}var DC=Ea("safe-polygon");function mv(e,t,n){return n&&!ga(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function XC(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=dp(),v=Ev(),g=Sa(c),x=Sa(l),y=Sa(n),m=L.useRef(),h=L.useRef(-1),w=L.useRef(),E=L.useRef(-1),C=L.useRef(!0),k=L.useRef(!1),A=L.useRef(()=>{}),B=L.useRef(!1),M=L.useCallback(()=>{var G;let V=(G=o.current.openEvent)==null?void 0:G.type;return(V==null?void 0:V.includes("mouse"))&&V!=="mousedown"},[o]);L.useEffect(()=>{if(!a)return;function G(V){let{open:U}=V;U||(lr(h),lr(E),C.current=!0,B.current=!1)}return s.on("openchange",G),()=>{s.off("openchange",G)}},[a,s]),L.useEffect(()=>{if(!a||!g.current||!n)return;function G(U){M()&&r(!1,U,"hover")}let V=ht(i.floating).documentElement;return V.addEventListener("mouseleave",G),()=>{V.removeEventListener("mouseleave",G)}},[i.floating,n,r,a,g,M]);let N=L.useCallback(function(G,V,U){V===void 0&&(V=!0),U===void 0&&(U="hover");let K=mv(x.current,"close",m.current);K&&!w.current?(lr(h),h.current=window.setTimeout(()=>r(!1,G,U),K)):V&&(lr(h),r(!1,G,U))},[x,r]),J=kn(()=>{A.current(),w.current=void 0}),Y=kn(()=>{if(k.current){let G=ht(i.floating).body;G.style.pointerEvents="",G.removeAttribute(DC),k.current=!1}}),O=kn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);L.useEffect(()=>{if(!a)return;function G($){if(lr(h),C.current=!1,u&&!ga(m.current)||d>0&&!mv(x.current,"open"))return;let W=mv(x.current,"open",m.current);W?h.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},W):n||r(!0,$,"hover")}function V($){if(O())return;A.current();let W=ht(i.floating);if(lr(E),B.current=!1,g.current&&o.current.floatingContext){n||lr(h),w.current=g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),J(),O()||N($,!0,"safe-polygon")}}));let fe=w.current;W.addEventListener("mousemove",fe),A.current=()=>{W.removeEventListener("mousemove",fe)};return}(m.current==="touch"?!gt(i.floating,$.relatedTarget):!0)&&N($)}function U($){O()||o.current.floatingContext&&(g.current==null||g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),J(),O()||N($)}}))($))}if(Ne(i.domReference)){var K;let $=i.domReference;return n&&$.addEventListener("mouseleave",U),(K=i.floating)==null||K.addEventListener("mouseleave",U),f&&$.addEventListener("mousemove",G,{once:!0}),$.addEventListener("mouseenter",G),$.addEventListener("mouseleave",V),()=>{var W;n&&$.removeEventListener("mouseleave",U),(W=i.floating)==null||W.removeEventListener("mouseleave",U),f&&$.removeEventListener("mousemove",G),$.removeEventListener("mouseenter",G),$.removeEventListener("mouseleave",V)}}},[i,a,e,u,d,f,N,J,Y,r,n,y,p,x,g,o,O]),fn(()=>{var G;if(a&&n&&(G=g.current)!=null&&G.__options.blockPointerEvents&&M()){k.current=!0;let U=i.floating;if(Ne(i.domReference)&&U){var V;let K=ht(i.floating).body;K.setAttribute(DC,"");let $=i.domReference,W=p==null||(V=p.nodesRef.current.find(z=>z.id===v))==null||(V=V.context)==null?void 0:V.elements.floating;return W&&(W.style.pointerEvents=""),K.style.pointerEvents="none",$.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{K.style.pointerEvents="",$.style.pointerEvents="",U.style.pointerEvents=""}}}},[a,n,v,i,p,g,M]),fn(()=>{n||(m.current=void 0,B.current=!1,J(),Y())},[n,J,Y]),L.useEffect(()=>()=>{J(),lr(h),lr(E),Y()},[a,i.domReference,J,Y]);let F=L.useMemo(()=>{function G(V){m.current=V.pointerType}return{onPointerDown:G,onPointerEnter:G,onMouseMove(V){let{nativeEvent:U}=V;function K(){!C.current&&!y.current&&r(!0,U,"hover")}u&&!ga(m.current)||n||d===0||B.current&&bm(V.movementX,2)+bm(V.movementY,2)<2||(lr(E),m.current==="touch"?K():(B.current=!0,E.current=window.setTimeout(K,d)))}}},[u,r,n,y,d]),se=L.useMemo(()=>({onMouseEnter(){lr(h)},onMouseLeave(G){O()||N(G.nativeEvent,!1)}}),[N,O]);return L.useMemo(()=>a?{reference:F,floating:se}:{},[a,F,se])}var FC=0;function xa(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(FC);let s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():FC=requestAnimationFrame(s)}function zC(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){let s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function ba(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var wa=new WeakMap,lp=new WeakSet,cp={},gv=0,uD=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,QC=e=>e&&(e.host||QC(e.parentNode)),dD=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=QC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function fD(e,t,n,r){let o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=dD(t,e),a=new Set,l=new Set(i),c=[];cp[o]||(cp[o]=new WeakMap);let u=cp[o];i.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Ir(v)!=="script")if(a.has(v))f(v);else{let g=s?v.getAttribute(s):null,x=g!==null&&g!=="false",y=wa.get(v)||0,m=s?y+1:y,h=(u.get(v)||0)+1;wa.set(v,m),u.set(v,h),c.push(v),m===1&&x&&lp.add(v),h===1&&v.setAttribute(o,""),!x&&s&&v.setAttribute(s,s==="inert"?"":"true")}})}return gv++,()=>{c.forEach(p=>{let v=wa.get(p)||0,g=s?v-1:v,x=(u.get(p)||0)-1;wa.set(p,g),u.set(p,x),g||(!lp.has(p)&&s&&p.removeAttribute(s),lp.delete(p)),x||p.removeAttribute(o)}),gv--,gv||(wa=new WeakMap,wa=new WeakMap,lp=new WeakSet,cp={})}}function HC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=ht(e[0]).body;return fD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var fp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZC(e,t){let n=Rc(e,fp());t==="prev"&&n.reverse();let r=n.indexOf(ts(ht(e)));return n.slice(r+1)[0]}function JC(e){return ZC(ht(e).body,"next")||e}function ek(e){return ZC(ht(e).body,"prev")||e}function Pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function pD(e){Rc(e,fp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function BC(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 pp={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},up=L.forwardRef(function(t,n){let[r,o]=L.useState();fn(()=>{eC()&&o("button")},[]);let s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ea("focus-guard")]:"",style:pp};return(0,pn.jsx)("span",S(S({},t),s))}),tk=L.createContext(null),UC=Ea("portal");function mD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=bv(),o=rk(),[s,i]=L.useState(null),a=L.useRef(null);return fn(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),fn(()=>{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(UC,""),l.appendChild(c),a.current=c,i(c)},[t,r]),fn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ne(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(UC,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function nk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=mD({id:n,root:r}),[i,a]=L.useState(null),l=L.useRef(null),c=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,v=!!i&&!i.modal&&i.open&&o&&!!(r||s);return L.useEffect(()=>{if(!s||!o||f)return;function g(x){s&&Pc(x)&&(x.type==="focusin"?BC:pD)(s)}return s.addEventListener("focusin",g,!0),s.addEventListener("focusout",g,!0),()=>{s.removeEventListener("focusin",g,!0),s.removeEventListener("focusout",g,!0)}},[s,o,f]),L.useEffect(()=>{s&&(p||BC(s))},[p,s]),(0,pn.jsxs)(tk.Provider,{value:L.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s]),children:[v&&s&&(0,pn.jsx)(up,{"data-type":"outside",ref:l,onFocus:g=>{if(Pc(g,s)){var x;(x=u.current)==null||x.focus()}else{let y=i?i.domReference:null,m=ek(y);m==null||m.focus()}}}),v&&s&&(0,pn.jsx)("span",{"aria-owns":s.id,style:pp}),s&&wv.createPortal(t,s),v&&s&&(0,pn.jsx)(up,{"data-type":"outside",ref:c,onFocus:g=>{if(Pc(g,s)){var x;(x=d.current)==null||x.focus()}else{let y=i?i.domReference:null,m=JC(y);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var rk=()=>L.useContext(tk),xv="data-floating-ui-focusable";function VC(e){return e?e.hasAttribute(xv)?e:e.querySelector("["+xv+"]")||e:null}function $C(e){return L.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var gD=20,Xs=[];function hD(e){Xs=Xs.filter(t=>t.isConnected),e&&Ir(e)!=="body"&&(Xs.push(e),Xs.length>gD&&(Xs=Xs.slice(-20)))}function jC(){return Xs.slice().reverse().find(e=>e.isConnected)}function yD(e){let t=fp();return fC(e,t)?e:Rc(e,t)[0]||e}var vD=L.forwardRef(function(t,n){return(0,pn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:pp}))});function ok(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:x,dataRef:y,elements:{domReference:m,floating:h}}=t,w=kn(()=>{var ie;return(ie=y.current.floatingContext)==null?void 0:ie.nodeId}),E=kn(p),C=typeof i=="number"&&i<0,k=ev(m)&&C,A=uD(),B=A?s:!0,M=!B||A&&f,N=Sa(o),J=Sa(i),Y=Sa(a),O=dp(),F=rk(),se=L.useRef(null),G=L.useRef(null),V=L.useRef(!1),U=L.useRef(!1),K=L.useRef(-1),$=F!=null,W=VC(h),z=kn(function(ie){return ie===void 0&&(ie=W),ie?Rc(ie,fp()):[]}),fe=kn(ie=>{let X=z(ie);return N.current.map(ae=>m&&ae==="reference"?m:W&&ae==="floating"?W:X).filter(Boolean).flat()});L.useEffect(()=>{if(r||!c)return;function ie(ae){if(ae.key==="Tab"){gt(W,ts(ht(W)))&&z().length===0&&!k&&Qf(ae);let pe=fe(),je=lo(ae);N.current[0]==="reference"&&je===m&&(Qf(ae),ae.shiftKey?xa(pe[pe.length-1]):xa(pe[1])),N.current[1]==="floating"&&je===W&&ae.shiftKey&&(Qf(ae),xa(pe[0]))}}let X=ht(W);return X.addEventListener("keydown",ie),()=>{X.removeEventListener("keydown",ie)}},[r,m,W,c,N,k,z,fe]),L.useEffect(()=>{if(r||!h)return;function ie(X){let ae=lo(X),je=z().indexOf(ae);je!==-1&&(K.current=je)}return h.addEventListener("focusin",ie),()=>{h.removeEventListener("focusin",ie)}},[r,h,z]),L.useEffect(()=>{if(r||!d)return;function ie(){U.current=!0,setTimeout(()=>{U.current=!1})}function X(ae){let pe=ae.relatedTarget;queueMicrotask(()=>{let je=w(),vt=!(gt(m,pe)||gt(h,pe)||gt(pe,h)||gt(F==null?void 0:F.portalNode,pe)||pe!=null&&pe.hasAttribute(Ea("focus-guard"))||O&&(ba(O.nodesRef.current,je).find(Qe=>{var He,Ze;return gt((He=Qe.context)==null?void 0:He.elements.floating,pe)||gt((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||zC(O.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,VC((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&vt&&ts(ht(W))===ht(W).body){Xe(W)&&W.focus();let Qe=K.current,He=z(),Ze=He[Qe]||He[He.length-1]||W;Xe(Ze)&&Ze.focus()}(k||!c)&&pe&&vt&&!U.current&&pe!==jC()&&(V.current=!0,g(!1,ae,"focus-out"))})}if(h&&Xe(m))return m.addEventListener("focusout",X),m.addEventListener("pointerdown",ie),h.addEventListener("focusout",X),()=>{m.removeEventListener("focusout",X),m.removeEventListener("pointerdown",ie),h.removeEventListener("focusout",X)}},[r,m,h,W,c,O,F,g,d,l,z,k,w]);let de=L.useRef(null),be=L.useRef(null),me=$C([de,F==null?void 0:F.beforeInsideRef]),re=$C([be,F==null?void 0:F.afterInsideRef]);L.useEffect(()=>{var ie,X;if(r||!h)return;let ae=Array.from((F==null||(ie=F.portalNode)==null?void 0:ie.querySelectorAll("["+Ea("portal")+"]"))||[]),pe=O?zC(O.nodesRef.current,w()):[],je=O&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],vt=(X=pe.find(Ze=>{var dt;return ev(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(X=X.context)==null?void 0:X.elements.domReference,Qe=[h,vt,...ae,...je,...E(),se.current,G.current,de.current,be.current,F==null?void 0:F.beforeOutsideRef.current,F==null?void 0:F.afterOutsideRef.current,N.current.includes("reference")||k?m:null].filter(Ze=>Ze!=null),He=c||k?HC(Qe,!M,M):HC(Qe);return()=>{He()}},[r,m,h,c,N,F,k,B,M,O,w,E]),fn(()=>{if(r||!Xe(W))return;let ie=ht(W),X=ts(ie);queueMicrotask(()=>{let ae=fe(W),pe=J.current,je=(typeof pe=="number"?ae[pe]:pe.current)||W,vt=gt(W,X);!C&&!vt&&v&&xa(je,{preventScroll:je===W})})},[r,v,W,C,fe,J]),fn(()=>{if(r||!W)return;let ie=!1,X=!1,ae=ht(W),pe=ts(ae),vt=y.current.openEvent;hD(pe);function Qe(dt){let{open:ps,reason:ms,event:Jt,nested:yr}=dt;if(ps&&(vt=Jt),ms==="escape-key"&&(X=!0),["hover","safe-polygon"].includes(ms)&&Jt.type==="mouseleave"&&(V.current=!0),ms==="outside-press")if(yr)V.current=!1,ie=!0;else if(ZT(Jt)||JT(Jt))V.current=!1;else{let Hr=!1;document.createElement("div").focus({get preventScroll(){return Hr=!0,!1}}),Hr?(V.current=!1,ie=!0):V.current=!0}}x.on("openchange",Qe);let He=ae.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,pp),$&&m&&m.insertAdjacentElement("afterend",He);function Ze(){return typeof Y.current=="boolean"?X&&m?m:jC()||He:Y.current.current||He}return()=>{x.off("openchange",Qe);let dt=ts(ae),ps=gt(h,dt)||O&&ba(O.nodesRef.current,w()).some(Jt=>{var yr;return gt((yr=Jt.context)==null?void 0:yr.elements.floating,dt)});(ps||vt&&["click","mousedown"].includes(vt.type))&&(X=!0);let ms=Ze();queueMicrotask(()=>{let Jt=yD(ms);Y.current&&!V.current&&Xe(Jt)&&(!(Jt!==dt&&dt!==ae.body)||ps)&&Jt.focus({preventScroll:ie}),He.remove()})}},[r,h,W,Y,y,x,O,$,m,w]),L.useEffect(()=>{queueMicrotask(()=>{V.current=!1})},[r]),fn(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:m}),()=>{F.setFocusManagerState(null)}},[r,F,c,v,g,d,m]),fn(()=>{if(r||!W||typeof MutationObserver!="function"||C)return;let ie=()=>{let ae=W.getAttribute("tabindex"),pe=z(),je=ts(ht(h)),vt=pe.indexOf(je);vt!==-1&&(K.current=vt),N.current.includes("floating")||je!==m&&pe.length===0?ae!=="0"&&W.setAttribute("tabindex","0"):ae!=="-1"&&W.setAttribute("tabindex","-1")};ie();let X=new MutationObserver(ie);return X.observe(W,{childList:!0,subtree:!0,attributes:!0}),()=>{X.disconnect()}},[r,h,W,m,N,z,C]);function Ce(ie){return r||!u||!c?null:(0,pn.jsx)(vD,{ref:ie==="start"?se:G,onClick:X=>g(!1,X.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let rt=!r&&B&&(c?!k:!0)&&($||c);return(0,pn.jsxs)(pn.Fragment,{children:[rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:me,onFocus:ie=>{if(c){let ae=fe();xa(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(V.current=!1,Pc(ie,F.portalNode)){let ae=JC(m);ae==null||ae.focus()}else{var X;(X=F.beforeOutsideRef.current)==null||X.focus()}}}),!k&&Ce("start"),n,Ce("end"),rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:re,onFocus:ie=>{if(c)xa(fe()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(V.current=!0),Pc(ie,F.portalNode)){let ae=ek(m);ae==null||ae.focus()}else{var X;(X=F.afterOutsideRef.current)==null||X.focus()}}})]})}function WC(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function xD(e){return Xe(e.target)&&e.target.tagName==="A"}function KC(e){return Jy(e)}function sk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=L.useRef(),p=L.useRef(!1),v=L.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let x=f.current;g.button===0&&a!=="click"&&(ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||WC(g))&&(g.key===" "&&!KC(s)&&(g.preventDefault(),p.current=!0),!xD(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||WC(g)||KC(s)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,d,l]);return L.useMemo(()=>i?{reference:v}:{},[i,v])}var wD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},SD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},GC=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 ik(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,g=dp(),x=kn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,m=L.useRef(!1),h=L.useRef(!1),{escapeKey:w,outsidePress:E}=GC(p),{escapeKey:C,outsidePress:k}=GC(v),A=L.useRef(!1),B=kn(F=>{var se;if(!n||!i||!a||F.key!=="Escape"||A.current)return;let G=(se=s.current.floatingContext)==null?void 0:se.nodeId,V=g?ba(g.nodesRef.current,G):[];if(!w&&(F.stopPropagation(),V.length>0)){let U=!0;if(V.forEach(K=>{var $;if(($=K.context)!=null&&$.open&&!K.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,tC(F)?F.nativeEvent:F,"escape-key")}),M=kn(F=>{var se;let G=()=>{var V;B(F),(V=lo(F))==null||V.removeEventListener("keydown",G)};(se=lo(F))==null||se.addEventListener("keydown",G)}),N=kn(F=>{var se;let G=m.current;m.current=!1;let V=h.current;if(h.current=!1,c==="click"&&V||G||typeof y=="function"&&!y(F))return;let U=lo(F),K="["+Ea("inert")+"]",$=ht(o.floating).querySelectorAll(K),W=Ne(U)?U:null;for(;W&&!ir(W);){let be=or(W);if(ir(be)||!Ne(be))break;W=be}if($.length&&Ne(U)&&!nC(U)&&!gt(U,o.floating)&&Array.from($).every(be=>!gt(W,be)))return;if(Xe(U)&&O){let be=ir(U),me=dn(U),re=/auto|scroll/,Ce=be||re.test(me.overflowX),rt=be||re.test(me.overflowY),ie=Ce&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,X=rt&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,ae=me.direction==="rtl",pe=X&&(ae?F.offsetX<=U.offsetWidth-U.clientWidth:F.offsetX>U.clientWidth),je=ie&&F.offsetY>U.clientHeight;if(pe||je)return}let z=(se=s.current.floatingContext)==null?void 0:se.nodeId,fe=g&&ba(g.nodesRef.current,z).some(be=>{var me;return Xf(F,(me=be.context)==null?void 0:me.elements.floating)});if(Xf(F,o.floating)||Xf(F,o.domReference)||fe)return;let de=g?ba(g.nodesRef.current,z):[];if(de.length>0){let be=!0;if(de.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){be=!1;return}}),!be)return}r(!1,F,"outside-press")}),J=kn(F=>{var se;let G=()=>{var V;N(F),(V=lo(F))==null||V.removeEventListener(c,G)};(se=lo(F))==null||se.addEventListener(c,G)});L.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let F=-1;function se($){r(!1,$,"ancestor-scroll")}function G(){window.clearTimeout(F),A.current=!0}function V(){F=window.setTimeout(()=>{A.current=!1},ma()?5:0)}let U=ht(o.floating);a&&(U.addEventListener("keydown",C?M:B,C),U.addEventListener("compositionstart",G),U.addEventListener("compositionend",V)),y&&U.addEventListener(c,k?J:N,k);let K=[];return f&&(Ne(o.domReference)&&(K=Cn(o.domReference)),Ne(o.floating)&&(K=K.concat(Cn(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(K=K.concat(Cn(o.reference.contextElement)))),K=K.filter($=>{var W;return $!==((W=U.defaultView)==null?void 0:W.visualViewport)}),K.forEach($=>{$.addEventListener("scroll",se,{passive:!0})}),()=>{a&&(U.removeEventListener("keydown",C?M:B,C),U.removeEventListener("compositionstart",G),U.removeEventListener("compositionend",V)),y&&U.removeEventListener(c,k?J:N,k),K.forEach($=>{$.removeEventListener("scroll",se)}),window.clearTimeout(F)}},[s,o,a,y,c,n,r,f,i,w,E,B,C,M,N,k,J]),L.useEffect(()=>{m.current=!1},[y,c]);let Y=L.useMemo(()=>S({onKeyDown:B},u&&S({[wD[d]]:F=>{r(!1,F.nativeEvent,"reference-press")}},d!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}})),[B,r,u,d]),O=L.useMemo(()=>({onKeyDown:B,onMouseDown(){h.current=!0},onMouseUp(){h.current=!0},[SD[c]]:()=>{m.current=!0}}),[B,c]);return L.useMemo(()=>i?{reference:Y,floating:O}:{},[i,Y,O])}function bD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=bv(),s=L.useRef({}),[i]=L.useState(()=>aD()),a=Ev()!=null,[l,c]=L.useState(r.reference),u=kn((p,v,g)=>{s.current.openEvent=p?v:void 0,i.emit("openchange",{open:p,event:v,reason:g,nested:a}),n==null||n(p,v,g)}),d=L.useMemo(()=>({setPositionReference:c}),[]),f=L.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return L.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function ak(e){e===void 0&&(e={});let{nodeId:t}=e,n=bD(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[s,i]=L.useState(null),[a,l]=L.useState(null),u=(o==null?void 0:o.domReference)||s,d=L.useRef(null),f=dp();fn(()=>{u&&(d.current=u)},[u]);let p=NC(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=L.useCallback(h=>{let w=Ne(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;l(w),p.refs.setReference(w)},[p.refs]),g=L.useCallback(h=>{(Ne(h)||h===null)&&(d.current=h,i(h)),(Ne(p.refs.reference.current)||p.refs.reference.current===null||h!==null&&!Ne(h))&&p.refs.setReference(h)},[p.refs]),x=L.useMemo(()=>P(S({},p.refs),{setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=L.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),m=L.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return fn(()=>{r.dataRef.current.floatingContext=m;let h=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);h&&(h.context=m)}),L.useMemo(()=>P(S({},p),{context:m,refs:x,elements:y}),[p,x,y,m])}var hv="active",yv="selected";function vv(e,t,n){let r=new Map,o=n==="item",s=e;if(o&&e){let i=e,{[hv]:a,[yv]:l}=i;s=oe(i,[Em(hv),Em(yv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[xv]:""}),s),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,d]=c;if(!(o&&[hv,yv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,g=new Array(v),x=0;x<v;x++)g[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...g)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function lk(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=L.useCallback(a=>vv(a,e,"reference"),t),s=L.useCallback(a=>vv(a,e,"floating"),n),i=L.useCallback(a=>vv(a,e,"item"),r);return L.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}var ED=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ck(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=ED.get(i))!=null?n:i,l=bv(),u=Ev()!=null,d=L.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0},a==="listbox"&&{role:"combobox"}),a==="menu"&&{id:l}),a==="menu"&&u&&{role:"menuitem"}),i==="select"&&{"aria-autocomplete":"none"}),i==="combobox"&&{"aria-autocomplete":"list"}),[a,o,u,r,l,i]),f=L.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||i==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,i]),p=L.useCallback(v=>{let{active:g,selected:x}=v,y=S({role:"option"},g&&{id:o+"-option"});switch(i){case"select":return P(S({},y),{"aria-selected":g&&x});case"combobox":return S(S({},y),g&&{"aria-selected":!0})}return{}},[o,i]);return L.useMemo(()=>s?{reference:d,floating:f,item:p}:{},[s,d,f,p])}function qC(e,t){let[n,r]=e,o=!1,s=t.length;for(let i=0,a=s-1;i<s;a=i++){let[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function TD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,s=!1,i=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(i===null||a===null||v===0)return i=d,a=f,l=p,null;let g=d-i,x=f-a,m=Math.sqrt(g*g+x*x)/v;return i=d,a=f,l=p,m}let u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:x,nodeId:y,tree:m}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;let{clientX:C,clientY:k}=w,A=[C,k],B=lo(w),M=w.type==="mouseleave",N=gt(g.floating,B),J=gt(g.domReference,B),Y=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),F=v.split("-")[0],se=f>O.right-O.width/2,G=p>O.bottom-O.height/2,V=TD(A,Y),U=O.width>Y.width,K=O.height>Y.height,$=(U?Y:O).left,W=(U?Y:O).right,z=(K?Y:O).top,fe=(K?Y:O).bottom;if(N&&(s=!0,!M))return;if(J&&(s=!1),J&&!M){s=!0;return}if(M&&Ne(w.relatedTarget)&>(g.floating,w.relatedTarget)||m&&ba(m.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(F==="top"&&p>=Y.bottom-1||F==="bottom"&&p<=Y.top+1||F==="left"&&f>=Y.right-1||F==="right"&&f<=Y.left+1)return E();let de=[];switch(F){case"top":de=[[$,Y.top+1],[$,O.bottom-1],[W,O.bottom-1],[W,Y.top+1]];break;case"bottom":de=[[$,O.top+1],[$,Y.bottom-1],[W,Y.bottom-1],[W,O.top+1]];break;case"left":de=[[O.right-1,fe],[O.right-1,z],[Y.left+1,z],[Y.left+1,fe]];break;case"right":de=[[Y.right-1,fe],[Y.right-1,z],[O.left+1,z],[O.left+1,fe]];break}function be(me){let[re,Ce]=me;switch(F){case"top":{let rt=[U?re+t/2:se?re+t*4:re-t*4,Ce+t+1],ie=[U?re-t/2:se?re+t*4:re-t*4,Ce+t+1],X=[[O.left,se||U?O.bottom-t:O.top],[O.right,se?U?O.bottom-t:O.top:O.bottom-t]];return[rt,ie,...X]}case"bottom":{let rt=[U?re+t/2:se?re+t*4:re-t*4,Ce-t],ie=[U?re-t/2:se?re+t*4:re-t*4,Ce-t],X=[[O.left,se||U?O.top+t:O.bottom],[O.right,se?U?O.top+t:O.bottom:O.top+t]];return[rt,ie,...X]}case"left":{let rt=[re+t+1,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ie=[re+t+1,K?Ce-t/2:G?Ce+t*4:Ce-t*4];return[...[[G||K?O.right-t:O.left,O.top],[G?K?O.right-t:O.left:O.right-t,O.bottom]],rt,ie]}case"right":{let rt=[re-t,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ie=[re-t,K?Ce-t/2:G?Ce+t*4:Ce-t*4],X=[[G||K?O.left+t:O.right,O.top],[G?K?O.left+t:O.right:O.left+t,O.bottom]];return[rt,ie,...X]}}}if(!qC([C,k],de)){if(s&&!V)return E();if(!M&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}qC([C,k],be([f,p]))?!s&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var mp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function CD({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:s}={}){let[i,a]=Lr.useState(e),l=o!=null?o:i,c=s!=null?s:a,u=ak({placement:t,open:l,onOpenChange:c,whileElementsMounted:np,middleware:[ap(5),pv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),fv({padding:10})]}),d=u.context,f=sk(d,{enabled:o==null}),p=ik(d),v=ck(d),g=XC(d,{enabled:r!=null?r:!1,handleClose:uk()}),x=lk([f,p,v,g]);return Lr.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var dk=Lr.createContext(null),Tv=()=>{let e=Lr.useContext(dk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Qs=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let s=CD(S({modal:t},n));return(0,Hn.jsx)(dk.Provider,{value:s,children:e})};function kD(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let s=Tv(),i=e||"button",a=t.ref,l=Sv([s.refs.setReference,a]);return(0,Hn.jsx)(i,P(S({ref:l,type:"button"},s.getReferenceProps(n)),{children:t}))}var RD=Lr.forwardRef(function(o,r){var s=o,{style:t}=s,n=oe(s,["style"]);let c=Tv(),{context:i}=c,a=oe(c,["context"]),l=Sv([a.refs.setFloating,r]);return i.open?(0,Hn.jsx)(nk,{children:(0,Hn.jsx)(ok,{context:i,modal:a.modal,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function PD(o){var s=o,{as:e,children:t,onClick:n}=s,r=oe(s,["as","children","onClick"]);let{setOpen:i}=Tv();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),i(!1),c.stopPropagation()}},r),{children:t}))}function fk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(Qs,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(Qs.Content,{className:mp.tooltip,children:[t,(0,Hn.jsx)("div",{className:mp.arrow})]}),(0,Hn.jsx)(Qs.Trigger,{className:mp.tooltipTrigger,children:e})]})}Qs.Trigger=kD;Qs.Content=RD;Qs.Button=PD;var yt=Qs;var Wt=b(R()),AD=3,ID=90,pk=({children:e})=>{let t=_("CommandPalette",Tn);return(0,Wt.jsx)("div",{className:t.listItemActions,children:e})};function Cv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:s,onSourceClick:i,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:d=AD}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var A;let g=ue(so),[x,y]=(0,Ic.useState)(!1),{selected:m,onChangeOpen:h}=es(),[w,E]=(0,Ic.useState)(!1),C=_("CommandPalette",Tn);function k(B){o(B),e&&h(!1)}return(0,Ic.useEffect)(()=>{E(m===c)},[m]),(0,Wt.jsxs)("div",{className:(0,Ac.default)(C.listItem,c===m&&C.listItemSelected),children:[(0,Wt.jsxs)(yt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,Wt.jsx)(yt.Trigger,P(S({className:C.listItemAction,"aria-disabled":(A=f.disabled)!=null?A:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,Wt.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,Wt.jsx)("p",{className:(0,Ac.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,a&&typeof a=="string"?(0,Wt.jsx)(Ks,{tagName:"p",allowList:[],content:jf(a)?$T(a):a,className:(0,Ac.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),n&&n.toString().length>ID&&(0,Wt.jsx)(yt.Content,{className:C.listItemTooltip,children:(0,Wt.jsx)(Ks,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),c===m&&s,l&&l.length>0&&(0,Wt.jsxs)("div",{className:C.sources,children:[(0,Wt.jsx)("span",{className:C.sourcesTitle,children:g("sources")}),l.slice(0,x?l.length:d).map(B=>(0,Wt.jsx)("a",{className:C.source,href:B.url,target:"_blank",title:B.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>i==null?void 0:i(B),children:B.name},B.url)),!x&&l.length>d&&(0,Wt.jsx)("button",{className:(0,Ac.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>y(!0),children:g("showMore",{amount:l.length-d})})]})]})}var Lc=b(R()),mk=()=>(0,Lc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Lc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Lc.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 Zs=b(R());function kv({children:e,title:t,id:n,onDismiss:r}){let o=ue(so),s=_("CommandPalette",Tn),{page:i}=es();return i!==n?null:(0,Zs.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Zs.jsxs)("div",{className:s.pageNav,children:[(0,Zs.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Zs.jsx)(mk,{}),o("back")]}),t&&(0,Zs.jsx)("h3",{className:s.pageTitle,children:t})]}),e]})}var gk=b(Q());var Oc=b(R()),Ca=()=>(0,Oc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Oc.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Oc.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 cr=b(R());function LD({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:s,selectedType:i},a){let l=_("CommandPalette",Tn);return(0,cr.jsxs)("div",{className:l.search,children:[(0,cr.jsx)("div",{className:l.searchIcon,children:(0,cr.jsx)(Ca,{})}),(0,cr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,cr.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:s,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,cr.jsx)("div",{className:l.selectWrapper,children:(0,cr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:i||r,children:[r&&(0,cr.jsx)("option",{children:r}),o.map(c=>(0,cr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var hk=(0,gk.forwardRef)(LD);var Rv=b(Me());var gp=b(R()),OD=o=>{var s=o,{onClick:e,shortKeys:t,children:n}=s,r=oe(s,["onClick","shortKeys","children"]);let i=_("CommandPalette",Tn);return(0,gp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,Rv.default)(i.actionButton,r.className,{[i.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,gp.jsx)("span",{className:(0,Rv.default)(i.actionShortcut,a===8629&&i.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},yk=OD;var Nc=b(R()),ND="[data-command-palette-item]";function Js({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:s,onChangeType:i,onChangeOpen:a,selectedType:l,types:c,children:u,isOpen:d,search:f,updateDeps:p=[]}){let[v,g]=(0,uo.useState)(),x=(0,uo.useRef)(null),y=()=>{o&&o(n),i(void 0),s(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&i){i(void 0),(N=x.current)==null||N.focus();return}if(f.length>0){s("");return}a(!1)},h=()=>{let N=w();N.length!==0&&g(N[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(ND)||[]),E=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let J=E(N);J&&g(J.dataset.itemId)},k=N=>{let J=E(N);J&&J.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let N=w(),J=E(v);if(!J)return;let Y=N.indexOf(J),O=N[Y+1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):h()},B=()=>{if(!v)return;let N=w(),J=E(v);if(!J)return;let Y=N.indexOf(J),O=N[Y-1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):C(N[N.length-1].dataset.itemId)},M=(0,uo.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),A();break}case"ArrowUp":{N.preventDefault(),B();break}case"Enter":{if(v){let J=E(v);J==null||J.click()}break}}},[v]);return(0,uo.useEffect)(()=>{h()},[f,r,l,d,...p]),(0,uo.useEffect)(()=>{v&&k(v)},[v]),(0,Nc.jsx)(Lf,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:m,onClose:y,onKeyDown:M,children:(0,Nc.jsxs)(WT,{selected:v,setSelected:g,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Nc.jsx)(hk,{ref:x,onChange:s,onChangeType:i,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}Js.Page=kv;Js.List=Uy;Js.Image=NT;Js.ListItem=Cv;Js.ListItemActions=pk;Js.Button=yk;var qe=Js;var vk=b(Q());function xk(e,t){(0,vk.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 Mc=b(Q());var wk={data:null,fetchState:"idle"},MD=e=>{var t;return(t=e.entities.data)!=null?t:null},hp=Dn([MD,ca,B1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:s,agentNickname:i}=t!=null?t:{};return s&&s!==o&&r.push(s),i&&i!==o&&r.push(i),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),ur=ge("entities/getEntities",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,s=yield o();return s.length===0?Promise.resolve([]):n.getEntities(s)})),_D=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),DD=ke({name:"entities",initialState:wk,reducers:{},extraReducers:e=>{e.addCase(ur.pending,t=>{t.fetchState="loading"}).addCase(ur.rejected,t=>{t.fetchState="error"}).addCase(ur.fulfilled,(t,n)=>{t.fetchState="done",t.data=_D(t.data?[...t.data,...n.payload]:n.payload)}).addCase(at,()=>wk)}}),Sk=DD.reducer;var Pv={};kt(Pv,{enUS:()=>FD,nlNL:()=>zD});var FD={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},zD={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var bk={root:"dd-TYTKs",empty:"dd-AU7uT"};var ka=b(R()),HD=({onCopy:e})=>{let t=(0,Mc.useRef)(null),n=_("EntitiesList",bk),r=j(hp),{setSelected:o}=es(),s=ue(Pv),i=ve();return(0,Mc.useEffect)(()=>{i(ur())},[]),(0,Mc.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,ka.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,ka.jsx)(qe.List,{children:r.map((a,l)=>(0,ka.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,ka.jsx)("p",{className:n.empty,children:s("noResults")})]})},Ek=HD;var ai=b(Q());var Ra=b(Q());function ei(e,t){let n=(0,Ra.useRef)(e);n.current=e;let[r,o]=(0,Ra.useState)(void 0),[s,i]=(0,Ra.useState)(void 0),[a,l]=(0,Ra.useState)("idle"),c=ve();return{error:s,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{i(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),i(void 0)}}}var yp=b(Me()),Rk=b(Q());var Av=b(R()),Iv=e=>(0,Av.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Av.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 Lv=b(R()),Tk=e=>(0,Lv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Lv.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 Pa(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(s=>{n.classList.add(s)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Ov={};kt(Ov,{enUS:()=>BD,nlNL:()=>UD});var BD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},UD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Ck(e){return ge("analytics/logEvent",(t,n)=>{var s,i,a;let r=(i=(s=n.getState())==null?void 0:s.conversation.current)==null?void 0:i.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,P(S({conversationId:r},o),{data:t.data}))})(e)}function ct(){let e=ve();return(t,n)=>I(this,null,function*(){yield e(Ck({name:t,data:n}))})}var kk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Aa=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,s=o||window.location.origin;return r&&!n?null:r&&n?`${s}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${s}${e}`};var fo=b(R()),VD=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=_("FeedbackThumbs",kk),s=te("enableFeedbackForm"),i=j(Rr),a=j(Aa(`/admin/feedback?conversationId=${i}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ue(Ov),c=ct(),[u,d]=(0,Rk.useState)(null),f=v=>{v.stopPropagation(),Pa(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Pa(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,fo.jsxs)("div",{className:o.thumbs,children:[(0,fo.jsx)(ye.Button,{title:l("thumbsUp"),onClick:f,icon:(0,fo.jsx)(Tk,{}),className:(0,yp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),s&&a?(0,fo.jsx)(ye.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,fo.jsx)(ye.Button,{title:l("thumbsDown"),onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},ti=VD;var _c=b(R()),Pk=()=>(0,_c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,_c.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,_c.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Nv={};kt(Nv,{enUS:()=>$D,nlNL:()=>jD});var $D={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},jD={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var Ak={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:Hk,setPrototypeOf:Ik,isFrozen:WD,getPrototypeOf:KD,getOwnPropertyDescriptor:GD}=Object,{freeze:Gt,seal:Bn,create:Bk}=Object,{apply:Hv,construct:Bv}=typeof Reflect!="undefined"&&Reflect;Gt||(Gt=function(t){return t});Bn||(Bn=function(t){return t});Hv||(Hv=function(t,n,r){return t.apply(n,r)});Bv||(Bv=function(t,n){return new t(...n)});var vp=qt(Array.prototype.forEach),qD=qt(Array.prototype.lastIndexOf),Lk=qt(Array.prototype.pop),Dc=qt(Array.prototype.push),YD=qt(Array.prototype.splice),wp=qt(String.prototype.toLowerCase),Mv=qt(String.prototype.toString),Ok=qt(String.prototype.match),Fc=qt(String.prototype.replace),XD=qt(String.prototype.indexOf),QD=qt(String.prototype.trim),dr=qt(Object.prototype.hasOwnProperty),Kt=qt(RegExp.prototype.test),zc=ZD(TypeError);function qt(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 Hv(e,t,r)}}function ZD(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bv(e,n)}}function xe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wp;Ik&&Ik(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let s=n(o);s!==o&&(WD(t)||(t[r]=s),o=s)}e[o]=!0}return e}function JD(e){for(let t=0;t<e.length;t++)dr(e,t)||(e[t]=null);return e}function ni(e){let t=Bk(null);for(let[n,r]of Hk(e))dr(e,n)&&(Array.isArray(r)?t[n]=JD(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ni(r):t[n]=r);return t}function Hc(e,t){for(;e!==null;){let r=GD(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=KD(e)}function n(){return null}return n}var Nk=Gt(["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","section","select","shadow","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"]),_v=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dv=Gt(["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"]),e3=Gt(["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"]),Fv=Gt(["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"]),t3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mk=Gt(["#text"]),_k=Gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zv=Gt(["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","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","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-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"]),Dk=Gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),xp=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),n3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),r3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),o3=Bn(/\$\{[\w\W]*/gm),s3=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),i3=Bn(/^aria-[\-\w]+$/),Uk=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),a3=Bn(/^(?:\w+script|data):/i),l3=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vk=Bn(/^html$/i),c3=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),Fk=Object.freeze({__proto__:null,ARIA_ATTR:i3,ATTR_WHITESPACE:l3,CUSTOM_ELEMENT:c3,DATA_ATTR:s3,DOCTYPE_NAME:Vk,ERB_EXPR:r3,IS_ALLOWED_URI:Uk,IS_SCRIPT_OR_DATA:a3,MUSTACHE_EXPR:n3,TMPLIT_EXPR:o3}),Bc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},u3=function(){return typeof window=="undefined"?null:window},d3=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 s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch(i){return console.warn("TrustedTypes policy "+s+" could not be created."),null}},zk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u3(),t=ne=>$k(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Bc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,g=Hc(v,"cloneNode"),x=Hc(v,"remove"),y=Hc(v,"nextSibling"),m=Hc(v,"childNodes"),h=Hc(v,"parentNode");if(typeof i=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:C,createNodeIterator:k,createDocumentFragment:A,getElementsByTagName:B}=n,{importNode:M}=r,N=zk();t.isSupported=typeof Hk=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:J,ERB_EXPR:Y,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:U}=Fk,{IS_ALLOWED_URI:K}=Fk,$=null,W=xe({},[...Nk,..._v,...Dv,...Fv,...Mk]),z=null,fe=xe({},[..._k,...zv,...Dk,...xp]),de=Object.seal(Bk(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}})),be=null,me=null,re=!0,Ce=!0,rt=!1,ie=!0,X=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,ps=!1,ms="user-content-",Jt=!0,yr=!1,Hr={},xi=null,H0=xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),B0=null,U0=xe({},["audio","video","img","source","image","track"]),gm=null,V0=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),du="http://www.w3.org/1998/Math/MathML",fu="http://www.w3.org/2000/svg",Br="http://www.w3.org/1999/xhtml",wi=Br,hm=!1,ym=null,DA=xe({},[du,fu,Br],Mv),pu=xe({},["mi","mo","mn","ms","mtext"]),mu=xe({},["annotation-xml"]),FA=xe({},["title","style","font","a","script"]),Wa=null,zA=["application/xhtml+xml","text/html"],HA="text/html",ft=null,Si=null,BA=n.createElement("form"),$0=function(T){return T instanceof RegExp||T instanceof Function},vm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Si&&Si===T)){if((!T||typeof T!="object")&&(T={}),T=ni(T),Wa=zA.indexOf(T.PARSER_MEDIA_TYPE)===-1?HA:T.PARSER_MEDIA_TYPE,ft=Wa==="application/xhtml+xml"?Mv:wp,$=dr(T,"ALLOWED_TAGS")?xe({},T.ALLOWED_TAGS,ft):W,z=dr(T,"ALLOWED_ATTR")?xe({},T.ALLOWED_ATTR,ft):fe,ym=dr(T,"ALLOWED_NAMESPACES")?xe({},T.ALLOWED_NAMESPACES,Mv):DA,gm=dr(T,"ADD_URI_SAFE_ATTR")?xe(ni(V0),T.ADD_URI_SAFE_ATTR,ft):V0,B0=dr(T,"ADD_DATA_URI_TAGS")?xe(ni(U0),T.ADD_DATA_URI_TAGS,ft):U0,xi=dr(T,"FORBID_CONTENTS")?xe({},T.FORBID_CONTENTS,ft):H0,be=dr(T,"FORBID_TAGS")?xe({},T.FORBID_TAGS,ft):{},me=dr(T,"FORBID_ATTR")?xe({},T.FORBID_ATTR,ft):{},Hr=dr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Ce=T.ALLOW_DATA_ATTR!==!1,rt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=T.SAFE_FOR_TEMPLATES||!1,ae=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,vt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,ps=T.SANITIZE_NAMED_PROPS||!1,Jt=T.KEEP_CONTENT!==!1,yr=T.IN_PLACE||!1,K=T.ALLOWED_URI_REGEXP||Uk,wi=T.NAMESPACE||Br,pu=T.MATHML_TEXT_INTEGRATION_POINTS||pu,mu=T.HTML_INTEGRATION_POINTS||mu,de=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Ce=!1),He&&(Qe=!0),Hr&&($=xe({},Mk),z=[],Hr.html===!0&&(xe($,Nk),xe(z,_k)),Hr.svg===!0&&(xe($,_v),xe(z,zv),xe(z,xp)),Hr.svgFilters===!0&&(xe($,Dv),xe(z,zv),xe(z,xp)),Hr.mathMl===!0&&(xe($,Fv),xe(z,Dk),xe(z,xp))),T.ADD_TAGS&&($===W&&($=ni($)),xe($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(z===fe&&(z=ni(z)),xe(z,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&xe(gm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(xi===H0&&(xi=ni(xi)),xe(xi,T.FORBID_CONTENTS,ft)),Jt&&($["#text"]=!0),pe&&xe($,["html","head","body"]),$.table&&(xe($,["tbody"]),delete be.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=d3(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Gt&&Gt(T),Si=T}},j0=xe({},[..._v,...Dv,...e3]),W0=xe({},[...Fv,...t3]),UA=function(T){let H=h(T);(!H||!H.tagName)&&(H={namespaceURI:wi,tagName:"template"});let ee=wp(T.tagName),Be=wp(H.tagName);return ym[T.namespaceURI]?T.namespaceURI===fu?H.namespaceURI===Br?ee==="svg":H.namespaceURI===du?ee==="svg"&&(Be==="annotation-xml"||pu[Be]):!!j0[ee]:T.namespaceURI===du?H.namespaceURI===Br?ee==="math":H.namespaceURI===fu?ee==="math"&&mu[Be]:!!W0[ee]:T.namespaceURI===Br?H.namespaceURI===fu&&!mu[Be]||H.namespaceURI===du&&!pu[Be]?!1:!W0[ee]&&(FA[ee]||!j0[ee]):!!(Wa==="application/xhtml+xml"&&ym[T.namespaceURI]):!1},vr=function(T){Dc(t.removed,{element:T});try{h(T).removeChild(T)}catch(H){x(T)}},gu=function(T,H){try{Dc(t.removed,{attribute:H.getAttributeNode(T),from:H})}catch(ee){Dc(t.removed,{attribute:null,from:H})}if(H.removeAttribute(T),T==="is")if(Qe||He)try{vr(H)}catch(ee){}else try{H.setAttribute(T,"")}catch(ee){}},K0=function(T){let H=null,ee=null;if(vt)T="<remove></remove>"+T;else{let xt=Ok(T,/^[\r\n\t ]+/);ee=xt&&xt[0]}Wa==="application/xhtml+xml"&&wi===Br&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(wi===Br)try{H=new f().parseFromString(Be,Wa)}catch(xt){}if(!H||!H.documentElement){H=C.createDocument(wi,"template",null);try{H.documentElement.innerHTML=hm?E:Be}catch(xt){}}let Ct=H.body||H.documentElement;return T&&ee&&Ct.insertBefore(n.createTextNode(ee),Ct.childNodes[0]||null),wi===Br?B.call(H,pe?"html":"body")[0]:pe?H.documentElement:Ct},G0=function(T){return k.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xm=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},q0=function(T){return typeof a=="function"&&T instanceof a};function Ur(ne,T,H){vp(ne,ee=>{ee.call(t,T,H,Si)})}let Y0=function(T){let H=null;if(Ur(N.beforeSanitizeElements,T,null),xm(T))return vr(T),!0;let ee=ft(T.nodeName);if(Ur(N.uponSanitizeElement,T,{tagName:ee,allowedTags:$}),T.hasChildNodes()&&!q0(T.firstElementChild)&&Kt(/<[/\w!]/g,T.innerHTML)&&Kt(/<[/\w!]/g,T.textContent)||T.nodeType===Bc.progressingInstruction||ae&&T.nodeType===Bc.comment&&Kt(/<[/\w]/g,T.data))return vr(T),!0;if(!$[ee]||be[ee]){if(!be[ee]&&Q0(ee)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee)))return!1;if(Jt&&!xi[ee]){let Be=h(T)||T.parentNode,Ct=m(T)||T.childNodes;if(Ct&&Be){let xt=Ct.length;for(let en=xt-1;en>=0;--en){let xr=g(Ct[en],!0);xr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(xr,y(T))}}}return vr(T),!0}return T instanceof l&&!UA(T)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&Kt(/<\/no(script|embed|frames)/i,T.innerHTML)?(vr(T),!0):(X&&T.nodeType===Bc.text&&(H=T.textContent,vp([J,Y,O],Be=>{H=Fc(H,Be," ")}),T.textContent!==H&&(Dc(t.removed,{element:T.cloneNode()}),T.textContent=H)),Ur(N.afterSanitizeElements,T,null),!1)},X0=function(T,H,ee){if(dt&&(H==="id"||H==="name")&&(ee in n||ee in BA))return!1;if(!(Ce&&!me[H]&&Kt(F,H))){if(!(re&&Kt(se,H))){if(!z[H]||me[H]){if(!(Q0(T)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,T)||de.tagNameCheck instanceof Function&&de.tagNameCheck(T))&&(de.attributeNameCheck instanceof RegExp&&Kt(de.attributeNameCheck,H)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(H))||H==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee))))return!1}else if(!gm[H]){if(!Kt(K,Fc(ee,V,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&T!=="script"&&XD(ee,"data:")===0&&B0[T])){if(!(rt&&!Kt(G,Fc(ee,V,"")))){if(ee)return!1}}}}}}return!0},Q0=function(T){return T!=="annotation-xml"&&Ok(T,U)},Z0=function(T){Ur(N.beforeSanitizeAttributes,T,null);let{attributes:H}=T;if(!H||xm(T))return;let ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},Be=H.length;for(;Be--;){let Ct=H[Be],{name:xt,namespaceURI:en,value:xr}=Ct,Ka=ft(xt),Dt=xt==="value"?xr:QD(xr);if(ee.attrName=Ka,ee.attrValue=Dt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Ur(N.uponSanitizeAttribute,T,ee),Dt=ee.attrValue,ps&&(Ka==="id"||Ka==="name")&&(gu(xt,T),Dt=ms+Dt),ae&&Kt(/((--!?|])>)|<\/(style|title)/i,Dt)){gu(xt,T);continue}if(ee.forceKeepAttr||(gu(xt,T),!ee.keepAttr))continue;if(!ie&&Kt(/\/>/i,Dt)){gu(xt,T);continue}X&&vp([J,Y,O],ex=>{Dt=Fc(Dt,ex," ")});let J0=ft(T.nodeName);if(X0(J0,Ka,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!en)switch(p.getAttributeType(J0,Ka)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{en?T.setAttributeNS(en,xt,Dt):T.setAttribute(xt,Dt),xm(T)?vr(T):Lk(t.removed)}catch(ex){}}}Ur(N.afterSanitizeAttributes,T,null)},VA=function ne(T){let H=null,ee=G0(T);for(Ur(N.beforeSanitizeShadowDOM,T,null);H=ee.nextNode();)Ur(N.uponSanitizeShadowNode,H,null),Y0(H),Z0(H),H.content instanceof s&&ne(H.content);Ur(N.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,ee=null,Be=null,Ct=null;if(hm=!ne,hm&&(ne="<!-->"),typeof ne!="string"&&!q0(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw zc("dirty is not a string, aborting")}else throw zc("toString is not a function");if(!t.isSupported)return ne;if(je||vm(T),t.removed=[],typeof ne=="string"&&(yr=!1),yr){if(ne.nodeName){let xr=ft(ne.nodeName);if(!$[xr]||be[xr])throw zc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)H=K0("<!---->"),ee=H.ownerDocument.importNode(ne,!0),ee.nodeType===Bc.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?H=ee:H.appendChild(ee);else{if(!Qe&&!X&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(H=K0(ne),!H)return Qe?null:Ze?E:""}H&&vt&&vr(H.firstChild);let xt=G0(yr?ne:H);for(;Be=xt.nextNode();)Y0(Be),Z0(Be),Be.content instanceof s&&VA(Be.content);if(yr)return ne;if(Qe){if(He)for(Ct=A.call(H.ownerDocument);H.firstChild;)Ct.appendChild(H.firstChild);else Ct=H;return(z.shadowroot||z.shadowrootmode)&&(Ct=M.call(r,Ct,!0)),Ct}let en=pe?H.outerHTML:H.innerHTML;return pe&&$["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&Kt(Vk,H.ownerDocument.doctype.name)&&(en="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
|
|
20
|
+
`+en),X&&vp([J,Y,O],xr=>{en=Fc(en,xr," ")}),w&&Ze?w.createHTML(en):en},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vm(ne),je=!0},t.clearConfig=function(){Si=null,je=!1},t.isValidAttribute=function(ne,T,H){Si||vm({});let ee=ft(ne),Be=ft(T);return X0(ee,Be,H)},t.addHook=function(ne,T){typeof T=="function"&&Dc(N[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let H=qD(N[ne],T);return H===-1?void 0:YD(N[ne],H,1)[0]}return Lk(N[ne])},t.removeHooks=function(ne){N[ne]=[]},t.removeAllHooks=function(){N=zk()},t}var jk=$k();var mo=b(Q());var Vv=b(Me()),Un=b(Q());var Sp=b(Q()),f3=["bottom","height","left","right","top","width"],p3=(e={},t={})=>f3.some(n=>e[n]!==t[n]),po=new Map,Wk,Kk=()=>{let e=[],t=[];po.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();p3(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{po.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Wk=window.requestAnimationFrame(Kk)};function m3(e,t){return{observe(){let n=po.size===0;if(po.has(e)){let r=po.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else po.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Kk()},unobserve(){let n=po.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||po.delete(e),po.size||cancelAnimationFrame(Wk)}}}}function Uv(e){let[t,n]=(0,Sp.useState)(null);return(0,Sp.useLayoutEffect)(()=>{if(!e.current)return;let r=m3(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ia=b(Q()),Yk=b(Ul());var Gk=b(Q());function rs(e){(0,Gk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ri(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var qk={root:"dd-r-dgo"};var Xk=({children:e,parentNode:t})=>{let[n,r]=(0,Ia.useState)(null),o=(0,Ia.useContext)(Ya);return(0,Ia.useLayoutEffect)(()=>{let s=document.createElement("div");return ri(s),s.classList.add(qk.root),o!=null&&o.portalRootNode&&s.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(s),r(s),()=>{s.isConnected&&s.remove()}},[]),n?(0,Yk.createPortal)(e,n):null};var Or={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 bp=b(R()),Ep=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),s=(0,Un.useCallback)(()=>n(a=>!a),[]),i=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:s,triggerRef:i}};function $v(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 La=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:s,toStyle:i=$v,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=Uv(t),f=Uv(n),p=(0,Un.useMemo)(()=>i(d,f,0),[d,f]);return(0,bp.jsx)(Xk,{parentNode:a,children:(0,bp.jsx)("div",P(S({className:(0,Vv.default)(Or.ref,{[Or.positionAbove]:r==="above",[Or.positionBelow]:r==="below",[Or.positionLeft]:r==="left",[Or.positionRight]:r==="right",[Or.alignStart]:o==="start",[Or.alignCenter]:o==="center",[Or.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,bp.jsx)("div",{className:(0,Vv.default)(e,Or.root),children:s})}))})};var Qk={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};function Kv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ii=Kv();function rR(e){ii=e}var $c={exec:()=>null};function Ae(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(Yt.caret,"$1"),n=n.replace(o,i),r},getRegex:()=>new RegExp(n,t)};return r}var Yt={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")},g3=/^(?:[ \t]*(?:\n|$))+/,h3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,y3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,v3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gv=/(?:[*+-]|\d{1,9}[.)])/,oR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sR=Ae(oR).replace(/bull/g,Gv).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(),x3=Ae(oR).replace(/bull/g,Gv).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(),qv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,w3=/^[^\n]+/,Yv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,S3=Ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b3=Ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gv).getRegex(),kp="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",Xv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,E3=Ae("^ {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",Xv).replace("tag",kp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),iR=Ae(qv).replace("hr",Wc).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",kp).getRegex(),T3=Ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",iR).getRegex(),Qv={blockquote:T3,code:h3,def:S3,fences:y3,heading:v3,hr:Wc,html:E3,lheading:sR,list:b3,newline:g3,paragraph:iR,table:$c,text:w3},Zk=Ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wc).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",kp).getRegex(),C3=P(S({},Qv),{lheading:x3,table:Zk,paragraph:Ae(qv).replace("hr",Wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zk).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",kp).getRegex()}),k3=P(S({},Qv),{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xv).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:$c,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ae(qv).replace("hr",Wc).replace("heading",` *#{1,6} *[^
|
|
21
|
+
]`).replace("lheading",sR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),R3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,P3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aR=/^( {2,}|\\)\n(?!\s*$)/,A3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rp=/[\p{P}\p{S}]/u,Zv=/[\s\p{P}\p{S}]/u,lR=/[^\s\p{P}\p{S}]/u,I3=Ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zv).getRegex(),cR=/(?!~)[\p{P}\p{S}]/u,L3=/(?!~)[\s\p{P}\p{S}]/u,O3=/(?:[^\s\p{P}\p{S}]|~)/u,N3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,uR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,M3=Ae(uR,"u").replace(/punct/g,Rp).getRegex(),_3=Ae(uR,"u").replace(/punct/g,cR).getRegex(),dR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",D3=Ae(dR,"gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Zv).replace(/punct/g,Rp).getRegex(),F3=Ae(dR,"gu").replace(/notPunctSpace/g,O3).replace(/punctSpace/g,L3).replace(/punct/g,cR).getRegex(),z3=Ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Zv).replace(/punct/g,Rp).getRegex(),H3=Ae(/\\(punct)/,"gu").replace(/punct/g,Rp).getRegex(),B3=Ae(/^<(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(),U3=Ae(Xv).replace("(?:-->|$)","-->").getRegex(),V3=Ae("^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",U3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$3=Ae(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Cp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fR=Ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Cp).replace("ref",Yv).getRegex(),pR=Ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yv).getRegex(),j3=Ae("reflink|nolink(?!\\()","g").replace("reflink",fR).replace("nolink",pR).getRegex(),Jv={_backpedal:$c,anyPunctuation:H3,autolink:B3,blockSkip:N3,br:aR,code:P3,del:$c,emStrongLDelim:M3,emStrongRDelimAst:D3,emStrongRDelimUnd:z3,escape:R3,link:$3,nolink:pR,punctuation:I3,reflink:fR,reflinkSearch:j3,tag:V3,text:A3,url:$c},W3=P(S({},Jv),{link:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Cp).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cp).getRegex()}),jv=P(S({},Jv),{emStrongRDelimAst:F3,emStrongLDelim:_3,url:Ae(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),K3=P(S({},jv),{br:Ae(aR).replace("{2,}","*").getRegex(),text:Ae(jv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Tp={normal:Qv,gfm:C3,pedantic:k3},Uc={normal:Jv,gfm:jv,breaks:K3,pedantic:W3},G3={"&":"&","<":"<",">":">",'"':""","'":"'"},Jk=e=>G3[e];function Nr(e,t){if(t){if(Yt.escapeTest.test(e))return e.replace(Yt.escapeReplace,Jk)}else if(Yt.escapeTestNoEncode.test(e))return e.replace(Yt.escapeReplaceNoEncode,Jk);return e}function eR(e){try{e=encodeURI(e).replace(Yt.percentDecode,"%")}catch(t){return null}return e}function tR(e,t){var s;let n=e.replace(Yt.findPipe,(i,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Yt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.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(Yt.slashPipe,"|");return r}function Vc(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function q3(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-1}function nR(e,t,n,r,o){let s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:s,title:i,text:a}}function Y3(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
|
|
22
|
+
`).map(s=>{let i=s.match(n.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(`
|
|
23
|
+
`)}var Oa=class{constructor(t){Ee(this,"options");Ee(this,"rules");Ee(this,"lexer");this.options=t||ii}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Vc(r,`
|
|
24
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=Y3(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let o=Vc(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Vc(n[0],`
|
|
25
25
|
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Vc(n[0],`
|
|
26
26
|
`).split(`
|
|
27
|
-
`),o="",
|
|
27
|
+
`),o="",s="",i=[];for(;r.length>0;){let a=!1,l=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))l.push(r[c]),a=!0;else if(!a)l.push(r[c]);else break;r=r.slice(c);let u=l.join(`
|
|
28
28
|
`),d=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
29
29
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
30
|
-
${u}`:u,
|
|
31
|
-
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,
|
|
30
|
+
${u}`:u,s=s?`${s}
|
|
31
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,g=v.raw+`
|
|
32
32
|
`+r.join(`
|
|
33
|
-
`),x=this.blockquote(g);
|
|
33
|
+
`),x=this.blockquote(g);i[i.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,s=s.substring(0,s.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,g=v.raw+`
|
|
34
34
|
`+r.join(`
|
|
35
|
-
`),x=this.list(g);
|
|
36
|
-
`);continue}}return{type:"blockquote",raw:o,tokens:
|
|
35
|
+
`),x=this.list(g);i[i.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,s=s.substring(0,s.length-v.raw.length)+x.raw,r=g.substring(i.at(-1).raw.length).split(`
|
|
36
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:i,text:s}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),o=r.length>1,s={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=i.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let f=n[2].split(`
|
|
37
37
|
`,1)[0].replace(this.rules.other.listReplaceTabs,m=>" ".repeat(3*m.length)),p=t.split(`
|
|
38
38
|
`,1)[0],v=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):v?g=n[1].length+1:(g=n[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=n[1].length),v&&this.rules.other.blankLine.test(p)&&(u+=p+`
|
|
39
39
|
`,t=t.substring(p.length+1),c=!0),!c){let m=this.rules.other.nextBulletRegex(g),h=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),E=this.rules.other.headingBeginRegex(g),C=this.rules.other.htmlBeginRegex(g);for(;t;){let k=t.split(`
|
|
40
40
|
`,1)[0],A;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||E.test(p)||C.test(p)||m.test(p)||h.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=`
|
|
41
41
|
`+A.slice(g);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||E.test(f)||h.test(f))break;d+=`
|
|
42
42
|
`+p}!v&&!p.trim()&&(v=!0),u+=k+`
|
|
43
|
-
`,t=t.substring(k.length+1),f=A.slice(g)}}
|
|
44
|
-
`):[],
|
|
45
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let
|
|
46
|
-
`),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
|
|
43
|
+
`,t=t.substring(k.length+1),f=A.slice(g)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:s}}}table(t){var a;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=tR(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
44
|
+
`):[],i={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<r.length;l++)i.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:i.align[l]});for(let l of s)i.rows.push(tR(l,i.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[u]})));return i}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
|
|
45
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Vc(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=q3(n[2],"()");if(i>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),nR(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[o.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return nR(r,s,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let i=[...o[0]].length-1,a,l,c=i,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+i);(o=d.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);let f=[...o[0]][0].length,p=t.slice(0,i+o.index+f+l);if(Math.min(i,l)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let v=p.slice(2,-2);return{type:"strong",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=n[1],o="mailto:"+r):(r=n[1],o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r,o;let n;if(n=this.rules.inline.url.exec(t)){let s,i;if(n[2]==="@")s=n[0],i="mailto:"+s;else{let a;do a=n[0],n[0]=(o=(r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])!=null?o:"";while(a!==n[0]);s=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},fr=class e{constructor(t){Ee(this,"tokens");Ee(this,"options");Ee(this,"state");Ee(this,"tokenizer");Ee(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ii,this.options.tokenizer=this.options.tokenizer||new Oa,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:Yt,block:Tp.normal,inline:Uc.normal};this.options.pedantic?(n.block=Tp.pedantic,n.inline=Uc.pedantic):this.options.gfm&&(n.block=Tp.gfm,this.options.breaks?n.inline=Uc.breaks:n.inline=Uc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Tp,inline:Uc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(Yt.carriageReturn,`
|
|
46
|
+
`),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,s,i;for(this.options.pedantic&&(t=t.replace(Yt.tabCharGlobal," ").replace(Yt.spaceLine,""));t;){let a;if((s=(o=this.options.extensions)==null?void 0:o.block)!=null&&s.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+=`
|
|
47
47
|
`: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+=`
|
|
48
48
|
`+a.raw,c.text+=`
|
|
49
49
|
`+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+=`
|
|
50
50
|
`+a.raw,c.text+=`
|
|
51
|
-
`+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((
|
|
51
|
+
`+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0,u=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let c=n.at(-1);r&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
|
52
52
|
`+a.raw,c.text+=`
|
|
53
53
|
`+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+=`
|
|
54
54
|
`+a.raw,c.text+=`
|
|
55
|
-
`+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
|
|
56
|
-
`;return o?'<pre><code class="language-'+Nr(o)+'">'+(r?
|
|
57
|
-
`:"<pre><code>"+(r?
|
|
55
|
+
`+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 s=!1,i="";for(;t;){s||(i=""),s=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(u=f.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 f=n.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,i)){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 d=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0,p=t.slice(1),v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),s=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},Na=class{constructor(t){Ee(this,"options");Ee(this,"parser");this.options=t||ii}space(t){return""}code({text:t,lang:n,escaped:r}){var i;let o=(i=(n||"").match(Yt.notSpaceStart))==null?void 0:i[0],s=t.replace(Yt.endingNewline,"")+`
|
|
56
|
+
`;return o?'<pre><code class="language-'+Nr(o)+'">'+(r?s:Nr(s,!0))+`</code></pre>
|
|
57
|
+
`:"<pre><code>"+(r?s:Nr(s,!0))+`</code></pre>
|
|
58
58
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
59
59
|
${this.parser.parse(t)}</blockquote>
|
|
60
60
|
`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
61
61
|
`}hr(t){return`<hr>
|
|
62
|
-
`}list(t){let n=t.ordered,r=t.start,o="";for(let a=0;a<t.items.length;a++){let l=t.items[a];o+=this.listitem(l)}let
|
|
63
|
-
`+o+"</"+
|
|
62
|
+
`}list(t){let n=t.ordered,r=t.start,o="";for(let a=0;a<t.items.length;a++){let l=t.items[a];o+=this.listitem(l)}let s=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+s+i+`>
|
|
63
|
+
`+o+"</"+s+`>
|
|
64
64
|
`}listitem(t){var r;let n="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+Nr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):n+=o+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
65
65
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
66
|
-
`}table(t){let n="",r="";for(let
|
|
66
|
+
`}table(t){let n="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);n+=this.tablerow({text:r});let o="";for(let s=0;s<t.rows.length;s++){let i=t.rows[s];r="";for(let a=0;a<i.length;a++)r+=this.tablecell(i[a]);o+=this.tablerow({text:r})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
67
67
|
<thead>
|
|
68
68
|
`+n+`</thead>
|
|
69
69
|
`+o+`</table>
|
|
70
70
|
`}tablerow({text:t}){return`<tr>
|
|
71
71
|
${t}</tr>
|
|
72
72
|
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
73
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),
|
|
74
|
-
`+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,
|
|
75
|
-
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Nr(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},
|
|
76
|
-
`)}var Q3=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=_("Markdown",Qk),s=(0,mo.useRef)(null),[a,l]=(0,mo.useState)(null),c=(0,mo.useMemo)(()=>{let g=Pe.parse(X3(e));return jk.sanitize(g.toString()).replaceAll("</code>",`${Y3(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var m;let x=g.target,y=!!((m=s.current)!=null&&m.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==s.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Pa(g,i.fadeup),r==null||r(e0(a)))},f=g=>{let x=g.target;if(x.tagName==="A"){g.stopPropagation();return}"copyIcon"in x.dataset&&(Pa(x,i.fadeup),r==null||r(e0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(e0(a)))},v=g=>{if(g===null)return;let x=g.getBoundingClientRect();x.left<0?g.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,mr.jsxs)(mo.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(La,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:i.options,ref:v,children:[r&&(0,mr.jsx)("button",{type:"button",className:i.option,onClick:d,children:n}),o&&(0,mr.jsxs)(mo.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:f})]})},go=Q3;var Nt=b(R()),Z3=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[i,s]=as.default.useState(""),{setSelected:a}=ei(),l=(0,as.useRef)(null),c=_("KnowledgeSearchStyles",Ak),u=ue(Nv),d=ct(),f=(x=j(fc(e!=null?e:-1)))!=null?x:[],p=es(t,{onSuccess(y){d("knowledge assist question answered",{question:i||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!i&&!!o}),a(`knowledge-assist-${f.length}`),s("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),i!==""&&p.call(i)}),g=(y,m)=>{d("knowledge assist source viewed",{question:m,sourceViewed:y.url||y.name})};return(0,as.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,as.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Nt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Nt.jsx)("div",{className:c.alignRight,children:(0,Nt.jsx)(qe.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:m},h)=>(0,Nt.jsx)(qe.List,{children:(0,Nt.jsx)(qe.ListItem,{id:`knowledge-assist-${h}`,"data-testid":"knowledge-search-answer",description:(0,Nt.jsx)(go,{content:m.answer}),closeOnSelect:!0,onClick:()=>n(m.answer),onSourceClick:w=>g(w,y),sources:m.sources,styles:{title:c.question,description:c.answer},extra:(0,Nt.jsx)("div",{className:c.listItemFeedback,children:(0,Nt.jsx)(ts,{feedbackText:m.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},m)})}),children:y})},`${m.answer}_${h}`)),p.state==="loading"&&(0,Nt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Nt.jsx)("p",{className:c.status,children:u("error")}),(0,Nt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Nt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:i,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),s(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(Pk,{})})]})]})},mR=Z3;var t0=b(R()),Pp=e=>(0,t0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,t0.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 Kc={};kt(Kc,{enUS:()=>J3,nlNL:()=>e4});var J3={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"}]},e4={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 Ap={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var ls=b(R()),t4=({suggestion:e,source:t,context:n})=>{let r=ue(Kc),o=j(Rr),i=ve(),s=te("enableSuggestionFeedback"),a=`${e.text}`,l=j(Aa(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{i(no({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,ls.jsxs)(yt,{placement:"top-end",children:[(0,ls.jsx)(yt.Trigger,{className:Ap.trigger,children:(0,ls.jsx)(Pp,{"data-testid":"feedback-dropdown-trigger"})}),(0,ls.jsx)(yt.Content,{className:Ap.content,children:(0,ls.jsx)(yt.Button,{className:Ap.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Ip=t4;var Gc={};kt(Gc,{enUS:()=>n4,nlNL:()=>r4});var n4={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?"}]},r4={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 ER=b(Q());var o4=["{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}"],i4=new RegExp(o4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function gR(e,t){let n=e.split(i4),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 d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>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 hR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var vR={suggestions:[],fetchState:"idle"},yR={default:vR},xR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},Lp=e=>e.textSuggestions,wR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Op=st("textSuggestions/refresh"),gr=ge("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=aa(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,Ql(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:cn(d.text,o)}),d.title?{title:cn(d.title,o)}:{}))),e==="default"){let d=s?l.filter(wR(a)):l;t.dispatch(Xo(d.slice(0,i)))}return l})),qc=ge("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;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(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},Ql(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(wR(e))),i&&(c=c.map(d=>P(S({},d),{text:cn(d.text,i)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?gR(d.text,e):d.text}))),c=hR(c,s),t.dispatch(Xo(c)),c})),SR=ke({name:"textSuggestions",initialState:yR,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(gr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||vR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(gr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(gr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(qc.pending,t=>{t.default.fetchState="loading"}).addCase(qc.rejected,t=>{t.default.fetchState="error"}).addCase(qc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(at,()=>yR)}}),{setTextSuggestions:I$}=SR.actions,bR=SR.reducer;var cs=b(R()),s4=({types:e,commands:t,onClick:n})=>{let r=ve(),o=ue(Gc),i=j(Lp);return(0,ER.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(gr(s))})},[]),(0,cs.jsxs)("div",{children:[t.length>0&&(0,cs.jsx)(qe.List,{heading:o("commands"),children:t.map((s,a)=>(0,cs.jsx)(qe.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:s.onClick,children:s.label},s.label))}),e.map(({type:s,title:a})=>{var l;return(0,cs.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((c,u)=>(0,cs.jsx)(qe.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)})]})},TR=s4;var Tt=b(R()),l4=200,c4=5,u4=4,n0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?u4:c4),d4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),f4=()=>{var K,$,W;let e=ve(),t=un(),n=ue(Gc),[r,o]=(0,Xt.useState)(!1),[i,s]=(0,Xt.useState)(""),[a,l]=(0,Xt.useState)(null),c=j(q1),u=j(Ui),[d,f]=(0,Xt.useState)(),p=j($t),v=te("showSearch"),g=te("enableSuggestionFeedback"),x=te("showEntitiesCommand"),y=te("showKnowledgeSearch"),m=te("showImageSearch"),h=te("searchTriggerKey"),w=j(Mf),E=j(_f),C=j(CT),k=j(Ty),A=j(Y1),B=j(G1),M=((W=($=(K=u==null?void 0:u.uiConfig)==null?void 0:K.search)==null?void 0:$.initialTypes)==null?void 0:W.filter(({isActive:z})=>z))||[],N=ct(),Z=(0,Xt.useMemo)(()=>{let z=me=>n0(k.filter(re=>re.type===me.toUpperCase()),me,d),fe=(C==null?void 0:C.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:z(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(fe.push({value:"PERSONAL",label:n("personalSuggestions"),list:z("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:z("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:z("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),m&&fe.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:z("IMAGE"),listOrientation:"horizontal"}),M.length===0)return fe;let de=M.map(me=>fe.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),be=fe.filter(me=>!de.find(re=>re.value===me.value));return[...de,...be]},[C,M,m,d]),Y=[{label:n("entitiesClipboard"),onClick:()=>e(ro("entities")),shouldShow:x&&d4(n("entitiesClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>{e(ro("knowledgeAssist")),N("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(z=>z.shouldShow).filter(()=>!d),O=(0,Xt.useCallback)((0,CR.default)((z,fe)=>{e(Fi({query:z,type:fe,tags:["search-overlay"],size:d?50:20}))},l4),[d]),F=(0,Xt.useCallback)((z,fe)=>{switch(fe.type){case"IMAGE":t.send(ky,{suggestion:fe});break;default:t.send(Pr,{text:z,suggestion:fe})}e(Fn(!1))},[e]),ie=z=>{Ar(z.text),e(no({name:"entity copied",data:{entity:z,type:"copy"}})),e(Fn(!1))},G=z=>{t.send(Pr,{text:z,suggestion:{source:"knowledge-assist",text:z}}),e(no({name:"answer used",data:{originalText:z},options:{includeConversationData:!0}})),s(""),a&&e(da(a)),e(ro("search")),e(Fn(!1))},V=z=>{let fe={input:z,threadId:a,onNewThreadId:de=>l(de)};if(E)return Hi(S({assistantCode:E},fe));if(w)return Bi(S({assistantCode:w},fe))};function U(z){return fe=>{r?window.confirm(n("warning"))&&(z(fe),o(!1)):z(fe)}}return(0,Xt.useEffect)(()=>{i?O(i,d):e(Sf())},[i,d]),(0,Xt.useEffect)(()=>{p&&e(pc())},[p]),xk(h,()=>{e(Fn(!0)),N("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Tt.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:U(z=>e(Fn(z))),onChangeType:z=>f(z),onChangePage:U(z=>e(ro(z))),selectedType:d,search:i,page:c,isOpen:B,types:Z,updateDeps:[k],children:[(0,Tt.jsxs)(qe.Page,{id:"search",children:[i.length===0&&(0,Tt.jsx)(TR,{types:M,commands:Y,onClick:F}),i.length>0&&(0,Tt.jsxs)(Xt.Fragment,{children:[Y.length>0&&(0,Tt.jsx)(qe.List,{heading:n("commands"),children:Y.map((z,fe)=>(0,Tt.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:z.onClick,id:`commands-${fe}`,children:z.label},z.label))}),Z.map(({value:z,label:fe,list:de,lineClamp:be,listOrientation:me})=>(0,Tt.jsx)(qe.List,{heading:fe,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(z),hasMore:!d&&A[z.toLowerCase()]>n0(de,z,d).length,children:n0(de,z,d).map(re=>(0,Tt.jsx)(qe.ListItem,{id:`${z}-${re.id}`,closeOnSelect:!1,lineClamp:be,onClick:()=>F(re.text,re),description:z!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:g&&(0,Tt.jsx)(qe.ListItemActions,{children:(0,Tt.jsx)(Ip,{context:i,source:"search",suggestion:re})}),children:z==="IMAGE"?(0,Tt.jsx)(qe.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},z))]})]}),(0,Tt.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:U(()=>{e(ro("search"))}),children:(0,Tt.jsx)(Ek,{onCopy:ie})}),(w!=null?w:E)&&(0,Tt.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:U(()=>{a&&e(da(a)),e(ro("search"))}),children:(0,Tt.jsx)(mR,{threadId:a,onEvaluate:V,question:i,onUse:G,onResetQuestion:()=>{a&&e(da(a)),s(""),l(null)}})})]})},kR=f4;var Yc=b(R()),p4=()=>{let e=te("showSearch"),t=te("isEmbedded");return(0,Yc.jsxs)(RR.Fragment,{children:[e&&(0,Yc.jsx)(kR,{}),t&&(0,Yc.jsx)(gT,{})]})},PR=p4;var OR=b(Me());var Np=b(R()),AR=({className:e})=>(0,Np.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,Np.jsx)("g",{children:(0,Np.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
|
|
73
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),s=eR(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return n&&(i+=' title="'+Nr(n)+'"'),i+=">"+o+"</a>",i}image({href:t,title:n,text:r}){let o=eR(t);if(o===null)return Nr(r);t=o;let s=`<img src="${t}" alt="${r}"`;return n&&(s+=` title="${Nr(n)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Nr(t.text)}},jc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},pr=class e{constructor(t){Ee(this,"options");Ee(this,"renderer");Ee(this,"textRenderer");this.options=t||ii,this.options.renderer=this.options.renderer||new Na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){var o,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[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(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
|
|
74
|
+
`+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,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[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}},oi=class{constructor(t){Ee(this,"options");Ee(this,"block");this.options=t||ii}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?fr.lex:fr.lexInline}provideParser(){return this.block?pr.parse:pr.parseInline}};Ee(oi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Wv=class{constructor(...t){Ee(this,"defaults",Kv());Ee(this,"options",this.setOptions);Ee(this,"parse",this.parseMarkdown(!0));Ee(this,"parseInline",this.parseMarkdown(!1));Ee(this,"Parser",pr);Ee(this,"Renderer",Na);Ee(this,"TextRenderer",jc);Ee(this,"Lexer",fr);Ee(this,"Tokenizer",Oa);Ee(this,"Hooks",oi);this.use(...t)}walkTokens(t,n){var o,s;let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let l of a.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of a.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o=S({},r);if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=n.renderers[s.name];i?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=n[s.level];i?i.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),o.extensions=n),r.renderer){let s=this.defaults.renderer||new Na(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}o.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Oa(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new oi;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=r.hooks[a],c=s[a];oi.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>c.call(s,f));let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults=S(S({},this.defaults),o)}),this}setOptions(t){return this.defaults=S(S({},this.defaults),t),this}lexer(t,n){return fr.lex(t,n!=null?n:this.defaults)}parser(t,n){return pr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let s=S({},o),i=S(S({},this.defaults),s),a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(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 r=="undefined"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let l=i.hooks?i.hooks.provideLexer():t?fr.lex:fr.lexInline,c=i.hooks?i.hooks.provideParser():t?pr.parse:pr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(r=i.hooks.preprocess(r));let u=l(r,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
|
|
75
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Nr(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},si=new Wv;function Pe(e,t){return si.parse(e,t)}Pe.options=Pe.setOptions=function(e){return si.setOptions(e),Pe.defaults=si.defaults,rR(Pe.defaults),Pe};Pe.getDefaults=Kv;Pe.defaults=ii;Pe.use=function(...e){return si.use(...e),Pe.defaults=si.defaults,rR(Pe.defaults),Pe};Pe.walkTokens=function(e,t){return si.walkTokens(e,t)};Pe.parseInline=si.parseInline;Pe.Parser=pr;Pe.parser=pr.parse;Pe.Renderer=Na;Pe.TextRenderer=jc;Pe.Lexer=fr;Pe.lexer=fr.lex;Pe.Tokenizer=Oa;Pe.Hooks=oi;Pe.parse=Pe;var CV=Pe.options,kV=Pe.setOptions,RV=Pe.use,PV=Pe.walkTokens,AV=Pe.parseInline;var IV=pr.parse,LV=fr.lex;var mr=b(R());function X3(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 e0(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 Q3(e){return e.replace(/\r\n/g,`
|
|
76
|
+
`)}var Z3=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let s=_("Markdown",Qk),i=(0,mo.useRef)(null),[a,l]=(0,mo.useState)(null),c=(0,mo.useMemo)(()=>{let g=Pe.parse(Q3(e));return jk.sanitize(g.toString()).replaceAll("</code>",`${X3(s.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var m;let x=g.target,y=!!((m=i.current)!=null&&m.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==i.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Pa(g,s.fadeup),r==null||r(e0(a)))},f=g=>{let x=g.target;if(x.tagName==="A"){g.stopPropagation();return}"copyIcon"in x.dataset&&(Pa(x,s.fadeup),r==null||r(e0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(e0(a)))},v=g=>{if(g===null)return;let x=g.getBoundingClientRect();x.left<0?g.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,mr.jsxs)(mo.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(La,{triggerRef:{current:a},className:s.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:s.options,ref:v,children:[r&&(0,mr.jsx)("button",{type:"button",className:s.option,onClick:d,children:n}),o&&(0,mr.jsxs)(mo.Fragment,{children:[(0,mr.jsx)("div",{className:s.divider}),(0,mr.jsx)("button",{type:"button",className:s.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:s.arrow})]}),(0,mr.jsx)("div",{ref:i,"data-testid":"widget-markdown-content",className:s.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},go=Z3;var Nt=b(R()),J3=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[s,i]=ai.default.useState(""),{setSelected:a}=es(),l=(0,ai.useRef)(null),c=_("KnowledgeSearchStyles",Ak),u=ue(Nv),d=ct(),f=(x=j(fc(e!=null?e:-1)))!=null?x:[],p=ei(t,{onSuccess(y){d("knowledge assist question answered",{question:s||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!s&&!!o}),a(`knowledge-assist-${f.length}`),i("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),s!==""&&p.call(s)}),g=(y,m)=>{d("knowledge assist source viewed",{question:m,sourceViewed:y.url||y.name})};return(0,ai.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,ai.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Nt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Nt.jsx)("div",{className:c.alignRight,children:(0,Nt.jsx)(qe.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:m},h)=>(0,Nt.jsx)(qe.List,{children:(0,Nt.jsx)(qe.ListItem,{id:`knowledge-assist-${h}`,"data-testid":"knowledge-search-answer",description:(0,Nt.jsx)(go,{content:m.answer}),closeOnSelect:!0,onClick:()=>n(m.answer),onSourceClick:w=>g(w,y),sources:m.sources,styles:{title:c.question,description:c.answer},extra:(0,Nt.jsx)("div",{className:c.listItemFeedback,children:(0,Nt.jsx)(ti,{feedbackText:m.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},m)})}),children:y})},`${m.answer}_${h}`)),p.state==="loading"&&(0,Nt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Nt.jsx)("p",{className:c.status,children:u("error")}),(0,Nt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Nt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:s,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),i(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(Pk,{})})]})]})},mR=J3;var t0=b(R()),Pp=e=>(0,t0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,t0.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 Kc={};kt(Kc,{enUS:()=>e4,nlNL:()=>t4});var e4={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"}]},t4={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 Ap={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var li=b(R()),n4=({suggestion:e,source:t,context:n})=>{let r=ue(Kc),o=j(Rr),s=ve(),i=te("enableSuggestionFeedback"),a=`${e.text}`,l=j(Aa(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{s(no({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!i||!l?null:(0,li.jsxs)(yt,{placement:"top-end",children:[(0,li.jsx)(yt.Trigger,{className:Ap.trigger,children:(0,li.jsx)(Pp,{"data-testid":"feedback-dropdown-trigger"})}),(0,li.jsx)(yt.Content,{className:Ap.content,children:(0,li.jsx)(yt.Button,{className:Ap.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Ip=n4;var Gc={};kt(Gc,{enUS:()=>r4,nlNL:()=>o4});var r4={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?"}]},o4={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 ER=b(Q());var s4=["{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}"],i4=new RegExp(s4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function gR(e,t){let n=e.split(i4),r=0,o=[];for(let s=0;s<n.length;s++){let i=n[s];if(o.push(i),s===n.length-1)break;if(t.indexOf(i)===-1)return e;let a=n[s+1],l=s===n.length-2;r+=i.length;let c=r;if(l){let d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>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 hR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var vR={suggestions:[],fetchState:"idle"},yR={default:vR},xR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},Lp=e=>e.textSuggestions,wR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Op=it("textSuggestions/refresh"),gr=ge("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:s,inlineSuggestions:i}=r.settings,a=aa(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,Ql(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:cn(d.text,o)}),d.title?{title:cn(d.title,o)}:{}))),e==="default"){let d=i?l.filter(wR(a)):l;t.dispatch(Xo(d.slice(0,s)))}return l})),qc=ge("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:s}=r.info,{textSuggestionsCount:i,deanonymize:a,inlineSuggestions:l}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},Ql(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(wR(e))),s&&(c=c.map(d=>P(S({},d),{text:cn(d.text,s)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?gR(d.text,e):d.text}))),c=hR(c,i),t.dispatch(Xo(c)),c})),SR=ke({name:"textSuggestions",initialState:yR,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(gr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||vR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(gr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(gr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(qc.pending,t=>{t.default.fetchState="loading"}).addCase(qc.rejected,t=>{t.default.fetchState="error"}).addCase(qc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(at,()=>yR)}}),{setTextSuggestions:N$}=SR.actions,bR=SR.reducer;var ci=b(R()),a4=({types:e,commands:t,onClick:n})=>{let r=ve(),o=ue(Gc),s=j(Lp);return(0,ER.useEffect)(()=>{e.forEach(({type:i})=>{(!s[i]||s[i].suggestions.length===0)&&r(gr(i))})},[]),(0,ci.jsxs)("div",{children:[t.length>0&&(0,ci.jsx)(qe.List,{heading:o("commands"),children:t.map((i,a)=>(0,ci.jsx)(qe.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:i.onClick,children:i.label},i.label))}),e.map(({type:i,title:a})=>{var l;return(0,ci.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=s[i])==null?void 0:l.suggestions.map((c,u)=>(0,ci.jsx)(qe.ListItem,{id:`${i}-${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}`))},i)})]})},TR=a4;var Tt=b(R()),c4=200,u4=5,d4=4,n0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?d4:u4),f4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),p4=()=>{var K,$,W;let e=ve(),t=un(),n=ue(Gc),[r,o]=(0,Xt.useState)(!1),[s,i]=(0,Xt.useState)(""),[a,l]=(0,Xt.useState)(null),c=j(q1),u=j(Us),[d,f]=(0,Xt.useState)(),p=j($t),v=te("showSearch"),g=te("enableSuggestionFeedback"),x=te("showEntitiesCommand"),y=te("showKnowledgeSearch"),m=te("showImageSearch"),h=te("searchTriggerKey"),w=j(Mf),E=j(_f),C=j(CT),k=j(Ty),A=j(Y1),B=j(G1),M=((W=($=(K=u==null?void 0:u.uiConfig)==null?void 0:K.search)==null?void 0:$.initialTypes)==null?void 0:W.filter(({isActive:z})=>z))||[],N=ct(),J=(0,Xt.useMemo)(()=>{let z=me=>n0(k.filter(re=>re.type===me.toUpperCase()),me,d),fe=(C==null?void 0:C.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:z(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(fe.push({value:"PERSONAL",label:n("personalSuggestions"),list:z("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:z("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:z("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),m&&fe.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:z("IMAGE"),listOrientation:"horizontal"}),M.length===0)return fe;let de=M.map(me=>fe.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),be=fe.filter(me=>!de.find(re=>re.value===me.value));return[...de,...be]},[C,M,m,d]),Y=[{label:n("entitiesClipboard"),onClick:()=>e(ro("entities")),shouldShow:x&&f4(n("entitiesClipboard"),s)},{label:s?`${n("knowledgeAssist")}: ${s}`:n("knowledgeAssist"),onClick:()=>{e(ro("knowledgeAssist")),N("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(z=>z.shouldShow).filter(()=>!d),O=(0,Xt.useCallback)((0,CR.default)((z,fe)=>{e(Fs({query:z,type:fe,tags:["search-overlay"],size:d?50:20}))},c4),[d]),F=(0,Xt.useCallback)((z,fe)=>{switch(fe.type){case"IMAGE":t.send(ky,{suggestion:fe});break;default:t.send(Pr,{text:z,suggestion:fe})}e(Fn(!1))},[e]),se=z=>{Ar(z.text),e(no({name:"entity copied",data:{entity:z,type:"copy"}})),e(Fn(!1))},G=z=>{t.send(Pr,{text:z,suggestion:{source:"knowledge-assist",text:z}}),e(no({name:"answer used",data:{originalText:z},options:{includeConversationData:!0}})),i(""),a&&e(da(a)),e(ro("search")),e(Fn(!1))},V=z=>{let fe={input:z,threadId:a,onNewThreadId:de=>l(de)};if(E)return Hs(S({assistantCode:E},fe));if(w)return Bs(S({assistantCode:w},fe))};function U(z){return fe=>{r?window.confirm(n("warning"))&&(z(fe),o(!1)):z(fe)}}return(0,Xt.useEffect)(()=>{s?O(s,d):e(Sf())},[s,d]),(0,Xt.useEffect)(()=>{p&&e(pc())},[p]),xk(h,()=>{e(Fn(!0)),N("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Tt.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:i,onChangeOpen:U(z=>e(Fn(z))),onChangeType:z=>f(z),onChangePage:U(z=>e(ro(z))),selectedType:d,search:s,page:c,isOpen:B,types:J,updateDeps:[k],children:[(0,Tt.jsxs)(qe.Page,{id:"search",children:[s.length===0&&(0,Tt.jsx)(TR,{types:M,commands:Y,onClick:F}),s.length>0&&(0,Tt.jsxs)(Xt.Fragment,{children:[Y.length>0&&(0,Tt.jsx)(qe.List,{heading:n("commands"),children:Y.map((z,fe)=>(0,Tt.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:z.onClick,id:`commands-${fe}`,children:z.label},z.label))}),J.map(({value:z,label:fe,list:de,lineClamp:be,listOrientation:me})=>(0,Tt.jsx)(qe.List,{heading:fe,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(z),hasMore:!d&&A[z.toLowerCase()]>n0(de,z,d).length,children:n0(de,z,d).map(re=>(0,Tt.jsx)(qe.ListItem,{id:`${z}-${re.id}`,closeOnSelect:!1,lineClamp:be,onClick:()=>F(re.text,re),description:z!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:g&&(0,Tt.jsx)(qe.ListItemActions,{children:(0,Tt.jsx)(Ip,{context:s,source:"search",suggestion:re})}),children:z==="IMAGE"?(0,Tt.jsx)(qe.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},z))]})]}),(0,Tt.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:U(()=>{e(ro("search"))}),children:(0,Tt.jsx)(Ek,{onCopy:se})}),(w!=null?w:E)&&(0,Tt.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:U(()=>{a&&e(da(a)),e(ro("search"))}),children:(0,Tt.jsx)(mR,{threadId:a,onEvaluate:V,question:s,onUse:G,onResetQuestion:()=>{a&&e(da(a)),i(""),l(null)}})})]})},kR=p4;var Yc=b(R()),m4=()=>{let e=te("showSearch"),t=te("isEmbedded");return(0,Yc.jsxs)(RR.Fragment,{children:[e&&(0,Yc.jsx)(kR,{}),t&&(0,Yc.jsx)(gT,{})]})},PR=m4;var OR=b(Me());var Np=b(R()),AR=({className:e})=>(0,Np.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,Np.jsx)("g",{children:(0,Np.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
77
|
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
|
|
78
78
|
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
|
|
79
79
|
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
|
|
80
|
-
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 r0=b(R()),m4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},IR=({className:e,color:t})=>(0,r0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r0.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:m4[t||"pink"]})});var LR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var o0={};kt(o0,{enUS:()=>g4,nlNL:()=>h4});var g4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},h4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var us=b(R()),NR=({onLogIn:e})=>{let t=ue(o0),n=te("floatingMenu"),r=te("productName"),o=ve(),i=j($t),s=_("FloatingMenu",LR);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Fn(!0)):e()};return(0,us.jsxs)("button",{type:"button",className:(0,OR.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,us.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,us.jsxs)("div",{className:s.icon,children:[(0,us.jsx)(IR,{className:s.logo,color:"pink"}),i===!1&&(0,us.jsx)(AR,{className:s.lock})]})]})};var Fp=b(Q());function Mr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var y4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},Mp=({ui:e})=>e.overlayCollapsed,MR=ke({name:"ui",initialState:y4,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:Xc,setInputFocus:_p,setOverlayCollapsed:oi,setOpenOverlayWhenTyping:_R,setOverlayCollapsedUserOverwrite:DR}=MR.actions,FR=MR.reducer;var VR=b(Q());var ii=b(Q());var zR=b(Q());function HR(e,t,n){(0,zR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var BR={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var ds=b(R()),x4=["search","personal-collection-search","search-autocomplete"];function w4(e,t,n,r={}){var i;let o="";return x4.includes(t)?o=UT(Xy(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=Xy(e,n,r),r.placeholders===!0&&(o=VT(o)),o}var S4=()=>{},b4=({selected:e,suggestion:t})=>{let n=te("inlineSuggestions"),r=j(aa),[o,i]=(0,ii.useState)(!1),s=te("enableSuggestionFeedback"),a=j(f=>f.input.text),l=ve(),c=_("TextSuggestion",BR),u=(0,ii.useRef)(null);(0,ii.useEffect)(()=>{let f=setTimeout(()=>{l(A1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(f)}},[t]),HR(u,"click",()=>{l(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let d=(0,ii.useMemo)(()=>w4(t.text,t.source,r,{stripAgentPart:n,placeholders:!0,searchKeywords:t.searchKeywords}),[n,t.text,t.source,r,t.searchKeywords]);return t.source==="gpt"&&!n?null:(0,ds.jsxs)("div",{className:c.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,ds.jsx)(ye,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:S4,children:(0,ds.jsx)(Ki,{containerTagName:"div",noWrap:!1,tagName:"span",className:c.formattedText,content:d})}),s&&o&&(0,ds.jsx)("div",{className:c.actions,children:(0,ds.jsx)(Ip,{source:"overlay",context:a,suggestion:t})})]})},UR=b4;var $R=b(R()),E4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,VR.useMemo)(()=>{let o=e.map((i,s)=>(0,$R.jsx)(UR,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),Dp=E4;var jR={root:"dd-PfvRI",paper:"dd-HYlyY"};var Qc=b(R()),T4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Fp.useRef)(null),r=_("InlineSuggestionsOverlay",jR),o=j(Mr),i=ve(),s=j($t),a=j(sa),l=j(Mp),c=te("showTextSuggestions");return ri(()=>{setTimeout(()=>{i(oi({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Fp.useEffect)(()=>{let u=n.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),l||!o||!c||e.length===0||s!==!0||a===!1?null:(0,Qc.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Qc.jsx)("div",{ref:n,className:r.paper,children:(0,Qc.jsx)(Ht,{children:(0,Qc.jsx)(Dp,{suggestions:e,selectedIndex:t})})})})},C4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),WR=oa(C4)(T4);var Zc=b(R()),k4=({children:e})=>{let n=te("locale").replace("-","");return(0,Zc.jsx)(_y.Provider,{value:n,children:e})},R4=({store:e,customStyles:t={},children:n})=>(0,Zc.jsx)(r1,{store:e,children:(0,Zc.jsx)(k4,{children:(0,Zc.jsx)(Ya.Provider,{value:t,children:n})})}),si=R4;var Hp=b(Me()),Ma=b(Q());var KR=b(Q());function GR(e,t){let[n,r]=(0,KR.useState)(()=>{if(typeof window=="undefined")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return ee.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){ee.error(s)}}]}var qR=()=>/Mac/i.test(navigator.platform);var XR=b(Me()),ho=b(Q());var i0={};kt(i0,{enUS:()=>P4,nlNL:()=>A4});var P4={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"}]}]},A4={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 YR={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var ai=b(R()),s0=(e,t,n)=>r=>(0,ai.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),I4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=ue(i0),s=un(),a=_("Login",YR),l=te("productName"),c=(0,ho.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,ho.useCallback)(x=>{x.preventDefault(),s.send(ua,!0)},[t]),d=(0,ho.useMemo)(()=>x=>(0,ai.jsx)("a",{onClick:m=>{m.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,ho.useCallback)(x=>(0,ai.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:g}=(0,ho.useMemo)(()=>({min:s0(a,60*10,c),hour:s0(a,60*60,c),day:s0(a,60*60*12,c)}),[]);return(0,ai.jsxs)("div",{className:(0,XR.default)(e,a.root),children:[i("loginPlease",{login:n?f:d,productName:l}),r&&(0,ai.jsxs)(ho.Fragment,{children:[(0,ai.jsx)("br",{}),i("snooze",{min:p,hour:v,day:g})]})]})},zp=I4;var QR={root:"dd-DoQhb",text:"dd-Jwnev"};var Jc=b(R()),L4=({title:e})=>{let t=_("SearchTrigger",QR),n=ve(),r=ct();return(0,Jc.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,Jc.jsx)(Ca,{}),(0,Jc.jsx)("span",{className:t.text,children:e})]})},ZR=L4;var a0={};kt(a0,{enUS:()=>O4,nlNL:()=>N4});var O4={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"}]},N4={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var JR={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"};var Ve=b(R()),M4=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=_("SuggestionsOverlay",JR),o=ue(a0),i=j(Mr),s=P1(),a=ve(),l=(0,Ma.useRef)(null),c=te("searchTriggerKey"),u=te("productName"),d=j(Mp),f=j($t),p=j(sa),[v,g]=(0,Ma.useState)(null),x=te("showSearch"),y=te("showTextSuggestions"),m=te("adminUrl"),h=te("isEmbedded"),[w,E]=GR("dd-snooze-until-ms",0),C=d||w>Date.now(),k=e.filter(M=>M.source!=="gpt").length,A=()=>{C&&E(0),a(DR(!C))},B=M=>{let N=Date.now()+M*1e3;E(N),ee.info(`Snooze until: ${new Date(N)}`),a(oi({collapse:!0}))};return(0,Ma.useEffect)(()=>{k===0&&g(null)},[e,k]),ri(()=>{a(oi({collapse:!0,skipWhenInputFocus:!0}))}),f===null||p===!1?null:f===!1?(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:r.triggersRight,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:r.collapsible,children:(0,Ve.jsx)(zp,{loginUrl:m,isEmbedded:h,onLogIn:n,onSnooze:B})})]}):!s||!i?null:(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:x&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(qR()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,Ve.jsx)(ZR,{title:o("search")})})}),(0,Ve.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,Hp.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),k>0&&y&&(0,Ve.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(Ht,{children:(0,Ve.jsx)(Dp,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},_4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),eP=oa(_4)(M4);var Qp=b(Me());var xo=b(Q());var _a=b(Q());function Bp(e){return e.contentEditable==="true"}function D4(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 tP(e){let{selectionStart:t,selectionEnd:n}=Bp(e)?D4(e):e;return[t,n]}function nP(e){let[,t]=(0,_a.useState)(),n=(0,_a.useRef)(null);return n.current=tP(e),(0,_a.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=tP(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 rP(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Pu);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 oP=b(Q()),F4=["div","span","mark","strong","b","i","u","em"];function l0(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(F4.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,oP.cloneElement)(r,{children:l0(s,t,n+1)})]}return[...e,...t]}function fs(e){return e.tagName.toLowerCase()==="textarea"}var iP={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 uP=b(Me());var Kp=b(Q());var Da=b(Q());function sP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Up(e){let t=(0,Da.useRef)(null),[n,r]=(0,Da.useState)(!1);return(0,Da.useEffect)(()=>{var u;let o=!1,i=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[s,a]=sP((d,f)=>{let p=t.current;if(!p)return;let v=d/i,g=f/i,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&g>x.y&&g<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=sP(()=>{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 aP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Vp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function lP(e){return e!=null}var cP=b(Me()),$p=b(Q());var yo={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 c0=b(R()),jp=(0,$p.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=oe(i,["className","children"]);let s=(0,$p.useRef)(null),a=_("TabCompletion",yo);return(0,c0.jsx)("div",P(S({ref:Vp([s,r]),className:(0,cP.default)(e,a.popoverContentContainer)},n),{children:(0,c0.jsx)("div",{className:a.popoverContent,children:t})}))});var li=b(R()),z4=e=>t=>{let n=$v(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},H4=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=_("TabCompletion",yo),s=Ep(),a=(0,Kp.useMemo)(()=>z4(e.getBoundingClientRect()),[e]),[l,c]=Up(e);return(0,Kp.useEffect)(()=>{c?s.open():s.close()},[c]),(0,li.jsxs)("span",{children:[(0,li.jsx)("mark",{ref:Vp([l,s.triggerRef]),className:(0,uP.default)(i.matchKeyword,{[i.hover]:c}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,li.jsx)(La,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,li.jsx)(jp,{style:n,children:(0,li.jsx)("div",{className:i.hintText,children:o})})})]})},Wp=class extends so{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=>P(S({},o),{keywordRegex:new RegExp(`\\b${aP(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(lP);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,li.jsx)(H4,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var dP=b(Me());var u0=b(R()),B4=({inputElement:e,children:t})=>{let n=_("TabCompletion",yo),[r,o]=Up(e);return(0,u0.jsx)("mark",{ref:r,className:(0,dP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Gp=class extends so{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,u0.jsx)(B4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Yp=b(Me());var Zt=b(Q());var d0=b(R()),fP=()=>(0,d0.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,d0.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 _r=b(Q());var mP=b(By());var pP={root:"dd-ky-Bv",content:"dd-kV5e1"};function qp(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 f0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),U4=3,V4=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),$4=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=U4})=>{let i=_("LinkSearch",pP),[s,a]=(0,_r.useState)(""),l=ve(),c=j(xR("url")),u=j(X1("URL")),d=(0,_r.useMemo)(()=>u.map(V4),[u]),[f,p]=(0,_r.useState)(d.length-1),v=te("fallbackImage"),g=h=>{let w=h.target;a(w.value)},x=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},y=h=>{var C;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&p(w),h.code==="ArrowDown"&&p(E),h.code==="Enter"&&e(((C=d[f])==null?void 0:C.text)||s)},m=(0,_r.useCallback)((0,mP.default)(h=>{l(Fi({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,_r.useEffect)(()=>{s&&m(s)},[s]),(0,_r.useEffect)(()=>()=>{l(Sf())},[]),(0,Vn.jsxs)("div",{className:i.root,children:[(0,Vn.jsx)(Ht,{withDivider:!0,children:(s?d:c).slice(0,o).map((h,w)=>(0,Vn.jsx)(ye,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Te,{children:[(0,Vn.jsx)(Te.Image,{src:qp(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Te.Content,{className:i.content,cropText:!0,children:[(0,Vn.jsx)(Te.Title,{children:h.title||f0(h.text)}),h.title&&f0(h.text)]}),(0,Vn.jsx)(ye.Actions,{children:(0,Vn.jsx)(ye.ActionButton,{label:r,onClick:E=>x(E,h.text)})})]})},h.text))}),(0,Vn.jsx)(uc,{value:s,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:y})]})},gP=$4;var p0={};kt(p0,{enUS:()=>j4,nlNL:()=>W4});var j4={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},W4={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Qt=b(R()),K4=(0,Zt.forwardRef)((e,t)=>{let n=_("TabCompletion",yo);return(0,Qt.jsx)("mark",{ref:t,className:(0,Yp.default)(n.matchSelection)},"selection-start")}),G4=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=ue(p0),s=_("TabCompletion",yo),a=(0,Zt.useRef)(null),l=(0,Zt.useRef)(null),[c,u]=(0,Zt.useState)(null),d=ve(),f=Ep(document.activeElement===r),[p]=(0,Zt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Zt.useEffect)(()=>()=>p.detach(),[]),(0,Zt.useEffect)(()=>{let g=e.current,x=a.current;!g||!x||(p.setStart(g,0),p.setEnd(x,0))},[e.current,a.current]),ri(()=>{f.close()});let v=(0,Zt.useCallback)(g=>{let x=p.toString(),y=/^http(s?):\/\//.test(g)?g:`https://${g}`;d(gf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Qt.jsxs)("span",{children:[(0,Qt.jsx)("mark",{ref:a,className:(0,Yp.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Qt.jsx)(La,{className:s.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Qt.jsxs)(jp,{style:n,ref:l,children:[(0,Qt.jsx)("div",{className:(0,Yp.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:c!==null}),children:(0,Qt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Qt.jsx)(fP,{}),(0,Qt.jsx)("span",{children:"\xA0"}),(0,Qt.jsx)("span",{children:i("insertLink")})]})}),c==="insertLink"&&(0,Qt.jsx)(gP,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},Xp=class extends so{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,Zt.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?S({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,Qt.jsx)(K4,{ref:this.startRef}):(0,Qt.jsx)(G4,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var vo=b(R()),q4=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let c=_("TabCompletion",iP),u=te("insertLink"),d=te("showMidSentenceSuggestions"),f=te("inlineSuggestions"),p=nP(a),v=(0,xo.useRef)(null),g=j($t);(0,xo.useEffect)(()=>{fs(a)&&p&&rP(a,p)},[p]);let x=(0,xo.useCallback)(h=>{if(!o||!n)return h;let w=[(0,vo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,vo.jsx)("span",{"data-testid":"tab-completion",className:(0,Qp.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,vo.jsx)("span",{className:(0,Qp.default)(c.hint,c.resetIndent),children:(0,vo.jsx)(ku,{keyCode:"tab"},"tabHint")})),l0(h,w)},[o,n,r]),y=(0,xo.useMemo)(()=>{let h=[];return u&&h.push(new Xp("selection")),h.push(new Gp("placeholders")),i&&h.push(new Wp("keywords")),h},[f,u,i]),m=(0,xo.useMemo)(()=>{let h=window.getComputedStyle(a);return{"--dd-color":h.color,"--dd-font-size":h.fontSize,"--dd-font-family":h.fontFamily,"--dd-font-variant":h.fontVariant}},[]);return!e||!g?null:(0,vo.jsxs)("div",{ref:h=>{h!=null&&h.parentElement&&(v.current=h==null?void 0:h.parentElement)},className:c.root,style:m,children:[(0,vo.jsx)(Ki,{tagName:"span",containerTagName:"div",className:(0,Qp.default)(c.container,c.agentText),disableLineBreaks:fs(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,vo.jsx)("br",{})]})},Y4=e=>{var x,y,m;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=la({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",c=(x=t.html)!=null?x:fa(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=i,{showTabCompletion:p,visible:v,showStyleSuggestions:g}=r;return{showTabHint:d,showStyleSuggestions:g,showTabCompletion:p&&Mr(e),content:c,tabText:u,source:l,keywordMatches:(m=(y=o.list)==null?void 0:y.keywordMatches)!=null?m:[],enabled:v&&f!==!1}},hP=oa(Y4)(q4);var ci=b(Q());var X4={token:null,interval:null},m0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),g0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(m0()),setInterval(()=>r(m0()),n)}),yP=ke({name:"passwordlessToken",initialState:X4,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(m0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(g0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:vP}=yP.actions,xP=yP.reducer;function Q4(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var wP=Dn([ST],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:Q4(n.code),label:n.code,name:n.name,description:n.name}})));var Zp=b(Q());var y0=b(Me());var h0=b(R()),eu=()=>(0,h0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,h0.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 SP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Dr=b(R()),Z4=({entities:e})=>{let t=_("EntitiesWidgetList",SP),[n,r]=(0,Zp.useState)(void 0),o=ve(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ar(a.text),o(no({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Zp.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Dr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Dr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Dr.jsx)("span",{className:t.entityText,children:a.text}),(0,Dr.jsxs)("span",{className:t.iconWrapper,children:[(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon),children:(0,Dr.jsx)(eu,{})}),(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon,n===l&&t.iconClicked),children:(0,Dr.jsx)(eu,{})})]})]},a.text))})},bP=Z4;var v0=b(R()),EP=()=>(0,v0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,v0.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 TP={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var CP={root:"dd-nazq3",rotation:"dd-3EHTv"};var RP=b(R()),J4=({size:e=12})=>{let t=_("LoadingSpinner",CP);return(0,RP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},kP=J4;var x0=b(R()),PP=()=>(0,x0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,x0.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 tu=b(R()),AP=e=>(0,tu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,tu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,tu.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 w0={};kt(w0,{enUS:()=>eF,nlNL:()=>tF});var eF={error:[{type:0,value:"Something went wrong"}]},tF={error:[{type:0,value:"Er ging iets fout"}]};var Rn=b(R()),IP,nF=3e3,rF=({assistantOptions:e})=>{let t=_("OnDemandAssistants",TP),n=ue(w0),r=es(nr),o=es(oo),i=j(RT),s=j(PT),a=ct(),l=s.filter(d=>d.isPinned),c=s.filter(d=>!d.isPinned),u=d=>I(void 0,null,function*(){if(clearTimeout(IP),a("trigger on demand assistant",{assistantCode:d}),d===i){o.call({transcript:e.transcript});return}r.call(P(S({},e),{assistantCode:d})),IP=setTimeout(()=>r.reset(),nF)});return s.length===0?null:(0,Rn.jsxs)("div",{className:t.root,children:[l.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)("button",{type:"button",className:t.button,disabled:r.state==="loading",onClick:()=>u(d),children:f},d)),r.state==="loading"&&(0,Rn.jsx)(kP,{}),r.state==="done"&&(0,Rn.jsx)(AP,{"data-testid":"trigger-done"}),r.state==="error"&&(0,Rn.jsx)(fk,{trigger:(0,Rn.jsx)(PP,{}),children:n("error")}),c.length>0&&r.state==="idle"&&(0,Rn.jsxs)(yt,{placement:"top-end",children:[(0,Rn.jsx)(yt.Trigger,{className:t.trigger,children:(0,Rn.jsx)(Pp,{"data-testid":"trigger"})}),(0,Rn.jsx)(yt.Content,{className:t.nav,"data-testid":"popover",children:c.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)(yt.Button,{className:t.item,disabled:r.state==="loading",onClick:()=>u(d),children:f},d))})]})]})},LP=rF;var MP=b(Q());var OP={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var NP=b(R()),oF=({width:e})=>{let t=_("LoadingProgressBar",OP);return(0,NP.jsx)("div",{className:t.loadingBar,style:{width:e}})},Jp=oF;var wo=b(R()),em=({title:e})=>{let t=(0,MP.useRef)(null);return Lx(t),(0,wo.jsx)(ye,{ref:t,children:(0,wo.jsx)(Te,{children:(0,wo.jsxs)(Te.Content,{children:[(0,wo.jsx)(Te.Title,{children:e}),(0,wo.jsx)(Jp,{width:"60%"}),(0,wo.jsx)(Jp,{width:"90%"}),(0,wo.jsx)(Jp,{width:"50%"})]})})})};var nu={};kt(nu,{enUS:()=>iF,nlNL:()=>sF});var iF={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"}]},sF={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 ps=b(Q());var S0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",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 Mt=b(R()),aF=500,lF=100,cF=({content:e,onChange:t,onCopy:n})=>{let r=(0,ps.useRef)(null),o=_("WidgetCue",S0);return(0,ps.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,lF),aF);i.style.setProperty("height",`${s}px`)},[e]),(0,Mt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},uF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let i=_("WidgetCue",S0),s=ue(nu),a=ct(),l=te("hasKeyboardInput"),[c,u]=(0,ps.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,ps.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Mt.jsxs)(ye,{"data-testid":"cue",children:[(0,Mt.jsx)(Te,{children:(0,Mt.jsxs)(Te.Content,{children:[e.title&&(0,Mt.jsx)(Te.Title,{className:i.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?s(e.rule.label):e.title}),e.specialType==="summary"?(0,Mt.jsx)(cF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Mt.jsx)(go,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(ye.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:i.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(ye.Button,{onClick:()=>f(c),children:s("copyCue")}),e.callToAction&&(0,Mt.jsx)(ye.Button,{onClick:d,children:e.callToAction.label}),(0,Mt.jsx)(ye.Button,{onClick:v,children:s("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(ts,{eventName:"summary feedback",feedbackText:(g=e.text)!=null?g:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(ts,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},_P=uF;var Fa=b(R()),dF=({cues:e})=>{let t=ve(),n=un(),r=ue(nu),o=ct(),i=c=>{t(ET({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},s=(c,u)=>{switch(Ar(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(Nf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{n.send(Pr,{text:c,suggestion:{source:"cue",sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Fa.jsx)(Fa.Fragment,{children:e.map(c=>c.isLoading?(0,Fa.jsx)(em,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Fa.jsx)(_P,{cue:c,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},c.rule.id))})},DP=dF;var tm=b(Q());var FP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var hr=b(R());function fF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var zP=({data:e,schema:t})=>{let n=_("WidgetCustomData",FP),r=o=>{Ar(o)};return(0,tm.useEffect)(()=>{ee.info("Custom data",e,t)},[e]),(0,hr.jsx)("dl",{className:n.root,children:t.map(o=>{let i=fF(e,o.path);return(0,hr.jsxs)(tm.Fragment,{children:[(0,hr.jsx)("dt",{className:n.label,children:o.label}),(0,hr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,hr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,hr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof i=="string"||typeof i=="number"?(0,hr.jsxs)("button",{type:"button",onClick:()=>r(`${i}`),className:n.copyButton,children:[(0,hr.jsx)("span",{className:n.copyButtonText,children:i}),(0,hr.jsx)(eu,{})]}):"-"})]},o.label)})})};var ut=b(Q());var za={};kt(za,{enUS:()=>pF,nlNL:()=>mF});var pF={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"}]},mF={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 nm={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 we=b(R()),gF=3,hF=({sources:e,onClick:t})=>{let n=ue(za),r=_("WidgetKnowledgeAssistant",nm),[o,i]=(0,ut.useState)(!1),s=o?e:e.slice(0,gF);return s.length===0?null:(0,we.jsxs)("ul",{className:r.sources,children:[s.map(a=>(0,we.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,we.jsxs)(yt,{tooltip:!0,placement:"top-start",children:[(0,we.jsx)(yt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,we.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,we.jsx)(yt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),s<e&&(0,we.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>i(!0),children:n("showMore",{amount:e.length-s.length})})]})},yF=({title:e,description:t})=>(0,we.jsx)(ye,{"data-testid":"knowledge-assist-empty-state",children:(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:e}),(0,we.jsx)(go,{content:t})]})})}),vF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:i,onSourceClick:s})=>{var l;let a=ue(za);return(0,we.jsxs)(ye,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:t.question}),(0,we.jsx)(go,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?i:void 0}),(0,we.jsx)(hF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>s(c,t.question)})]})}),(0,we.jsxs)(ye.ButtonsContainer,{children:[(0,we.jsx)("div",{}),(0,we.jsx)(ts,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},b0=(0,ut.createContext)(null),rm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,ut.useState)(null),[s,a]=(0,ut.useState)(!1),[l,c]=(0,ut.useState)(!!n),[u,d]=(0,ut.useState)(null),f=ve(),p=ct(),v=es(y=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:y,threadId:o,onNewThreadId(m){i(m)}})},{onSuccess(y){var m;p("knowledge assist question answered",{question:y.question,answer:y.answer.answer,sources:(m=y.answer.sources)!=null?m:[],isFollowUpQuestion:y.threadId===o,isAutoInitiated:l}),c(!1)}}),g=y=>I(void 0,null,function*(){a(!0),d(y),yield v.call(y),a(!1),d(null)}),x={isEnabled:!!e,isSubmitting:s,threadId:o,pendingInput:u,onSubmit:g,onReset(){o&&f(da(o)),i(null)}};return(0,ut.useEffect)(()=>{n&&g(n)},[n]),(0,we.jsx)(b0.Provider,{value:x,children:r})},om=()=>{let e=ue(za),t=_("WidgetKnowledgeAssistant",nm),n=(0,ut.useContext)(b0),r=(0,ut.useRef)(null),[o,i]=(0,ut.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,we.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,we.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:s}),(0,we.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},im=({title:e,emptyState:t})=>{var v,g;let n=ue(za),r=ct(),o=_("WidgetKnowledgeAssistant",nm),i=(0,ut.useRef)(null),s=(0,ut.useContext)(b0),a=(g=j(fc((v=s.threadId)!=null?v:-1)))!=null?g:[],l=te("hasKeyboardInput"),c=un(),u=x=>{Ar(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),s.onReset(),r("knowledge assist reset",{threadId:(y=s.threadId)!=null?y:void 0})},p=x=>{c.send(Pr,{text:x,suggestion:{source:"cue",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t?null:(0,we.jsxs)(ut.Fragment,{children:[(0,we.jsx)(wr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,we.jsxs)(Ht,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,we.jsx)(yF,S({},t)),a.map((x,y)=>(0,we.jsx)(vF,{innerRef:y===a.length-1?i:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),s.pendingInput&&(0,we.jsx)(em,{title:s.pendingInput})]})}),a.length>0&&(0,we.jsx)("div",{className:o.resetContainer,children:(0,we.jsx)(ye.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var UP=b(Q());var xF=/(https?:\/\/[^\s]+)/,BP=e=>e.split(" ").find(t=>xF.test(t));var $n=b(R()),wF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=BP(r),i=ue(Kc),s=te("showImages"),a=te("fallbackImage"),l=te("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,UP.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(ye,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Te,{children:[s&&e.image&&(0,$n.jsx)(Te.Image,{src:qp(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Te.Content,{children:[e.title&&(0,$n.jsx)(Te.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(ye.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Te.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(ye.Actions,{children:[o&&(0,$n.jsx)(ye.ActionButton,{onClick:u,label:i("visitUrl")}),l&&(0,$n.jsx)(ye.ActionButton,{primary:!0,onClick:c,label:i("useSuggestion")})]})]})},VP=wF;var ru=b(R()),SF=({lines:e,suggestions:t})=>{let n=un(),r=(o,i)=>{n.send(Pr,{text:o,suggestion:P(S({},i),{source:i.source,sourceText:i.text})})};return(0,ru.jsx)(ru.Fragment,{children:t.map(o=>(0,ru.jsx)(VP,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},$P=SF;var ou={};kt(ou,{enUS:()=>bF,nlNL:()=>EF});var bF={waiting:[{type:0,value:"Loading\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"}]},EF={waiting:[{type:0,value:"Laden\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 Ha={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(R()),WP=(e,t)=>{let n=j($t);(0,ci.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},TF=({onLogIn:e})=>{let t=_("Widget",Ha),n=te("isEmbedded"),r=te("adminUrl");return(0,ce.jsx)("div",{className:t.loginText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)(zp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},jP=({text:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.stateText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)("p",{children:e})})},"notification")},CF=()=>{let e=ue(ou),t=ve(),n=_("Widget",Ha),r=te("showSearch"),o=te("isEmbedded"),i=j(Aa("/admin/")),s=un(),a=te("productName"),l=ct();return WP(()=>{if(o)return t(g0()),()=>{t(vP())}},[t,o]),!r&&!i?null:(0,ce.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ce.jsx)(ye.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ce.jsx)(Ca,{}),onClick:()=>{s.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),i&&(0,ce.jsx)(ye.Button,{as:"a",target:"_blank",icon:(0,ce.jsx)(EP,{}),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})})]})},kF=({title:e,content:t})=>{let n=ue(ou),[r,o]=(0,ci.useState)(!0);return r?(0,ce.jsx)(wr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsxs)(ye,{children:[(0,ce.jsx)(Te,{children:(0,ce.jsx)(Te.Content,{children:(0,ce.jsx)(go,{content:t})})}),(0,ce.jsx)(ye.ButtonsContainer,{children:(0,ce.jsx)(ye.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},RF=()=>{let e=ve(),t=j(gc),n=j(IT),r=j(wP),o=j(U1),i=j(hp),s=j(Lp),a=j(Ui),l=j(Rr);return(0,ci.useEffect)(()=>{!!o&&!n&&ee.warn("Custom data provided, but no schema.")},[o,n]),WP(()=>{t.forEach(({type:c})=>{c==="entities"?e(ur()):Au.includes(c)||e(gr(c))})},[e,l,a]),(0,ci.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&ee.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:d,lines:f,schema:p,property:v})=>{var g,x;switch(c){case"entities":return i&&i.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(bP,{entities:i})},c);case"cues":return r&&r.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(DP,{cues:r})})},c);case"custom-data-banner":return o&&v&&o[v]&&(0,ce.jsx)(kF,{title:u,content:String(o[v])});case"custom-data":return o&&p&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(zP,{data:o,schema:p})})},c);default:return((x=(g=s[c])==null?void 0:g.suggestions)==null?void 0:x.length)>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)($P,{lines:f,contentType:c,suggestions:s[c].suggestions.slice(0,d)||[]})})},c)}})})},E0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.footer,children:e})},T0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},PF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ue(ou),o=j(sa),i=j($t),s=j(C1),a=j(Ui),l=j(AT("knowledge-assist")),c=j(Mf),u=j(_f);return o===!1?(0,ce.jsx)(jP,{text:r("notSupported")}):i===!1?(0,ce.jsx)(TF,{onLogIn:e}):!a||!s||i===null?(0,ce.jsx)(jP,{text:r("waiting")}):(0,ce.jsx)(T0,{children:(0,ce.jsxs)(rm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?Hi:Bi,children:[(0,ce.jsxs)(Ts,{children:[(0,ce.jsx)(CF,{}),(0,ce.jsx)(RF,{}),l&&(0,ce.jsx)(im,{title:l.title,emptyState:t.emptyState})]}),(0,ce.jsxs)(E0,{children:[l&&(0,ce.jsx)(om,{}),(0,ce.jsx)(LP,{assistantOptions:n})]})]})})},KP=PF;function Ba(e){let t=new Range;return t.selectNodeContents(e),t}function GP(e,t,n){try{return ui(e,t,n),!0}catch(r){return!1}}function sm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function am(e){return"tagName"in e&&e.tagName==="BR"}var iu=/[\u200B-\u200D\uFEFF]/g;function ui(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,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(iu,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=s(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(am(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;sm(l)&&c&&!sm(c)&&!am(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}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,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let g=d.textContent;p&&(a=c+g.substring(0,r).replace(iu,"").length),v&&(l=c+g.substring(0,i).replace(iu,"").length),c+=g.replace(iu,"").length;break}case Node.ELEMENT_NODE:{if(am(d)&&d.nextSibling){c++;break}!f&&sm(d)&&d.previousSibling&&c++;for(let g=0;g<d.childNodes.length;g++){let x=p&&g===r,y=v&&g===i;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!s)&&u(d.childNodes[g]),v&&g===i-1&&(l=c),l!==void 0))break}v&&(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 au(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 d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,g=p?i:void 0;l+=u.textContent.replace(iu,"").substring(v,g);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&am(u)&&u.nextSibling){l+=`
|
|
81
|
-
`;break}!d&&!
|
|
82
|
-
`);let v=f?r:0,g=p?Math.min(i,u.childNodes.length):u.childNodes.length;for(let x=v;x<g&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var qP=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(qP||{}),So=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),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.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let i=this.getCaretPosition();Yo(i,this.cachedCaretPosition)||(this.cachedCaretPosition=i,this.emit("caretposition",i))}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(qP).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()})}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 YP(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var ms=class extends So{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),au(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var s;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="getComposedRanges"in r&&n instanceof ShadowRoot?(s=r.getComposedRanges(n))==null?void 0:s[0]: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!YP(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!YP(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return su(this.element,n);let r=this.lastKnownSelection;if(r&&GP(this.element,r.start,r.end))return r;let o=Ba(this.element);return o.collapse(!1),su(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return au(this.element,ui(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 AF=["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 XP(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",AF.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 gs=class extends So{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 XP(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 QP(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 IF(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var C0=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()}},k0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=QP(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()}},R0=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(),ee.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 k0(t,this.deepdeskUrl,{debug:!0}):new C0(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=IF(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(ee.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;ee.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(P(S({},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)}},ZP=R0;function LF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[LF(n)]:$e(e[n])}),{}):e}function OF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _t(e){return Array.isArray(e)?e.map(_t):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[OF(n)]:_t(e[n])}),{}):e}var Ua=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var P0=e=>new Promise(t=>{setTimeout(t,e)});var Va=class extends Ua{constructor(){super(...arguments);this.name="ClientError"}},I0=class extends Ua{constructor(){super(...arguments);this.name="ServerError"}},A0=new Map;function NF(e){return I(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:(ee.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var di=class di{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}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:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=k=>k instanceof TypeError,retryOnResponse:g=k=>k.status>=500,version:x=null}=C,y=oe(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(A0.has(s)){r(A0.get(s));return}}let m=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(m.headers=P(S({},m.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(m.headers=P(S({},m.headers),{"X-Deepdesk-API-Version":x}));let h=d,w=!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 E=()=>I(this,null,function*(){return h--,a(s,m).then(k=>I(this,null,function*(){return g(k)&&!i.isAborted&&h>0?(yield P0(f),E()):k.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):k})).catch(k=>I(this,null,function*(){if(v(k)&&!i.isAborted&&h>0)return yield P0(f),E();throw k}))});E().then(k=>I(this,null,function*(){let A=yield NF(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new I0("Server Error",A));return}if(k.status===401){o(new Va("Unauthorized",A));return}if(k.status===403){o(new Va("Forbidden",A));return}if(k.status===404){o(new Va("Not Found",A));return}if(k.status>=400){o(new Va("Bad Request",A));return}c&&A0.set(s,A),r(A)})).catch(k=>{o(k)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return di.refreshingToken||(di.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{di.refreshingToken=null},1e3*60)})),di.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};di.refreshingToken=null;var hs=di;function L0(e){return P(S({},$e(e)),{metadata:e.metadata})}var ys=class ys{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new hs(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>I(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(ys.exchangeTokenPromise||(ys.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),ys.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),ee.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},_t(t)),{metadata:(r=t.metadata)!=null?r:{}}));return L0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",_t(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",_t(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),ee.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 ee.info(`Successfully retrieved conversation ${s.id} for session ${t}`),L0(s)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){ee.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 I(this,null,function*(){var i;yield this.preflight();let r=_t(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return L0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},_t(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let s=n,{data:r}=s,o=oe(s,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/v2/analytics/events",_t(P(S(S({},i),o),{data:r,name:t})))})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw ee.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",_t(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(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}`,_t(n),{abortLatest:!0})).map(s=>P(S({},$e(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 I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,_t(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 I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",_t(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,_t(t),{version:"v2"});return $e(n)})}knowledgeAssist(i,s,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_t({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(i=>i.text&&i.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let i=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()}`,s=yield this.client.post(i,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(s.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(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 $e(i)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",_t(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Vx);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&ee.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};ys.exchangeTokenPromise=null;var bo=ys;var JP={startTime:null,stopTime:null},eA=e=>e.handlingTime,tA=ke({name:"handlingTime",initialState:JP,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(at,()=>JP)}}),{handlingTimeStart:nA,handlingTimeStop:lm,handlingTimeReset:rA}=tA.actions,oA=tA.reducer;var iA=(e={})=>{let t=S({onAuthError:ia(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var cm={list:{keywordMatches:[]},fetchState:"idle"};var vs=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[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 cm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),MF=ke({name:"styleSuggestions",initialState:cm,reducers:{},extraReducers:e=>{e.addCase(vs.pending,t=>{t.fetchState="loading"}).addCase(vs.rejected,t=>{t.fetchState="error"}).addCase(vs.fulfilled,(t,n)=>{t.fetchState="done",Yo(t.list,n.payload)||(t.list=n.payload)}).addCase(Di,t=>{t.list=cm.list}).addCase(at,()=>cm)}}),sA=MF.reducer;var aA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:vs,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:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function _F(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var lA=(e={})=>{let t=S({getTextSuggestions:gr,getAutocompleteSuggestions:qc,debounce:200,check:Mr},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,d=(g=l.conversation.current)==null?void 0:g.id,f=i.type===Op.toString();if(!d||!c&&!u)return a;let{input:p}=l;return _F(p,s)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=aa(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var cA=vs.fulfilled.toString();function DF(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 uA=e=>t=>n=>r=>{var c;if(r.type!==cA){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=DF(o,s);r.type===cA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var FF=Qd({assistants:TT,auth:g1,conversation:k1,contentTypes:kT,passwordlessToken:xP,entities:Sk,handlingTime:oA,info:K1,input:z1,settings:l1,profile:LT,search:Z1,styleSuggestions:sA,ui:FR,textSuggestions:bR});function dA(e){return DE({reducer:FF,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(iA()).concat(lA({debounce:200})).concat(aA({debounce:500})).concat(uA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,i)=>o.concat(i),n)},preloadedState:e.preloadedState})}var zF=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},HF=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),i=Gl("inlineSuggestions")(o);switch(r.type){case ia.toString():{!r.payload&&e.emit("logout",void 0);break}case ur.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case no.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Di.toString():e.logSendMessage(r.payload);break;case Nf.toString():e.emit("call-to-action",{cue:r.payload});break;case nr.fulfilled.toString():r.isBroadcasted||e.broadcast(Cy,r,!1);break;default:break}let s=n(r);switch(r.type){case Di.toString():e.handleAfterSendMessage(r.payload);break;case Xc.toString():e.onUpdateShowTabHint(r.payload);break;case lm.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case gf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:zF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),i&&t.dispatch(Xo([]));break}case hf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Xo.toString():{i&&r.payload.length>0&&t.dispatch(yf(0));break}case oo.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return s},fA=HF;function O0(e){return e.toISOString().replace("T"," ").replace("Z","")}var BF=(e,t)=>t.version,pA=Dn([ca,Rr,eA,BF],(e,t,n,r)=>{if(!t)return ee.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:i}=n;return!o||!i?(ee.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:O0(o),timeStop:O0(i)}});function mA(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}}function N0(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return N0(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?N0(o,t):null}function M0(e,t){return N0(e,t)}function gA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UF(e){return typeof e=="object"&&e!==null&&"tagName"in e}function um(e){return UF(e)&&(fs(e)||Bp(e))}var yA,Fr=new Map,VF=["bottom","height","left","right","top","width"],hA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:VF.some(n=>e[n]!==t[n]);function vA(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,...vA(t)]:[]}function xA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var dm=!1,wA=()=>{dm=!0;let e=[];if(Fr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Fr.delete(n);return}let r=n.getBoundingClientRect();hA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(xA,t.rect):t.rect;hA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Fr.size===0){dm=!1;return}yA=window.requestAnimationFrame(wA)};function _0(e,t){let n=vA(e),r=[],o=n.map((i,s)=>_0(i,a=>{r[s]=a;let l=Fr.get(e);if(!l)return;let c=r.reduce(xA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Fr.has(e)){let s=Fr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Fr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!dm&&wA()},unobserve(){o.forEach(s=>s.unobserve());let i=Fr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Fr.delete(e),Fr.size||(cancelAnimationFrame(yA),dm=!1)}}}}var SA,zr=new Map,bA=()=>{zr.forEach((e,t)=>{if(!t.isConnected){zr.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)))}),zr.size!==0&&(SA=window.requestAnimationFrame(bA))};function EA(e,t){return{observe(){let n=zr.size===0;zr.has(e)?zr.get(e).callbacks.push(t):zr.set(e,{visible:void 0,callbacks:[t]}),n&&bA()},unobserve(){let n=zr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||zr.delete(e),zr.size||cancelAnimationFrame(SA)}}}}var D0=["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 F0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function $a(e){return Number.parseFloat(e)}function fm(e){return Math.round(e*1e6)}function TA(e){return e/1e6}function z0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=$a(e.width),i=$a(e.borderLeftWidth),s=$a(e.borderRightWidth),a=$a(e.paddingRight),l=TA(fm(o)-fm(i)-fm(s)),c=TA(fm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function lu(e,t={}){var u,d;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",rs(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};F0(r,n,D0),z0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=EA(e,()=>{F0(r,n,D0),z0(r,e,n),i(),setTimeout(i,0)}),a,l=!0,c=_0(e,f=>{if(f===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),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(F0(r,n,D0),z0(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),g=$a(v.borderTopWidth),x=$a(v.borderBottomWidth),y=p.top+g-f.top,m=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),c.unobserve(),s.unobserve(),n.remove()}]}var CA=(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){ee.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function $F(e){return e.offsetParent!==null}function kA(e){if(!$F(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 pm(e,t,n=100){let r=kA(e);t({isVisible:r});let o=setInterval(()=>{let i=kA(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var cu=class extends Error{},mm=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 cu("Queued async function is outdated"));let o=Promise.withResolvers();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};var Le=b(R());var RA=CA("showTabHint",!0),ja=class ja{constructor({deepdeskUrl:t,version:n=ja.version||"unknown",locale:r="en-US",token:o,fetch:i,productName:s,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.queues=new mm;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new bo(l,{token:o,fetch:i}),this.version=n,this.instanceId=ja.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[fA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>RA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=dA(c),this.broadcastEvents=new ZP({debug:!0,deepdeskUrl:l,eventMap:J1(this.store),createCustomChannel:a}),this.store.dispatch(Xc(RA.value())),this.store.dispatch(uf({locale:r,adminUrl:l,productName:s}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=this.state.input.textSuggestions[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?(ee.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(ee.warn("Profile has not been loaded (yet)"),!0):(ee.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(ia(null)),this.store.dispatch(eo());let t=n=>$t(n)&&c1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(eo())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(vy({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(ff(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(pf({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(xy(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(wy(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(mf(t))).payload})}resetConversation(){this.store.dispatch(at()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(uf(t))}setVisitorInfo(t){this.store.dispatch($1(t))}setCustomData(t){this.store.dispatch(j1(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Xl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(by(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(Ey())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Op()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:i=!0,includeMetadata:s,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(nr({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:s,input:r,skipState:!i}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){ee.warn("Can't evaluate assistant when profile is not loaded yet.");return}let i=r[{accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"}[t]];if(!i){ee.warn(`No assistant set in profile for conversation event "${t}"`);return}return this.queues.push(i,()=>I(this,null,function*(){yield this.evaluateAssistant(i,S({includeMetadata:!0},n))})).catch(a=>{if(a instanceof cu){ee.warn(`Queued assistant "${i}" was outdated and dropped`);return}throw a})})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return ee.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||ee.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(oo(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:i,selection:s}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(L1(Sy(t))),!Mr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||s&&(t.shiftKey||(this.store.dispatch(M1()),t.preventDefault()))},f=()=>{n||!u||a&&i<=0||s&&(t.shiftKey||(this.store.dispatch(_1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(yf(-1)),this.store.dispatch(oi({collapse:!0})),this.store.dispatch(_R(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=la(this.state);if(!p)return;this.store.dispatch(Xc(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(oi({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Xo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(ee.info("Start handling time"),this.store.dispatch(nA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(ee.info("Stop handling time"),this.store.dispatch(lm()))}logSendMessage(t){let n=mA(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=pA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(rA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Di((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(F1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(i){ee.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),ee.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(W1(t))}whenConversationLoaded(t){let n=o=>{var i;return(i=o.conversation.current)==null?void 0:i.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[i,s]=lu(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]=lu(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 rs(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),ee.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()?(ee.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(D1(r.metrics))):ee.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(!um(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),rs(t),this.inputMediator=a||(fs(t)?new gs(t):new ms(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(vf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(O1(Sy(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(N1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(I1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(xf(p))},500):this.store.dispatch(xf(p))}),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(_p(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(_p(!0))}),this.renderSuggestions(t,c),this.subscribe(Gl("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(xf(this.inputMediator.getSelection())),this.store.dispatch(_p(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}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;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(i=>i()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,i;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(i=this.aboveSuggestions)==null||i.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),i=(0,fi.createRoot)(o);i.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(WR,{})})}));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()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i}=n,s=o&&M0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",s||t,{appendTo:i,closestScrollElement:s,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",s||t,{appendTo:i},r==null?void 0:r.suggestionsRootNode),d=(0,fi.createRoot)(a);d.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(hP,{inputElement:t})})}));let f=(0,fi.createRoot)(c);return f.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(eP,{onLogIn:()=>this.loginViaPopup().catch(p=>ee.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&M0(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,fi.createRoot)(l);return u.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(NR,{onLogIn:()=>this.loginViaPopup().catch(d=>ee.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,fi.createRoot)(r);return o.render((0,Le.jsx)(si,{store:this.store,customStyles:n,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(PR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&ee.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,fi.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(KP,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>ee.warn(s.message))})})})),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setExternalId((s=this.state.conversation.current)==null?void 0:s.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r,s=(0,fi.createRoot)(n);return s.render((0,Le.jsx)(si,{store:this.store,customStyles:o,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(T0,{children:(0,Le.jsxs)(rm,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Hi:Bi,children:[(0,Le.jsx)(Ts,{children:(0,Le.jsx)(im,{title:r.title,emptyState:r.emptyState})}),(0,Le.jsx)(E0,{children:(0,Le.jsx)(om,{})})]})})})})),{unmount(){s.unmount()}}}setupHandlingTime(t){let n=pm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){gA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(mc());let t=Ui(this.state);t&&this.store.dispatch(uf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{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",d),clearInterval(f)};i.onmessage=p=>I(this,null,function*(){var v,g;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(Zl),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}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 d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){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){ee.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&ee.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(ee.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;ee.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=gc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(ur()):Au.includes(r)||this.store.dispatch(gr(r))})}catch(r){this.handleError(r)}})}};ja.version="17.0.0",ja.count=0;var uu=ja;function jF(e){return I(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 PA(e,t){return I(this,null,function*(){let n=yield jF(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 AA(e,t,n){return I(this,null,function*(){yield new bo(e).authenticateWithKey(t,n)})}function IA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function LA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:i}=e,{start:s,end:a}=(d=n.replace)!=null?d:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{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 OA(r,o){return I(this,arguments,function*(e,t,n={}){let i=n.replace?ui(e,n.replace.start,n.replace.end):Ba(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(`
|
|
83
|
-
`).reverse().forEach((l,c)=>{c>0&&
|
|
84
|
-
`).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},
|
|
80
|
+
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 r0=b(R()),g4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},IR=({className:e,color:t})=>(0,r0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r0.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:g4[t||"pink"]})});var LR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var o0={};kt(o0,{enUS:()=>h4,nlNL:()=>y4});var h4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},y4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var ui=b(R()),NR=({onLogIn:e})=>{let t=ue(o0),n=te("floatingMenu"),r=te("productName"),o=ve(),s=j($t),i=_("FloatingMenu",LR);if(s===null||n===!1)return null;let a=()=>{s===!0?o(Fn(!0)):e()};return(0,ui.jsxs)("button",{type:"button",className:(0,OR.default)(i.root,{[i.isLoggedIn]:s,[i.isLoggedOut]:!s}),onClick:a,children:[(0,ui.jsx)("div",{className:i.text,children:t(s?"search":"signin",{productName:r})}),(0,ui.jsxs)("div",{className:i.icon,children:[(0,ui.jsx)(IR,{className:i.logo,color:"pink"}),s===!1&&(0,ui.jsx)(AR,{className:i.lock})]})]})};var Fp=b(Q());function Mr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:s}=e.input;return s.start!==s.end?!1:s.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(s.end))||r&&new RegExp(r).test(o.substring(0,s.end))?!0:n===!1&&r===!1:!1}var v4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},Mp=({ui:e})=>e.overlayCollapsed,MR=ke({name:"ui",initialState:v4,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:Xc,setInputFocus:_p,setOverlayCollapsed:os,setOpenOverlayWhenTyping:_R,setOverlayCollapsedUserOverwrite:DR}=MR.actions,FR=MR.reducer;var VR=b(Q());var ss=b(Q());var zR=b(Q());function HR(e,t,n){(0,zR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var BR={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var di=b(R()),w4=["search","personal-collection-search","search-autocomplete"];function S4(e,t,n,r={}){var s;let o="";return w4.includes(t)?o=UT(Xy(e,n,{stripAgentPart:!0}),(s=r.searchKeywords)!=null?s:[n]):o=Xy(e,n,r),r.placeholders===!0&&(o=VT(o)),o}var b4=()=>{},E4=({selected:e,suggestion:t})=>{let n=te("inlineSuggestions"),r=j(aa),[o,s]=(0,ss.useState)(!1),i=te("enableSuggestionFeedback"),a=j(f=>f.input.text),l=ve(),c=_("TextSuggestion",BR),u=(0,ss.useRef)(null);(0,ss.useEffect)(()=>{let f=setTimeout(()=>{l(A1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(f)}},[t]),HR(u,"click",()=>{l(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let d=(0,ss.useMemo)(()=>S4(t.text,t.source,r,{stripAgentPart:n,placeholders:!0,searchKeywords:t.searchKeywords}),[n,t.text,t.source,r,t.searchKeywords]);return t.source==="gpt"&&!n?null:(0,di.jsxs)("div",{className:c.root,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,di.jsx)(ye,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:b4,children:(0,di.jsx)(Ks,{containerTagName:"div",noWrap:!1,tagName:"span",className:c.formattedText,content:d})}),i&&o&&(0,di.jsx)("div",{className:c.actions,children:(0,di.jsx)(Ip,{source:"overlay",context:a,suggestion:t})})]})},UR=E4;var $R=b(R()),T4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,VR.useMemo)(()=>{let o=e.map((s,i)=>(0,$R.jsx)(UR,{index:i,selected:i===t,suggestion:s},`${s.text}-${s.source}`));return n?o.reverse():o},[e,t,n]),Dp=T4;var jR={root:"dd-PfvRI",paper:"dd-HYlyY"};var Qc=b(R()),C4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Fp.useRef)(null),r=_("InlineSuggestionsOverlay",jR),o=j(Mr),s=ve(),i=j($t),a=j(ia),l=j(Mp),c=te("showTextSuggestions");return rs(()=>{setTimeout(()=>{s(os({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Fp.useEffect)(()=>{let u=n.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),l||!o||!c||e.length===0||i!==!0||a===!1?null:(0,Qc.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Qc.jsx)("div",{ref:n,className:r.paper,children:(0,Qc.jsx)(Ht,{children:(0,Qc.jsx)(Dp,{suggestions:e,selectedIndex:t})})})})},k4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),WR=oa(k4)(C4);var Zc=b(R()),R4=({children:e})=>{let n=te("locale").replace("-","");return(0,Zc.jsx)(_y.Provider,{value:n,children:e})},P4=({store:e,customStyles:t={},children:n})=>(0,Zc.jsx)(r1,{store:e,children:(0,Zc.jsx)(R4,{children:(0,Zc.jsx)(Ya.Provider,{value:t,children:n})})}),is=P4;var Hp=b(Me()),Ma=b(Q());var KR=b(Q());function GR(e,t){let[n,r]=(0,KR.useState)(()=>{if(typeof window=="undefined")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return Z.error(s),t}});return[n,s=>{try{let i=s instanceof Function?s(n):s;r(i),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(i))}catch(i){Z.error(i)}}]}var qR=()=>/Mac/i.test(navigator.platform);var XR=b(Me()),ho=b(Q());var s0={};kt(s0,{enUS:()=>A4,nlNL:()=>I4});var A4={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"}]}]},I4={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 YR={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var as=b(R()),i0=(e,t,n)=>r=>(0,as.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),L4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let s=ue(s0),i=un(),a=_("Login",YR),l=te("productName"),c=(0,ho.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,ho.useCallback)(x=>{x.preventDefault(),i.send(ua,!0)},[t]),d=(0,ho.useMemo)(()=>x=>(0,as.jsx)("a",{onClick:m=>{m.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,ho.useCallback)(x=>(0,as.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:g}=(0,ho.useMemo)(()=>({min:i0(a,60*10,c),hour:i0(a,60*60,c),day:i0(a,60*60*12,c)}),[]);return(0,as.jsxs)("div",{className:(0,XR.default)(e,a.root),children:[s("loginPlease",{login:n?f:d,productName:l}),r&&(0,as.jsxs)(ho.Fragment,{children:[(0,as.jsx)("br",{}),s("snooze",{min:p,hour:v,day:g})]})]})},zp=L4;var QR={root:"dd-DoQhb",text:"dd-Jwnev"};var Jc=b(R()),O4=({title:e})=>{let t=_("SearchTrigger",QR),n=ve(),r=ct();return(0,Jc.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,Jc.jsx)(Ca,{}),(0,Jc.jsx)("span",{className:t.text,children:e})]})},ZR=O4;var a0={};kt(a0,{enUS:()=>N4,nlNL:()=>M4});var N4={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"}]},M4={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var JR={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"};var Ve=b(R()),_4=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=_("SuggestionsOverlay",JR),o=ue(a0),s=j(Mr),i=P1(),a=ve(),l=(0,Ma.useRef)(null),c=te("searchTriggerKey"),u=te("productName"),d=j(Mp),f=j($t),p=j(ia),[v,g]=(0,Ma.useState)(null),x=te("showSearch"),y=te("showTextSuggestions"),m=te("adminUrl"),h=te("isEmbedded"),[w,E]=GR("dd-snooze-until-ms",0),C=d||w>Date.now(),k=e.filter(M=>M.source!=="gpt").length,A=()=>{C&&E(0),a(DR(!C))},B=M=>{let N=Date.now()+M*1e3;E(N),Z.info(`Snooze until: ${new Date(N)}`),a(os({collapse:!0}))};return(0,Ma.useEffect)(()=>{k===0&&g(null)},[e,k]),rs(()=>{a(os({collapse:!0,skipWhenInputFocus:!0}))}),f===null||p===!1?null:f===!1?(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:r.triggersRight,children:(0,Ve.jsx)(ys,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(ys,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:r.collapsible,children:(0,Ve.jsx)(zp,{loginUrl:m,isEmbedded:h,onLogIn:n,onSnooze:B})})]}):!i||!s?null:(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:x&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(qR()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,Ve.jsx)(ZR,{title:o("search")})})}),(0,Ve.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,Hp.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Ve.jsx)(ys,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(ys,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),k>0&&y&&(0,Ve.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(Ht,{children:(0,Ve.jsx)(Dp,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},D4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),eP=oa(D4)(_4);var Qp=b(Me());var xo=b(Q());var _a=b(Q());function Bp(e){return e.contentEditable==="true"}function F4(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),s=o.cloneRange();s.selectNodeContents(e),s.setEnd(o.endContainer,o.endOffset),n=s.toString().length,s.selectNodeContents(e),s.setEnd(o.startContainer,o.startOffset),t=s.toString().length}return{selectionStart:t,selectionEnd:n}}function tP(e){let{selectionStart:t,selectionEnd:n}=Bp(e)?F4(e):e;return[t,n]}function nP(e){let[,t]=(0,_a.useState)(),n=(0,_a.useRef)(null);return n.current=tP(e),(0,_a.useEffect)(()=>{let r=()=>{var a;let[o,s]=(a=n.current)!=null?a:[],i=tP(e);(!i||o!==i[0]||s!==i[1])&&(n.current=i,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 rP(e,t){if(!t)return;let n=e,{value:r}=n,[o,s]=t,i=r.match(Pu);if(!i||i.length===0)return;let a=0;i.find(l=>{let c=r.indexOf(l,a);return o>c&&s<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var oP=b(Q()),z4=["div","span","mark","strong","b","i","u","em"];function l0(e,t,n=0){var s;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(s=r.props)==null?void 0:s.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(z4.includes(o)){let i=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,oP.cloneElement)(r,{children:l0(i,t,n+1)})]}return[...e,...t]}function fi(e){return e.tagName.toLowerCase()==="textarea"}var sP={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 uP=b(Me());var Kp=b(Q());var Da=b(Q());function iP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Up(e){let t=(0,Da.useRef)(null),[n,r]=(0,Da.useState)(!1);return(0,Da.useEffect)(()=>{var u;let o=!1,s=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[i,a]=iP((d,f)=>{let p=t.current;if(!p)return;let v=d/s,g=f/s,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&g>x.y&&g<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=iP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",i),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",i),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function aP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Vp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function lP(e){return e!=null}var cP=b(Me()),$p=b(Q());var yo={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 c0=b(R()),jp=(0,$p.forwardRef)((o,r)=>{var s=o,{className:e,children:t}=s,n=oe(s,["className","children"]);let i=(0,$p.useRef)(null),a=_("TabCompletion",yo);return(0,c0.jsx)("div",P(S({ref:Vp([i,r]),className:(0,cP.default)(e,a.popoverContentContainer)},n),{children:(0,c0.jsx)("div",{className:a.popoverContent,children:t})}))});var ls=b(R()),H4=e=>t=>{let n=$v(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},B4=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let s=_("TabCompletion",yo),i=Ep(),a=(0,Kp.useMemo)(()=>H4(e.getBoundingClientRect()),[e]),[l,c]=Up(e);return(0,Kp.useEffect)(()=>{c?i.open():i.close()},[c]),(0,ls.jsxs)("span",{children:[(0,ls.jsx)("mark",{ref:Vp([l,i.triggerRef]),className:(0,uP.default)(s.matchKeyword,{[s.hover]:c}),"aria-haspopup":"dialog","aria-expanded":i.opened?"true":"false",children:r}),i.opened&&(0,ls.jsx)(La,{className:s.popover,triggerRef:i.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,ls.jsx)(jp,{style:n,children:(0,ls.jsx)("div",{className:s.hintText,children:o})})})]})},Wp=class extends io{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=>P(S({},o),{keywordRegex:new RegExp(`\\b${aP(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(s=>{if(this.usedKeywordMatches.has(s))return null;let i=n.match(s.keywordRegex);if(!i)return null;let a=n.charAt(i.index-1),l=n.charAt(i.index+s.keyword.length);return a==="{"&&l==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:s.suggestion,preparedKeywordMatch:s,valid:!0}}).filter(lP);if(r.length===0)return null;let o=r.reduce((s,i)=>i.index<s.index?i:s);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,ls.jsx)(B4,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var dP=b(Me());var u0=b(R()),U4=({inputElement:e,children:t})=>{let n=_("TabCompletion",yo),[r,o]=Up(e);return(0,u0.jsx)("mark",{ref:r,className:(0,dP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Gp=class extends io{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,u0.jsx)(U4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Yp=b(Me());var Zt=b(Q());var d0=b(R()),fP=()=>(0,d0.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,d0.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 _r=b(Q());var mP=b(By());var pP={root:"dd-ky-Bv",content:"dd-kV5e1"};function qp(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(s){return null}}function f0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),V4=3,$4=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),j4=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=V4})=>{let s=_("LinkSearch",pP),[i,a]=(0,_r.useState)(""),l=ve(),c=j(xR("url")),u=j(X1("URL")),d=(0,_r.useMemo)(()=>u.map($4),[u]),[f,p]=(0,_r.useState)(d.length-1),v=te("fallbackImage"),g=h=>{let w=h.target;a(w.value)},x=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},y=h=>{var C;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&p(w),h.code==="ArrowDown"&&p(E),h.code==="Enter"&&e(((C=d[f])==null?void 0:C.text)||i)},m=(0,_r.useCallback)((0,mP.default)(h=>{l(Fs({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,_r.useEffect)(()=>{i&&m(i)},[i]),(0,_r.useEffect)(()=>()=>{l(Sf())},[]),(0,Vn.jsxs)("div",{className:s.root,children:[(0,Vn.jsx)(Ht,{withDivider:!0,children:(i?d:c).slice(0,o).map((h,w)=>(0,Vn.jsx)(ye,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Te,{children:[(0,Vn.jsx)(Te.Image,{src:qp(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Te.Content,{className:s.content,cropText:!0,children:[(0,Vn.jsx)(Te.Title,{children:h.title||f0(h.text)}),h.title&&f0(h.text)]}),(0,Vn.jsx)(ye.Actions,{children:(0,Vn.jsx)(ye.ActionButton,{label:r,onClick:E=>x(E,h.text)})})]})},h.text))}),(0,Vn.jsx)(uc,{value:i,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:y})]})},gP=j4;var p0={};kt(p0,{enUS:()=>W4,nlNL:()=>K4});var W4={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},K4={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Qt=b(R()),G4=(0,Zt.forwardRef)((e,t)=>{let n=_("TabCompletion",yo);return(0,Qt.jsx)("mark",{ref:t,className:(0,Yp.default)(n.matchSelection)},"selection-start")}),q4=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let s=ue(p0),i=_("TabCompletion",yo),a=(0,Zt.useRef)(null),l=(0,Zt.useRef)(null),[c,u]=(0,Zt.useState)(null),d=ve(),f=Ep(document.activeElement===r),[p]=(0,Zt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Zt.useEffect)(()=>()=>p.detach(),[]),(0,Zt.useEffect)(()=>{let g=e.current,x=a.current;!g||!x||(p.setStart(g,0),p.setEnd(x,0))},[e.current,a.current]),rs(()=>{f.close()});let v=(0,Zt.useCallback)(g=>{let x=p.toString(),y=/^http(s?):\/\//.test(g)?g:`https://${g}`;d(gf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Qt.jsxs)("span",{children:[(0,Qt.jsx)("mark",{ref:a,className:(0,Yp.default)(i.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Qt.jsx)(La,{className:i.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Qt.jsxs)(jp,{style:n,ref:l,children:[(0,Qt.jsx)("div",{className:(0,Yp.default)(i.selectionOptions,{[i.selectionOptionsIsHidden]:c!==null}),children:(0,Qt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:i.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Qt.jsx)(fP,{}),(0,Qt.jsx)("span",{children:"\xA0"}),(0,Qt.jsx)("span",{children:s("insertLink")})]})}),c==="insertLink"&&(0,Qt.jsx)(gP,{placeholder:s("linkInputPlaceholder"),visitUrlText:s("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},Xp=class extends io{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,Zt.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 s=this.foundIndex===0?r:o,i=s>=this.charCount&&s<=this.charCount+n.length?{index:s-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let a=this.foundIndex===1;return i&&a?this.charCount+=s-this.charCount:this.charCount+=n.length,i?S({isStart:a},i):null}replaceWith(n,r){return r.isStart?(0,Qt.jsx)(G4,{ref:this.startRef}):(0,Qt.jsx)(q4,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var vo=b(R()),Y4=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:s,keywordMatches:i,inputElement:a,source:l})=>{let c=_("TabCompletion",sP),u=te("insertLink"),d=te("showMidSentenceSuggestions"),f=te("inlineSuggestions"),p=nP(a),v=(0,xo.useRef)(null),g=j($t);(0,xo.useEffect)(()=>{fi(a)&&p&&rP(a,p)},[p]);let x=(0,xo.useCallback)(h=>{if(!o||!n)return h;let w=[(0,vo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,vo.jsx)("span",{"data-testid":"tab-completion",className:(0,Qp.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,vo.jsx)("span",{className:(0,Qp.default)(c.hint,c.resetIndent),children:(0,vo.jsx)(ku,{keyCode:"tab"},"tabHint")})),l0(h,w)},[o,n,r]),y=(0,xo.useMemo)(()=>{let h=[];return u&&h.push(new Xp("selection")),h.push(new Gp("placeholders")),s&&h.push(new Wp("keywords")),h},[f,u,s]),m=(0,xo.useMemo)(()=>{let h=window.getComputedStyle(a);return{"--dd-color":h.color,"--dd-font-size":h.fontSize,"--dd-font-family":h.fontFamily,"--dd-font-variant":h.fontVariant}},[]);return!e||!g?null:(0,vo.jsxs)("div",{ref:h=>{h!=null&&h.parentElement&&(v.current=h==null?void 0:h.parentElement)},className:c.root,style:m,children:[(0,vo.jsx)(Ks,{tagName:"span",containerTagName:"div",className:(0,Qp.default)(c.container,c.agentText),disableLineBreaks:fi(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:i,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,vo.jsx)("br",{})]})},X4=e=>{var x,y,m;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:s}=e,i=la({input:t}),a=(i==null?void 0:i.text)||"",l=(i==null?void 0:i.source)||"",c=(x=t.html)!=null?x:fa(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=s,{showTabCompletion:p,visible:v,showStyleSuggestions:g}=r;return{showTabHint:d,showStyleSuggestions:g,showTabCompletion:p&&Mr(e),content:c,tabText:u,source:l,keywordMatches:(m=(y=o.list)==null?void 0:y.keywordMatches)!=null?m:[],enabled:v&&f!==!1}},hP=oa(X4)(Y4);var cs=b(Q());var Q4={token:null,interval:null},m0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),g0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(m0()),setInterval(()=>r(m0()),n)}),yP=ke({name:"passwordlessToken",initialState:Q4,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(m0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(g0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:vP}=yP.actions,xP=yP.reducer;function Z4(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var wP=Dn([ST],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:Z4(n.code),label:n.code,name:n.name,description:n.name}})));var Zp=b(Q());var y0=b(Me());var h0=b(R()),eu=()=>(0,h0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,h0.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 SP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Dr=b(R()),J4=({entities:e})=>{let t=_("EntitiesWidgetList",SP),[n,r]=(0,Zp.useState)(void 0),o=ve(),s=()=>{r(void 0)},i=a=>{e&&(r(e.indexOf(a)),Ar(a.text),o(no({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Zp.useEffect)(()=>{let a=setTimeout(s,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Dr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Dr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>i(a),children:[(0,Dr.jsx)("span",{className:t.entityText,children:a.text}),(0,Dr.jsxs)("span",{className:t.iconWrapper,children:[(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon),children:(0,Dr.jsx)(eu,{})}),(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon,n===l&&t.iconClicked),children:(0,Dr.jsx)(eu,{})})]})]},a.text))})},bP=J4;var v0=b(R()),EP=()=>(0,v0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,v0.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 TP={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var CP={root:"dd-nazq3",rotation:"dd-3EHTv"};var RP=b(R()),eF=({size:e=12})=>{let t=_("LoadingSpinner",CP);return(0,RP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},kP=eF;var x0=b(R()),PP=()=>(0,x0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,x0.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 tu=b(R()),AP=e=>(0,tu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,tu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,tu.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 w0={};kt(w0,{enUS:()=>tF,nlNL:()=>nF});var tF={error:[{type:0,value:"Something went wrong"}]},nF={error:[{type:0,value:"Er ging iets fout"}]};var Rn=b(R()),IP,rF=3e3,oF=({assistantOptions:e})=>{let t=_("OnDemandAssistants",TP),n=ue(w0),r=ei(nr),o=ei(oo),s=j(RT),i=j(PT),a=ct(),l=i.filter(d=>d.isPinned),c=i.filter(d=>!d.isPinned),u=d=>I(void 0,null,function*(){if(clearTimeout(IP),a("trigger on demand assistant",{assistantCode:d}),d===s){o.call({transcript:e.transcript});return}r.call(P(S({},e),{assistantCode:d})),IP=setTimeout(()=>r.reset(),rF)});return i.length===0?null:(0,Rn.jsxs)("div",{className:t.root,children:[l.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)("button",{type:"button",className:t.button,disabled:r.state==="loading",onClick:()=>u(d),children:f},d)),r.state==="loading"&&(0,Rn.jsx)(kP,{}),r.state==="done"&&(0,Rn.jsx)(AP,{"data-testid":"trigger-done"}),r.state==="error"&&(0,Rn.jsx)(fk,{trigger:(0,Rn.jsx)(PP,{}),children:n("error")}),c.length>0&&r.state==="idle"&&(0,Rn.jsxs)(yt,{placement:"top-end",children:[(0,Rn.jsx)(yt.Trigger,{className:t.trigger,children:(0,Rn.jsx)(Pp,{"data-testid":"trigger"})}),(0,Rn.jsx)(yt.Content,{className:t.nav,"data-testid":"popover",children:c.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)(yt.Button,{className:t.item,disabled:r.state==="loading",onClick:()=>u(d),children:f},d))})]})]})},LP=oF;var MP=b(Q());var OP={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var NP=b(R()),sF=({width:e})=>{let t=_("LoadingProgressBar",OP);return(0,NP.jsx)("div",{className:t.loadingBar,style:{width:e}})},Jp=sF;var wo=b(R()),em=({title:e})=>{let t=(0,MP.useRef)(null);return Lx(t),(0,wo.jsx)(ye,{ref:t,children:(0,wo.jsx)(Te,{children:(0,wo.jsxs)(Te.Content,{children:[(0,wo.jsx)(Te.Title,{children:e}),(0,wo.jsx)(Jp,{width:"60%"}),(0,wo.jsx)(Jp,{width:"90%"}),(0,wo.jsx)(Jp,{width:"50%"})]})})})};var nu={};kt(nu,{enUS:()=>iF,nlNL:()=>aF});var iF={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"}]},aF={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 pi=b(Q());var S0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",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 Mt=b(R()),lF=500,cF=100,uF=({content:e,onChange:t,onCopy:n})=>{let r=(0,pi.useRef)(null),o=_("WidgetCue",S0);return(0,pi.useEffect)(()=>{let s=r.current;if(!s)return;s.style.setProperty("height","0px");let i=Math.min(Math.max(s.scrollHeight,cF),lF);s.style.setProperty("height",`${i}px`)},[e]),(0,Mt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},dF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let s=_("WidgetCue",S0),i=ue(nu),a=ct(),l=te("hasKeyboardInput"),[c,u]=(0,pi.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,pi.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Mt.jsxs)(ye,{"data-testid":"cue",children:[(0,Mt.jsx)(Te,{children:(0,Mt.jsxs)(Te.Content,{children:[e.title&&(0,Mt.jsx)(Te.Title,{className:s.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?i(e.rule.label):e.title}),e.specialType==="summary"?(0,Mt.jsx)(uF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Mt.jsx)(go,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(ye.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:s.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(ye.Button,{onClick:()=>f(c),children:i("copyCue")}),e.callToAction&&(0,Mt.jsx)(ye.Button,{onClick:d,children:e.callToAction.label}),(0,Mt.jsx)(ye.Button,{onClick:v,children:i("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(ti,{eventName:"summary feedback",feedbackText:(g=e.text)!=null?g:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(ti,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},_P=dF;var Fa=b(R()),fF=({cues:e})=>{let t=ve(),n=un(),r=ue(nu),o=ct(),s=c=>{t(ET({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},i=(c,u)=>{switch(Ar(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(Nf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{n.send(Pr,{text:c,suggestion:{source:"cue",sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Fa.jsx)(Fa.Fragment,{children:e.map(c=>c.isLoading?(0,Fa.jsx)(em,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Fa.jsx)(_P,{cue:c,onCallToAction:a,onRemove:s,onCopy:i,onUse:l},c.rule.id))})},DP=fF;var tm=b(Q());var FP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var hr=b(R());function pF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var zP=({data:e,schema:t})=>{let n=_("WidgetCustomData",FP),r=o=>{Ar(o)};return(0,tm.useEffect)(()=>{Z.info("Custom data",e,t)},[e]),(0,hr.jsx)("dl",{className:n.root,children:t.map(o=>{let s=pF(e,o.path);return(0,hr.jsxs)(tm.Fragment,{children:[(0,hr.jsx)("dt",{className:n.label,children:o.label}),(0,hr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&s?(0,hr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!s?(0,hr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof s=="string"||typeof s=="number"?(0,hr.jsxs)("button",{type:"button",onClick:()=>r(`${s}`),className:n.copyButton,children:[(0,hr.jsx)("span",{className:n.copyButtonText,children:s}),(0,hr.jsx)(eu,{})]}):"-"})]},o.label)})})};var ut=b(Q());var za={};kt(za,{enUS:()=>mF,nlNL:()=>gF});var mF={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"}]},gF={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 nm={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 we=b(R()),hF=3,yF=({sources:e,onClick:t})=>{let n=ue(za),r=_("WidgetKnowledgeAssistant",nm),[o,s]=(0,ut.useState)(!1),i=o?e:e.slice(0,hF);return i.length===0?null:(0,we.jsxs)("ul",{className:r.sources,children:[i.map(a=>(0,we.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,we.jsxs)(yt,{tooltip:!0,placement:"top-start",children:[(0,we.jsx)(yt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,we.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,we.jsx)(yt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),i<e&&(0,we.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>s(!0),children:n("showMore",{amount:e.length-i.length})})]})},vF=({title:e,description:t})=>(0,we.jsx)(ye,{"data-testid":"knowledge-assist-empty-state",children:(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:e}),(0,we.jsx)(go,{content:t})]})})}),xF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:s,onSourceClick:i})=>{var l;let a=ue(za);return(0,we.jsxs)(ye,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:t.question}),(0,we.jsx)(go,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?s:void 0}),(0,we.jsx)(yF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>i(c,t.question)})]})}),(0,we.jsxs)(ye.ButtonsContainer,{children:[(0,we.jsx)("div",{}),(0,we.jsx)(ti,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},b0=(0,ut.createContext)(null),rm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,s]=(0,ut.useState)(null),[i,a]=(0,ut.useState)(!1),[l,c]=(0,ut.useState)(!!n),[u,d]=(0,ut.useState)(null),f=ve(),p=ct(),v=ei(y=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:y,threadId:o,onNewThreadId(m){s(m)}})},{onSuccess(y){var m;p("knowledge assist question answered",{question:y.question,answer:y.answer.answer,sources:(m=y.answer.sources)!=null?m:[],isFollowUpQuestion:y.threadId===o,isAutoInitiated:l}),c(!1)}}),g=y=>I(void 0,null,function*(){a(!0),d(y),yield v.call(y),a(!1),d(null)}),x={isEnabled:!!e,isSubmitting:i,threadId:o,pendingInput:u,onSubmit:g,onReset(){o&&f(da(o)),s(null)}};return(0,ut.useEffect)(()=>{n&&g(n)},[n]),(0,we.jsx)(b0.Provider,{value:x,children:r})},om=()=>{let e=ue(za),t=_("WidgetKnowledgeAssistant",nm),n=(0,ut.useContext)(b0),r=(0,ut.useRef)(null),[o,s]=(0,ut.useState)(""),i=l=>{s(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),s(""))})};return n.isEnabled?(0,we.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,we.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:i}),(0,we.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},sm=({title:e,emptyState:t})=>{var v,g;let n=ue(za),r=ct(),o=_("WidgetKnowledgeAssistant",nm),s=(0,ut.useRef)(null),i=(0,ut.useContext)(b0),a=(g=j(fc((v=i.threadId)!=null?v:-1)))!=null?g:[],l=te("hasKeyboardInput"),c=un(),u=x=>{Ar(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),i.onReset(),r("knowledge assist reset",{threadId:(y=i.threadId)!=null?y:void 0})},p=x=>{c.send(Pr,{text:x,suggestion:{source:"cue",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!i.isEnabled||(a==null?void 0:a.length)===0&&!i.isSubmitting&&!t?null:(0,we.jsxs)(ut.Fragment,{children:[(0,we.jsx)(wr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,we.jsxs)(Ht,{withDivider:!0,children:[t&&a.length===0&&!i.pendingInput&&(0,we.jsx)(vF,S({},t)),a.map((x,y)=>(0,we.jsx)(xF,{innerRef:y===a.length-1?s:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),i.pendingInput&&(0,we.jsx)(em,{title:i.pendingInput})]})}),a.length>0&&(0,we.jsx)("div",{className:o.resetContainer,children:(0,we.jsx)(ye.Button,{disabled:i.threadId===null||i.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var UP=b(Q());var wF=/(https?:\/\/[^\s]+)/,BP=e=>e.split(" ").find(t=>wF.test(t));var $n=b(R()),SF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=BP(r),s=ue(Kc),i=te("showImages"),a=te("fallbackImage"),l=te("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,UP.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(ye,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Te,{children:[i&&e.image&&(0,$n.jsx)(Te.Image,{src:qp(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Te.Content,{children:[e.title&&(0,$n.jsx)(Te.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(ye.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Te.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(ye.Actions,{children:[o&&(0,$n.jsx)(ye.ActionButton,{onClick:u,label:s("visitUrl")}),l&&(0,$n.jsx)(ye.ActionButton,{primary:!0,onClick:c,label:s("useSuggestion")})]})]})},VP=SF;var ru=b(R()),bF=({lines:e,suggestions:t})=>{let n=un(),r=(o,s)=>{n.send(Pr,{text:o,suggestion:P(S({},s),{source:s.source,sourceText:s.text})})};return(0,ru.jsx)(ru.Fragment,{children:t.map(o=>(0,ru.jsx)(VP,{suggestion:o,lines:e,onUse:s=>r(s,o)},o.text||o.url||o.message))})},$P=bF;var ou={};kt(ou,{enUS:()=>EF,nlNL:()=>TF});var EF={waiting:[{type:0,value:"Loading\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"}]},TF={waiting:[{type:0,value:"Laden\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 Ha={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(R()),WP=(e,t)=>{let n=j($t);(0,cs.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},CF=({onLogIn:e})=>{let t=_("Widget",Ha),n=te("isEmbedded"),r=te("adminUrl");return(0,ce.jsx)("div",{className:t.loginText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)(zp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},jP=({text:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.stateText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)("p",{children:e})})},"notification")},kF=()=>{let e=ue(ou),t=ve(),n=_("Widget",Ha),r=te("showSearch"),o=te("isEmbedded"),s=j(Aa("/admin/")),i=un(),a=te("productName"),l=ct();return WP(()=>{if(o)return t(g0()),()=>{t(vP())}},[t,o]),!r&&!s?null:(0,ce.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ce.jsx)(ye.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ce.jsx)(Ca,{}),onClick:()=>{i.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),s&&(0,ce.jsx)(ye.Button,{as:"a",target:"_blank",icon:(0,ce.jsx)(EP,{}),href:s,"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})})]})},RF=({title:e,content:t})=>{let n=ue(ou),[r,o]=(0,cs.useState)(!0);return r?(0,ce.jsx)(wr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsxs)(ye,{children:[(0,ce.jsx)(Te,{children:(0,ce.jsx)(Te.Content,{children:(0,ce.jsx)(go,{content:t})})}),(0,ce.jsx)(ye.ButtonsContainer,{children:(0,ce.jsx)(ye.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},PF=()=>{let e=ve(),t=j(gc),n=j(IT),r=j(wP),o=j(U1),s=j(hp),i=j(Lp),a=j(Us),l=j(Rr);return(0,cs.useEffect)(()=>{!!o&&!n&&Z.warn("Custom data provided, but no schema.")},[o,n]),WP(()=>{t.forEach(({type:c})=>{c==="entities"?e(ur()):Au.includes(c)||e(gr(c))})},[e,l,a]),(0,cs.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&Z.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ce.jsx)(cs.Fragment,{children:t.map(({type:c,title:u,amount:d,lines:f,schema:p,property:v})=>{var g,x;switch(c){case"entities":return s&&s.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(bP,{entities:s})},c);case"cues":return r&&r.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(DP,{cues:r})})},c);case"custom-data-banner":return o&&v&&o[v]&&(0,ce.jsx)(RF,{title:u,content:String(o[v])});case"custom-data":return o&&p&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(zP,{data:o,schema:p})})},c);default:return((x=(g=i[c])==null?void 0:g.suggestions)==null?void 0:x.length)>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)($P,{lines:f,contentType:c,suggestions:i[c].suggestions.slice(0,d)||[]})})},c)}})})},E0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.footer,children:e})},T0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},AF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ue(ou),o=j(ia),s=j($t),i=j(C1),a=j(Us),l=j(AT("knowledge-assist")),c=j(Mf),u=j(_f);return o===!1?(0,ce.jsx)(jP,{text:r("notSupported")}):s===!1?(0,ce.jsx)(CF,{onLogIn:e}):!a||!i||s===null?(0,ce.jsx)(jP,{text:r("waiting")}):(0,ce.jsx)(T0,{children:(0,ce.jsxs)(rm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?Hs:Bs,children:[(0,ce.jsxs)(Ti,{children:[(0,ce.jsx)(kF,{}),(0,ce.jsx)(PF,{}),l&&(0,ce.jsx)(sm,{title:l.title,emptyState:t.emptyState})]}),(0,ce.jsxs)(E0,{children:[l&&(0,ce.jsx)(om,{}),(0,ce.jsx)(LP,{assistantOptions:n})]})]})})},KP=AF;function Ba(e){let t=new Range;return t.selectNodeContents(e),t}function GP(e,t,n){try{return us(e,t,n),!0}catch(r){return!1}}function im(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function am(e){return"tagName"in e&&e.tagName==="BR"}var su=/[\u200B-\u200D\uFEFF]/g;function us(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,s=!1;function i(l,c){let u=-1,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(su,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=i(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,i(c,n-o)),s=!0),o=d;break}case Node.ELEMENT_NODE:{if(am(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),s=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!s);u++);let c=l.lastChild;im(l)&&c&&!im(c)&&!am(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function iu(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:s,collapsed:i}=t,a,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let g=d.textContent;p&&(a=c+g.substring(0,r).replace(su,"").length),v&&(l=c+g.substring(0,s).replace(su,"").length),c+=g.replace(su,"").length;break}case Node.ELEMENT_NODE:{if(am(d)&&d.nextSibling){c++;break}!f&&im(d)&&d.previousSibling&&c++;for(let g=0;g<d.childNodes.length;g++){let x=p&&g===r,y=v&&g===s;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!i)&&u(d.childNodes[g]),v&&g===s-1&&(l=c),l!==void 0))break}v&&(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 au(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:s,collapsed:i}=t,a=0,l="";function c(u){let d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,g=p?s:void 0;l+=u.textContent.replace(su,"").substring(v,g);break}case Node.ELEMENT_NODE:{if(!i&&a===1&&am(u)&&u.nextSibling){l+=`
|
|
81
|
+
`;break}!d&&!i&&a===1&&im(u)&&u.previousSibling&&(l+=`
|
|
82
|
+
`);let v=f?r:0,g=p?Math.min(s,u.childNodes.length):u.childNodes.length;for(let x=v;x<g&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var qP=(i=>(i.CUT="Cut",i.BACKSPACE="Backspace",i.DELETE="Delete",i.ERASEEOF="EraseEof",i.UNDO="Undo",i.CLEAR="Clear",i))(qP||{}),So=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),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.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let s=this.getCaretPosition();Yo(s,this.cachedCaretPosition)||(this.cachedCaretPosition=s,this.emit("caretposition",s))}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(qP).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()})}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 YP(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var mi=class extends So{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),au(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var i;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="getComposedRanges"in r&&n instanceof ShadowRoot?(i=r.getComposedRanges(n))==null?void 0:i[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let s=this.element.ownerDocument.createRange();return s.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),s.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!s||!this.element.contains(s.startContainer)||!this.element.contains(s.endContainer)?null:s}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!YP(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!YP(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return iu(this.element,n);let r=this.lastKnownSelection;if(r&&GP(this.element,r.start,r.end))return r;let o=Ba(this.element);return o.collapse(!1),iu(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return au(this.element,us(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(s=>{var i,a;s.length===2&&s[0].addedNodes.length===1&&((i=s[0].addedNodes[0])==null?void 0:i.textContent)==="\u2060"&&((a=s[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 IF=["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 XP(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,s=window.getComputedStyle(e),i=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",IF.forEach(u=>{o[u]=s[u]}),n?e.scrollHeight>Number.parseInt(s.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),i.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(s.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(s.borderLeftWidth)};return i.removeChild(r),c}var gi=class extends So{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 XP(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 s;return(s=n==null?void 0:n.get)==null?void 0:s.call(this.element)},set:s=>{var i;(i=n==null?void 0:n.set)==null||i.call(this.element,s),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 QP(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let s=document.createElement("iframe"),i=new URL(t);return Object.entries(n).forEach(([a,l])=>{i.searchParams.append(a,l)}),s.style.position="absolute",s.style.left="-999em",s.style.width="0px",s.style.height="0px",s.tabIndex=-1,s.id=r,s.title=`iframe-${e}`,s.src=i.toString(),window.document.body.appendChild(s),s}function LF(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var C0=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()}},k0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=QP(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()}},R0=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(),Z.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 k0(t,this.deepdeskUrl,{debug:!0}):new C0(t),r=o=>{var i,a;if(o.origin!==this.deepdeskUrl)return;let s=LF(o.data);typeof s!="object"||s.type!=="event"||s.channel!==t||(Z.info("Received broadcast event",this.externalId,o),(a=(i=this.eventMap)[s.name])==null||a.call(i,s.payload))};return n.onMessage(r),n}send(t,n,r){var i,a;Z.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(i=this.eventMap)[t])==null||a.call(i,n));let s=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;s==null||s.postMessage(P(S({},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)}},ZP=R0;function OF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[OF(n)]:$e(e[n])}),{}):e}function NF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _t(e){return Array.isArray(e)?e.map(_t):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[NF(n)]:_t(e[n])}),{}):e}var Ua=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var P0=e=>new Promise(t=>{setTimeout(t,e)});var Va=class extends Ua{constructor(){super(...arguments);this.name="ClientError"}},I0=class extends Ua{constructor(){super(...arguments);this.name="ServerError"}},A0=new Map;function MF(e){return I(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:(Z.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var ds=class ds{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let s={isAborted:!1,reject:o},i=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",C=n,{useCache:c=!1,abortLatest:u=!1,attempts:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=k=>k instanceof TypeError,retryOnResponse:g=k=>k.status>=500,version:x=null}=C,y=oe(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(A0.has(i)){r(A0.get(i));return}}let m=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(m.headers=P(S({},m.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(m.headers=P(S({},m.headers),{"X-Deepdesk-API-Version":x}));let h=d,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[i]&&u&&(this.latestRequestByUrl[i].isAborted=!0,this.latestRequestByUrl[i].reject(new Error("Aborted"))),this.latestRequestByUrl[i]=s;let E=()=>I(this,null,function*(){return h--,a(i,m).then(k=>I(this,null,function*(){return g(k)&&!s.isAborted&&h>0?(yield P0(f),E()):k.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):k})).catch(k=>I(this,null,function*(){if(v(k)&&!s.isAborted&&h>0)return yield P0(f),E();throw k}))});E().then(k=>I(this,null,function*(){let A=yield MF(k);if(delete this.latestRequestByUrl[i],k.status>=500){o(new I0("Server Error",A));return}if(k.status===401){o(new Va("Unauthorized",A));return}if(k.status===403){o(new Va("Forbidden",A));return}if(k.status===404){o(new Va("Not Found",A));return}if(k.status>=400){o(new Va("Bad Request",A));return}c&&A0.set(i,A),r(A)})).catch(k=>{o(k)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return ds.refreshingToken||(ds.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{ds.refreshingToken=null},1e3*60)})),ds.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};ds.refreshingToken=null;var hi=ds;function L0(e){return P(S({},$e(e)),{metadata:e.metadata})}var yi=class yi{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new hi(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,s)=>I(this,null,function*(){let i=yield r(o,s);return this.handleDeepdeskVersionHeaders(i),i}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(yi.exchangeTokenPromise||(yi.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),yi.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),Z.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},_t(t)),{metadata:(r=t.metadata)!=null?r:{}}));return L0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",_t(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",_t(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),Z.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:s=1e3}=n,i=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return Z.info(`Successfully retrieved conversation ${i.id} for session ${t}`),L0(i)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){Z.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:s=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var s;yield this.preflight();let r=_t(n);n.metadata&&(r.metadata=(s=n.metadata)!=null?s:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return L0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},_t(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let i=n,{data:r}=i,o=oe(i,["data"]),s=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/v2/analytics/events",_t(P(S(S({},s),o),{data:r,name:t})))})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw Z.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",_t(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(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}`,_t(n),{abortLatest:!0})).map(i=>P(S({},$e(i)),{text:i.text||i.url||i.message,source:r,type:r})).filter((i,a,l)=>a===l.findIndex(c=>c.text===i.text))})}isLoggedIn(){return I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,_t(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,s,i)=>s===i.findIndex(a=>a.text===o.text))})}getPinnedMessages(t){return I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",_t(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,_t(t),{version:"v2"});return $e(n)})}knowledgeAssist(s,i,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_t({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(s=>s.text&&s.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let s=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(s,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(i.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,s=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(s)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",_t(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),s=o.match(Vx);if(!n||!s)return;let i=s[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[i];a&&n&&a!==n&&Z.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[i]=n})}};yi.exchangeTokenPromise=null;var bo=yi;var JP={startTime:null,stopTime:null},eA=e=>e.handlingTime,tA=ke({name:"handlingTime",initialState:JP,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(at,()=>JP)}}),{handlingTimeStart:nA,handlingTimeStop:lm,handlingTimeReset:rA}=tA.actions,oA=tA.reducer;var sA=(e={})=>{let t=S({onAuthError:sa(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var cm={list:{keywordMatches:[]},fetchState:"idle"};var vi=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,s=t.getState(),{showStyleSuggestions:i}=s.settings,a=(l=s.conversation.current)==null?void 0:l.profileCode;if(!i)return cm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),_F=ke({name:"styleSuggestions",initialState:cm,reducers:{},extraReducers:e=>{e.addCase(vi.pending,t=>{t.fetchState="loading"}).addCase(vi.rejected,t=>{t.fetchState="error"}).addCase(vi.fulfilled,(t,n)=>{t.fetchState="done",Yo(t.list,n.payload)||(t.list=n.payload)}).addCase(Ds,t=>{t.list=cm.list}).addCase(at,()=>cm)}}),iA=_F.reducer;var aA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:vi,debounce:500},e);return o=>s=>i=>{var p;let a=o.getState().input.text,l=s(i),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:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function DF(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var lA=(e={})=>{let t=S({getTextSuggestions:gr,getAutocompleteSuggestions:qc,debounce:200,check:Mr},e),n;return r=>o=>s=>{var g;let{input:i}=r.getState(),a=o(s),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,d=(g=l.conversation.current)==null?void 0:g.id,f=s.type===Op.toString();if(!d||!c&&!u)return a;let{input:p}=l;return DF(p,i)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=aa(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var cA=vi.fulfilled.toString();function FF(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let s=e.keywordMatches.filter(l=>l.keyword===o),i=t.keywordMatches.filter(l=>l.keyword===o),a=i.length-s.length;a<=0||r.push(...i.slice(0,a))}),r}var uA=e=>t=>n=>r=>{var c;if(r.type!==cA){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let s=t.getState(),i=s.styleSuggestions.list,a=(c=s.conversation)==null?void 0:c.current;if(o===i)return;let l=FF(o,i);r.type===cA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var zF=Qd({assistants:TT,auth:g1,conversation:k1,contentTypes:kT,passwordlessToken:xP,entities:Sk,handlingTime:oA,info:K1,input:z1,settings:l1,profile:LT,search:Z1,styleSuggestions:iA,ui:FR,textSuggestions:bR});function dA(e){return DE({reducer:zF,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(sA()).concat(lA({debounce:200})).concat(aA({debounce:500})).concat(uA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,s)=>o.concat(s),n)},preloadedState:e.preloadedState})}var HF=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},BF=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),s=Gl("inlineSuggestions")(o);switch(r.type){case sa.toString():{!r.payload&&e.emit("logout",void 0);break}case ur.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case no.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Ds.toString():e.logSendMessage(r.payload);break;case Nf.toString():e.emit("call-to-action",{cue:r.payload});break;case nr.fulfilled.toString():r.isBroadcasted||e.broadcast(Cy,r,!1);break;default:break}let i=n(r);switch(r.type){case Ds.toString():e.handleAfterSendMessage(r.payload);break;case Xc.toString():e.onUpdateShowTabHint(r.payload);break;case lm.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case gf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:HF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),s&&t.dispatch(Xo([]));break}case hf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Xo.toString():{s&&r.payload.length>0&&t.dispatch(yf(0));break}case oo.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return i},fA=BF;function O0(e){return e.toISOString().replace("T"," ").replace("Z","")}var UF=(e,t)=>t.version,pA=Dn([ca,Rr,eA,UF],(e,t,n,r)=>{if(!t)return Z.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:s}=n;return!o||!s?(Z.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:O0(o),timeStop:O0(s)}});function mA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:s}}=e.input,i=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:i,numPastes:r,suggestions:s}}function N0(e,t){var s;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return N0(r,t);let o=(s=e.ownerDocument.defaultView)==null?void 0:s.frameElement;return o?N0(o,t):null}function M0(e,t){return N0(e,t)}function gA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function VF(e){return typeof e=="object"&&e!==null&&"tagName"in e}function um(e){return VF(e)&&(fi(e)||Bp(e))}var yA,Fr=new Map,$F=["bottom","height","left","right","top","width"],hA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:$F.some(n=>e[n]!==t[n]);function vA(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,...vA(t)]:[]}function xA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var dm=!1,wA=()=>{dm=!0;let e=[];if(Fr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Fr.delete(n);return}let r=n.getBoundingClientRect();hA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(xA,t.rect):t.rect;hA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Fr.size===0){dm=!1;return}yA=window.requestAnimationFrame(wA)};function _0(e,t){let n=vA(e),r=[],o=n.map((s,i)=>_0(s,a=>{r[i]=a;let l=Fr.get(e);if(!l)return;let c=r.reduce(xA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(s=!0){if(o.forEach(i=>i.observe(!1)),Fr.has(e)){let i=Fr.get(e);i.callbacks.push(t),i.rect&&t(i.rect)}else Fr.set(e,{rect:void 0,callbacks:[t],parentRects:r});s&&!dm&&wA()},unobserve(){o.forEach(i=>i.unobserve());let s=Fr.get(e);if(s){let i=s.callbacks.indexOf(t);i>=0&&s.callbacks.splice(i,1),s.callbacks.length||Fr.delete(e),Fr.size||(cancelAnimationFrame(yA),dm=!1)}}}}var SA,zr=new Map,bA=()=>{zr.forEach((e,t)=>{if(!t.isConnected){zr.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(s=>s(e.visible)))}),zr.size!==0&&(SA=window.requestAnimationFrame(bA))};function EA(e,t){return{observe(){let n=zr.size===0;zr.has(e)?zr.get(e).callbacks.push(t):zr.set(e,{visible:void 0,callbacks:[t]}),n&&bA()},unobserve(){let n=zr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||zr.delete(e),zr.size||cancelAnimationFrame(SA)}}}}var D0=["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 F0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function $a(e){return Number.parseFloat(e)}function fm(e){return Math.round(e*1e6)}function TA(e){return e/1e6}function z0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=$a(e.width),s=$a(e.borderLeftWidth),i=$a(e.borderRightWidth),a=$a(e.paddingRight),l=TA(fm(o)-fm(s)-fm(i)),c=TA(fm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function lu(e,t={}){var u,d;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",ri(n);let r=window.getComputedStyle(e),o=!0,s=()=>{n.scrollTop=e.scrollTop};F0(r,n,D0),z0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",s));let i=EA(e,()=>{F0(r,n,D0),z0(r,e,n),s(),setTimeout(s,0)}),a,l=!0,c=_0(e,f=>{if(f===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),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(F0(r,n,D0),z0(r,e,n),s(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),g=$a(v.borderTopWidth),x=$a(v.borderBottomWidth),y=p.top+g-f.top,m=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),i.observe(),[n,()=>{e.removeEventListener("scroll",s),c.unobserve(),i.unobserve(),n.remove()}]}var CA=(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){Z.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function jF(e){return e.offsetParent!==null}function kA(e){if(!jF(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 pm(e,t,n=100){let r=kA(e);t({isVisible:r});let o=setInterval(()=>{let s=kA(e);s!==r&&(r=s,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var cu=class extends Error{},mm=class{constructor(){this.queues={}}push(t,n){let r=()=>{let s=this.queues[t][1];s?(this.queues[t]=[s.promise,null],s.resolve()):delete this.queues[t]};if(!this.queues[t]){let s=n().finally(r);return this.queues[t]=[s,null],s}this.queues[t][1]&&this.queues[t][1].reject(new cu("Queued async function is outdated"));let o=Promise.withResolvers();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};var WF={accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"},KF={accepted:"onConversationAcceptedAssistants","new-message":"onConversationNewMessageAssistants",ended:"onConversationEndedAssistants"},RA=(e,t)=>{let n=e[WF[t]];if(n)return[n];let r=e[KF[t]];return r&&r.length>0?r.map(o=>o.code):(Z.warn(`No assistant set in profile for conversation event "${t}"`),[])};var Le=b(R());var PA=CA("showTabHint",!0),ja=class ja{constructor({deepdeskUrl:t,version:n=ja.version||"unknown",locale:r="en-US",token:o,fetch:s,productName:i,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.queues=new mm;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new bo(l,{token:o,fetch:s}),this.version=n,this.instanceId=ja.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[fA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>PA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=dA(c),this.broadcastEvents=new ZP({debug:!0,deepdeskUrl:l,eventMap:J1(this.store),createCustomChannel:a}),this.store.dispatch(Xc(PA.value())),this.store.dispatch(uf({locale:r,adminUrl:l,productName:i}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=this.state.input.textSuggestions[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?(Z.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(Z.warn("Profile has not been loaded (yet)"),!0):(Z.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(sa(null)),this.store.dispatch(eo());let t=n=>$t(n)&&c1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(eo())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(vy({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(ff(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(pf({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(xy(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(wy(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(mf(t))).payload})}resetConversation(){this.store.dispatch(at()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(uf(t))}setVisitorInfo(t){this.store.dispatch($1(t))}setCustomData(t){this.store.dispatch(j1(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Xl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(by(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(Ey())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Op()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:s=!0,includeMetadata:i,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(nr({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:i,input:r,skipState:!s}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){Z.warn("Can't evaluate assistant when profile is not loaded yet.");return}let o=RA(r,t);yield Promise.all(o.map(s=>this.queues.push(s,()=>I(this,null,function*(){yield this.evaluateAssistant(s,S({includeMetadata:!0},n))})).catch(i=>{if(i instanceof cu){Z.warn(`Queued assistant "${s}" was outdated and dropped`);return}throw i})))})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return Z.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||Z.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(oo(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:s,selection:i}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(L1(Sy(t))),!Mr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||i&&(t.shiftKey||(this.store.dispatch(M1()),t.preventDefault()))},f=()=>{n||!u||a&&s<=0||i&&(t.shiftKey||(this.store.dispatch(_1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(yf(-1)),this.store.dispatch(os({collapse:!0})),this.store.dispatch(_R(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=la(this.state);if(!p)return;this.store.dispatch(Xc(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(os({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Xo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(Z.info("Start handling time"),this.store.dispatch(nA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(Z.info("Stop handling time"),this.store.dispatch(lm()))}logSendMessage(t){let n=mA(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=pA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(rA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Ds((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(F1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(s){Z.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),Z.error(s)}})}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(W1(t))}whenConversationLoaded(t){let n=o=>{var s;return(s=o.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[s,i]=lu(n,r);return s.setAttribute("translate","no"),s.dataset.testid=t,o&&s.classList.add(o),[s,i]}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 s=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,i=s?s.ownerDocument.defaultView:null;if(s&&(i===window||(i==null?void 0:i.parent)===window)){let[l,c]=lu(s,{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 ri(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),Z.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()?(Z.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(D1(r.metrics))):Z.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(!um(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ri(t),this.inputMediator=a||(fi(t)?new gi(t):new mi(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(vf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(O1(Sy(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(N1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(I1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(xf(p))},500):this.store.dispatch(xf(p))}),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(_p(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(_p(!0))}),this.renderSuggestions(t,c),this.subscribe(Gl("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(xf(this.inputMediator.getSelection())),this.store.dispatch(_p(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}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;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(s=>s()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(s=this.aboveSuggestions)==null||s.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),s=(0,fs.createRoot)(o);s.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(WR,{})})}));let i=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",i),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",i),s.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s}=n,i=o&&M0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",i||t,{appendTo:s,closestScrollElement:i,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",i||t,{appendTo:s},r==null?void 0:r.suggestionsRootNode),d=(0,fs.createRoot)(a);d.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(hP,{inputElement:t})})}));let f=(0,fs.createRoot)(c);return f.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(eP,{onLogIn:()=>this.loginViaPopup().catch(p=>Z.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s,floatingMenuParent:i}=n,a=o&&M0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:i!=null?i:s},r==null?void 0:r.floatingMenuParent),u=(0,fs.createRoot)(l);return u.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(NR,{onLogIn:()=>this.loginViaPopup().catch(d=>Z.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,fs.createRoot)(r);return o.render((0,Le.jsx)(is,{store:this.store,customStyles:n,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(PR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&Z.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:s}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:s}),this.widgetRoot=(0,fs.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(KP,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(i=>Z.warn(i.message))})})})),this.whenConversationLoaded(()=>{var i;this.broadcastEvents.setExternalId((i=this.state.conversation.current)==null?void 0:i.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:s}=r,i=(0,fs.createRoot)(n);return i.render((0,Le.jsx)(is,{store:this.store,customStyles:o,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(T0,{children:(0,Le.jsxs)(rm,{assistantCode:t,initialQuestion:s,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Hs:Bs,children:[(0,Le.jsx)(Ti,{children:(0,Le.jsx)(sm,{title:r.title,emptyState:r.emptyState})}),(0,Le.jsx)(E0,{children:(0,Le.jsx)(om,{})})]})})})})),{unmount(){i.unmount()}}}setupHandlingTime(t){let n=pm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){gA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(mc());let t=Us(this.state);t&&this.store.dispatch(uf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{let o=new MessageChannel,s=o.port1,i=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${i}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",d),clearInterval(f)};s.onmessage=p=>I(this,null,function*(){var v,g;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(Zl),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}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 d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){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){Z.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&Z.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(Z.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;Z.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=gc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(ur()):Au.includes(r)||this.store.dispatch(gr(r))})}catch(r){this.handleError(r)}})}};ja.version="17.0.1-beta.0",ja.count=0;var uu=ja;function GF(e){return I(this,null,function*(){var o,s,i;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(i=(s=e.mimeType)!=null?s:n.headers.get("Content-Type"))!=null?i:"image/jpeg"})})}function AA(e,t){return I(this,null,function*(){let n=yield GF(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 IA(e,t,n){return I(this,null,function*(){yield new bo(e).authenticateWithKey(t,n)})}function LA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function OA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:s}=e,{start:i,end:a}=(d=n.replace)!=null?d:{start:0,end:s.length},l=`${s.slice(0,i)}${t}${s.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:i+t.length,end:i+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 NA(r,o){return I(this,arguments,function*(e,t,n={}){let s=n.replace?us(e,n.replace.start,n.replace.end):Ba(e),i,a=()=>{if(n.setRange)return n.setRange(s.cloneRange());s.deleteContents(),i=document.createElement("span"),s.insertNode(i),n.insertBRs!==!1?t.split(`
|
|
83
|
+
`).reverse().forEach((l,c)=>{c>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(l))}):s.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?us(e,n.selectionAfter.start,n.selectionAfter.end):(s.collapse(!1),s),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!i)return;i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}function qF(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 YF(e){let t=document.createDocumentFragment();return e.split(`
|
|
84
|
+
`).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},s=0;for(;o=n.slice(s).match(/(\[([^\]]+)])\(([^)]+)\)/);){let i=document.createElement("a");i.href=o[3],i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"),i.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(s,s+o.index))),t.appendChild(i),s=s+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(s)))}),t}function MA(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):MA(n,t)}function _A(o,s){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let i;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var f;let l=(f=e.ownerDocument.defaultView)!=null?f: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;i=document.createElement("span"),u.insertNode(i);let d=r?qF(t):YF(t);n?MA(u.startContainer,d):(u.insertNode(d),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!i)try{i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}return YA(XF);})();
|
|
85
85
|
/*! Bundled license information:
|
|
86
86
|
|
|
87
87
|
classnames/index.js:
|